query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
protected Map<String, OperationTransformer> buildOperationTransformers(AttributeTransformationDescriptionBuilderImpl.AttributeTransformationDescriptionBuilderRegistry registry) {
final Map<String, OperationTransformer> operations = new HashMap<String, OperationTransformer>();
for(final Map.Entry<String, OperationTransformationEntry> entry: operationTransformers.entrySet()) {
final OperationTransformer transformer = entry.getValue().getOperationTransformer(registry);
operations.put(entry.getKey(), transformer);
}
return operations;
} | [
"Build the operation transformers.\n\n@param registry the shared resource registry\n@return the operation transformers"
] | [
"Use this API to fetch dnstxtrec resource of given name .",
"Associate a name with an object and make it persistent.\nAn object instance may be bound to more than one name.\nBinding a previously transient object to a name makes that object persistent.\n@param object The object to be named.\n@param name The name to be given to the object.\n@exception org.odmg.ObjectNameNotUniqueException\nIf an attempt is made to bind a name to an object and that name is already bound\nto an object.",
"This filter adds rounded corners to the image using the specified color as the background.\n\n@param radiusInner amount of pixels to use as radius.\n@param radiusOuter specifies the second value for the ellipse used for the radius. Use 0 for\nno value.\n@param color fill color for clipped region.",
"BuildInteractiveObjectFromAnchor is a special type of interactive object in that it does not get\nbuilt using ROUTE's.\n\n@param anchorSensor is the Sensor that describes the sensor set to an Anchor\n@param anchorDestination is either another Viewpoint, url to a web site or another x3d scene",
"Print a duration value.\n\n@param value Duration instance\n@return string representation of a duration",
"get the ClassTypeSignature corresponding to given parameterized type\n\n@param parameterizedType\n@return",
"Read in the configuration properties.",
"Pops the top of the stack of active elements if the current position in the call stack corresponds to the one\nthat pushed the active elements.\n\n<p>This method does not do any type checks, so take care to retrieve the elements with the same types used to push\nto them onto the stack.\n\n@param <T> the type of the elements\n\n@return the active elements or null if the current call stack did not push any active elements onto the stack",
"Add a note to a photo. The Note object bounds and text must be specified.\n\n@param photoId\nThe photo ID\n@param note\nThe Note object\n@return The updated Note object"
] |
public static final Date getTimestampFromTenths(byte[] data, int offset)
{
long ms = ((long) getInt(data, offset)) * 6000;
return (DateHelper.getTimestampFromLong(EPOCH + ms));
} | [
"Reads a combined date and time value expressed in tenths of a minute.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value"
] | [
"Writes back hints file.",
"Inserts an array of Parcelable values into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value an array of Parcelable objects, or null\n@return this bundler instance to chain method calls",
"Gets a list of registered docker images from the images cache, if it has been\nregistered to the cache for a specific build-info ID and if a docker manifest has been captured for it\nby the build-info proxy.\nAdditionally, the methods also removes the returned images from the cache.\n@param buildInfoId\n@return",
"Resolves the package type from the maven project.\n\n@param project the maven project\n\n@return the package type",
"Register this broker in ZK for the first time.",
"Constructs a string representing this address according to the given parameters\n\n@param keepMixed if this address was constructed from a string with mixed representation (a:b:c:d:e:f:1.2.3.4), whether to keep it that way (ignored if makeMixed is true in the params argument)\n@param params the parameters for the address string",
"refresh all deliveries dependencies for a particular product",
"Adds the given property and value to the constructed reference.\n\n@param propertyIdValue\nthe property to add\n@param value\nthe value to add\n@return builder object to continue construction",
"Checks the preconditions for creating a new RequireSubStr processor with a List of Strings.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif requiredSubStrings or one of its elements is null\n@throws IllegalArgumentException\nif requiredSubStrings is empty"
] |
public void setInRGB(IntRange inRGB) {
this.inRed = inRGB;
this.inGreen = inRGB;
this.inBlue = inRGB;
CalculateMap(inRGB, outRed, mapRed);
CalculateMap(inRGB, outGreen, mapGreen);
CalculateMap(inRGB, outBlue, mapBlue);
} | [
"Set RGB input range.\n\n@param inRGB Range."
] | [
"Helper to read an optional String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read.",
"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",
"Old REST client uses old REST service",
"Get the group URL for the specified group ID\n\n@param groupId\nThe group ID\n@return The group URL\n@throws FlickrException",
"Create a temporary directory under a given workspace",
"Computes the likelihood of the random draw\n\n@return The likelihood.",
"Get object by identity. First lookup among objects registered in the\ntransaction, then in persistent storage.\n@param id The identity\n@return The object\n@throws PersistenceBrokerException",
"convert a param object to a multimap.\n\n@param objectParams the parameters to convert.\n@return the corresponding Multimap.",
"Make a copy of this Area of Interest."
] |
public Stats getCollectionStats(String collectionId, Date date) throws FlickrException {
return getStats(METHOD_GET_COLLECTION_STATS, "collection_id", collectionId, date);
} | [
"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\""
] | [
"Call the constructor for the given class, inferring the correct types for\nthe arguments. This could be confusing if there are multiple constructors\nwith the same number of arguments and the values themselves don't\ndisambiguate.\n\n@param klass The class to construct\n@param args The arguments\n@return The constructed value",
"Returns the compact project records for all projects in the workspace.\n\n@param workspace The workspace or organization to find projects in.\n@return Request object",
"Rehashes the contents of the receiver into a new table\nwith a smaller or larger capacity.\nThis method is called automatically when the\nnumber of keys in the receiver exceeds the high water mark or falls below the low water mark.",
"Declaration of the variable within a block",
"Inverts the value of the bit at the specified index.\n@param index The bit to flip (0 is the least-significant bit).\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string.",
"Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nunless we have a metadata cache available for the specified media slot, in which case that will be used instead.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n\n@return the metadata, if any",
"Awaits at most 5 minutes until all pods meets the given predicate.\n\n@param filter used to wait to detect that a pod is up and running.",
"Format a date that is parseable from JavaScript, according to ISO-8601.\n\n@param date the date to format to a JSON string\n@return a formatted date in the form of a string",
"get string from post stream\n\n@param is\n@param encoding\n@return"
] |
public static void columnMaxAbs( DMatrixSparseCSC A , double []values ) {
if( values.length < A.numCols )
throw new IllegalArgumentException("Array is too small. "+values.length+" < "+A.numCols);
for (int i = 0; i < A.numCols; i++) {
int idx0 = A.col_idx[i];
int idx1 = A.col_idx[i+1];
double maxabs = 0;
for (int j = idx0; j < idx1; j++) {
double v = Math.abs(A.nz_values[j]);
if( v > maxabs )
maxabs = v;
}
values[i] = maxabs;
}
} | [
"Finds the maximum abs in each column of A and stores it into values\n@param A (Input) Matrix\n@param values (Output) storage for column max abs"
] | [
"Remove any device announcements that are so old that the device seems to have gone away.",
"Measure all children from container if needed\n@param measuredChildren the list of measured children\nmeasuredChildren list can be passed as null if it's not needed to\ncreate the list of the measured items\n@return true if the layout was recalculated, otherwise - false",
"Set the amount of offset between child objects and parent.\n@param axis {@link Axis}\n@param offset",
"Use this API to unset the properties of gslbservice resources.\nProperties that need to be unset are specified in args array.",
"Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance",
"This may cost twice what it would in the original Map because we have to find\nthe original value for this key.\n\n@param key key with which the specified value is to be associated.\n@param value value to be associated with the specified key.\n@return previous value associated with specified key, or <tt>null</tt>\nif there was no mapping for key. A <tt>null</tt> return can\nalso indicate that the map previously associated <tt>null</tt>\nwith the specified key, if the implementation supports\n<tt>null</tt> values.",
"Handles incoming Send Data Request. Send Data request are used\nto acknowledge or cancel failed messages.\n@param incomingMessage the request message to process.",
"Exports json encoded content to CrashReport object\n\n@param json valid json body.\n@return new instance of CrashReport",
"Copy the contents of the given String to the given output Writer.\nCloses the writer when done.\n@param in the String to copy from\n@param out the Writer to copy to\n@throws IOException in case of I/O errors"
] |
public KeyChangeResult handleKeyChange(EntryChangeEvent event, boolean allLanguages) {
if (m_keyset.getKeySet().contains(event.getNewValue())) {
m_container.getItem(event.getItemId()).getItemProperty(TableProperty.KEY).setValue(event.getOldValue());
return KeyChangeResult.FAILED_DUPLICATED_KEY;
}
if (allLanguages && !renameKeyForAllLanguages(event.getOldValue(), event.getNewValue())) {
m_container.getItem(event.getItemId()).getItemProperty(TableProperty.KEY).setValue(event.getOldValue());
return KeyChangeResult.FAILED_FOR_OTHER_LANGUAGE;
}
return KeyChangeResult.SUCCESS;
} | [
"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."
] | [
"return the workspace size needed for ctc",
"Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nrequest queue.",
"Given a binary expression corresponding to an assignment, will check that the type of the RHS matches one\nof the possible setters and if not, throw a type checking error.\n@param expression the assignment expression\n@param leftExpression left expression of the assignment\n@param rightExpression right expression of the assignment\n@param setterInfo possible setters\n@return true if type checking passed",
"Returns an iterable containing all the enterprise users that matches the filter and specifies which child fields\nto retrieve from the API.\n@param api the API connection to be used when retrieving the users.\n@param filterTerm used to filter the results to only users starting with this string in either the name or the\nlogin. Can be null to not filter the results.\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing all the enterprise users that matches the filter.",
"This method extracts data for a single resource from a Planner file.\n\n@param plannerResource Resource data",
"Removes the given entity from the inverse associations it manages.",
"Method generates abbreviated exception message.\n\n@param message\nOriginal log message\n@param throwable\nThe attached throwable\n@return Abbreviated exception message",
"Provides the results of a QR decomposition. These will be modified by adding or removing\nrows from the original 'A' matrix.\n\n@param Q The Q matrix which is to be modified. Is modified later and reference saved.\n@param R The R matrix which is to be modified. Is modified later and reference saved.",
"Extracts the value of this bit flag from the supplied byte array\nand sets the value in the supplied container.\n\n@param container container\n@param data byte array"
] |
public static void unregisterContextualInstance(EjbDescriptor<?> descriptor) {
Set<Class<?>> classes = CONTEXTUAL_SESSION_BEANS.get();
classes.remove(descriptor.getBeanClass());
if (classes.isEmpty()) {
CONTEXTUAL_SESSION_BEANS.remove();
}
} | [
"Indicates that contextual session bean instance has been constructed."
] | [
"This method writes data for a single calendar to an MSPDI file.\n\n@param bc Base calendar data\n@return New MSPDI calendar instance",
"Creates a region from a name and a label.\n\n@param name the uniquely identifiable name of the region\n@param label the label of the region\n@return the newly created region",
"Use this API to delete onlinkipv6prefix of given name.",
"Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus",
"Adds all fields declared directly in the object's class to the output\n@return this",
"Adds tags to the If-Match header.\n\n@param tag the tag to add, may be null. This means the same as adding {@link Tag#ALL}\n@throws IllegalArgumentException if ALL is supplied more than once, or you add a null tag more than once.\n@return a new Conditionals object with the If-Match tag added.",
"Start pushing the element off to the right.",
"Exceptions specific to each operation is handled in the corresponding\nsubclass. At this point we don't know the reason behind this exception.\n\n@param exception",
"Add properties to 'properties' map on transaction start\n@param type - of transaction"
] |
public static <T> Collection<T> diff(Collection<T> list1, Collection<T> list2) {
Collection<T> diff = new ArrayList<T>();
for (T t : list1) {
if (!list2.contains(t)) {
diff.add(t);
}
}
return diff;
} | [
"all objects in list1 that are not in list2\n\n@param <T>\n@param list1\nFirst collection\n@param list2\nSecond collection\n@return The collection difference list1 - list2"
] | [
"Converts the given string to a clob object\n\n@param stringName string name to clob\n@param sqlConnection Connection object\n@return Clob object or NULL",
"Create a set containing all the processors in the graph.",
"note this string is used by hashCode",
"Set the color for each total for the column\n@param column the number of the column (starting from 1)\n@param color",
"Either gets an existing lock on the specified resource or creates one if none exists.\nThis methods guarantees to do this atomically.\n\n@param resourceId the resource to get or create the lock on\n@param isolationId the isolation level identity key. See {@link CommonsOJBLockManager}.\n@return the lock for the specified resource",
"Get the bounding-box containing all features of all layers.",
"Use this API to unset the properties of bridgetable resource.\nProperties that need to be unset are specified in args array.",
"Delete an object.",
"Classify the tokens in a String. Each sentence becomes a separate document.\nDoesn't override default readerAndWriter.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap})."
] |
protected boolean shouldApplyThisRuleTo(ClassNode classNode) {
// TODO Consider caching applyTo, doNotApplyTo and associated WildcardPatterns
boolean shouldApply = true;
String applyTo = getApplyToClassNames();
String doNotApplyTo = getDoNotApplyToClassNames();
if (applyTo != null && applyTo.length() > 0) {
WildcardPattern pattern = new WildcardPattern(applyTo, true);
shouldApply = pattern.matches(classNode.getNameWithoutPackage()) || pattern.matches(classNode.getName());
}
if (shouldApply && doNotApplyTo != null && doNotApplyTo.length() > 0) {
WildcardPattern pattern = new WildcardPattern(doNotApplyTo, true);
shouldApply = !pattern.matches(classNode.getNameWithoutPackage()) && !pattern.matches(classNode.getName());
}
return shouldApply;
} | [
"Return true if this rule should be applied for the specified ClassNode, based on the\nconfiguration of this rule.\n@param classNode - the ClassNode\n@return true if this rule should be applied for the specified ClassNode"
] | [
"Add SQL to handle a unique=true field. THis is not for uniqueCombo=true.",
"Adds OPT_N | OPT_NODE option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Write file creation record.\n\n@throws IOException",
"This method retrieves a double of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required double data",
"Fall-back for types that are not handled by a subclasse's dispatch method.",
"Displays a sample model for the report request.\n@return A string describing the structure of a certain report execution",
"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.",
"Classify the tokens in a String. Each sentence becomes a separate document.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap}).",
"Set the \"everyWorkingDay\" flag.\n@param isEveryWorkingDay flag, indicating if the event should take place every working day."
] |
public int scrollToPage(int pageNumber) {
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "scrollToPage pageNumber = %d mPageCount = %d",
pageNumber, mPageCount);
if (mSupportScrollByPage &&
(mScrollOver || (pageNumber >= 0 && pageNumber <= mPageCount - 1))) {
scrollToItem(getFirstItemIndexOnPage(pageNumber));
} else {
Log.w(TAG, "Pagination is not enabled!");
}
return mCurrentItemIndex;
} | [
"Scroll to specific page. The final page might be different from the requested one if the\nrequested page is larger than the last page. To process the scrolling by pages\nLayoutScroller must be constructed with a pageSize greater than zero.\n@param pageNumber page to scroll to\n@return the new current item after the scrolling processed."
] | [
"Register a new SingleServiceWrapperInterceptor for the bean being\nwrapped, associate it with the PerformanceMonitor and tell it which methods\nto intercept.\n\n@param source An Attribute node from the spring configuration\n@param beanName The name of the bean that this performance monitor is wrapped around\n@param registry The registry where all the spring beans are registered",
"This method extracts data for a single calendar from a Phoenix file.\n\n@param calendar calendar data",
"Attempts exclusive acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success.",
"Takes a model and an SCXMLFrontier and decomposes the Frontier into a Map of Strings to Strings\nThese strings can be sent over a network to get a Frontier past a 'gap'\n\n@param frontier the Frontier\n@param modelText the model\n@return the map of strings representing a decomposition",
"Creates a new indirection handler instance.\n\n@param brokerKey The associated {@link PBKey}.\n@param id The subject's ids\n@return The new instance",
"Set the meta data for the photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param title\nThe new title\n@param description\nThe new description\n@throws FlickrException",
"Gets a color formatted as an integer with ARGB ordering.\n\n@param json {@link JSONObject} to get the color from\n@param elementName Name of the color element\n@return An ARGB formatted integer\n@throws JSONException",
"Build copyright map once.",
"Returns the output path specified on the javadoc options"
] |
public static int getId(Context context, String id) {
final String defType;
if (id.startsWith("R.")) {
int dot = id.indexOf('.', 2);
defType = id.substring(2, dot);
} else {
defType = "drawable";
}
Log.d(TAG, "getId(): id: %s, extracted type: %s", id, defType);
return getId(context, id, defType);
} | [
"Parses the resource String id and get back the int res id\n@param context\n@param id String resource id\n@return int resource id"
] | [
"The parameter must never be null\n\n@param queryParameters",
"Returns if this maps the specified cell.\n\n@param cell the cell name\n@return {@code true} if this maps the column, {@code false} otherwise",
"Gets the Json Array representation of the given list of strings.\n@param keys List of strings\n@return the JsonArray represents the list of keys",
"Calculate a shift value that can be used to create a power-of-two value between\nthe specified maximum and minimum values.\n@param minimumValue the minimum value\n@param maximumValue the maximum value\n@return the calculated shift (use {@code 1 << shift} to obtain a value)",
"Creates a Set out of the given keys\n\n@param <K> the key type\n@param keys\nthe keys\n@return a Set containing the given keys",
"Write an unsigned short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at",
"Sets the proxy class to be used.\n@param newProxyClass java.lang.Class",
"Populate time ranges.\n\n@param ranges time ranges from a Synchro table\n@param container time range container",
"Returns a flag indicating if also expired resources should be found.\n@return A flag indicating if also expired resources should be found."
] |
protected Path createTempDirectory(String prefix) {
try {
return Files.createTempDirectory(tempDirectory, prefix);
} catch (IOException e) {
throw new AllureCommandException(e);
}
} | [
"Creates an temporary directory. The created directory will be deleted when\ncommand will ended."
] | [
"Use this API to fetch lbvserver_cachepolicy_binding resources of given name .",
"Splits data into blocks, adds error correction and then interleaves the blocks and error correction data.",
"Finds the most recent dump of the given type that is actually available.\n\n@param dumpContentType\nthe type of the dump to look for\n@return most recent main dump or null if no such dump exists",
"Creates an immutable singleton instance.\n\n@param key\n@param value\n@return",
"Runs the record linkage process.",
"Use this API to add policydataset.",
"Closes off this connection\n@param connection to close",
"At the moment we only support the case where one entity type is returned",
"Obtains a Accounting local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting local date-time, not null\n@throws DateTimeException if unable to create the date-time"
] |
@ViewChanged
public synchronized void onViewChangeEvent(ViewChangedEvent event) {
if (logger.isDebugEnabled()) {
logger.debug("onViewChangeEvent : pre[" + event.isPre() + "] : event local address[" + event.getCache().getLocalAddress() + "]");
}
final List<Address> oldView = currentView;
currentView = new ArrayList<Address>(event.getNewView().getMembers());
final Address localAddress = getLocalAddress();
//just a precaution, it can be null!
if (oldView != null) {
final Cache jbossCache = mobicentsCache.getJBossCache();
final Configuration config = jbossCache.getConfiguration();
final boolean isBuddyReplicationEnabled = config.getBuddyReplicationConfig() != null && config.getBuddyReplicationConfig().isEnabled();
// recover stuff from lost members
Runnable runnable = new Runnable() {
public void run() {
for (Address oldMember : oldView) {
if (!currentView.contains(oldMember)) {
if (logger.isDebugEnabled()) {
logger.debug("onViewChangeEvent : processing lost member " + oldMember);
}
for (FailOverListener localListener : failOverListeners) {
ClientLocalListenerElector localListenerElector = localListener.getElector();
if (localListenerElector != null && !isBuddyReplicationEnabled) {
// going to use the local listener elector instead, which gives results based on data
performTakeOver(localListener,oldMember,localAddress, true, isBuddyReplicationEnabled);
}
else {
List<Address> electionView = getElectionView(oldMember);
if(electionView!=null && elector.elect(electionView).equals(localAddress))
{
performTakeOver(localListener, oldMember, localAddress, false, isBuddyReplicationEnabled);
}
cleanAfterTakeOver(localListener, oldMember);
}
}
}
}
}
};
Thread t = new Thread(runnable);
t.start();
}
} | [
"Method handle a change on the cluster members set\n@param event"
] | [
"Checks if this has the passed suffix\n\n@param suffix is a Bytes object to compare to this\n@return true or false\n@since 1.1.0",
"we only use the registrationList map if the object is not a proxy. During the\nreference locking, we will materialize objects and they will enter the registered for\nlock map.",
"Initialize new instance\n@param instance\n@param logger\n@param auditor",
"Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string",
"Sets the protocol.\n@param protocol The protocol to be set.",
"Use this API to fetch auditsyslogpolicy_systemglobal_binding resources of given name .",
"Get MultiJoined ClassDescriptors\n@param cld",
"Inserts the specified array into the specified original array at the specified index.\n\n@param original the original array into which we want to insert another array\n@param index the index at which we want to insert the array\n@param inserted the array that we want to insert\n@return the combined array",
"Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement"
] |
public long getTimeRemainingInMillis()
{
long batchTime = System.currentTimeMillis() - startTime;
double timePerIteration = (double) batchTime / (double) worked.get();
return (long) (timePerIteration * (total - worked.get()));
} | [
"Gets the estimated time remaining in milliseconds based upon the total number of work units, the start time, and how many units have been done\nso far.\n\nThis should not be called before any work units have been done."
] | [
"Inserts a String value into the mapping of the underlying Bundle, replacing any existing value\nfor the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a String, or null\n@return this bundler instance to chain method calls",
"Detect new objects.",
"This will blur the view behind it and set it in\na imageview over the content with a alpha value\nthat corresponds to slideOffset.",
"Check the version to assure it is allowed.\n\n@param pluginName plugin name which needs the dependency\n@param dependency dependency which needs to be verified\n@param requestedVersion requested/minimum version\n@param availableVersion available version\n@return version check problem or empty string when all is fine",
"Open the connection to the server.\n\n@param url the url to connect to\n@return returns the input stream for the connection\n@throws IOException cannot get result",
"Configure all UI elements in the \"ending\"-options panel.",
"Set default value with\n\n@param iso ISO2 of country",
"Transfer the ownership of an application to another user.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param to Username of the person to transfer the app to. This is usually in the form of \"[email protected]\".",
"Extracts the service name from a Server.\n@param server\n@return"
] |
public boolean detectOperaMobile() {
if ((userAgent.indexOf(engineOpera) != -1)
&& ((userAgent.indexOf(mini) != -1) || (userAgent.indexOf(mobi) != -1))) {
return true;
}
return false;
} | [
"Detects Opera Mobile or Opera Mini.\n@return detection of an Opera browser for a mobile device"
] | [
"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>",
"Add query part for the facet, without filters.\n@param query The query part that is extended for the facet",
"Set the values using the specified Properties object.\n\n@param properties Properties object containing specific property values\nfor the RESTClient config\n\nNote: We're using the same property names as that in ClientConfig\nfor backwards compatibility.",
"Puts strings inside quotes and numerics are left as they are.\n@param str\n@return",
"This method returns the actual raw class associated with the specified\ntype.",
"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",
"returns IsolationLevel literal as matching\nto the corresponding id\n@return the IsolationLevel literal",
"Returns true if super class of the parameter exists and is abstract and package private. In such case we want to omit such method.\n\nSee WELD-2507 and Oracle issue - https://bugs.java.com/view_bug.do?bug_id=6342411\n\n@return true if the super class exists and is abstract and package private",
"Recovers the state of synchronization for a namespace in case a system failure happened.\nThe goal is to revert the namespace to a known, good state. This method itself is resilient\nto failures, since it doesn't delete any documents from the undo collection until the\ncollection is in the desired state with respect to those documents."
] |
protected boolean lacksSomeLanguage(ItemDocument itemDocument) {
for (int i = 0; i < arabicNumeralLanguages.length; i++) {
if (!itemDocument.getLabels()
.containsKey(arabicNumeralLanguages[i])) {
return true;
}
}
return false;
} | [
"Returns true if the given item document lacks a label for at least one of\nthe languages covered.\n\n@param itemDocument\n@return true if some label is missing"
] | [
"Runs the print.\n\n@param args the cli arguments\n@throws Exception",
"Apply modifications to a content task definition.\n\n@param patchId the patch id\n@param modifications the modifications\n@param definitions the task definitions\n@param filter the content item filter",
"Returns the result of the performed spellcheck formatted in JSON.\n\n@param request The CmsSpellcheckingRequest.\n@return JSONObject that contains the result of the performed spellcheck.",
"Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"copy\"\n@param jsonObject of Link\n@return String",
"Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance",
"rollback the transaction",
"The mediator registration config. If it contains default config and definitions,\nthen the dynamic config will be initialized with those values.\n\n@see org.openhim.mediator.engine.RegistrationConfig\n@see #getDynamicConfig()",
"Retrieves state and metrics information for individual channel.\n\n@param name channel name\n@return channel information",
"Initialize the style generators for the messages table."
] |
private Renderer createRenderer(T content, ViewGroup parent) {
int prototypeIndex = getPrototypeIndex(content);
Renderer renderer = getPrototypeByIndex(prototypeIndex).copy();
renderer.onCreate(content, layoutInflater, parent);
return renderer;
} | [
"Create a Renderer getting a copy from the prototypes collection.\n\n@param content to render.\n@param parent used to inflate the view.\n@return a new renderer."
] | [
"Populates a resource availability table.\n\n@param table resource availability table\n@param data file data",
"Creates a curator built using the given zookeeper connection string and timeout",
"Retrieve a UUID from an input stream.\n\n@param is input stream\n@return UUID instance",
"Use this API to fetch authenticationtacacspolicy_systemglobal_binding resources of given name .",
"Use this API to fetch appfwprofile_denyurl_binding resources of given name .",
"Multiply two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the multiply of specified complex numbers.",
"Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception",
"Visit an open package of the current module.\n\n@param packaze the qualified name of the opened package.\n@param access the access flag of the opened package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can use deep\nreflection to the classes of the open package or\n<tt>null</tt>.",
"Returns a string representation of the receiver, containing\nthe String representation of each key-value pair, sorted ascending by value."
] |
public void validateOperation(final ModelNode operation) {
if (operation == null) {
return;
}
final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
final String name = operation.get(OP).asString();
OperationEntry entry = root.getOperationEntry(address, name);
if (entry == null) {
throwOrWarnAboutDescriptorProblem(ControllerLogger.ROOT_LOGGER.noOperationEntry(name, address));
}
//noinspection ConstantConditions
if (entry.getType() == EntryType.PRIVATE || entry.getFlags().contains(OperationEntry.Flag.HIDDEN)) {
return;
}
if (entry.getOperationHandler() == null) {
throwOrWarnAboutDescriptorProblem(ControllerLogger.ROOT_LOGGER.noOperationHandler(name, address));
}
final DescriptionProvider provider = getDescriptionProvider(operation);
final ModelNode description = provider.getModelDescription(null);
final Map<String, ModelNode> describedProperties = getDescribedRequestProperties(operation, description);
final Map<String, ModelNode> actualParams = getActualRequestProperties(operation);
checkActualOperationParamsAreDescribed(operation, describedProperties, actualParams);
checkAllRequiredPropertiesArePresent(description, operation, describedProperties, actualParams);
checkParameterTypes(description, operation, describedProperties, actualParams);
//TODO check ranges
} | [
"Validates an operation against its description provider\n\n@param operation The operation to validate\n@throws IllegalArgumentException if the operation is not valid"
] | [
"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",
"Returns an empty model of a Dependency in Json\n\n@return String\n@throws IOException",
"Use this API to fetch authenticationvserver_authenticationtacacspolicy_binding resources of given name .",
"Creates a new remote proxy controller using an existing channel.\n\n@param channelAssociation the channel association\n@param pathAddress the address within the model of the created proxy controller\n@param addressTranslator the translator to use translating the address for the remote proxy\n@return the proxy controller\n\n@deprecated only present for test case use",
"Remove a license from an artifact\n\n@param gavc String The artifact GAVC\n@param licenseId String The license id to be removed.",
"Creates a tar file entry with defaults parameters.\n@param fileName the entry name\n@return file entry with reasonable defaults",
"Commit all written data to the physical disk\n\n@throws IOException any io exception",
"Checks whether the given set of properties is available.\n\n@param keys the keys to check\n@return true if all properties are available, false otherwise",
"Executes the given supplier within the context of a read lock.\n\n@param <E> The result type.\n@param sup The supplier.\n@return The result of {@link Supplier#get()}."
] |
public static <T> T withStreams(Socket socket, @ClosureParams(value=SimpleType.class, options={"java.io.InputStream","java.io.OutputStream"}) Closure<T> closure) throws IOException {
InputStream input = socket.getInputStream();
OutputStream output = socket.getOutputStream();
try {
T result = closure.call(new Object[]{input, output});
InputStream temp1 = input;
input = null;
temp1.close();
OutputStream temp2 = output;
output = null;
temp2.close();
return result;
} finally {
closeWithWarning(input);
closeWithWarning(output);
}
} | [
"Passes the Socket's InputStream and OutputStream to the closure. The\nstreams will be closed after the closure returns, even if an exception\nis thrown.\n\n@param socket a Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.2"
] | [
"Convert a name into initials.\n\n@param name source name\n@return initials",
"Prepares all files added for tus uploads.\n\n@param assemblyUrl the assembly url affiliated with the tus upload.\n@throws IOException when there's a failure with file retrieval.\n@throws ProtocolException when there's a failure with tus upload.",
"Finds an entity given its primary key.\n\n@throws RowNotFoundException\nIf no such object was found.\n@throws TooManyRowsException\nIf more that one object was returned for the given ID.",
"Concatenates of list of Bytes objects to create a byte array\n\n@param listOfBytes Bytes objects to concatenate\n@return Bytes",
"This method retrieves a Duration instance representing the amount of\nwork between two dates based on this calendar.\n\n@param startDate start date\n@param endDate end date\n@param format required duration format\n@return amount of work",
"Returns the list of user defined attribute names.\n\n@return the list of user defined attribute names, if there are none it returns an empty set.",
"Embeds the given SVG element into a new SVG element scaling the graphic to the given dimension and\napplying the given rotation.",
"An invalid reference or references. The verification of the digest of a\nreference failed. This can be caused by a change to the referenced data\nsince the signature was generated.\n\n@param aInvalidReferences\nThe indices to the invalid references.\n@return Result object",
"Lift a Java Func2 to a Scala Function2\n\n@param f the function to lift\n\n@returns the Scala function"
] |
public static BoxTermsOfService.Info create(BoxAPIConnection api,
BoxTermsOfService.TermsOfServiceStatus termsOfServiceStatus,
BoxTermsOfService.TermsOfServiceType termsOfServiceType, String text) {
URL url = ALL_TERMS_OF_SERVICES_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, "POST");
JsonObject requestJSON = new JsonObject()
.add("status", termsOfServiceStatus.toString())
.add("tos_type", termsOfServiceType.toString())
.add("text", text);
request.setBody(requestJSON.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
BoxTermsOfService createdTermsOfServices = new BoxTermsOfService(api, responseJSON.get("id").asString());
return createdTermsOfServices.new Info(responseJSON);
} | [
"Creates a new Terms of Services.\n@param api the API connection to be used by the resource.\n@param termsOfServiceStatus the current status of the terms of services. Set to \"enabled\" or \"disabled\".\n@param termsOfServiceType the scope of terms of service. Set to \"external\" or \"managed\".\n@param text the text field of terms of service containing terms of service agreement info.\n@return information about the Terms of Service created."
] | [
"and class as property",
"Get the bounding box for a certain tile.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns the bounding box for the tile, expressed in the layer's coordinate system.",
"Formats the supplied value using the specified DateTimeFormat.\n\n@return \"\" if the value is null",
"Overridden to ensure that our timestamp handling is as expected",
"Returns width and height that allow the given source width, height to fit inside the target width, height\nwithout losing aspect ratio",
"Extracts the version id from a string\n\n@param versionDir The string\n@return Returns the version id of the directory, else -1",
"Drop down selected view\n\n@param position position of selected item\n@param convertView View of selected item\n@param parent parent of selected view\n@return convertView",
"Use this API to fetch a systemglobal_authenticationldappolicy_binding resources.",
"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"
] |
public SqlStatement getPreparedUpdateStatement(ClassDescriptor cld)
{
SqlForClass sfc = getSqlForClass(cld);
SqlStatement result = sfc.getUpdateSql();
if(result == null)
{
ProcedureDescriptor pd = cld.getUpdateProcedure();
if(pd == null)
{
result = new SqlUpdateStatement(cld, logger);
}
else
{
result = new SqlProcedureStatement(pd, logger);
}
// set the sql string
sfc.setUpdateSql(result);
if(logger.isDebugEnabled())
{
logger.debug("SQL:" + result.getStatement());
}
}
return result;
} | [
"generate a prepared UPDATE-Statement for the Class\ndescribed by cld\n@param cld the ClassDescriptor"
] | [
"Translate the each ByteArray in an iterable into a hexadecimal string\n\n@param arrays The array of bytes to translate\n@return An iterable of converted strings",
"Obtain collection of Parameters from request\n\n@param dataArray request parameters\n@return Map of parameters\n@throws Exception exception",
"Creates a proxy object which implements a given bean interface.\n\n@param proxyInterface\nthe interface the the proxy will implement\n@param <T>\nthe proxy implementation type\n@return the proxy implementation\n@throws NullPointerException\nif proxyInterface is null",
"Determine which daughter of the current parse tree is the head.\n\n@param t The parse tree to examine the daughters of.\nIf this is a leaf, <code>null</code> is returned\n@param parent The parent of t\n@return The daughter parse tree that is the head of <code>t</code>.\nReturns null for leaf nodes.\n@see Tree#percolateHeads(HeadFinder)\nfor a routine to call this and spread heads throughout a tree",
"Use this API to fetch lbvserver_servicegroup_binding resources of given name .",
"Returns the item at the specified position.\n\n@param position index of the item to return\n@return the item at the specified position or {@code null} when not found",
"Check whether the delegate type implements or extends all decorated types.\n\n@param decorator\n@throws DefinitionException If the delegate type doesn't implement or extend all decorated types",
"Get a File path list from configuration.\n\n@param name the name of the property\n@param props the set of configuration properties\n\n@return the CanonicalFile form for the given name.",
"Scans given archive for files passing given filter, adds the results into given list."
] |
public Date getStartDate()
{
Date startDate = null;
for (Task task : m_tasks)
{
//
// If a hidden "summary" task is present we ignore it
//
if (NumberHelper.getInt(task.getUniqueID()) == 0)
{
continue;
}
//
// Select the actual or forecast start date. Note that the
// behaviour is different for milestones. The milestone end date
// is always correct, the milestone start date may be different
// to reflect a missed deadline.
//
Date taskStartDate;
if (task.getMilestone() == true)
{
taskStartDate = task.getActualFinish();
if (taskStartDate == null)
{
taskStartDate = task.getFinish();
}
}
else
{
taskStartDate = task.getActualStart();
if (taskStartDate == null)
{
taskStartDate = task.getStart();
}
}
if (taskStartDate != null)
{
if (startDate == null)
{
startDate = taskStartDate;
}
else
{
if (taskStartDate.getTime() < startDate.getTime())
{
startDate = taskStartDate;
}
}
}
}
return (startDate);
} | [
"Find the earliest task start date. We treat this as the\nstart date for the project.\n\n@return start date"
] | [
"Adds not Null criteria,\ncustomer_id is not Null\nThe attribute will NOT be translated into column name\n\n@param column The column name to be used without translation",
"Use this API to fetch all the nsspparams resources that are configured on netscaler.",
"Calls the httpHandler method.",
"Updates the styling and content of the internal text area based on the real value, the ghost value, and whether\nit has focus.",
"Is the transport secured by a policy",
"Returns a Client object for a clientUUID and profileId\n\n@param clientUUID UUID or friendlyName of client\n@param profileId - can be null, safer if it is not null\n@return Client object or null\n@throws Exception exception",
"Returns the name of this alias if path has been added\nto the aliased portions of attributePath\n\n@param path the path to test for inclusion in the alias",
"Returns the supplied string with any trailing '\\n' removed.",
"Gets a SerialMessage with the SENSOR_ALARM_GET command\n@return the serial message"
] |
public void start(GVRAccessibilitySpeechListener speechListener) {
mTts.setSpeechListener(speechListener);
mTts.getSpeechRecognizer().startListening(mTts.getSpeechRecognizerIntent());
} | [
"Start speech recognizer.\n\n@param speechListener"
] | [
"Computes the ratio of the smallest value to the largest. Does not assume\nthe array is sorted first\n@param sv array\n@return smallest / largest",
"For use on a slave HC to get all the server groups used by the host\n\n@param hostResource the host resource\n@return the server configs on this host",
"This method computes the eigen vector with the largest eigen value by using the\ndirect power method. This technique is the easiest to implement, but the slowest to converge.\nWorks only if all the eigenvalues are real.\n\n@param A The matrix. Not modified.\n@return If it converged or not.",
"Return any feedback messages and errors that were generated - but\nsuppressed - during the interpolation process. Since unresolvable\nexpressions will be left in the source string as-is, this feedback is\noptional, and will only be useful for debugging interpolation problems.\n\n@return a {@link List} that may be interspersed with {@link String} and\n{@link Throwable} instances.",
"Mapping message info.\n\n@param messageInfo the message info\n@return the message info type",
"Execute a server task.\n\n@param listener the transactional server listener\n@param task the server task\n@return time to wait in ms for a response from the server, or {@code -1} if the task execution failed locally",
"Retrieves a vertex attribute as an integer buffer.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>int</i>\n@see #setIntArray(String, int[])\n@see #getIntVec(String)",
"Returns the intersection of this range with the given range, a range which includes those addresses in both this and the given rqnge.\n@param other\n@return",
"Method used to extract data from the block of properties and\ninsert the key value pair into a map.\n\n@param data block of property data\n@param previousItemOffset previous offset\n@param previousItemKey item key\n@param itemOffset current item offset"
] |
public void setFileExtensions(final String fileExtensions) {
this.fileExtensions = IterableExtensions.<String>toList(((Iterable<String>)Conversions.doWrapArray(fileExtensions.trim().split("\\s*,\\s*"))));
} | [
"Either a single file extension or a comma-separated list of extensions for which the language\nshall be registered."
] | [
"Draws the specified image with the first rectangle's bounds, clipping with the second one.\n\n@param img image\n@param rect rectangle\n@param clipRect clipping bounds\n@param opacity opacity of the image (1 = opaque, 0= transparent)",
"Configure if you want this collapsible container to\naccordion its child elements or use expandable.",
"Safe write error response.\n\n@param channel the channel\n@param header the request header\n@param error the exception",
"Adds the contents of a Java package to this JAR.\n\n@param clazz a class whose package we wish to add to the JAR.\n@param filter a filter to select particular classes\n@return {@code this}",
"Use this API to save nsconfig.",
"Adds one or several attributes to facet on for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining.",
"Use this API to fetch the statistics of all scpolicy_stats resources that are configured on netscaler.",
"Returns an object which represents the data to be transferred. The class\nof the object returned is defined by the representation class of the flavor.\n\n@param flavor the requested flavor for the data\n@see DataFlavor#getRepresentationClass\n@exception IOException if the data is no longer available\nin the requested flavor.\n@exception UnsupportedFlavorException if the requested data flavor is\nnot supported.",
"Returns the x-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the x coordinate"
] |
public static void sendMimeMessage(MimeMessage mimeMessage) {
try {
Transport.send(mimeMessage);
} catch (MessagingException e) {
throw new IllegalStateException("Can not send message " + mimeMessage, e);
}
} | [
"Send the message using the JavaMail session defined in the message\n\n@param mimeMessage Message to send"
] | [
"Log a message at the provided level.",
"Makes sure that the operation name and the address have been set and returns a ModelNode\nrepresenting the operation request.",
"Load a classifier from the specified InputStream. The classifier is\nreinitialized from the flags serialized in the classifier. This does not\nclose the InputStream.\n\n@param in\nThe InputStream to load the serialized classifier from\n@param props\nThis Properties object will be used to update the\nSeqClassifierFlags which are read from the serialized classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"Use this API to fetch vrid_nsip6_binding resources of given name .",
"Match the Origin header with the allowed origins.\nIf it doesn't match then a 403 response code is set on the response and it returns null.\n@param exchange the current HttpExchange.\n@param allowedOrigins list of sanitized allowed origins.\n@return the first matching origin, null otherwise.\n@throws Exception",
"Retrieves the parent task for a Phoenix activity.\n\n@param activity Phoenix activity\n@return parent task",
"Finish the oauth flow after the user was redirected back.\n\n@param code\nCode returned by the Eve Online SSO\n@param state\nThis should be some secret to prevent XRSF see\ngetAuthorizationUri\n@throws net.troja.eve.esi.ApiException",
"Creates the style definition used for a rectangle element based on the given properties of the rectangle\n@param x The X coordinate of the rectangle.\n@param y The Y coordinate of the rectangle.\n@param width The width of the rectangle.\n@param height The height of the rectangle.\n@param stroke Should there be a stroke around?\n@param fill Should the rectangle be filled?\n@return The resulting element style definition.",
"Gets the node meta data.\n\n@param key - the meta data key\n@return the node meta data value for this key"
] |
@Override
public SuggestAccountsRequest suggestAccounts() throws RestApiException {
return new SuggestAccountsRequest() {
@Override
public List<AccountInfo> get() throws RestApiException {
return AccountsRestClient.this.suggestAccounts(this);
}
};
} | [
"Added in Gerrit 2.11."
] | [
"this method looks up the appropriate JDOClass for a given persistent Class.\nIt uses the JDOModel to perfom this lookup.\n@param c the persistent Class\n@return the JDOCLass object",
"Returns requested content types or default content type if none found.\n\n@return Requested content types or default content type if none found.",
"Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.\nIf it is valid, the initializer function is applied to it.",
"Get the minutes difference",
"DISPATCHING - COMMANDS",
"Returns true if the input is a vector\n@param a A matrix or vector\n@return true if it's a vector. Column or row.",
"In-place scaling of a row in A\n\n@param alpha scale factor\n@param A matrix\n@param row which row in A",
"Get a property as a double or defaultValue.\n\n@param key the property name\n@param defaultValue the default value",
"Queries database meta data to check for the existence of\nspecific tables."
] |
public static Collection<String> getFormatProviderNames() {
Collection<String> providers = Optional.ofNullable(getMonetaryFormatsSpi()).orElseThrow(
() -> new MonetaryException(
"No MonetaryFormatsSingletonSpi loaded, query functionality is not available."))
.getProviderNames();
if (Objects.isNull(providers)) {
Logger.getLogger(MonetaryFormats.class.getName()).warning(
"No supported rate/conversion providers returned by SPI: " +
getMonetaryFormatsSpi().getClass().getName());
return Collections.emptySet();
}
return providers;
} | [
"Get the names of the currently registered format providers.\n\n@return the provider names, never null."
] | [
"Method which performs strength checks on password. It returns outcome which can be used by CLI.\n\n@param isAdminitrative - administrative checks are less restrictive. This means that weak password or one which violates restrictions is not indicated as failure.\nAdministrative checks are usually performed by admin changing/setting default password for user.\n@param userName - the name of user for which password is set.\n@param password - password.\n@return",
"Determines whether the given type is an array type.\n\n@param type the given type\n@return true if the given type is a subclass of java.lang.Class or implements GenericArrayType",
"Use this API to fetch all the sslfipskey resources that are configured on netscaler.",
"Takes a numeric string value and converts it to a integer between 0 and 100.\n\nreturns 0 if the string is not numeric.\n\n@param percentage - A numeric string value\n@return a integer between 0 and 100",
"QR decomposition.\n\nDecomposes (m,n) matrix A into a (m,m) matrix Q and an (m,n) matrix R such that\nQ is orthogonal, R is upper triangular and Q * R = A\n\nNote that if A has more rows than columns, then the lower rows of R will contain\nonly zeros, such that the corresponding later columns of Q do not enter the computation\nat all. For some reason, LAPACK does not properly normalize those columns.\n\n@param A matrix\n@return QR decomposition",
"Returns the configured request parameter for the current query string, or the default parameter if the core is not specified.\n@return The configured request parameter for the current query string, or the default parameter if the core is not specified.",
"Gets the string representation of the path to the current JSON element.\n\n@param key the leaf key",
"All the attributes needed either by the processors for each datasource row or by the jasper template.\n\n@param attributes the attributes.",
"This looks at the servlet attributes to get the list of response headers to remove while the response object gets created by the servlet"
] |
@Override
public ImageSource apply(ImageSource source) {
if (radius != 0) {
if (source.isGrayscale()) {
return applyGrayscale(source, radius);
} else {
return applyRGB(source, radius);
}
} else {
if (source.isGrayscale()) {
return applyGrayscale(source, kernel);
} else {
return applyRGB(source, kernel);
}
}
} | [
"Apply filter to an image.\n\n@param source FastBitmap"
] | [
"Handles newlines by removing them and add new rows instead",
"Returns first enum constant found..\n\n@param styleName Space-separated list of styles\n@param enumClass Type of enum\n@param defaultValue Default value of no match was found\n@return First enum constant found or default value",
"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.",
"Called recursively to renumber child task IDs.\n\n@param parentTask parent task instance\n@param currentID current task ID\n@return updated current task ID",
"Convert Collection to Set\n@param collection Collection\n@return Set",
"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",
"Resolve Java control character sequences to the actual character value.\nOptionally handle unicode escape sequences, too.",
"Runs the module import script.\n\n@param cms the CMS context to use\n@param module the module for which to run the script",
"Saves the current translations from the container to the respective localization."
] |
public void stop() {
syncLock.lock();
try {
if (syncThread == null) {
return;
}
instanceChangeStreamListener.stop();
syncThread.interrupt();
try {
syncThread.join();
} catch (final InterruptedException e) {
return;
}
syncThread = null;
isRunning = false;
} finally {
syncLock.unlock();
}
} | [
"Stops the background data synchronization thread."
] | [
"Answer the counted size\n\n@return int",
"Changes to cluster OR store definition metadata results in routing\nstrategies changing. These changes need to be propagated to all the\nlisteners.\n\n@param cluster The updated cluster metadata\n@param storeDefs The updated list of store definition",
"Prepare all tasks.\n\n@param entry the patch entry\n@param context the patch context\n@param tasks a list for prepared tasks\n@param conflicts a list for conflicting content items\n@throws PatchingException",
"Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect",
"Set a variable in the top variables layer to given \"collection\" of the vertex frames. Can't be reassigned -\nthrows on attempt to reassign.",
"Closes the connection to the Z-Wave controller.",
"Use this API to fetch the statistics of all authenticationvserver_stats resources that are configured on netscaler.",
"Get the value of the fist child element with the given name.\n\n@param element\nThe parent element\n@param name\nThe child element name\n@return The child element value or null",
"Detects if the current device is a mobile device.\nThis method catches most of the popular modern devices.\nExcludes Apple iPads and other modern tablets.\n@return detection of any mobile device using the quicker method"
] |
private void validationRelations(Task task)
{
List<Relation> predecessors = task.getPredecessors();
if (!predecessors.isEmpty())
{
ArrayList<Relation> invalid = new ArrayList<Relation>();
for (Relation relation : predecessors)
{
Task sourceTask = relation.getSourceTask();
Task targetTask = relation.getTargetTask();
String sourceOutlineNumber = sourceTask.getOutlineNumber();
String targetOutlineNumber = targetTask.getOutlineNumber();
if (sourceOutlineNumber != null && targetOutlineNumber != null && sourceOutlineNumber.startsWith(targetOutlineNumber + '.'))
{
invalid.add(relation);
}
}
for (Relation relation : invalid)
{
relation.getSourceTask().removePredecessor(relation.getTargetTask(), relation.getType(), relation.getLag());
}
}
} | [
"This method validates all relationships for a task, removing\nany which have been incorrectly read from the MPP file and\npoint to a parent task.\n\n@param task task under test"
] | [
"Attach a metadata cache file to a particular player media slot, so the cache will be used instead of querying\nthe player for metadata. This supports operation with metadata during shows where DJs are using all four player\nnumbers and heavily cross-linking between them.\n\nIf the media is ejected from that player slot, the cache will be detached.\n\n@param slot the media slot to which a meta data cache is to be attached\n@param file the metadata cache to be attached\n\n@throws IOException if there is a problem reading the cache file\n@throws IllegalArgumentException if an invalid player number or slot is supplied\n@throws IllegalStateException if the metadata finder is not running",
"Pause component timer for current instance\n@param type - of component",
"Sets a custom configuration attribute.\n@param attributeName the attribute name. Names starting with\n{@link #JDBC_PROPERTY_NAME_PREFIX} will be used (without the prefix) by the\nConnectionFactory when creating connections from DriverManager\n(not used for external DataSource connections). Names starting with\n{@link #DBCP_PROPERTY_NAME_PREFIX} to Commons DBCP (if used, also without prefix).\n@param attributeValue the attribute value",
"Returns the list of the configured sort options, or the empty list if no sort options are configured.\n@return The list of the configured sort options, or the empty list if no sort options are configured.",
"Sets ID field value.\n\n@param val value",
"Extracts the column of A and copies it into u while computing the magnitude of the\nlargest element and returning it.\n\n<pre>\nu[ (offsetU+row0+i)*2 ] = A.getReal(row0+i,col)\nu[ (offsetU+row0+i)*2 + 1] = A.getImag(row0+i,col)\n</pre>\n\n@param A Complex matrix\n@param row0 First row in A to be copied\n@param row1 Last row in A + 1 to be copied\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U\n@return magnitude of largest element",
"Use this API to update dbdbprofile.",
"Return an artifact regarding its gavc\n\n@param gavc String\n@return DbArtifact",
"Translate the given byte array into a string of 1s and 0s\n\n@param bytes The bytes to translate\n@return The string"
] |
private Map<String, String> mergeItem(
String item,
Map<String, String> localeValues,
Map<String, String> resultLocaleValues) {
if (resultLocaleValues.get(item) != null) {
if (localeValues.get(item) != null) {
localeValues.put(item, localeValues.get(item) + " " + resultLocaleValues.get(item));
} else {
localeValues.put(item, resultLocaleValues.get(item));
}
}
return localeValues;
} | [
"Merges the item from the resultLocaleValues into the corresponding item of the localeValues.\n@param item the item to merge\n@param localeValues the values where the item gets merged into\n@param resultLocaleValues the values where the item to merge is read from\n@return the modified localeValues with the merged item"
] | [
"Check to see whether a packet starts with the standard header bytes, followed by a known byte identifying it.\nIf so, return the kind of packet that has been recognized.\n\n@param packet a packet that has just been received\n@param port the port on which the packet has been received\n\n@return the type of packet that was recognized, or {@code null} if the packet was not recognized",
"Append this message to the message set\n@param messages message to append\n@return the written size and first offset\n@throws IOException file write exception",
"Get the FieldDescriptor for the PathInfo\n\n@param aTableAlias\n@param aPathInfo\n@return FieldDescriptor",
"Use this API to add transformpolicy.",
"Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values",
"Retrieves all file version retentions.\n@param api the API connection to be used by the resource.\n@param fields the fields to retrieve.\n@return an iterable contains information about all file version retentions.",
"Use this API to unset the properties of rnatparam resource.\nProperties that need to be unset are specified in args array.",
"This method dumps the entire contents of a file to an output\nprint writer as ascii data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors",
"Creates an option to deploy existing content to the runtime for each deployment\n\n@param deployments a set of deployments to deploy\n\n@return the deploy operation"
] |
static InstalledIdentity load(final InstalledImage image, final ProductConfig productConfig, final List<File> moduleRoots, final List<File> bundleRoots) throws IOException {
// build the identity information
final String productVersion = productConfig.resolveVersion();
final String productName = productConfig.resolveName();
final Identity identity = new AbstractLazyIdentity() {
@Override
public String getName() {
return productName;
}
@Override
public String getVersion() {
return productVersion;
}
@Override
public InstalledImage getInstalledImage() {
return image;
}
};
final Properties properties = PatchUtils.loadProperties(identity.getDirectoryStructure().getInstallationInfo());
final List<String> allPatches = PatchUtils.readRefs(properties, Constants.ALL_PATCHES);
// Step 1 - gather the installed layers data
final InstalledConfiguration conf = createInstalledConfig(image);
// Step 2 - process the actual module and bundle roots
final ProcessedLayers processedLayers = process(conf, moduleRoots, bundleRoots);
final InstalledConfiguration config = processedLayers.getConf();
// Step 3 - create the actual config objects
// Process layers
final InstalledIdentityImpl installedIdentity = new InstalledIdentityImpl(identity, allPatches, image);
for (final LayerPathConfig layer : processedLayers.getLayers().values()) {
final String name = layer.name;
installedIdentity.putLayer(name, createPatchableTarget(name, layer, config.getLayerMetadataDir(name), image));
}
// Process add-ons
for (final LayerPathConfig addOn : processedLayers.getAddOns().values()) {
final String name = addOn.name;
installedIdentity.putAddOn(name, createPatchableTarget(name, addOn, config.getAddOnMetadataDir(name), image));
}
return installedIdentity;
} | [
"Load the available layers.\n\n@param image the installed image\n@param productConfig the product config to establish the identity\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the layers\n@throws IOException"
] | [
"Get a reader implementation class to perform API calls with while specifying\nan explicit page size for paginated API calls. This gets translated to a per_page=\nparameter on API requests. Note that Canvas does not guarantee it will honor this page size request.\nThere is an explicit maximum page size on the server side which could change. The default page size\nis 10 which can be limiting when, for example, trying to get all users in a 800 person course.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param paginationPageSize Requested pagination page size\n@param <T> The reader type to request an instance of\n@return An instance of the requested reader class",
"Replaces the translations in an existing container with the translations for the provided locale.\n@param locale the locale for which translations should be loaded.\n@return <code>true</code> if replacing succeeded, <code>false</code> otherwise.",
"Use this API to add nssimpleacl.",
"Convert string to qname.\n\n@param str the string\n@return the qname",
"List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.",
"Configure high fps settings in the camera for VR mode\n\n@param fpsMode integer indicating the desired fps: 0 means 30 fps, 1 means 60\nfps, and 2 means 120 fps. Any other value is invalid.\n@return A boolean indicating the status of the method call. It may be false due\nto multiple reasons including: 1) supplying invalid fpsMode as the input\nparameter, 2) VR mode not supported.",
"Creates an observable that emits the given item after the specified time in milliseconds.\n\n@param event the event to emit\n@param milliseconds the delay in milliseconds\n@param <T> the type of event\n@return delayed observable",
"Add a range to an exception, ensure that we don't try to add null ranges.\n\n@param exception target exception\n@param start exception start\n@param finish exception finish",
"Safe write error response.\n\n@param channel the channel\n@param header the request header\n@param error the exception"
] |
void insertOne(final MongoNamespace namespace, final BsonDocument document) {
this.waitUntilInitialized();
try {
ongoingOperationsGroup.enter();
// Remove forbidden fields from the document before inserting it into the local collection.
final BsonDocument docForStorage = sanitizeDocument(document);
final NamespaceSynchronizationConfig nsConfig =
this.syncConfig.getNamespaceConfig(namespace);
final Lock lock = nsConfig.getLock().writeLock();
lock.lock();
final ChangeEvent<BsonDocument> event;
final BsonValue documentId;
try {
getLocalCollection(namespace).insertOne(docForStorage);
documentId = BsonUtils.getDocumentId(docForStorage);
event = ChangeEvents.changeEventForLocalInsert(namespace, docForStorage, true);
final CoreDocumentSynchronizationConfig config = syncConfig.addAndGetSynchronizedDocument(
namespace,
documentId
);
config.setSomePendingWritesAndSave(logicalT, event);
} finally {
lock.unlock();
}
checkAndInsertNamespaceListener(namespace);
eventDispatcher.emitEvent(nsConfig, event);
} finally {
ongoingOperationsGroup.exit();
}
} | [
"Inserts a single document locally and being to synchronize it based on its _id. Inserting\na document with the same _id twice will result in a duplicate key exception.\n\n@param namespace the namespace to put the document in.\n@param document the document to insert."
] | [
"Returns the field descriptors given in the the field names list.\n\n@param fieldNames The field names, separated by commas\n@return The field descriptors in the order given by the field names\n@throws NoSuchFieldException If a field hasn't been found",
"Checks whether the given set of properties is available.\n\n@param keys the keys to check\n@return true if all properties are available, false otherwise",
"Create a TableAlias for path or userAlias\n@param aTable\n@param aPath\n@param aUserAlias\n@return TableAlias",
"Checks to see if an Oracle Server exists.\n\n@param curator It is the responsibility of the caller to ensure the curator is started\n@return boolean if the server exists in zookeeper",
"Helper to return the first item in the iterator or null.\n\n@return T the first item or null.",
"Searches the variables layers, top to bottom, for the iterable having all of it's items of the given type. Return\nnull if not found.",
"Build and return a foreign collection based on the field settings that matches the id argument. This can return\nnull in certain circumstances.\n\n@param parent\nThe parent object that we will set on each item in the collection.\n@param id\nThe id of the foreign object we will look for. This can be null if we are creating an empty\ncollection.",
"remove an objects entry from the object registry",
"Cleans the object key.\n\n@param name Name of the object key\n@return The {@link ValidationResult} object containing the object,\nand the error code(if any)"
] |
public static void setFieldValue(Object object, String fieldName, Object value) {
try {
getDeclaredFieldInHierarchy(object.getClass(), fieldName).set(object, value);
} catch (IllegalArgumentException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
} | [
"Convenience method for setting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field to set.\n@param value\nValue to which to set the field."
] | [
"Returns the device push token or null\n\n@param type com.clevertap.android.sdk.PushType (FCM or GCM)\n@return String device token or null\nNOTE: on initial install calling getDevicePushToken may return null, as the device token is\nnot yet available\nImplement CleverTapAPI.DevicePushTokenRefreshListener to get a callback once the token is\navailable",
"Given a status update from a CDJ, find the metadata for the track that it has loaded, if any. If there is\nan appropriate metadata cache, will use that, otherwise makes a query to the players dbserver.\n\n@param status the CDJ status update that will be used to determine the loaded track and ask the appropriate\nplayer for metadata about it\n\n@return the metadata that was obtained, if any",
"Log long string using verbose tag\n\n@param TAG The tag.\n@param longString The long string.",
"Sets the search scope.\n\n@param cms The current CmsObject object.",
"Calculate the layout container size along the axis\n@param axis {@link Axis}\n@return size",
"Reads a single record from the table.\n\n@param buffer record data\n@param table parent table",
"Use this API to add dnssuffix resources.",
"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)\"",
"Returns the steps instances associated to CandidateSteps\n\n@param candidateSteps\nthe List of CandidateSteps\n@return The List of steps instances"
] |
public int knotAt(int x) {
for (int i = 1; i < numKnots-1; i++)
if (xKnots[i+1] > x)
return i;
return 1;
} | [
"Return the knot at a given position.\n@param x the position\n@return the knot number, or 1 if no knot found"
] | [
"Returns a handle to the pool. Useful to obtain a handle to the\nstatistics for example.\n@return pool",
"Use this API to delete locationfile.",
"generate a prepared UPDATE-Statement for the Class\ndescribed by cld\n@param cld the ClassDescriptor",
"Initializes the bean name defaulted",
"Use this API to fetch all the inat resources that are configured on netscaler.",
"Get a sub-list of this list\n@param fromIndex index of the first element in the sub-list (inclusive)\n@param toIndex index of the last element in the sub-list (inclusive)\n@return the sub-list",
"Create a forward curve from given times and discount factors.\n\nThe forward curve will have times.length-1 fixing times from times[0] to times[times.length-2]\n<code>\nforward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]);\n</code>\nNote: If time[0] > 0, then the discount factor 1.0 will inserted at time 0.0\n\n@param name The name of this curve.\n@param times A vector of given time points.\n@param givenDiscountFactors A vector of given discount factors (corresponding to the given time points).\n@param paymentOffset The maturity of the underlying index modeled by this curve.\n@return A new ForwardCurve object.",
"This method performs database modification at the very and of transaction.",
"Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate"
] |
public EventBus emitSync(EventObject event, Object... args) {
return _emitWithOnceBus(eventContextSync(event, args));
} | [
"Emit a event object with parameters and force all listeners to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)"
] | [
"Use this API to clear nssimpleacl.",
"Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance",
"Returns the resolution of resolving the conflict between a local and remote event using\nthe given conflict resolver.\n\n@param conflictResolver the conflict resolver to use.\n@param documentId the document id related to the conflicted events.\n@param localEvent the conflicted local event.\n@param remoteEvent the conflicted remote event.\n@return the resolution to the conflict.",
"Throws an IllegalArgumentException when the given value is null.\n@param value the value to assert if not null\n@param name the name of the argument\n@param <T> The generic type of the value to assert if not null\n@return the value",
"another media scan way",
"Removes all elems in the given Collection that aren't accepted by the given Filter.",
"Return an instance of this class.\n\n@param container Solr CoreContainer container object in order to create a server object.\n\n@return instance of CmsSolrSpellchecker",
"Get a sub-list of this list\n@param fromIndex index of the first element in the sub-list (inclusive)\n@param toIndex index of the last element in the sub-list (inclusive)\n@return the sub-list",
"Returns the value of a property of the current object on the specified level.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\""
] |
private Object filterValue(Object value)
{
if (value instanceof Boolean && !((Boolean) value).booleanValue())
{
value = null;
}
if (value instanceof String && ((String) value).isEmpty())
{
value = null;
}
if (value instanceof Double && ((Double) value).doubleValue() == 0.0)
{
value = null;
}
if (value instanceof Integer && ((Integer) value).intValue() == 0)
{
value = null;
}
if (value instanceof Duration && ((Duration) value).getDuration() == 0.0)
{
value = null;
}
return value;
} | [
"Replace default values will null, allowing them to be ignored.\n\n@param value value to test\n@return filtered value"
] | [
"Read data for an individual task.\n\n@param row task data from database\n@param task Task instance",
"Transits a float propertyId from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self",
"List the indexes in the database. The returned object allows for listing indexes by type.\n\n@return indexes object with methods for getting indexes of a particular type",
"Returns an attribute's list value from a non-main section of this JAR's manifest.\nThe attributes string value will be split on whitespace into the returned list.\nThe returned list may be safely modified.\n\n@param section the manifest's section\n@param name the attribute's name",
"Move this rectangle to the specified bottom-left point.\n\n@param rect rectangle to move\n@param x new x origin\n@param y new y origin",
"Add a management request handler factory to this context.\n\n@param factory the request handler to add",
"Flat the map of list of string to map of strings, with theoriginal values, seperated by comma",
"Use this API to clear bridgetable resources.",
"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"
] |
public void setEditedFilePath(final String editedFilePath) {
m_filePathField.setReadOnly(false);
m_filePathField.setValue(editedFilePath);
m_filePathField.setReadOnly(true);
} | [
"Sets the path of the edited file in the corresponding display.\n@param editedFilePath path of the edited file to set."
] | [
"Generate the specified output file by merging the specified\nVelocity template with the supplied context.",
"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",
"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.",
"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",
"Returns the filename of the resource with extension.\n\n@return Filename of the GVRAndroidResource. May return null if the\nresource is not associated with any file",
"Retrieve the document with the specified ID from the database and deserialize to an\ninstance of the POJO of type T.\n\n@param <T> object type\n@param classType the class of type T\n@param id the document id\n@return an object of type T\n@throws NoDocumentException if the document is not found in the database\n@see #find(Class, String, String)\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/document.html#read\"\ntarget=\"_blank\">Documents - read</a>",
"Add a 'IS NOT NULL' clause so the column must not be null. '<>' NULL does not work.",
"returns true if a job was queued within a timeout",
"Creates the parents of nested XML elements if necessary.\n@param xmlContent the XML content that is edited.\n@param xmlPath the path of the (nested) element, for which the parents should be created\n@param l the locale for which the XML content is edited."
] |
public void delete(boolean notifyUser, boolean force) {
String queryString = new QueryStringBuilder()
.appendParam("notify", String.valueOf(notifyUser))
.appendParam("force", String.valueOf(force))
.toString();
URL url = USER_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), queryString, this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"Deletes a user from an enterprise account.\n@param notifyUser whether or not to send an email notification to the user that their account has been deleted.\n@param force whether or not this user should be deleted even if they still own files."
] | [
"Returns the value of an optional property, if the property is\nset. If it is not set defval is returned.",
"when divisionPrefixLen is null, isAutoSubnets has no effect",
"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.",
"Get the value of a primitive type from the request data.\n\n@param fieldName the name of the attribute to get from the request data.\n@param pAtt the primitive attribute.\n@param requestData the data to retrieve the value from.",
"Start with specifying the groupId",
"Set the visibility of the object.\n\n@see Visibility\n@param visibility\nThe visibility of the object.\n@return {@code true} if the visibility was changed, {@code false} if it\nwasn't.",
"This method generates a list of lists. Each list represents the data\nfor an embedded object, and contains set set of RTFEmbeddedObject instances\nthat make up the embedded object. This method will return null\nif there are no embedded objects in the RTF document.\n\n@param text RTF document\n@return list of lists of RTFEmbeddedObject instances",
"Signals that the processor to finish and waits until it finishes.",
"Add the specified files in reverse order."
] |
public String interpolate( String input, RecursionInterceptor recursionInterceptor )
throws InterpolationException
{
try
{
return interpolate( input, recursionInterceptor, new HashSet<String>() );
}
finally
{
if ( !cacheAnswers )
{
existingAnswers.clear();
}
}
} | [
"Entry point for recursive resolution of an expression and all of its\nnested expressions.\n\n@todo Ensure unresolvable expressions don't trigger infinite recursion."
] | [
"Get the value of the specified column.\n\n@param columnName the name of the column\n@return the corresponding value of the column, {@code null} if the column does not exist in the row key",
"Convert custom info.\n\n@param customInfo the custom info map\n@return the custom info type",
"add a join between two aliases\n\nTODO BRJ : This needs refactoring, it looks kind of weird\n\nno extents\nA1 -> A2\n\nextents on the right\nA1 -> A2\nA1 -> A2E0\n\nextents on the left : copy alias on right, extents point to copies\nA1 -> A2\nA1E0 -> A2C0\n\nextents on the left and right\nA1 -> A2\nA1 -> A2E0\nA1E0 -> A2C0\nA1E0 -> A2E0C0\n\n@param left\n@param leftKeys\n@param right\n@param rightKeys\n@param outer\n@param name",
"Execute pull docker image on agent\n\n@param launcher\n@param imageTag\n@param username\n@param password\n@param host\n@return\n@throws IOException\n@throws InterruptedException",
"get the TypeSignature corresponding to given class with given type\narguments\n\n@param clazz\n@param typeArgs\n@return",
"Use this API to fetch dnspolicy_dnsglobal_binding resources of given name .",
"Starts the HTTP service.\n\n@throws Exception if the service failed to started",
"Inserts 'token' after 'where'. if where is null then it is inserted to the beginning of the list.\n@param where Where 'token' should be inserted after. if null the put at it at the beginning\n@param token The token that is to be inserted",
"Returns the class of datatype URI that best characterizes the range of\nthe given property based on its datatype.\n\n@param propertyIdValue\nthe property for which to get a range\n@return the range URI or null if the datatype could not be identified."
] |
public static byte[] encode(byte[] ba, int offset, long v) {
ba[offset + 0] = (byte) (v >>> 56);
ba[offset + 1] = (byte) (v >>> 48);
ba[offset + 2] = (byte) (v >>> 40);
ba[offset + 3] = (byte) (v >>> 32);
ba[offset + 4] = (byte) (v >>> 24);
ba[offset + 5] = (byte) (v >>> 16);
ba[offset + 6] = (byte) (v >>> 8);
ba[offset + 7] = (byte) (v >>> 0);
return ba;
} | [
"Encode a long into a byte array at an offset\n\n@param ba Byte array\n@param offset Offset\n@param v Long value\n@return byte array given in input"
] | [
"This method writes task data to a JSON file.\nNote that we write the task hierarchy in order to make rebuilding the hierarchy easier.",
"This method extracts project properties from a GanttProject file.\n\n@param ganttProject GanttProject file",
"Builds sql clause to load data into a database.\n\n@param config Load configuration.\n@param prefix Prefix for temporary resources.\n@return the load DDL",
"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",
"Process a device update once it has been received. Track it as the most recent update from its address,\nand notify any registered listeners, including master listeners if it results in changes to tracked state,\nsuch as the current master player and tempo. Also handles the Baroque dance of handing off the tempo master\nrole from or to another device.",
"Extracts a set of interceptor bindings from a collection of annotations.\n@param beanManager\n@param annotations\n@return",
"Function to delete the specified store from Metadata store. This involves\n\n1. Remove entry from the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeName specifies name of the store to be deleted.",
"Create User Application Properties\nCreate application properties for a user\n@param userId User Id (required)\n@param properties Properties to be updated (required)\n@param aid Application ID (optional)\n@return PropertiesEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Set keyboard done listener to detect when the user click \"DONE\" on his keyboard\n\n@param listener IntlPhoneInputListener"
] |
public void delete(Object element, boolean testForEquality) {
int index = indexOfFromTo(element, 0, size-1, testForEquality);
if (index>=0) removeFromTo(index,index);
} | [
"Deletes the first element from the receiver that matches the specified element.\nDoes nothing, if no such matching element is contained.\n\nTests elements for equality or identity as specified by <tt>testForEquality</tt>.\nWhen testing for equality, two elements <tt>e1</tt> and\n<tt>e2</tt> are <i>equal</i> if <tt>(e1==null ? e2==null :\ne1.equals(e2))</tt>.)\n\n@param testForEquality if true -> tests for equality, otherwise for identity.\n@param element the element to be deleted."
] | [
"Convenience method which allows all projects in the database to\nbe read in a single operation.\n\n@return list of ProjectFile instances\n@throws MPXJException",
"Remove a handler from the list\n@param toRemove The handler to remove. Any handler object that\nmatches this class will be removed.\n@return true if this handler was in the list.",
"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",
"Fetch a value from the Hashmap .\n\n@param firstKey\nfirst key\n@param secondKey\nsecond key\n@return the element or null.",
"Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque",
"Demonstrates how to add an override to an existing path",
"Calculate Mode value.\n@param values Values.\n@return Returns mode value of the histogram array.",
"Add exceptions to the calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param gpCalendar GanttProject calendar",
"Assigned action code"
] |
protected String failMsg(final Throwable thrwbl, final String queue, final Job job) throws IOException {
final JobFailure failure = new JobFailure();
failure.setFailedAt(new Date());
failure.setWorker(this.name);
failure.setQueue(queue);
failure.setPayload(job);
failure.setThrowable(thrwbl);
return ObjectMapperFactory.get().writeValueAsString(failure);
} | [
"Create and serialize a JobFailure.\n\n@param thrwbl the Throwable that occurred\n@param queue the queue the job came from\n@param job the Job that failed\n@return the JSON representation of a new JobFailure\n@throws IOException if there was an error serializing the JobFailure"
] | [
"Resolve the boot updates and register at the local HC.\n\n@param controller the model controller\n@param callback the completed callback\n@throws Exception for any error",
"Delete a photo from flickr.\n\nThis method requires authentication with 'delete' permission.\n\n@param photoId\n@throws FlickrException",
"Resolve Java control character sequences to the actual character value.\nOptionally handle unicode escape sequences, too.",
"Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects",
"Copy a patch element\n\n@param entry the patch entry\n@param patchId the patch id for the element\n@param modifications the element modifications\n@return the new patch element",
"It's enough to just set the disabled attribute on the\nelement, but we want to also add a \"disabled\" class so that we can\nstyle it.\n\nAt some point we'll just be able to use .button:disabled,\nbut that doesn't work in IE8-",
"Read an element which contains only a single list attribute of a given\ntype, returning it as an array.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@param type the value type class\n@param <T> the value type\n@return the value list as an array\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.",
"changes the color of the image - more red and less blue\n\n@return new pixel array",
"Enables lifecycle callbacks for Android devices\n@param application App's Application object"
] |
public ItemRequest<OrganizationExport> findById(String organizationExport) {
String path = String.format("/organization_exports/%s", organizationExport);
return new ItemRequest<OrganizationExport>(this, OrganizationExport.class, path, "GET");
} | [
"Returns details of a previously-requested Organization export.\n\n@param organizationExport Globally unique identifier for the Organization export.\n@return Request object"
] | [
"Return the releaseId\n\n@return releaseId",
"Use this API to fetch sslvserver_sslcipher_binding resources of given name .",
"Obtains a local date in Coptic 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 Coptic local date, not null\n@throws DateTimeException if unable to create the date",
"Tests if this enumeration contains more elements.\n@return <code>true</code> if and only if this enumeration object\ncontains at least one more element to provide;\n<code>false</code> otherwise.",
"Defers an event for processing in a later phase of the current\ntransaction.\n\n@param metadata The event object",
"Use this API to enable nsacl6 resources of given names.",
"Computes the square root of the complex number.\n\n@param input Input complex number.\n@param root Output. The square root of the input",
"Returns the primary message codewords for mode 2.\n\n@param postcode the postal code\n@param country the country code\n@param service the service code\n@return the primary message, as codewords",
"once animation is setup, start the animation record the beginning and\nending time for the animation"
] |
public static HashMap<String, String> getMapFromJSONPath(JSONObject record, String path) {
return getObjectFromJSONPath(record, path);
} | [
"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."
] | [
"Ensures that the primary keys required by the given reference are present in the referenced class.\n\n@param modelDef The model\n@param refDef The reference\n@throws ConstraintException If there is a conflict between the primary keys",
"Publish finish events for each of the specified query labels\n\n<pre>\n{@code\nLabelledEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId Identifier\n@param bus EventBus to post events to\n@param labels Query types to post to event bus",
"Painter the tile, by building a URL where the image can be found.\n\n@param tile\nMust be an instance of {@link InternalTile}, and must have a non-null {@link RasterUrlBuilder}.\n@return Returns a {@link InternalTile}.",
"Returns whether or not the host editor service is available\n\n@return\n@throws Exception",
"Use this API to fetch appfwprofile_crosssitescripting_binding resources of given name .",
"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",
"Allows the closure to be called for NullObject\n\n@param closure the closure to call on the object\n@return result of calling the closure",
"Starts closing the keyboard when the hits are scrolled.",
"This method maps the resource unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param rscFixedMeta resource fixed meta data\n@param rscFixedData resource fixed data\n@return map of resource IDs to resource data"
] |
public int numOccurrences(int year, int month, int day) {
DateTimeFormatter parser = ISODateTimeFormat.date();
DateTime date = parser.parseDateTime(year + "-" + month + "-" + "01");
Calendar cal = Calendar.getInstance();
cal.setTime(date.toDate());
GregorianChronology calendar = GregorianChronology.getInstance();
DateTimeField field = calendar.dayOfMonth();
int days = 0;
int count = 0;
int num = field.getMaximumValue(new LocalDate(year, month, day, calendar));
while (days < num) {
if (cal.get(Calendar.DAY_OF_WEEK) == day) {
count++;
}
date = date.plusDays(1);
cal.setTime(date.toDate());
days++;
}
return count;
} | [
"Given a year, month, and day, find the number of occurrences of that day in the month\n\n@param year the year\n@param month the month\n@param day the day\n@return the number of occurrences of the day in the month"
] | [
"Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead",
"Iterate RMI Targets Map and remove entries loaded by protected ClassLoader",
"Checks if the required option exists.\n\n@param options OptionSet to checked\n@param opt Required option to check\n@throws VoldemortException",
"The ARP is additional request parameters, which must be sent once\nreceived after any HTTP call. This is sort of a proxy for cookies.\n\n@return A JSON object containing the ARP key/values. Can be null.",
"Mark root of this DAG depends on given DAG's root.\n\n@param dependencyGraph the dependency DAG",
"Convert moneyness given as difference to par swap rate to moneyness in bp.\nUses the fixing times of the fix schedule to determine fractions.\n\n@param moneyness as offset.\n@return Moneyness in bp.",
"Returns the foreignkey to the specified table.\n\n@param name The name of the foreignkey\n@param tableName The name of the referenced table\n@return The foreignkey def or <code>null</code> if it does not exist",
"Get a timer of the given string name and todos for the current thread. If\nno such timer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return timer",
"Get photos from the user's contacts.\n\nThis method requires authentication with 'read' permission.\n\n@param count\nThe number of photos to return\n@param justFriends\nSet to true to only show friends photos\n@param singlePhoto\nSet to true to get a single photo\n@param includeSelf\nSet to true to include self\n@return The Collection of photos\n@throws FlickrException"
] |
public String getLinkUrl(JSONObject jsonObject){
if(jsonObject == null) return null;
try {
JSONObject urlObject = jsonObject.has("url") ? jsonObject.getJSONObject("url") : null;
if(urlObject == null) return null;
JSONObject androidObject = urlObject.has("android") ? urlObject.getJSONObject("android") : null;
if(androidObject != null){
return androidObject.has("text") ? androidObject.getString("text") : "";
}else{
return "";
}
} catch (JSONException e) {
Logger.v("Unable to get Link URL with JSON - "+e.getLocalizedMessage());
return null;
}
} | [
"Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"url\"\n@param jsonObject of Link\n@return String"
] | [
"Check local saved copy first ??. If Auth by username is available, then we will not need to make the API call.\n\n@throws FlickrException",
"Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.",
"A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field.\n\nReturns an empty data record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"Write calendar exceptions.\n\n@param records list of ProjectCalendars\n@throws IOException",
"Use this API to update dbdbprofile resources.",
"The third method to write caseManager. Its task is to write the call to\nthe story to be run.\n\n@param caseManager\nthe file where the test must be written\n@param storyName\nthe name of the story\n@param test_path\nthe path where the story can be found\n@param user\nthe user requesting the story\n@param feature\nthe feature requested by the user\n@param benefit\nthe benefit provided by the feature\n@throws BeastException",
"Cretae a BufferedImage from an ImageProducer.\n@param producer the ImageProducer\n@return a new TYPE_INT_ARGB BufferedImage",
"Return the set of synchronized document _ids in a namespace\nthat have been paused due to an irrecoverable error.\n\n@param namespace the namespace to get paused document _ids for.\n@return the set of paused document _ids in a namespace",
"Return the single class name from a class-name string."
] |
private String generateValue() {
String result = "";
for (CmsCheckBox checkbox : m_checkboxes) {
if (checkbox.isChecked()) {
result += checkbox.getInternalValue() + ",";
}
}
if (result.contains(",")) {
result = result.substring(0, result.lastIndexOf(","));
}
return result;
} | [
"Generate a string with all selected checkboxes separated with ','.\n\n@return a string with all selected checkboxes"
] | [
"Read custom property definitions for resources.\n\n@param gpResources GanttProject resources",
"Throws an exception if at least one results directory is missing.",
"Use this API to count sslcipher_individualcipher_binding resources configued on NetScaler.",
"Create a JsonParser for a given json node.\n@param jsonNode the json node\n@return the json parser\n@throws IOException",
"Size of a queue.\n\n@param jedis\n@param queueName\n@return",
"Extract resource type from a resource ID string.\n@param id the resource ID string\n@return the resource type",
"Calculates the radius to a given boundedness value\n@param D Diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param B Boundedeness\n@return Confinement radius",
"Handles incoming Application Update Request.\n@param incomingMessage the request message to process.",
"Gets an item that was shared with a password-protected shared link.\n@param api the API connection to be used by the shared item.\n@param sharedLink the shared link to the item.\n@param password the password for the shared link.\n@return info about the shared item."
] |
public static <InnerT> Observable<InnerT> convertListToInnerAsync(Observable<List<InnerT>> innerList) {
return innerList.flatMap(new Func1<List<InnerT>, Observable<InnerT>>() {
@Override
public Observable<InnerT> call(List<InnerT> inners) {
return Observable.from(inners);
}
});
} | [
"Converts Observable of list to Observable of Inner.\n@param innerList list to be converted.\n@param <InnerT> type of inner.\n@return Observable for list of inner."
] | [
"is ready to service requests",
"Recursively searches for formatting annotations.\n\n@param visitedTypes used to prevent an endless loop\n@param parameterName",
"Returns the secret key matching the specified identifier.\n\n@param input the input stream containing the keyring collection\n@param keyId the 4 bytes identifier of the key",
"Shows error dialog, manually supplying details instead of getting them from an exception stack trace.\n\n@param message the error message\n@param details the details",
"Return the key if there is one else return -1",
"Populate the UDF values for this entity.\n\n@param tableName parent table name\n@param type entity type\n@param container entity\n@param uniqueID entity Unique ID",
"Abort and close the transaction.\nCalling abort abandons all persistent object modifications and releases the\nassociated locks.\nIf transaction is not in progress a TransactionNotInProgressException is thrown",
"Disconnects from the serial interface and stops\nsend and receive threads.",
"Send a get artifacts request\n\n@param hasLicense\n@return list of artifact\n@throws GrapesCommunicationException"
] |
public void waitAndRetry() {
ContinueToSendToBatchSenderAsstManager continueToSendToBatchSenderAsstManager = new ContinueToSendToBatchSenderAsstManager(
processedWorkerCount);
logger.debug("NOW WAIT Another " + asstManagerRetryIntervalMillis
+ " MS. at " + PcDateUtils.getNowDateTimeStrStandard());
getContext()
.system()
.scheduler()
.scheduleOnce(
Duration.create(asstManagerRetryIntervalMillis,
TimeUnit.MILLISECONDS), getSelf(),
continueToSendToBatchSenderAsstManager,
getContext().system().dispatcher(), getSelf());
return;
} | [
"Wait and retry."
] | [
"Retrieves the cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry",
"Removes all elements in the sorted set with a score in the given range.\n@param scoreRange\n@return the number of elements removed.",
"Use this API to fetch all the appqoepolicy resources that are configured on netscaler.",
"Returns a specific profile\n\n@param profileId ID of profile\n@return Selected profile if found, null if not found\n@throws Exception exception",
"Read correlation id from message.\n\n@param message the message\n@return the CorrelationId as string",
"Sets the top and bottom frame margin.\n@param frameTop margin\n@param frameBottom margin\n@return this to allow chaining",
"Gets the registration point that been associated with the registration for the longest period.\n\n@return the initial registration point, or {@code null} if there are no longer any registration points",
"Runs a query that returns a single int.",
"Compute a singular-value decomposition of A.\n\n@return A DoubleMatrix[3] array of U, S, V such that A = U * diag(S) * V'"
] |
public static final String printResourceType(ResourceType value)
{
return (Integer.toString(value == null ? ResourceType.WORK.getValue() : value.getValue()));
} | [
"Print a resource type.\n\n@param value ResourceType instance\n@return resource type value"
] | [
"Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits",
"Prepare a batch api request using list of individual reuests.\n@param requests list of api requests that has to be executed in batch.",
"Builds a string that serializes a list of objects separated by the pipe\ncharacter. The toString methods are used to turn objects into strings.\nThis operation is commonly used to build parameter lists for API\nrequests.\n\n@param objects\nthe objects to implode\n@return string of imploded objects",
"Sets the action label to be displayed, if any. Note that if this is not set, the action\nbutton will not be displayed\n\n@param actionButtonLabel\n@return",
"Calculate the actual bit length of the proposed binary string.",
"Converts the given dislect to a human-readable datasource type.",
"Gathers all parameters' annotations for the given method, starting from the third parameter.",
"Returns the full record for a single attachment.\n\n@param attachment Globally unique identifier for the attachment.\n@return Request object",
"Return true only if the specified object responds to the named method\n@param object - the object to check\n@param methodName - the name of the method\n@return true if the object responds to the named method"
] |
public static DiscountCurveInterface createDiscountCurveFromMonteCarloLiborModel(String forwardCurveName, LIBORModelMonteCarloSimulationModel model, double startTime) throws CalculationException{
// Check if the LMM uses a discount curve which is created from a forward curve
if(model.getModel().getDiscountCurve()==null || model.getModel().getDiscountCurve().getName().toLowerCase().contains("DiscountCurveFromForwardCurve".toLowerCase())){
return new DiscountCurveFromForwardCurve(ForwardCurveInterpolation.createForwardCurveFromMonteCarloLiborModel(forwardCurveName, model, startTime));
}
else {
// i.e. forward curve of Libor Model not OIS. In this case return the OIS curve.
// Only at startTime 0!
return (DiscountCurveInterface) model.getModel().getDiscountCurve();
}
} | [
"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."
] | [
"Mutate the gradient.\n@param amount the amount in the range zero to one",
"Write back to hints file.",
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added",
"Use this API to update sslocspresponder.",
"Set the value for a custom request\n\n@param pathId ID of path\n@param customRequest value of custom request\n@param clientUUID UUID of client",
"Use this API to fetch a appfwglobal_auditnslogpolicy_binding resources.",
"Utility method to clear cached calendar data.",
"Returns the smallest prefix length possible such that this address division grouping includes the block of addresses for that prefix.\n\n@return the prefix length",
"Checks if a given number is in the range of an integer.\n\n@param number\na number which should be in the range of an integer (positive or negative)\n\n@see java.lang.Integer#MIN_VALUE\n@see java.lang.Integer#MAX_VALUE\n\n@return number as an integer (rounding might occur)"
] |
public synchronized HttpServer<Buffer, Buffer> start() throws Exception {
if (server == null) {
server = createProtocolListener();
}
return server;
} | [
"Start a server.\n\n@return the http server\n@throws Exception the exception"
] | [
"Returns real unquoted value for a DisplayValue\n@param key\n@return",
"Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class",
"Exports json encoded content to CrashReport object\n\n@param json valid json body.\n@return new instance of CrashReport",
"Get a fallback handler.\n\n@param header the protocol header\n@return the fallback handler",
"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.",
"Use this API to unset the properties of nsspparams resource.\nProperties that need to be unset are specified in args array.",
"Load the properties from the resource file if one is specified",
"Get the connectivity state as reported by the Android system\n\n@param context Android context\n@return the connectivity state as reported by the Android system",
"Registers Jersey HeaderDelegateProviders for the specified TinyTypes.\n\n@param head a TinyType\n@param tail other TinyTypes\n@throws IllegalArgumentException when a non-TinyType is given"
] |
private boolean checkConfig(BundleContext context) throws Exception {
ServiceReference serviceRef = context.getServiceReference(ConfigurationAdmin.class.getName());
ConfigurationAdmin cfgAdmin = (ConfigurationAdmin)context.getService(serviceRef);
Configuration config = cfgAdmin.getConfiguration("org.talend.esb.sam.agent");
return "true".equalsIgnoreCase((String)config.getProperties().get("collector.lifecycleEvent"));
} | [
"Check config.\n\n@param context the context\n@return true, if successful\n@throws Exception the exception"
] | [
"Visits a parameter of this method.\n\n@param name\nparameter name or null if none is provided.\n@param access\nthe parameter's access flags, only <tt>ACC_FINAL</tt>,\n<tt>ACC_SYNTHETIC</tt> or/and <tt>ACC_MANDATED</tt> are\nallowed (see {@link Opcodes}).",
"Uploads files from the given file input fields.<p<\n\n@param fields the set of names of fields containing the files to upload\n@param filenameCallback the callback to call with the resulting map from field names to file paths\n@param errorCallback the callback to call with an error message",
"This method retrieves a byte array containing the data at the\ngiven index in the block. If no data is found at the given index\nthis method returns null.\n\n@param index index of the data item to be retrieved\n@return byte array containing the requested data",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"We have obtained waveform detail for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this waveform detail\n@param detail the waveform detail which we retrieved",
"Overridden method always creating a new instance\n\n@param contextual The bean to create\n@param creationalContext The creation context",
"Compiles the allowable actions for a file or folder.\n\n@param cms the current CMS context\n@param file the resource for which we want the allowable actions\n\n@return the allowable actions for the given resource",
"Checks to see if a handler is disabled\n\n@param handlerName the name of the handler to enable.",
"Adds api doc roots from a link. The folder reffered by the link should contain a package-list\nfile that will be parsed in order to add api doc roots to this configuration\n@param packageListUrl"
] |
@Override
public Symmetry010Date dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"Obtains a local date in Symmetry010 calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Symmetry010 era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code IsoEra}"
] | [
"Synchronize the scroll positions of the scrollbars with the actual scroll\nposition of the content.",
"Remove any protocol-level headers from the remote server's response that\ndo not apply to the new response we are sending.\n\n@param response",
"Moves to the next step.",
"Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate",
"Use this API to create sslfipskey resources.",
"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.",
"Run a task once, after a delay.\n\n@param task\nTask to run.\n@param delay\nUnit is seconds.\n@return An interface that lets you query the status; cancel; or\nreschedule the event.",
"Parses command-line and removes metadata related to rebalancing.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"Adds the basic sentence.\n\n@param s the s\n@throws ParseException the parse exception"
] |
public static Class<?> loadClass(String className) {
try {
return Class.forName(className);
} catch(ClassNotFoundException e) {
throw new IllegalArgumentException(e);
}
} | [
"Load the given class using the default constructor\n\n@param className The name of the class\n@return The class object"
] | [
"Unregister all MBeans",
"Add a dependency task item for this model.\n\n@param dependency the dependency task item.\n@return key to be used as parameter to taskResult(string) method to retrieve result the task item",
"Checks to see if an Oracle Server exists.\n\n@param curator It is the responsibility of the caller to ensure the curator is started\n@return boolean if the server exists in zookeeper",
"Returns an iterator equivalent to this iterator with all duplicated items removed\nby using the default comparator. The original iterator will become\nexhausted of elements after determining the unique values. A new iterator\nfor the unique values will be returned.\n\n@param self an Iterator\n@return the modified Iterator\n@since 1.5.5",
"Use this API to fetch a appflowglobal_binding resource .",
"Create a host target.\n\n@param hostName the host name\n@param client the connected controller client to the master host.\n@return the remote target",
"Sets the protocol, hostname and port to connect to.\n\n@param protocol the protocol to use\n@param hostname the host name\n@param port the port\n\n@return the builder",
"The Maven3Builder class is looking for the PATH+JDK environment variable due to legacy code.\nIn The pipeline flow we need to convert the JAVA_HOME to PATH+JDK in order to reuse the code.",
"Runs a queued task, if the queue is not already empty.\n\nNote that this will decrement the request count if there are no queued tasks to be run\n\n@param hasPermit If the caller has already called {@link #beginRequest(boolean force)}"
] |
public DiscreteInterval plus(DiscreteInterval other) {
return new DiscreteInterval(this.min + other.min, this.max + other.max);
} | [
"Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum"
] | [
"Permanently close the ClientRequestExecutor pool. Resources subsequently\nchecked in will be destroyed.",
"Get the collection of the server groups\n\n@return Collection of active server groups",
"Lift a Java Func0 to a Scala Function0\n\n@param f the function to lift\n\n@returns the Scala function",
"Returns the complete task record for a single task.\n\n@param task The task to get.\n@return Request object",
"Returns the compact project records for all projects in the workspace.\n\n@param workspace The workspace or organization to find projects in.\n@return Request object",
"Retrieves the table structure for an Asta PP file. Subclasses determine the exact contents of the structure\nfor a specific version of the Asta PP file.\n\n@return PP file table structure",
"This method allows a predecessor relationship to be removed from this\ntask instance. It will only delete relationships that exactly match the\ngiven targetTask, type and lag time.\n\n@param targetTask the predecessor task\n@param type relation type\n@param lag relation lag\n@return returns true if the relation is found and removed",
"Use this API to fetch appfwjsoncontenttype resource of given name .",
"Returns the name of the current member which is the name in the case of a field, or the property name for an\naccessor method.\n\n@return The member name\n@exception XDocletException if an error occurs"
] |
public void editPhotos(String photosetId, String primaryPhotoId, String[] photoIds) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_EDIT_PHOTOS);
parameters.put("photoset_id", photosetId);
parameters.put("primary_photo_id", primaryPhotoId);
parameters.put("photo_ids", StringUtilities.join(photoIds, ","));
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
} | [
"Edit which photos are in the photoset.\n\n@param photosetId\nThe photoset ID\n@param primaryPhotoId\nThe primary photo Id\n@param photoIds\nThe photo IDs for the photos in the set\n@throws FlickrException"
] | [
"Updates a path table value for column columnName\n\n@param columnName name of the column to update\n@param newData new content to set\n@param path_id ID of the path to update",
"Return a collection of Photo objects not in part of any sets.\n\nThis method requires authentication with 'read' permission.\n\n@param perPage\nThe per page\n@param page\nThe page\n@return The collection of Photo objects\n@throws FlickrException",
"Performs the closure within a transaction using a cached connection.\nIf the closure takes a single argument, it will be called\nwith the connection, otherwise it will be called with no arguments.\n\n@param closure the given closure\n@throws SQLException if a database error occurs",
"Return cached object by key. The key will be concatenated with\ncurrent session id when fetching the cached object\n\n@param key\n@param <T>\nthe object type\n@return the cached object",
"Generate a string with all selected checkboxes separated with ','.\n\n@return a string with all selected checkboxes",
"Read data for an individual task from the tables in a PEP file.\n\n@param parent parent task\n@param id task ID\n@return task instance",
"Note that the index can only be built once.\n\n@param beans The set of beans the index should be built from, only instances of {@link CommonBean} and implementations of {@link PassivationCapable} are\nincluded\n@throws IllegalStateException If the index is built already",
"This method is used to push install referrer via UTM source, medium & campaign parameters\n@param source The UTM source parameter\n@param medium The UTM medium parameter\n@param campaign The UTM campaign parameter",
"Computes the longest common contiguous substring of s and t.\nThe LCCS is the longest run of characters that appear consecutively in\nboth s and t. For instance, the LCCS of \"color\" and \"colour\" is 4, because\nof \"colo\"."
] |
public static vlan_interface_binding[] get(nitro_service service, Long id) throws Exception{
vlan_interface_binding obj = new vlan_interface_binding();
obj.set_id(id);
vlan_interface_binding response[] = (vlan_interface_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch vlan_interface_binding resources of given name ."
] | [
"Add \"ORDER BY\" clause to the SQL query statement. This can be called multiple times to add additional \"ORDER BY\"\nclauses. Ones earlier are applied first.",
"Creates a non-binary media type with the given type, subtype, and UTF-8 encoding\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}",
"Build filter for the request.\n\n@param layerFilter layer filter\n@param featureIds features to include in report (null for all)\n@return filter\n@throws GeomajasException filter could not be parsed/created",
"This method dumps the entire contents of a file to an output\nprint writer as hex and ASCII data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors",
"Deletes the metadata on this folder associated with a specified scope and template.\n\n@param templateName the metadata template type name.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").",
"This method returns the existing folder, and if it does not exist, the\nmethod generates it.\n\n@param path\n@param dest_dir\n@return the folder\n@throws BeastException",
"Extracts the zip file to the output folder\n\n@param zipFile ZIP File to extract\n@param outputFolder Output Folder\n@return A Collection with the extracted files\n@throws IOException I/O Error",
"Convenience method for retrieving an Object resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"Marks the given list of statements for deletion. It is verified that the\ncurrent document actually contains the statements before doing so. This\ncheck is based on exact statement equality, including qualifier order and\nstatement id.\n\n@param currentDocument\nthe document with the current statements\n@param deleteStatements\nthe list of statements to be deleted"
] |
public String getSQL92LikePattern() throws IllegalArgumentException {
if (escape.length() != 1) {
throw new IllegalArgumentException("Like Pattern --> escape char should be of length exactly 1");
}
if (wildcardSingle.length() != 1) {
throw new IllegalArgumentException("Like Pattern --> wildcardSingle char should be of length exactly 1");
}
if (wildcardMulti.length() != 1) {
throw new IllegalArgumentException("Like Pattern --> wildcardMulti char should be of length exactly 1");
}
return LikeFilterImpl.convertToSQL92(escape.charAt(0), wildcardMulti.charAt(0), wildcardSingle.charAt(0),
isMatchingCase(), pattern);
} | [
"See convertToSQL92.\n\n@return SQL like sub-expression\n@throws IllegalArgumentException oops"
] | [
"Redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@return\n@throws Exception",
"Set editable state on an attribute. This needs to also set the state on the associated attributes.\n\n@param attribute attribute for which the editable state needs to be set\n@param editable new editable state",
"Update an existing feature. Made package private for testing purposes.\n\n@param feature feature to update\n@throws LayerException oops",
"Installs a remoting stream server for a domain instance\n@param serviceTarget the service target to install the services into\n@param endpointName the name of the endpoint to install the stream server into\n@param networkInterfaceBinding the network interface binding\n@param port the port\n@param securityRealm the security real name\n@param options the remoting options",
"Meant to execute assertions in tests only\n@return a read-only view of the map containing the relations between entities",
"Parse the given projection.\n\n@param projection The projection string.\n@param longitudeFirst longitudeFirst",
"Sets the model that the handling works on.\n\n@param databaseModel The database model\n@param objModel The object model",
"Blocks until the server has started successfully or an exception is\nthrown.\n\n@throws VoldemortException if a problem occurs during start-up wrapping\nthe original exception.",
"Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters"
] |
public void await() {
boolean intr = false;
final Object lock = this.lock;
try {
synchronized (lock) {
while (! readClosed) {
try {
lock.wait();
} catch (InterruptedException e) {
intr = true;
}
}
}
} finally {
if (intr) {
Thread.currentThread().interrupt();
}
}
} | [
"Wait for the read side to close. Used when the writer needs to know when\nthe reader finishes consuming a message."
] | [
"Set virtual host so the server can direct the request. Value is the host header if it is set, otherwise\nuse the hostname from the original request.\n\n@param httpMethodProxyRequest\n@param httpServletRequest",
"Calls beforeMaterialization on all registered listeners in the reverse\norder of registration.",
"Confirms that both clusters have the same number of total partitions.\n\n@param lhs\n@param rhs",
"Return key Values of an Identity\n@param cld\n@param oid\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException",
"Populates a recurring task.\n\n@param record MPX record\n@param task recurring task\n@throws MPXJException",
"Stops the service. If a timeout is given and the service has still not\ngracefully been stopped after timeout ms the service is stopped by force.\n\n@param millis value in ms",
"Tell a device to turn sync on or off.\n\n@param deviceNumber the device whose sync state is to be set\n@param synced {@code} true if sync should be turned on, else it will be turned off\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network",
"Set the duration option.\n@param value the duration option to set ({@link EndType} as string).",
"Divides the elements at the specified column by 'val'. Takes in account\nleading zeros and one."
] |
public static void doMetaGetRO(AdminClient adminClient,
Collection<Integer> nodeIds,
List<String> storeNames,
List<String> metaKeys) throws IOException {
for(String key: metaKeys) {
System.out.println("Metadata: " + key);
if(!key.equals(KEY_MAX_VERSION) && !key.equals(KEY_CURRENT_VERSION)
&& !key.equals(KEY_STORAGE_FORMAT)) {
System.out.println(" Invalid read-only metadata key: " + key);
} else {
for(Integer nodeId: nodeIds) {
String hostName = adminClient.getAdminClientCluster()
.getNodeById(nodeId)
.getHost();
System.out.println(" Node: " + hostName + ":" + nodeId);
if(key.equals(KEY_MAX_VERSION)) {
Map<String, Long> mapStoreToROVersion = adminClient.readonlyOps.getROMaxVersion(nodeId,
storeNames);
for(String storeName: mapStoreToROVersion.keySet()) {
System.out.println(" " + storeName + ":"
+ mapStoreToROVersion.get(storeName));
}
} else if(key.equals(KEY_CURRENT_VERSION)) {
Map<String, Long> mapStoreToROVersion = adminClient.readonlyOps.getROCurrentVersion(nodeId,
storeNames);
for(String storeName: mapStoreToROVersion.keySet()) {
System.out.println(" " + storeName + ":"
+ mapStoreToROVersion.get(storeName));
}
} else if(key.equals(KEY_STORAGE_FORMAT)) {
Map<String, String> mapStoreToROFormat = adminClient.readonlyOps.getROStorageFormat(nodeId,
storeNames);
for(String storeName: mapStoreToROFormat.keySet()) {
System.out.println(" " + storeName + ":"
+ mapStoreToROFormat.get(storeName));
}
}
}
}
System.out.println();
}
} | [
"Gets read-only metadata.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeIds Node ids to fetch read-only metadata from\n@param storeNames Stores names to fetch read-only metadata from\n@param metaKeys List of read-only metadata to fetch\n@throws IOException"
] | [
"Inserts a single document locally and being to synchronize it based on its _id. Inserting\na document with the same _id twice will result in a duplicate key exception.\n\n@param namespace the namespace to put the document in.\n@param document the document to insert.",
"Append the given item to the end of the list\n@param segment segment to append",
"Compress a directory into a zip file\n\n@param dir Directory\n@param zipFile ZIP file to create\n@throws IOException I/O Error",
"Set the background color.\n\nIf you don't set the background color, the default is an opaque black:\n{@link Color#BLACK}, 0xff000000.\n\n@param color\nAn Android 32-bit (ARGB) {@link Color}, such as you get from\n{@link Resources#getColor(int)}",
"Use this API to add systemuser.",
"Get a property as a boolean or null.\n\n@param key the property name",
"Get the real Object\n\n@param objectOrProxy\n@return Object",
"This method extracts resource data from a Planner file.\n\n@param plannerProject Root node of the Planner file",
"Read custom fields for a GanttProject task.\n\n@param gpTask GanttProject task\n@param mpxjTask MPXJ Task instance"
] |
public static Predicate anyBitsSet(final String expr, final long bits) {
return new Predicate() {
private String param;
public void init(AbstractSqlCreator creator) {
param = creator.allocateParameter();
creator.setParameter(param, bits);
}
public String toSql() {
return String.format("(%s & :%s) > 0", expr, param);
}
};
} | [
"Adds a clause that checks whether ANY set bits in a bitmask are present\nin a numeric expression.\n\n@param expr\nSQL numeric expression to check.\n@param bits\nInteger containing the bits for which to check."
] | [
"Send a track metadata update announcement to all registered listeners.",
"Map from an activity code value UUID to the actual value itself, and its\nsequence number.\n\n@param storepoint storepoint containing current project data",
"Adds a new Matrix variable. If one already has the same name it is written over.\n\nWhile more verbose for multiple variables, this function doesn't require new memory be declared\neach time it's called.\n\n@param variable Matrix which is to be assigned to name\n@param name The name of the variable",
"Print the common class node's properties",
"Return the current working directory\n\n@return the current working directory",
"Term value.\n\n@param term\nthe term\n@return the string",
"parse when there are two date-times",
"Read a list of fixed sized blocks from the input stream.\n\n@return List of MapRow instances representing the fixed size blocks",
"Install the installation manager service.\n\n@param serviceTarget\n@return the service controller for the installed installation manager"
] |
public static String getSerializedVectorClock(VectorClock vc) {
VectorClockWrapper vcWrapper = new VectorClockWrapper(vc);
String serializedVC = "";
try {
serializedVC = mapper.writeValueAsString(vcWrapper);
} catch(Exception e) {
e.printStackTrace();
}
return serializedVC;
} | [
"Function to serialize the given Vector clock into a string. If something\ngoes wrong, it returns an empty string.\n\n@param vc The Vector clock to serialize\n@return The string (JSON) version of the specified Vector clock"
] | [
"Get the Operation metadata for a single operation on an MBean by name.\n@param operationName the Operation name (can be URL-encoded).\n@return the {@link MBeanOperationInfo} for the operation.\n@throws OperationNotFoundException Method was not found\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Inits the ws client.\n\n@param context the context\n@throws Exception the exception",
"This method is called to format a date. It will return the null text\nif a null value is supplied.\n\n@param value date value\n@return formatted date value",
"Prepare a parallel HTTP HEAD Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Process the settings when we are going to consume them.",
"Template method for verification of lazy initialisation.",
"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",
"Queues a job for execution in specified time.\n\n@param job the job.\n@param millis execute the job in this time.",
"This is a generic function for retrieving any config value. The returned value\nis the one the server is operating with, no matter whether it comes from defaults\nor from the user-supplied configuration.\n\nThis function only provides access to configs which are deemed safe to share\npublicly (i.e.: not security-related configs). The list of configs which are\nconsidered off-limit can itself be configured via '{@value #RESTRICTED_CONFIGS}'.\n\n@param key config key for which to retrieve the value.\n@return the value for the requested config key, in String format.\nMay return null if the key exists and its value is explicitly set to null.\n@throws UndefinedPropertyException if the requested key does not exist in the config.\n@throws ConfigurationException if the requested key is not publicly available."
] |
public String getResourcePath()
{
switch (resourceType)
{
case ANDROID_ASSETS: return assetPath;
case ANDROID_RESOURCE: return resourceFilePath;
case LINUX_FILESYSTEM: return filePath;
case NETWORK: return url.getPath();
case INPUT_STREAM: return inputStreamName;
default: return null;
}
} | [
"Returns the full path of the resource file with extension.\n\n@return path of the GVRAndroidResource. May return null if the\nresource is not associated with any file"
] | [
"Converts the List to PagedList.\n@param list list to be converted in to paged list\n@param <InnerT> the wrapper inner type\n@return the Paged list for the inner type.",
"Compute the A matrix from the Q and R matrices.\n\n@return The A matrix.",
"Pass the activity you use the drawer in ;)\nThis is required if you want to set any values by resource\n\n@param activity\n@return",
"Private recursive helper function to actually do the type-safe checking\nof assignability.",
"Add the given entries of the input map into the output map.\n\n<p>\nIf a key in the inputMap already exists in the outputMap, its value is\nreplaced in the outputMap by the value from the inputMap.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param outputMap the map to update.\n@param inputMap the entries to add.\n@since 2.15",
"Converts the node to JSON\n@return JSON object",
"Creates a list of placeholders for use in a PreparedStatement\n\n@param length number of placeholders\n@return String of placeholders, seperated by comma",
"Counts a single page of the specified gender. If this is the first page\nof that gender on this site, a suitable key is added to the list of the\nsite's genders.\n\n@param gender\nthe gender to count\n@param siteRecord\nthe site record to count it for",
"Method to know if already exists one file with the same name in the same\nfolder\n\n@param scenario_name\n@param path\n@param dest_dir\n@return true when the file does not exist"
] |
void flushLogQueue() {
Set<String> problems = new LinkedHashSet<String>();
synchronized (messageQueue) {
Iterator<LogEntry> i = messageQueue.iterator();
while (i.hasNext()) {
problems.add("\t\t" + i.next().getMessage() + "\n");
i.remove();
}
}
if (!problems.isEmpty()) {
logger.transformationWarnings(target.getHostName(), problems);
}
} | [
"flushes log queue, this actually writes combined log message into system log"
] | [
"Use this API to fetch nd6ravariables resource of given name .",
"Use this API to fetch all the dnspolicylabel resources that are configured on netscaler.",
"Create an object of the given type using a constructor that matches the\nsupplied arguments and invoke the setters with the supplied variables.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@param vars\nthe named arguments for setters\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception",
"Sets the body of this request to a given JSON string.\n@param body the JSON string to use as the body.",
"Update counters and call hooks.\n@param handle connection handle.",
"Get logs for an app by specifying additional parameters.\n@param logRequest See {LogRequestBuilder}\n@return log stream response",
"Use this API to fetch statistics of service_stats resource of given name .",
"Send an error to the client with a message.\n\n@param httpServletResponse the response to send the error to.\n@param message the message to send\n@param code the error code",
"Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException"
] |
@PostConstruct
public final void init() {
this.cleanUpTimer = Executors.newScheduledThreadPool(1, timerTask -> {
final Thread thread = new Thread(timerTask, "Clean up old job records");
thread.setDaemon(true);
return thread;
});
this.cleanUpTimer.scheduleAtFixedRate(this::cleanup, this.cleanupInterval, this.cleanupInterval,
TimeUnit.SECONDS);
} | [
"Called by spring on initialization."
] | [
"Read a four byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value",
"Make all elements of a String array lower case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements lower case",
"Deletes a chain of vertices from this list.",
"Queues a job for execution in specified time.\n\n@param job the job.\n@param millis execute the job in this time.",
"Remember execution time for all executed suites.",
"Use this API to delete sslcipher of given name.",
"Check that the scope type is allowed by the stereotypes on the bean and\nthe bean type",
"Gets information about this collaboration.\n\n@return info about this collaboration.",
"Sets whether an individual list value is selected.\n\n@param value the value of the item to be selected or unselected\n@param selected <code>true</code> to select the item"
] |
public void validate(final List<Throwable> validationErrors) {
if (this.matchers == null) {
validationErrors.add(new IllegalArgumentException(
"Matchers cannot be null. There should be at least a !acceptAll matcher"));
}
if (this.matchers != null && this.matchers.isEmpty()) {
validationErrors.add(new IllegalArgumentException(
"There are no url matchers defined. There should be at least a " +
"!acceptAll matcher"));
}
} | [
"Validate the configuration.\n\n@param validationErrors where to put the errors."
] | [
"Returns the index of the segment containing the first byte outside the network prefix.\nWhen networkPrefixLength is null, or it matches or exceeds the bit length, returns the segment count.\n\n@param networkPrefixLength\n@param byteLength\n@return",
"Utility function that creates directory.\n\n@param dir Directory path\n@return File object of directory.",
"Publish the changes to main registry",
"Links the given widget to InstantSearch according to the interfaces it implements.\n\n@param widget a widget implementing ({@link AlgoliaResultsListener} || {@link AlgoliaErrorListener} || {@link AlgoliaSearcherListener}).",
"Remove all controllers but leave input manager running.\n@return number of controllers removed",
"Check the version to assure it is allowed.\n\n@param pluginName plugin name which needs the dependency\n@param dependency dependency which needs to be verified\n@param requestedVersion requested/minimum version\n@param availableVersion available version\n@return version check problem or empty string when all is fine",
"Sets the model that the handling works on.\n\n@param databaseModel The database model\n@param objModel The object model",
"Set editable state on an attribute. This needs to also set the state on the associated attributes.\n\n@param attribute attribute for which the editable state needs to be set\n@param editable new editable state",
"Sets the package pattern to match against."
] |
public static ComplexNumber Subtract(ComplexNumber z1, double scalar) {
return new ComplexNumber(z1.real - scalar, z1.imaginary);
} | [
"Subtract a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the subtract of specified complex number with a scalar value."
] | [
"Use this API to fetch sslcipher resource of given name .",
"Saves the loaded XML bundle as property bundle.\n@throws UnsupportedEncodingException thrown if localizations from the XML bundle could not be loaded correctly.\n@throws CmsException thrown if any of the interactions with the VFS fails.\n@throws IOException thrown if localizations from the XML bundle could not be loaded correctly.",
"Calculates the delta of a digital option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The delta of the digital option",
"Create a rollback patch based on the recorded actions.\n\n@param patchId the new patch id, depending on release or one-off\n@param patchType the current patch identity\n@return the rollback patch",
"Closes the server socket.",
"Retrieve multiple properties.\n\n@param method method definition\n@param object target object\n@param map parameter values",
"Processes the template for all columns of the current table index.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Inserts the provided document. If the document is missing an identifier, the client should\ngenerate one.\n\n@param document the document to insert\n@return a task containing the result of the insert one operation",
"Retrieve a duration in the form required by Phoenix.\n\n@param duration Duration instance\n@return formatted duration"
] |
public void process(ProjectFile file, Var2Data varData, byte[] fixedData) throws IOException
{
Props props = getProps(varData);
//System.out.println(props);
if (props != null)
{
String viewName = MPPUtility.removeAmpersands(props.getUnicodeString(VIEW_NAME));
byte[] listData = props.getByteArray(VIEW_CONTENTS);
List<Integer> uniqueIdList = new LinkedList<Integer>();
if (listData != null)
{
for (int index = 0; index < listData.length; index += 4)
{
Integer uniqueID = Integer.valueOf(MPPUtility.getInt(listData, index));
//
// Ensure that we have a valid task, and that if we have and
// ID of zero, this is the first task shown.
//
if (file.getTaskByUniqueID(uniqueID) != null && (uniqueID.intValue() != 0 || index == 0))
{
uniqueIdList.add(uniqueID);
}
}
}
int filterID = MPPUtility.getShort(fixedData, 128);
ViewState state = new ViewState(file, viewName, uniqueIdList, filterID);
file.getViews().setViewState(state);
}
} | [
"Entry point for processing saved view state.\n\n@param file project file\n@param varData view state var data\n@param fixedData view state fixed data\n@throws IOException"
] | [
"Generates new individual particle radius based on min and max radius setting.\n\n@return new particle radius",
"Creates a Source Processor\n\n@param source the data source itself\n@param parallelism the parallelism of this processor\n@param description the description of this processor\n@param taskConf the configuration of this processor\n@param system actor system\n@return the new created source processor",
"Use this API to add snmpmanager.",
"Sets the access token to use when authenticating a client.",
"Find the logging profile attached to any resource.\n\n@param resourceRoot the root resource\n\n@return the logging profile name or {@code null} if one was not found",
"Adds a license to an artifact if the license exist into the database\n\n@param gavc String\n@param licenseId String",
"Add authentication information for the given host\n@param host the host\n@param credentials the credentials\n@param authScheme the scheme for preemptive authentication (should be\n<code>null</code> if adding authentication for a proxy server)\n@param context the context in which the authentication information\nshould be saved",
"Initializes the editor states for the different modes, depending on the type of the opened file.",
"characters callback."
] |
public Set<Class> entityClasses() {
EntityMetaInfoRepo repo = app().entityMetaInfoRepo().forDb(id);
return null == repo ? C.<Class>set() : repo.entityClasses();
} | [
"Returns all model classes registered on this datasource\n\n@return model classes talk to this datasource"
] | [
"Add the line to the content\n\n@param bufferedFileReader The file reader\n@param content The content of the file\n@param line The current read line\n@throws IOException",
"Compares two columns given by their names.\n\n@param objA The name of the first column\n@param objB The name of the second column\n@return\n@see java.util.Comparator#compare(java.lang.Object, java.lang.Object)",
"Use this API to unset the properties of gslbsite resource.\nProperties that need to be unset are specified in args array.",
"Sets up this object to represent an argument that will be set to a\nconstant value.\n\n@param constantValue the constant value.",
"Convert a SSE to a Stitch SSE\n@param event SSE to convert\n@param decoder decoder for decoding data\n@param <T> type to decode data to\n@return a Stitch server-sent event",
"Builds a instance of the class for a map containing the values, without specifying the handler for differences\n\n@param clazz The class to build instance\n@param values The values map\n@return The instance\n@throws InstantiationException Error instantiating\n@throws IllegalAccessException Access error\n@throws IntrospectionException Introspection error\n@throws IllegalArgumentException Argument invalid\n@throws InvocationTargetException Invalid target",
"Create a set out of the items in the Iterable.\n\n@param <T>\nThe type of items in the Iterable.\n@param items\nThe items to be made into a set.\n@return A set consisting of the items from the Iterable.",
"Given a particular id, return the correct contextual. For contextuals\nwhich aren't passivation capable, the contextual can't be found in another\ncontainer, and null will be returned.\n\n@param id An identifier for the contextual\n@return the contextual",
"Indicates that all of the packages within an archive are \"known\" by the package mapper. Generally\nthis indicates that the archive does not contain customer code."
] |
public static BoxCollaborationWhitelistExemptTarget.Info create(final BoxAPIConnection api, String userID) {
URL url = COLLABORATION_WHITELIST_EXEMPT_TARGET_ENTRIES_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, HttpMethod.POST);
JsonObject requestJSON = new JsonObject()
.add("user", new JsonObject()
.add("type", "user")
.add("id", userID));
request.setBody(requestJSON.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
BoxCollaborationWhitelistExemptTarget userWhitelist = new BoxCollaborationWhitelistExemptTarget(api,
responseJSON.get("id").asString());
return userWhitelist.new Info(responseJSON);
} | [
"Creates a collaboration whitelist for a Box User with a given ID.\n@param api the API connection to be used by the collaboration whitelist.\n@param userID the ID of the Box User to add to the collaboration whitelist.\n@return information about the collaboration whitelist created for user."
] | [
"Register the given common classes with the ClassUtils cache.",
"This method writes extended attribute data for an assignment.\n\n@param xml MSPDI assignment\n@param mpx MPXJ assignment",
"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",
"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)",
"A variant of the gamma function.\n@param a the number to apply gain to\n@param b the gain parameter. 0.5 means no change, smaller values reduce gain, larger values increase gain.\n@return the output value",
"Gets the thread dump.\n\n@return the thread dump",
"Sets the necessary height for all bands in the report, to hold their children",
"Specifies the container object class to be instantiated\n\n@param containerObjectClass\ncontainer object class to be instantiated\n\n@return the current builder instance",
"Parse an extended attribute currency value.\n\n@param value string representation\n@return currency value"
] |
public void updateIntegerBelief(String name, int value) {
introspector.storeBeliefValue(this, name, getIntegerBelief(name) + value);
} | [
"Updates the given integer belief\nadding the given integer\nnewBelief = previousBelief + givenValue\n\n@param String - the belief name\n@param the value to add"
] | [
"Returns the single abstract method of a class node, if it is a SAM type, or null otherwise.\n@param type a type for which to search for a single abstract method\n@return the method node if type is a SAM type, null otherwise",
"Calculate start dates for a yearly absolute recurrence.\n\n@param calendar current date\n@param dates array of start dates",
"Creates a collaboration whitelist for a Box User with a given ID.\n@param api the API connection to be used by the collaboration whitelist.\n@param userID the ID of the Box User to add to the collaboration whitelist.\n@return information about the collaboration whitelist created for user.",
"Convert custom info.\n\n@param customInfo the custom info map\n@return the custom info type",
"Create a REST call to artifactory with a generic request\n\n@param artifactoryRequest that should be sent to artifactory\n@return {@link ArtifactoryResponse} artifactory response as per to the request sent",
"Calls the provided metric getter on all the tracked environments and\nobtains their values\n\n@param metricGetterName\n@return",
"Stops the background data synchronization thread and releases the local client.",
"Loads the Configuration from the properties file.\n\nLoads the properties file, or uses defaults on failure.\n\n@see org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl#setFilename(java.lang.String)",
"Assemble and send a packet that performs sync control, turning a device's sync mode on or off, or telling it\nto become the tempo master.\n\n@param target an update from the device whose sync state is to be set\n@param command the byte identifying the specific sync command to be sent\n\n@throws IOException if there is a problem sending the command to the device"
] |
public FileModel getChildFile(ArchiveModel archiveModel, String filePath)
{
filePath = FilenameUtils.separatorsToUnix(filePath);
StringTokenizer stk = new StringTokenizer(filePath, "/");
FileModel currentFileModel = archiveModel;
while (stk.hasMoreTokens() && currentFileModel != null)
{
String pathElement = stk.nextToken();
currentFileModel = findFileModel(currentFileModel, pathElement);
}
return currentFileModel;
} | [
"Finds the file at the provided path within the archive.\n\nEg, getChildFile(ArchiveModel, \"/META-INF/MANIFEST.MF\") will return a {@link FileModel} if a file named\n/META-INF/MANIFEST.MF exists within the archive\n\n@return Returns the located {@link FileModel} or null if no file with this path could be located"
] | [
"Removes all currently assigned labels for this Datum then adds all\nof the given Labels.",
"Perform construction with custom thread pool size.",
"Attach a component to this scene object.\n\nEach scene object has a list of components that may\nbe attached to it. Only one component of a particular type\ncan be attached. Components are retrieved based on their type.\n\n@return true if component is attached, false if a component of that class is already attached.\n@param component component to attach.\n@see GVRSceneObject#detachComponent(long)\n@see GVRSceneObject#getComponent(long)",
"Throws an exception if at least one results directory is missing.",
"Counts the coordinates stored in a single statement for the relevant\nproperty, if they are actually given and valid.\n\n@param statement\n@param itemDocument",
"Creates the tcpClient with proper handler.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception",
"Convert the Phoenix representation of a duration into a Duration instance.\n\n@param value Phoenix duration\n@return Duration instance",
"returns the abstract method from a SAM type, if it is a SAM type.\n@param c the SAM class\n@return null if nothing was found, the method otherwise",
"In managed environment do internal close the used connection"
] |
public static Set<String> listAllLinks(OperationContext context, String overlay) {
Set<String> serverGoupNames = listServerGroupsReferencingOverlay(context.readResourceFromRoot(PathAddress.EMPTY_ADDRESS), overlay);
Set<String> links = new HashSet<>();
for (String serverGoupName : serverGoupNames) {
links.addAll(listLinks(context, PathAddress.pathAddress(
PathElement.pathElement(SERVER_GROUP, serverGoupName),
PathElement.pathElement(DEPLOYMENT_OVERLAY, overlay))));
}
return links;
} | [
"Returns all the deployment runtime names associated with an overlay accross all server groups.\n\n@param context the current OperationContext.\n@param overlay the name of the overlay.\n@return all the deployment runtime names associated with an overlay accross all server groups."
] | [
"Processes a row of the sites table and stores the site information found\ntherein.\n\n@param siteRow\nstring serialisation of a sites table row as found in the SQL\ndump",
"Finds the parent group of the given one and returns it\n\n@param group Group for which the parent is needed\n@return The parent group of the given one. If the given one is the first one, it returns the same group",
"Checks the preconditions for creating a new ForbidSubStr processor with a List of forbidden substrings.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif forbiddenSubStrings is null\n@throws IllegalArgumentException\nif forbiddenSubStrings is empty",
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)",
"Print out the template information that the client needs for performing a request.\n\n@param json the writer to write the information to.",
"Initializes unspecified sign properties using available defaults\nand global settings.",
"Use this API to fetch all the responderpolicy resources that are configured on netscaler.",
"Build and return a foreign collection based on the field settings that matches the id argument. This can return\nnull in certain circumstances.\n\n@param parent\nThe parent object that we will set on each item in the collection.\n@param id\nThe id of the foreign object we will look for. This can be null if we are creating an empty\ncollection.",
"Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p"
] |
public void recordGetAllTime(long timeNS,
int requested,
int returned,
long totalValueBytes,
long totalKeyBytes) {
recordTime(Tracked.GET_ALL,
timeNS,
requested - returned,
totalValueBytes,
totalKeyBytes,
requested);
} | [
"Record the duration of a get_all operation, along with how many values\nwere requested, how may were actually returned and the size of the values\nreturned."
] | [
"Computes the determinant for the specified matrix. It must be square and have\nthe same width and height as what was specified in the constructor.\n\n@param mat The matrix whose determinant is to be computed.\n@return The determinant.",
"Read a block of data from the FastTrack file and determine if\nit contains a table definition, or columns.\n\n@param blockIndex index of the current block\n@param startIndex start index of the block in the file\n@param blockLength block length",
"Cleans the object key.\n\n@param name Name of the object key\n@return The {@link ValidationResult} object containing the object,\nand the error code(if any)",
"Sign in a group of connections to the registry by key\n\n@param key\nthe key\n@param connections\na collection of websocket connections",
"Use this API to fetch statistics of authenticationvserver_stats resource of given name .",
"Resolves current full path with .yml and .yaml extensions\n\n@param fullpath\nwithout extension.\n\n@return Path of existing definition or null",
"Merge the given maps.\n\n<p>\nThe replied map is a view on the given two maps.\nIf a key exists in the two maps, the replied value is the value of the right operand.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n<p>\nThe replied map is unmodifiable.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@since 2.15",
"Shutdown the server\n\n@throws Exception exception",
"Load a JSON file from the application's \"asset\" directory.\n\n@param context Valid {@link Context}\n@param asset Name of the JSON file\n@return New instance of {@link JSONObject}"
] |
@Override
public final PArray getArray(final String key) {
PArray result = optArray(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | [
"Get a property as a array or throw exception.\n\n@param key the property name"
] | [
"Checks, if the end type is valid for the set pattern type.\n@return a flag, indicating if the end type is valid for the pattern type.",
"Append field with quotes and escape characters added in the key, if required.\nThe value is added without quotes and any escape characters.\n\n@return this",
"Returns the perma link for the given resource and optional detail content.<p<\n\n@param cms the CMS context to use\n@param resourceName the page to generate the perma link for\n@param detailContentId the structure id of the detail content (may be null)\n\n@return the perma link",
"Creates a Span that covers an exact row. String parameters will be encoded as UTF-8",
"Writes the content of an input stream to an output stream\n\n@throws IOException",
"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})",
"Assign an ID value to this field.",
"symbol for filling padding position in output",
"exposed only for tests"
] |
public boolean setCustomResponse(String pathValue, String requestType, String customData) {
try {
JSONObject path = getPathFromEndpoint(pathValue, requestType);
if (path == null) {
String pathName = pathValue;
createPath(pathName, pathValue, requestType);
path = getPathFromEndpoint(pathValue, requestType);
}
String pathId = path.getString("pathId");
resetResponseOverride(pathId);
setCustomResponse(pathId, customData);
return toggleResponseOverride(pathId, true);
} catch (Exception e) {
e.printStackTrace();
}
return false;
} | [
"Sets a custom response on an endpoint\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@param customData custom response data\n@return true if success, false otherwise"
] | [
"Compiles the allowable actions for a file or folder.\n\n@param cms the current CMS context\n@param file the resource for which we want the allowable actions\n\n@return the allowable actions for the given resource",
"Validates bic.\n\n@param bic to be validated.\n@throws BicFormatException if bic is invalid.\nUnsupportedCountryException if bic's country is not supported.",
"Persists the current set of versions buffered for the current key into\nstorage, using the multiVersionPut api\n\nNOTE: Now, it could be that the stream broke off and has more pending\nversions. For now, we simply commit what we have to disk. A better design\nwould rely on in-stream markers to do the flushing to storage.",
"Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table.",
"Creates a map between a calendar ID and a list of\nwork pattern assignment rows.\n\n@param rows work pattern assignment rows\n@return work pattern assignment map",
"compares two java files",
"Set the week of month.\n@param weekOfMonthStr the week of month to set.",
"Gets the publisher wrapped by the specofoed FlexiblePublisher.\n@param publisher The FlexiblePublisher wrapping the publisher.\n@param type The type of the publisher wrapped by the FlexiblePublisher.\n@return The publisher object wrapped by the FlexiblePublisher.\nNull is returned if the FlexiblePublisher does not wrap a publisher of the specified type.\n@throws IllegalArgumentException In case publisher is not of type\n{@link org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher}",
"Delivers the correct JSON Object for the dockers\n\n@param dockers\n@throws org.json.JSONException"
] |
public int[] getIntArray(String attributeName)
{
int[] array = NativeVertexBuffer.getIntArray(getNative(), attributeName);
if (array == null)
{
throw new IllegalArgumentException("Attribute name " + attributeName + " cannot be accessed");
}
return array;
} | [
"Retrieves a vertex attribute as an integer array.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>int</i>\n@see #setIntVec(String, IntBuffer)\n@see #getIntArray(String)"
] | [
"Generate the specified output file by merging the specified\nVelocity template with the supplied context.",
"Use this API to fetch dnstxtrec resource of given name .",
"Delete all backups asynchronously",
"Tests correctness. Try\nfrom=1000, to=10000\nfrom=200, to=1000\nfrom=16, to=1000\nfrom=1000, to=Integer.MAX_VALUE",
"Reads GIF image from byte array.\n\n@param data containing GIF file.\n@return read status code (0 = no errors).",
"Keep a cache of items files associated with classification in order to improve performance.",
"Requests the cue list for a specific track ID, given a dbserver connection to a player that has already\nbeen set up.\n\n@param rekordboxId the track of interest\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved cue list, or {@code null} if none was available\n@throws IOException if there is a communication problem",
"Imports a file via assimp without post processing.\n\n@param filename the file to import\n@return the loaded scene\n@throws IOException if an error occurs",
"Use this API to fetch gslbservice resource of given name ."
] |
public void setList(List<T> list) {
if (list != mList) {
mList = list;
if (mList == null) {
notifyInvalidated();
} else {
notifyChanged();
}
}
} | [
"Set new list data set\n@param list new data set"
] | [
"Looks up the object from the cache\n\n@param oid The Identity to look up the object for\n@return The object if found, otherwise null",
"Function to perform backward pooling",
"Returns the value of a property of the current object on the specified level.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"",
"Given the current and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@throws IOException",
"Looks for sequences of integer lists and combine them into one big sequence",
"Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds",
"this method is not intended to be called by clients\n@since 2.12",
"Send a DEBUG log message with specified subsystem. If subsystem is not enabled the message\nwill not be logged\n@param subsystem logging subsystem\n@param tag Used to identify the source of a log message. It usually identifies the class or\nactivity where the log call occurs.\n@param pattern The message pattern\n@return",
"Sets the scale vector of the keyframe."
] |
public void setFieldConversionClassName(String fieldConversionClassName)
{
try
{
this.fieldConversion = (FieldConversion) ClassHelper.newInstance(fieldConversionClassName);
}
catch (Exception e)
{
throw new MetadataException(
"Could not instantiate FieldConversion class using default constructor", e);
}
} | [
"Sets the fieldConversion.\n@param fieldConversionClassName The fieldConversion to set"
] | [
"Adds the remaining tokens to the processed tokens list.\n\n@param iter An iterator over the remaining tokens",
"Get a collection of Photo objects for the specified Photoset.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@param photosetId\nThe photoset ID\n@param extras\nSet of extra-fields\n@param privacy_filter\nfilter value for authenticated calls\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return PhotoList The Collection of Photo objects\n@throws FlickrException",
"Creates a real agent in the platform\n\n@param agent_name\nThe name that the agent is gonna have in the platform\n@param path\nThe path of the description (xml) of the agent",
"Render json.\n\n@param o\nthe o\n@return the string",
"This continuously tries to reconnect in a separate thread and will only stop if the connection was established\nsuccessfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters\nand callback will get updated.\n\n@param reconnectUri the updated connection uri\n@param authKey the updated authentication key\n@param callback the current callback",
"creates a bounds object with both point parsed from the json and set it\nto the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Write a comma to the output stream if required.",
"any possible bean invocations from other ADV observers",
"Adds a clause that checks whether ANY set bits in a bitmask are present\nin a numeric expression.\n\n@param expr\nSQL numeric expression to check.\n@param bits\nInteger containing the bits for which to check."
] |
protected void updateForNewConfiguration(CmsGitConfiguration gitConfig) {
if (!m_checkinBean.setCurrentConfiguration(gitConfig)) {
Notification.show(
CmsVaadinUtils.getMessageText(Messages.GUI_GIT_CONFIGURATION_SWITCH_FAILED_0),
CmsVaadinUtils.getMessageText(Messages.GUI_GIT_CONFIGURATION_SWITCH_FAILED_DESC_0),
Type.ERROR_MESSAGE);
m_configurationSelector.select(m_checkinBean.getCurrentConfiguration());
return;
}
resetSelectableModules();
for (final String moduleName : gitConfig.getConfiguredModules()) {
addSelectableModule(moduleName);
}
updateNewModuleSelector();
m_pullFirst.setValue(Boolean.valueOf(gitConfig.getDefaultAutoPullBefore()));
m_pullAfterCommit.setValue(Boolean.valueOf(gitConfig.getDefaultAutoPullAfter()));
m_addAndCommit.setValue(Boolean.valueOf(gitConfig.getDefaultAutoCommit()));
m_pushAutomatically.setValue(Boolean.valueOf(gitConfig.getDefaultAutoPush()));
m_commitMessage.setValue(Strings.nullToEmpty(gitConfig.getDefaultCommitMessage()));
m_copyAndUnzip.setValue(Boolean.valueOf(gitConfig.getDefaultCopyAndUnzip()));
m_excludeLib.setValue(Boolean.valueOf(gitConfig.getDefaultExcludeLibs()));
m_ignoreUnclean.setValue(Boolean.valueOf(gitConfig.getDefaultIngoreUnclean()));
m_userField.setValue(Strings.nullToEmpty(gitConfig.getDefaultGitUserName()));
m_emailField.setValue(Strings.nullToEmpty(gitConfig.getDefaultGitUserEmail()));
} | [
"Updates the options panel for a special configuration.\n@param gitConfig the git configuration."
] | [
"Binds the Identities Primary key values to the statement.",
"Use this API to fetch filtered set of vpnglobal_auditnslogpolicy_binding resources.\nset the filter parameter values in filtervalue object.",
"Sets the frame pointer to a specific frame\n\n@return boolean true if the move was successful",
"Inserts a Serializable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Serializable object, or null\n@return this bundler instance to chain method calls",
"Use this API to add tmtrafficaction.",
"Parses the configuration node and provides a pipeline configuration without any extensions marked for loading.\nThe configuration node is supposed to conform to the pipeline configuration JSON schema.\n\n<p>The caller is supposed to use the methods from the builder to add/find extension classes that will be used in\nthe analysis.\n\n<p>Note that the returned pipeline configuration might not contain all the extensions available in\nthe classloader depending on the include/exclude filters in the configuration.\n\n@param json the configuration node\n@return a pipeline configuration parsed from the configuration\n@see Builder#build()",
"This method is used to initiate a release staging process using the Artifactory Release Staging API.",
"Load the given class using a specific class loader.\n\n@param className The name of the class\n@param cl The Class Loader to be used for finding the class.\n@return The class object",
"Returns a Bic object holding the value of the specified String.\n\n@param bic the String to be parsed.\n@return a Bic object holding the value represented by the string argument.\n@throws BicFormatException if the String doesn't contain parsable Bic.\nUnsupportedCountryException if bic's country is not supported."
] |
public static void append(File file, Object text, String charset) throws IOException {
Writer writer = null;
try {
FileOutputStream out = new FileOutputStream(file, true);
if (!file.exists()) {
writeUTF16BomIfRequired(charset, out);
}
writer = new OutputStreamWriter(out, charset);
InvokerHelper.write(writer, text);
writer.flush();
Writer temp = writer;
writer = null;
temp.close();
} finally {
closeWithWarning(writer);
}
} | [
"Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0"
] | [
"Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.",
"After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime",
"Notify all WorkerListeners currently registered for the given WorkerEvent.\n@param event the WorkerEvent that occurred\n@param worker the Worker that the event occurred in\n@param queue the queue the Worker is processing\n@param job the Job related to the event (only supply for JOB_PROCESS, JOB_EXECUTE, JOB_SUCCESS, and\nJOB_FAILURE events)\n@param runner the materialized object that the Job specified (only supply for JOB_EXECUTE and\nJOB_SUCCESS events)\n@param result the result of the successful execution of the Job (only set for JOB_SUCCESS and if the Job was\na Callable that returned a value)\n@param t the Throwable that caused the event (only supply for JOB_FAILURE and ERROR events)",
"Calculate the child size along the axis\n@param dataIndex data index\n@param axis {@link Axis}\n@return child size",
"Log the data for a single column.\n\n@param startIndex offset into buffer\n@param length length",
"Returns the default hidden preference for the user.\n\n@return boolean hidden or not\n@throws FlickrException",
"Write a map field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Add a new script\n\n@param model\n@param name\n@param script\n@return\n@throws Exception",
"Executes a method on the server asynchronously"
] |
public Launcher addEnvironmentVariable(final String key, final String value) {
env.put(key, value);
return this;
} | [
"Adds an environment variable to the process being created.\n\n@param key they key for the variable\n@param value the value for the variable\n\n@return the launcher"
] | [
"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",
"Gen job id.\n\n@return the string",
"Determines the accessor method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name",
"Record the details of the media being cached, to make it easier to recognize, now that we have access to that\ninformation.\n\n@param slot the slot from which a metadata cache is being created\n@param zos the stream to which the ZipFile is being written\n@param channel the low-level channel to which the cache is being written\n\n@throws IOException if there is a problem writing the media details entry",
"This method writes task data to an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Compute the repair set from the given values and nodes\n\n@param nodeValues The value found on each node\n@return A set of repairs to perform",
"this method mimics EMC behavior",
"Serialize a map of objects to a JSON String.\n\n@param map The map of objects to serialize.\n@param jsonObjectClass The @JsonObject class of the list elements",
"Set the end time.\n@param date the end time to set."
] |
@SuppressWarnings("deprecation")
@Deprecated
public final void validateAndSet(ModelNode operationObject, final ModelNode model) throws OperationFailedException {
validateOperation(operationObject);
for (AttributeDefinition ad : this.parameters) {
ad.validateAndSet(operationObject, model);
}
} | [
"validates operation against the definition and sets model for the parameters passed.\n\n@param operationObject model node of type {@link ModelType#OBJECT}, typically representing an operation request\n@param model model node in which the value should be stored\n@throws OperationFailedException if the value is not valid\n\n@deprecated Not used by the WildFly management kernel; will be removed in a future release"
] | [
"Sends a request to the API with the given parameters and the given\nrequest method and returns the result string. It automatically fills the\ncookie map with cookies in the result header after the request.\n\nWarning: You probably want to use ApiConnection.sendJsonRequest\nthat execute the request using JSON content format,\nthrows the errors and logs the warnings.\n\n@param requestMethod\neither POST or GET\n@param parameters\nMaps parameter keys to values. Out of this map the function\nwill create a query string for the request.\n@return API result\n@throws IOException",
"Read a field from the supplied stream, starting with the tag that identifies the type, and reading enough\nto collect the corresponding value.\n\n@param is the stream on which a type tag is expected to be the next byte, followed by the field value.\n\n@return the field that was found on the stream.\n\n@throws IOException if there is a problem reading the field.",
"Convert an MPXJ Duration instance into an integer duration in minutes\nready to be written to an MPX file.\n\n@param properties project properties, used for duration units conversion\n@param duration Duration instance\n@return integer duration in minutes",
"Add the elements that all values objects require from the provided values object.\n\n@param sourceValues the values object containing the required elements",
"Use this API to update clusternodegroup resources.",
"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\"",
"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.",
"A simple helper method that creates a pool of connections to Redis using\nthe supplied configurations.\n\n@param jesqueConfig the config used to create the pooled Jedis connections\n@param poolConfig the config used to create the pool\n@return a configured Pool of Jedis connections",
"Method to get the file writer required for the .story files\n\n@param scenarioName\n@param aux_package_path\n@param dest_dir\n@return The file writer that generates the .story files for each test\n@throws BeastException"
] |
public static Optional<Variable> freshBuilder(SourceBuilder code, Datatype datatype) {
if (!datatype.getBuilderFactory().isPresent()) {
return Optional.empty();
}
return Optional.of(code.scope().computeIfAbsent(Declaration.FRESH_BUILDER, () -> {
Variable defaults = new Variable("defaults");
code.addLine("%s %s = %s;",
datatype.getGeneratedBuilder(),
defaults,
datatype.getBuilderFactory().get()
.newBuilder(datatype.getBuilder(), TypeInference.INFERRED_TYPES));
return defaults;
}));
} | [
"Declares a fresh Builder to copy default property values from.\n\n<p>Reuses an existing fresh Builder instance if one was already declared in this scope.\n\n@returns a variable holding a fresh Builder, if a no-args factory method is available to\ncreate one with"
] | [
"Consumer is required to do any privilege checks before getting here\n\n@param request a {@link HttpServletRequest} which may contain forced groups parameters from URL, Header or Cookie.\n@return a map of test names to bucket values specified by the request. Returns an empty {@link Map} if nothing was specified",
"Determine if a CharSequence can be parsed as a Long.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isLong(String)\n@since 1.8.2",
"Computes the product of the diagonal elements. For a diagonal or triangular\nmatrix this is the determinant.\n\n@param T A matrix.\n@return product of the diagonal elements.",
"Publish the bundle resources directly.",
"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.",
"Calculate the starting content offset based on the layout orientation and Gravity\n@param totalSize total size occupied by the content",
"Sets the underlying read timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#readTimeout(long, TimeUnit)",
"Adds OPT_U | OPT_URL option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available"
] |
private static void validatePseudoScopedBean(Bean<?> bean, BeanManagerImpl beanManager) {
if (bean.getInjectionPoints().isEmpty()) {
// Skip validation if there are no injection points (e.g. for classes which are not intended to be used as beans)
return;
}
reallyValidatePseudoScopedBean(bean, beanManager, new LinkedHashSet<Object>(), new HashSet<Bean<?>>());
} | [
"Checks to make sure that pseudo scoped beans (i.e. @Dependent scoped beans) have no circular dependencies."
] | [
"This method take a list of fileName of the type partitionId_Replica_Chunk\nand returns file names that match the regular expression\nmasterPartitionId_",
"Deserialize a directory of javascript design documents to a List of DesignDocument objects.\n\n@param directory the directory containing javascript files\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read",
"Checks whether the given class maps to a different table but also has the given collection.\n\n@param origCollDef The original collection to search for\n@param origTableDef The original table\n@param classDef The class descriptor to test\n@return <code>true</code> if the class maps to a different table and has the collection",
"Samples with replacement from a collection\n\n@param c\nThe collection to be sampled from\n@param n\nThe number of samples to take\n@return a new collection with the sample",
"Command line method to walk the directories provided on the command line\nand print out their contents\n\n@param args Directory names",
"Gets the '.disabled' file for a given version of this store. That file may or may not\nexist.\n\n@param version of the store for which to get the '.disabled' file.\n@return an instance of {@link File} pointing to the '.disabled' file.\n@throws PersistenceFailureException if the requested version cannot be found.",
"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",
"Get the Attribute metadata for an MBean by name.\n@return the {@link Map} of {@link String} attribute names to {@link MBeanAttributeInfo} values.",
"Creates a span that covers an exact row"
] |
private OperationEntry getInheritableOperationEntryLocked(final String operationName) {
final OperationEntry entry = operations == null ? null : operations.get(operationName);
if (entry != null && entry.isInherited()) {
return entry;
}
return null;
} | [
"Only call with the read lock held"
] | [
"Use this API to fetch all the protocolhttpband resources that are configured on netscaler.\nThis uses protocolhttpband_args which is a way to provide additional arguments while fetching the resources.",
"Want to make arbitrary probability queries? Then this is the method for\nyou. Given the filename, it reads it in and breaks it into documents, and\nthen makes a CRFCliqueTree for each document. you can then ask the clique\ntree for marginals and conditional probabilities of almost anything you\nwant.",
"Render json.\n\n@param o\nthe o\n@return the string",
"Helper method to convert seed bytes into the long value required by the\nsuper class.",
"Creates a resource key with id defined as enumeration value name and bundle specified by given class.\n@param clazz the class owning the bundle\n@param value enumeration value used to define key id\n@return the resource key",
"Creates a decorator bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return a Bean",
"Close the Closeable. Logging a warning if any problems occur.\n\n@param c the thing to close",
"Runs the shell script for committing and optionally pushing the changes in the module.\n@return exit code of the script.",
"Performs a streaming request against a Stitch app server determined by the deployment model\nof the underlying app. Throws a Stitch specific exception if the request fails.\n\n@param stitchReq the request to perform.\n@return an {@link EventStream} that will provide response events."
] |
private Table getTable(String name)
{
Table table = m_tables.get(name);
if (table == null)
{
table = EMPTY_TABLE;
}
return table;
} | [
"Retrieve a table by name.\n\n@param name table name\n@return Table instance"
] | [
"Computes the rank of a matrix using the specified tolerance.\n\n@param A Matrix whose rank is to be calculated. Not modified.\n@param threshold The numerical threshold used to determine a singular value.\n@return The matrix's rank.",
"Pause component timer for current instance\n@param type - of component",
"Get a log file and last relevant date, and check if the log file is relevant\n@param currentLogFile The log file\n@param lastRelevantDate The last date which files should be keeping since\n@return false if the file should be deleted, true if it does not.",
"Overridden to ensure that our timestamp handling is as expected",
"Tries to load a site specific error page. If\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param errorCode the error code to display\n@return a flag, indicating if the custom error page could be loaded.",
"Process a currency definition.\n\n@param row record from XER file",
"Use this API to fetch all the sslcipher resources that are configured on netscaler.",
"Use this API to fetch vlan_nsip6_binding resources of given name .",
"Gets the proper modulus operation.\n\n@param x Integer.\n@param m Modulo.\n@return Modulus."
] |
private String escapeQuotes(String value)
{
StringBuilder sb = new StringBuilder();
int length = value.length();
char c;
sb.append('"');
for (int index = 0; index < length; index++)
{
c = value.charAt(index);
sb.append(c);
if (c == '"')
{
sb.append('"');
}
}
sb.append('"');
return (sb.toString());
} | [
"This method is called when double quotes are found as part of\na value. The quotes are escaped by adding a second quote character\nand the entire value is quoted.\n\n@param value text containing quote characters\n@return escaped and quoted text"
] | [
"Register the agent in the platform\n\n@param agent_name\nThe name of the agent to be registered\n@param agent\nThe agent to register.\n@throws FIPAException",
"Print units.\n\n@param value units value\n@return units value",
"Initialise an extension module's extensions in the extension registry\n\n@param extensionRegistry the extension registry\n@param module the name of the module containing the extensions\n@param rootRegistration The parent registration of the extensions. For a server or domain.xml extension, this will be the root resource registration. For a host.xml extension, this will be the host resource registration\n@param extensionRegistryType The type of the registry",
"Parse units.\n\n@param value units value\n@return units value",
"Checks to see if either the diagonal element or off diagonal element is zero. If one is\nthen it performs a split or pushes it off the matrix.\n\n@return True if there was a zero.",
"Start with specifying the groupId",
"Sets the current configuration if it is a valid configuration. Otherwise the configuration is not set.\n@param configuration the configuration to set.\n@return flag, indicating if the configuration is set.",
"Split string content into list, ignoring matches of the pattern\n@param content String content\n@param ignorePattern Pattern to ignore\n@return list",
"Get CorrelationId from message.\n\n@param message the message\n@return correlationId or null if not set"
] |
public static final BigInteger printEarnedValueMethod(EarnedValueMethod value)
{
return (value == null ? BigInteger.valueOf(EarnedValueMethod.PERCENT_COMPLETE.getValue()) : BigInteger.valueOf(value.getValue()));
} | [
"Print an earned value method.\n\n@param value EarnedValueMethod instance\n@return earned value method value"
] | [
"Match the Origin header with the allowed origins.\nIf it doesn't match then a 403 response code is set on the response and it returns null.\n@param exchange the current HttpExchange.\n@param allowedOrigins list of sanitized allowed origins.\n@return the first matching origin, null otherwise.\n@throws Exception",
"returns an array containing values for all the Objects attribute\n@throws PersistenceBrokerException if there is an erros accessing obj field values",
"Executes a batch plan.\n\n@param batchId Used as the ID of the batch plan. This allows related\ntasks on client- & server-side to pretty print messages in a\nmanner that debugging can track specific batch plans across the\ncluster.\n@param batchPlan The batch plan...",
"Iterate RMI Targets Map and remove entries loaded by protected ClassLoader",
"Compress a directory into a zip file\n\n@param dir Directory\n@param zipFile ZIP file to create\n@throws IOException I/O Error",
"Deletes an individual alias\n\n@param alias\nthe alias to delete",
"Generate a path select string\n\n@return Select query string",
"Validates the deployment.\n\n@param isDomain {@code true} if this is a domain server, otherwise {@code false}\n\n@throws MojoDeploymentException if the deployment is invalid",
"Use this API to update onlinkipv6prefix resources."
] |
protected int compare(MethodDesc o1, MethodDesc o2) {
final Class<?>[] paramTypes1 = o1.getParameterTypes();
final Class<?>[] paramTypes2 = o2.getParameterTypes();
// sort by parameter types from left to right
for (int i = 0; i < paramTypes1.length; i++) {
final Class<?> class1 = paramTypes1[i];
final Class<?> class2 = paramTypes2[i];
if (class1.equals(class2))
continue;
if (class1.isAssignableFrom(class2) || Void.class.equals(class2))
return -1;
if (class2.isAssignableFrom(class1) || Void.class.equals(class1))
return 1;
}
// sort by declaring class (more specific comes first).
if (!o1.getDeclaringClass().equals(o2.getDeclaringClass())) {
if (o1.getDeclaringClass().isAssignableFrom(o2.getDeclaringClass()))
return 1;
if (o2.getDeclaringClass().isAssignableFrom(o1.getDeclaringClass()))
return -1;
}
// sort by target
final int compareTo = ((Integer) targets.indexOf(o2.target)).compareTo(targets.indexOf(o1.target));
return compareTo;
} | [
"returns > 0 when o1 is more specific than o2,\n\nreturns == 0 when o1 and o2 are equal or unrelated,\n\nreturns < 0 when o2 is more specific than o1,"
] | [
"Returns the size of the shadow element",
"Use this API to delete dnsaaaarec.",
"Return all URI schemes that are supported in the system.",
"Set brightness to eg. darken the resulting image for use as background\n\n@param brightness default is 0, pos values increase brightness, neg. values decrease brightness\n.-100 is black, positive goes up to 1000+",
"Notification that the server process finished.",
"Returns the y-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the y coordinate",
"Obtains a Coptic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"from IsoFields in ThreeTen-Backport",
"Readable yyyyMMdd representation of a day, which is also sortable."
] |
private void setTasks(String tasks) {
for (String task : tasks.split(",")) {
if (KNOWN_TASKS.containsKey(task)) {
this.tasks |= KNOWN_TASKS.get(task);
this.taskName += (this.taskName.isEmpty() ? "" : "-") + task;
} else {
logger.warn("Unsupported RDF serialization task \"" + task
+ "\". Run without specifying any tasks for help.");
}
}
} | [
"Sets the RDF serialization tasks based on the given string value.\n\n@param tasks\na space-free, comma-separated list of task names"
] | [
"validates operation against the definition and sets model for the parameters passed.\n\n@param operationObject model node of type {@link ModelType#OBJECT}, typically representing an operation request\n@param model model node in which the value should be stored\n@throws OperationFailedException if the value is not valid\n\n@deprecated Not used by the WildFly management kernel; will be removed in a future release",
"Gets axis dimension\n@param axis Axis. It might be either {@link Layout.Axis#X X} or\n{@link Layout.Axis#Y Y} or {@link Layout.Axis#Z Z}\n@return axis dimension",
"Writes the results of the processing to a file.",
"Returns the u component of a coordinate from a texture coordinate set.\n\n@param vertex the vertex index\n@param coords the texture coordinate set\n@return the u component",
"Finds or creates a ResourceStorageLoadable for the given resource.\nClients should first call shouldLoadFromStorage to check whether there exists a storage version\nof the given resource.\n\n@return an IResourceStorageLoadable",
"Operators which affect the variables to its left and right",
"Closes any registered stream entries that have not yet been consumed",
"Finds the maximum abs in each column of A and stores it into values\n@param A (Input) Matrix\n@param values (Output) storage for column max abs",
"Issue the database statements to create the table associated with a table configuration.\n\n@param connectionSource\nconnectionSource Associated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@return The number of statements executed to do so."
] |
public static void setDefaultHostName(String hostName) {
if (hostName == null || hostName.contains(":")) {
return;
}
DEFAULT_BASE_URL = "http://" + hostName + ":" + DEFAULT_API_PORT + "/" + API_BASE + "/";
} | [
"Set the default host running the Odo instance to configure. Allows default profile methods and PathValueClient to\noperate on remote hosts\n\n@param hostName name of host"
] | [
"Initialization method.\n\n@param t1\n@param t2",
"Creates the request.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception",
"Convert JsonString to Object of Clazz\n\n@param json\n@param clazz\n@return Object of Clazz",
"Use this API to add route6.",
"Returns the mode in the Collection. If the Collection has multiple modes, this method picks one\narbitrarily.",
"Find the number of Strings matched to the given Matcher.\n\n@param matcher a Matcher\n@return int the number of Strings matched to the given matcher.\n@since 1.0",
"resumed a given deployment\n\n@param deployment The deployment to resume",
"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns all the elements in the sorted set with a value in the given range.\nIf the elements in the sorted set have different scores, the returned elements are unspecified.\n@param lexRange\n@return the range of elements",
"Sets the delegate of the service, that gets notified of the\nstatus of message delivery.\n\nNote: This option has no effect when using non-blocking\nconnections."
] |
private boolean runQueuedTask(boolean hasPermit) {
if (!hasPermit && beginRequest(paused) == RunResult.REJECTED) {
return false;
}
QueuedTask task = null;
if (!paused) {
task = taskQueue.poll();
} else {
//the container is suspended, but we still need to run any force queued tasks
task = findForcedTask();
}
if (task != null) {
if(!task.runRequest()) {
decrementRequestCount();
}
return true;
} else {
decrementRequestCount();
return false;
}
} | [
"Runs a queued task, if the queue is not already empty.\n\nNote that this will decrement the request count if there are no queued tasks to be run\n\n@param hasPermit If the caller has already called {@link #beginRequest(boolean force)}"
] | [
"Check the variable name and if not set, set it with the singleton variable being on the top of the stack.",
"Set the gamma levels.\n@param rGamma the gamma level for the red channel\n@param gGamma the gamma level for the blue channel\n@param bGamma the gamma level for the green channel\n@see #getGamma",
"This method recursively descends the directory structure, dumping\ndetails of any files it finds to the output file.\n\n@param pw Output PrintWriter\n@param dir DirectoryEntry to dump\n@param prefix prefix used to identify path to this object\n@param showData flag indicating if data is dumped, or just structure\n@param hex set to true if hex output is required\n@param indent indent used if displaying structure only\n@throws Exception Thrown on file read errors",
"Use this API to fetch all the dospolicy resources that are configured on netscaler.",
"Search for interesting photos using the Flickr Interestingness algorithm.\n\n@param params\nAny search parameters\n@param perPage\nNumber of items per page\n@param page\nThe page to start on\n@return A PhotoList\n@throws FlickrException",
"Create a set out of the items in the Iterable.\n\n@param <T>\nThe type of items in the Iterable.\n@param items\nThe items to be made into a set.\n@return A set consisting of the items from the Iterable.",
"Get a list of tags for the specified photo.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param photoId\nThe photo ID\n@return The collection of Tag objects",
"Retrieves the avatar of a user as an InputStream.\n\n@return InputStream representing the user avater.",
"Get a list of modules regarding filters\n\n@param filters Map<String,String>\n@return List<Module>\n@throws GrapesCommunicationException"
] |
public static long count(nitro_service service, String zonename) throws Exception{
dnszone_domain_binding obj = new dnszone_domain_binding();
obj.set_zonename(zonename);
options option = new options();
option.set_count(true);
dnszone_domain_binding response[] = (dnszone_domain_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | [
"Use this API to count dnszone_domain_binding resources configued on NetScaler."
] | [
"Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.",
"Utility method to retrieve the previous working date finish 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 previous work finish",
"Get a loader that lists the Files in the current path,\nand monitors changes.",
"All tests completed.",
"Called whenever a rebalance task completes. This means one task is done\nand some number of partition stores have been migrated.\n\n@param taskId\n@param partitionStoresMigrated Number of partition stores moved by this\ncompleted task.",
"the 1st request from the manager.",
"Connects to a child JVM process\n\n@param p the process to which to connect\n@param startAgent whether to installed the JMX agent in the target process if not already in place\n@return an {@link MBeanServerConnection} to the process's MBean server",
"mark a node as blacklisted\n\n@param nodeId Integer node id of the node to be blacklisted",
"Creates a PathAddress from the given ModelNode address. The given node is expected to be an address node.\n\n@param node the node (cannot be {@code null})\n\n@return the update identifier"
] |
private void initStoreDefinitions(Version storesXmlVersion) {
if(this.storeDefinitionsStorageEngine == null) {
throw new VoldemortException("The store definitions directory is empty");
}
String allStoreDefinitions = "<stores>";
Version finalStoresXmlVersion = null;
if(storesXmlVersion != null) {
finalStoresXmlVersion = storesXmlVersion;
}
this.storeNames.clear();
ClosableIterator<Pair<String, Versioned<String>>> storesIterator = this.storeDefinitionsStorageEngine.entries();
// Some test setups may result in duplicate entries for 'store' element.
// Do the de-dup here
Map<String, Versioned<String>> storeNameToDefMap = new HashMap<String, Versioned<String>>();
Version maxVersion = null;
while(storesIterator.hasNext()) {
Pair<String, Versioned<String>> storeDetail = storesIterator.next();
String storeName = storeDetail.getFirst();
Versioned<String> versionedStoreDef = storeDetail.getSecond();
storeNameToDefMap.put(storeName, versionedStoreDef);
Version curVersion = versionedStoreDef.getVersion();
// Get the highest version from all the store entries
if(maxVersion == null) {
maxVersion = curVersion;
} else if(maxVersion.compare(curVersion) == Occurred.BEFORE) {
maxVersion = curVersion;
}
}
// If the specified version is null, assign highest Version to
// 'stores.xml' key
if(finalStoresXmlVersion == null) {
finalStoresXmlVersion = maxVersion;
}
// Go through all the individual stores and update metadata
for(Entry<String, Versioned<String>> storeEntry: storeNameToDefMap.entrySet()) {
String storeName = storeEntry.getKey();
Versioned<String> versionedStoreDef = storeEntry.getValue();
// Add all the store names to the list of storeNames
this.storeNames.add(storeName);
this.metadataCache.put(storeName, new Versioned<Object>(versionedStoreDef.getValue(),
versionedStoreDef.getVersion()));
}
Collections.sort(this.storeNames);
for(String storeName: this.storeNames) {
Versioned<String> versionedStoreDef = storeNameToDefMap.get(storeName);
// Stitch together to form the complete store definition list.
allStoreDefinitions += versionedStoreDef.getValue();
}
allStoreDefinitions += "</stores>";
// Update cache with the composite store definition list.
metadataCache.put(STORES_KEY,
convertStringToObject(STORES_KEY,
new Versioned<String>(allStoreDefinitions,
finalStoresXmlVersion)));
} | [
"Function to go through all the store definitions contained in the STORES\ndirectory and\n\n1. Update metadata cache.\n\n2. Update STORES_KEY by stitching together all these keys.\n\n3. Update 'storeNames' list.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will correctly handle concurrency issues. Currently this is not an\nissue since its invoked by init, put, add and delete store all of which\nuse locks to deal with any concurrency related issues."
] | [
"Sets the global setting for this ID\n\n@param pathId ID of path\n@param global True if global, False otherwise",
"Detach a scope from its parent, this will trigger the garbage collection of this scope and it's\nsub-scopes\nif they are not referenced outside of Toothpick.\n\n@param name the name of the scope to close.",
"Returns the data about all of the plugins that are set\n\n@param onlyValid True to get only valid plugins, False for all\n@return array of Plugins set",
"Maps the text representation of column data to Java types.\n\n@param table table name\n@param column column name\n@param data text representation of column data\n@param type column data type\n@param epochDateFormat true if date is represented as an offset from an epoch\n@return Java representation of column data\n@throws MPXJException",
"Returns the configured page sizes, or the default page size if no core is configured.\n@return The configured page sizes, or the default page size if no core is configured.",
"Ask the specified player for a Folder menu for exploring its raw filesystem.\nThis is a request for unanalyzed items, so we do a typed menu request.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n@param folderId identifies the folder whose contents should be listed, use -1 to get the root folder\n\n@return the entries in the folder menu\n\n@throws Exception if there is a problem obtaining the menu",
"Waits for the current outstanding request retrying it with exponential backoff if it fails.\n\n@throws ClosedByInterruptException if request was interrupted\n@throws IOException In the event of FileNotFoundException, MalformedURLException\n@throws RetriesExhaustedException if exceeding the number of retries",
"Use this API to count bridgegroup_vlan_binding resources configued on NetScaler.",
"Creates a curator built using Fluo's zookeeper connection string. Root path will start at Fluo\nchroot."
] |
public static org.jfrog.hudson.ArtifactoryServer prepareArtifactoryServer(String artifactoryServerID,
ArtifactoryServer pipelineServer) {
if (artifactoryServerID == null && pipelineServer == null) {
return null;
}
if (artifactoryServerID != null && pipelineServer != null) {
return null;
}
if (pipelineServer != null) {
CredentialsConfig credentials = pipelineServer.createCredentialsConfig();
return new org.jfrog.hudson.ArtifactoryServer(null, pipelineServer.getUrl(), credentials,
credentials, pipelineServer.getConnection().getTimeout(), pipelineServer.isBypassProxy(), pipelineServer.getConnection().getRetry(), pipelineServer.getDeploymentThreads());
}
org.jfrog.hudson.ArtifactoryServer server = RepositoriesUtils.getArtifactoryServer(artifactoryServerID, RepositoriesUtils.getArtifactoryServers());
if (server == null) {
return null;
}
return server;
} | [
"Prepares Artifactory server either from serverID or from ArtifactoryServer.\n\n@param artifactoryServerID\n@param pipelineServer\n@return"
] | [
"Use this API to fetch tmtrafficaction resource of given name .",
"Use this API to count dnszone_domain_binding resources configued on NetScaler.",
"Deserialize an `AppDescriptor` from byte array\n\n@param bytes\nthe byte array\n@return\nan `AppDescriptor` instance",
"We add typeRefs without Nodes on the fly, so we should remove them before relinking.",
"Write a string attribute.\n\n@param name attribute name\n@param value attribute value",
"Execute JavaScript in the browser.\n\n@param code The code to execute.\n@return The return value of the JavaScript.\n@throws CrawljaxException when javascript execution failed.",
"High-accuracy Normal cumulative distribution function.\n\n@param x Value.\n@return Result.",
"Called on mouse up in the caption area, ends dragging by ending event\ncapture.\n\n@param event the mouse up event that ended dragging\n\n@see DOM#releaseCapture\n@see #beginDragging\n@see #endDragging",
"Sets the position of the currency symbol.\n\n@param posn currency symbol position."
] |
public static void log(final String templateName, final Template template, final Values values) {
new ValuesLogger().doLog(templateName, template, values);
} | [
"Log the values for the provided template.\n\n@param templateName the name of the template the values came from\n@param template the template object\n@param values the resultant values"
] | [
"Clear out our DAO caches.",
"Executes the API action \"wbsetaliases\" for the given parameters.\n\n@param id\nthe id of the entity to be edited; if used, the site and title\nparameters must be null\n@param site\nwhen selecting an entity by title, the site key for the title,\ne.g., \"enwiki\"; if used, title must also be given but id must\nbe null\n@param title\nstring used to select an entity by title; if used, site must\nalso be given but id must be null\n@param newEntity\nused for creating a new entity of a given type; the value\nindicates the intended entity type; possible values include\n\"item\" and \"property\"; if used, the parameters id, site, and\ntitle must be null\n@param language\nthe language code for the label\n@param add\nthe values of the aliases to add. They will be merged with the\nexisting aliases. This parameter cannot be used in conjunction\nwith \"set\".\n@param remove\nthe values of the aliases to remove. Other aliases will be retained.\nThis parameter cannot be used in conjunction with \"set\".\n@param set\nthe values of the aliases to set. This will erase any existing\naliases in this language and replace them by the given list.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Sets a new config and clears the previous cache",
"Initialize the class if this is being called with Spring.",
"Read file content to string.\n\n@param filePath\nthe file path\n@return the string\n@throws IOException\nSignals that an I/O exception has occurred.",
"Use this API to reset Interface resources.",
"Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given reference curve and an additional spread.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.\n@param referenceCurve The reference curve used for discounting the coupon payments.\n@param spread The spread which should be added to the discount curve.\n@param model The model under which the product is valued.\n@return The value of the bond for the given curve and spread.",
"Instantiates a new event collector.",
"Return the number of rows affected."
] |
public synchronized boolean hasNext()
{
try
{
if (!isHasCalledCheck())
{
setHasCalledCheck(true);
setHasNext(getRsAndStmt().m_rs.next());
if (!getHasNext())
{
autoReleaseDbResources();
}
}
}
catch (Exception ex)
{
setHasNext(false);
autoReleaseDbResources();
if(ex instanceof ResourceClosedException)
{
throw (ResourceClosedException)ex;
}
if(ex instanceof SQLException)
{
throw new PersistenceBrokerSQLException("Calling ResultSet.next() failed", (SQLException) ex);
}
else
{
throw new PersistenceBrokerException("Can't get next row from ResultSet", ex);
}
}
if (logger.isDebugEnabled())
logger.debug("hasNext() -> " + getHasNext());
return getHasNext();
} | [
"returns true if there are still more rows in the underlying ResultSet.\nReturns false if ResultSet is exhausted."
] | [
"Calculates the radius to a given boundedness value\n@param D Diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param B Boundedeness\n@return Confinement radius",
"Rent a car available in the last serach result\n@param intp - the command interpreter instance",
"Attaches an arbitrary object to this context.\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.",
"Moves a particular enum option to be either before or after another specified enum option in the custom field.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"in truth we probably only need the types as injected by the metadata binder",
"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",
"Returns flag whose value indicates if the string is null, empty or\nonly contains whitespace characters\n\n@param s a string\n@return true if the string is null, empty or only contains whitespace characters",
"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",
"Reads non outline code custom field values and populates container."
] |
Subsets and Splits