query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public static Drawable decideIcon(ImageHolder imageHolder, Context ctx, int iconColor, boolean tint) { if (imageHolder == null) { return null; } else { return imageHolder.decideIcon(ctx, iconColor, tint); } }
[ "a small static helper which catches nulls for us\n\n@param imageHolder\n@param ctx\n@param iconColor\n@param tint\n@return" ]
[ "Send a tempo changed announcement to all registered master listeners.\n\n@param tempo the new master tempo", "Transforms user name and icon size into the rfs image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path", "Returns an text table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.", "Return the number of arguments associated with the specified option.\nThe return value includes the actual option.\nWill return 0 if the option is not supported.", "Walk through the object graph of the specified insert object. Was used for\nrecursive object graph walk.", "Analyses the content of the general section of an ini configuration file\nand fills out the class arguments with this data.\n\n@param section\n{@link Section} with name \"general\"", "Converts the provided object to a date, if possible.\n\n@param date the date.\n\n@return the date as {@link java.util.Date}", "Registers a BeanNameAutoProxyCreator class that wraps the bean being\nmonitored. The proxy is associated with the PerformanceMonitorInterceptor\nfor the bean, which is created when parsing the methods attribute from\nthe springconfiguration xml file.\n\n@param source An Attribute node from the spring configuration\n@param holder A container for the beans I will create\n@param context the context currently parsing my spring config", "Parses command line arguments.\n\n@param args\nArray of arguments, like the ones provided by\n{@code void main(String[] args)}\n@param objs\nOne or more objects with annotated public fields.\n@return A {@code List} containing all unparsed arguments (i.e. arguments\nthat are no switches)\n@throws IOException\nif a parsing error occurred.\n@see CmdArgument" ]
public static<Z> Function0<Z> lift(Func0<Z> f) { return bridge.lift(f); }
[ "Lift a Java Func0 to a Scala Function0\n\n@param f the function to lift\n\n@returns the Scala function" ]
[ "Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid", "Add a clause where the ID is equal to the argument.", "Returns screen height and width\n\n@param context\nAny non-null Android Context\n@param p\nOptional Point to reuse. If null, a new Point will be created.\n@return .x is screen width; .y is screen height.", "Get unique values form the array.\n\n@param values Array of values.\n@return Unique values.", "Abort an upload session, discarding any chunks that were uploaded to it.", "Adds special accessors for private constants so that inner classes can retrieve them.", "Build the key for the TableAlias based on the path and the hints\n@param aPath\n@param hintClasses\n@return the key for the TableAlias", "Use this API to update nsspparams.", "Get the nearest scale.\n\n@param zoomLevels the list of Zoom Levels.\n@param tolerance the tolerance to use when considering if two values are equal. For example if\n12.0 == 12.001. The tolerance is a percentage.\n@param zoomLevelSnapStrategy the strategy to use for snapping to the nearest zoom level.\n@param geodetic snap to geodetic scales.\n@param paintArea the paint area of the map.\n@param dpi the DPI." ]
private void initExceptionsPanel() { m_exceptionsPanel.setLegend(Messages.get().key(Messages.GUI_SERIALDATE_PANEL_EXCEPTIONS_0)); m_exceptionsPanel.addCloseHandler(this); m_exceptionsPanel.setVisible(false); }
[ "Configure all UI elements in the exceptions panel." ]
[ "Use this API to fetch sslocspresponder 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", "In common shader cases, NaN makes little sense. Correspondingly, GVRF is\ngoing to use Float.NaN as illegal flag in many cases. Therefore, we need\na function to check if there is any setX that is using NaN as input.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param data\nA single float data.\n@throws IllegalArgumentException\nif the data includes NaN.", "The normalized string returned by this method is consistent with java.net.Inet6address.\n\nIPs are not compressed nor mixed in this representation. If this has a prefix length, that will be included in the string.", "Returns the sentence as a string with a space between words.\nDesigned to work robustly, even if the elements stored in the\n'Sentence' are not of type Label.\n\nThis one uses the default separators for any word type that uses\nseparators, such as TaggedWord.\n\n@param justValue If <code>true</code> and the elements are of type\n<code>Label</code>, return just the\n<code>value()</code> of the <code>Label</code> of each word;\notherwise,\ncall the <code>toString()</code> method on each item.\n@return The sentence in String form", "Makes a DocumentReaderAndWriter based on the flags the CRFClassifier\nwas constructed with. Will create the flags.readerAndWriter and\ninitialize it with the CRFClassifier's flags.", "Called when the layout is applied to the data\n@param container WidgetContainer to access the org.gearvrf.org.gearvrf.widgetlib in the layout\n@param viewPortSize View port for data set", "Use this API to fetch a rewriteglobal_binding resource .", "Given a Task instance, this task determines if it should be written to the\nPM XML file as an activity or as a WBS item, and calls the appropriate\nmethod.\n\n@param task Task instance" ]
protected void concatenateReports() { if (!concatenatedReports.isEmpty()) { // dummy group for page break if needed DJGroup globalGroup = createDummyGroup(); report.getColumnsGroups().add(0, globalGroup); } for (Subreport subreport : concatenatedReports) { DJGroup globalGroup = createDummyGroup(); globalGroup.getFooterSubreports().add(subreport); report.getColumnsGroups().add(0, globalGroup); } }
[ "Create dummy groups for each concatenated report, and in the footer of\neach group adds the subreport." ]
[ "Checks if data set is mandatory but missing or non repeatable but having\nmultiple values in this IIM instance.\n\n@param info\nIIM data set to check\n@return list of constraint violations, empty set if data set is valid", "Sanity checks the input or declares a new matrix. Return matrix is an identity matrix.", "Get CorrelationId from message.\n\n@param message the message\n@return correlationId or null if not set", "Handle content length.\n\n@param event\nthe event", "Get result of one of the task that belongs to this task's task group.\n\n@param key the task key\n@param <T> the actual type of the task result\n@return the task result, null will be returned if task has not produced a result yet", "Processes the most recent dump of the sites table to extract information\nabout registered sites.\n\n@return a Sites objects that contains the extracted information, or null\nif no sites dump was available (typically in offline mode without\nhaving any previously downloaded sites dumps)\n@throws IOException\nif there was a problem accessing the sites table dump or the\ndump download directory", "Use this API to delete ntpserver resources.", "Inverts an upper or lower triangular block submatrix.\n\n@param blockLength\n@param upper Is it upper or lower triangular.\n@param T Triangular matrix that is to be inverted. Must be block aligned. Not Modified.\n@param T_inv Where the inverse is stored. This can be the same as T. Modified.\n@param temp Work space variable that is size blockLength*blockLength.", "Get an integer property override value.\n@param name the {@link CircuitBreaker} name.\n@param key the property override key.\n@return the property override value, or null if it is not found." ]
public void init( DMatrixRMaj A ) { if( A.numRows != A.numCols) throw new IllegalArgumentException("Must be square"); if( A.numCols != N ) { N = A.numCols; QT.reshape(N,N, false); if( w.length < N ) { w = new double[ N ]; gammas = new double[N]; b = new double[N]; } } // just copy the top right triangle QT.set(A); }
[ "If needed declares and sets up internal data structures.\n\n@param A Matrix being decomposed." ]
[ "Send JSON representation of given data object to all connections tagged with\ngiven label\n@param data the data object\n@param label the tag label", "Check if the node matches the column values\n\n@param nodeProperties the properties on the node\n@param keyColumnNames the name of the columns to check\n@param keyColumnValues the value of the columns to check\n@return true if the properties of the node match the column names and values", "Gets the publisher of the specified type, if it is wrapped by the \"Flexible Publish\" publisher in a project.\nNull is returned if no such publisher is found.\n@param project The project\n@param type The type of the publisher", "Gets the Hamming distance between two strings.\n\n@param first First string.\n@param second Second string.\n@return The Hamming distance between p and q.", "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.", "This method writes data for an individual calendar to a PM XML file.\n\n@param mpxj ProjectCalander instance", "Takes the file, reads it in, and prints out the likelihood of each possible\nlabel at each point.\n\n@param filename\nThe path to the specified file", "Disable all overrides for a specified path with overrideType\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client\n@param overrideType Override type identifier", "Given a string which is either the name of a predefined tab configuration or a configuration string, returns\nthe corresponding tab configuration.\n\n@param configStr a configuration string or predefined configuration name\n\n@return the gallery tab configuration" ]
public void downloadRange(OutputStream output, long rangeStart, long rangeEnd, ProgressListener listener) { URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID()); BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET"); if (rangeEnd > 0) { request.addHeader("Range", String.format("bytes=%s-%s", Long.toString(rangeStart), Long.toString(rangeEnd))); } else { request.addHeader("Range", String.format("bytes=%s-", Long.toString(rangeStart))); } BoxAPIResponse response = request.send(); InputStream input = response.getBody(listener); byte[] buffer = new byte[BUFFER_SIZE]; try { int n = input.read(buffer); while (n != -1) { output.write(buffer, 0, n); n = input.read(buffer); } } catch (IOException e) { throw new BoxAPIException("Couldn't connect to the Box API due to a network error.", e); } finally { response.disconnect(); } }
[ "Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd, while reporting the\nprogress to a ProgressListener.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.\n@param listener a listener for monitoring the download's progress." ]
[ "This method is provided to allow an absolute period of time\nrepresented by start and end dates into a duration in working\ndays based on this calendar instance. This method takes account\nof any exceptions defined for this calendar.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object", "Creates the DAO if we have config information cached and caches the DAO.", "Updates the properties of a tag. Only the fields provided in the `data`\nblock will be updated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated tag record.\n\n@param tag The tag to update.\n@return Request object", "Skips the stream over the specified number of bytes, adding the skipped\namount to the count.\n\n@param length the number of bytes to skip\n@return the actual number of bytes skipped\n@throws java.io.IOException if an I/O error occurs\n@see java.io.InputStream#skip(long)", "Decrease the indent level.", "Utility method to clear cached calendar data.", "Return the number of entries in the cue list that represent hot cues.\n\n@return the number of cue list entries that are hot cues", "Use this API to add nspbr6 resources.", "Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time" ]
public static final MVCArray buildArcPoints(LatLong center, double startBearing, double endBearing, double radius) { int points = DEFAULT_ARC_POINTS; MVCArray res = new MVCArray(); if (startBearing > endBearing) { endBearing += 360.0; } double deltaBearing = endBearing - startBearing; deltaBearing = deltaBearing / points; for (int i = 0; (i < points + 1); i++) { res.push(center.getDestinationPoint(startBearing + i * deltaBearing, radius)); } return res; }
[ "Generates the points for an arc based on two bearings from a centre point\nand a radius.\n\n@param center The LatLong point of the center.\n@param startBearing North is 0 degrees, East is 90 degrees, etc.\n@param endBearing North is 0 degrees, East is 90 degrees, etc.\n@param radius In metres\n@return An array of LatLong points in an MVC array representing the arc.\nUsing this method directly you will need to push the centre point onto\nthe array in order to close it, if desired." ]
[ "Retrieves the constructor that is used by OJB to create instances of the given collection proxy\nclass.\n\n@param proxyClass The proxy class\n@param baseType The required base type of the proxy class\n@param typeDesc The type of collection proxy\n@return The constructor", "Get the property name from the expression.\n\n@param expression expression\n@return property name", "Converts a JSON patch path to a JSON property name.\nCurrently the metadata API only supports flat maps.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the JSON property name.", "Sets the currently edited locale.\n@param locale the locale to set.", "Reads color table as 256 RGB integer values.\n\n@param ncolors int number of colors to read.\n@return int array containing 256 colors (packed ARGB with full alpha).", "Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException", "Acquire the exclusive lock allowing the acquisition to be interrupted.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@throws InterruptedException - if the acquiring thread is interrupted.\n@throws IllegalArgumentException if {@code permit} is null.", "Send a request that expects a single message as its response, then read and return that response.\n\n@param requestType identifies what kind of request to send\n@param responseType identifies the type of response we expect, or {@code null} if we’ll accept anything\n@param arguments The argument fields to send in the request\n\n@return the response from the player\n\n@throws IOException if there is a communication problem, or if the response does not have the same transaction\nID as the request.", "return a prepared DELETE Statement fitting for the given ClassDescriptor" ]
MongoCollection<BsonDocument> getUndoCollection(final MongoNamespace namespace) { return localClient .getDatabase(String.format("sync_undo_%s", namespace.getDatabaseName())) .getCollection(namespace.getCollectionName(), BsonDocument.class) .withCodecRegistry(MongoClientSettings.getDefaultCodecRegistry()); }
[ "Returns the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.\n\n@param namespace the namespace referring to the undo collection.\n@return the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure." ]
[ "Creates an internal project and repositories such as a token storage.", "Finish the work of building and sending a protocol packet.\n\n@param kind the type of packet to create and send\n@param payload the content which will follow our device name in the packet\n@param destination where the packet should be sent\n@param port the port to which the packet should be sent\n\n@throws IOException if there is a problem sending the packet", "Read all top level tasks.", "Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value", "Test to determine if this is a split task.\n\n@param calendar current calendar\n@param list timephased resource assignment list\n@return boolean flag", "Stores all entries contained in the given map in the cache.", "Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved parameter type of the method return type, or {@code null}\nif not resolvable or if the single argument is of type {@link WildcardType}.", "Creates a cube with each face as a separate mesh using a different texture.\nThe meshes will share a common vertex array but will have separate index buffers.\n@param gvrContext context to use for creating cube\n@param facingOut true for outward normals, false for inward normals\n@param vertexDesc string describing which vertex components are desired\n@param textureList list of 6 textures, one for each face", "Wraps a linear solver of any type with a safe solver the ensures inputs are not modified" ]
public ItemDocument updateTermsStatements(ItemIdValue itemIdValue, List<MonolingualTextValue> addLabels, List<MonolingualTextValue> addDescriptions, List<MonolingualTextValue> addAliases, List<MonolingualTextValue> deleteAliases, List<Statement> addStatements, List<Statement> deleteStatements, String summary) throws MediaWikiApiErrorException, IOException { ItemDocument currentDocument = (ItemDocument) this.wikibaseDataFetcher .getEntityDocument(itemIdValue.getId()); return updateTermsStatements(currentDocument, addLabels, addDescriptions, addAliases, deleteAliases, addStatements, deleteStatements, summary); }
[ "Updates the terms and statements of the item document identified by the\ngiven item id. The updates are computed with respect to the current data\nfound online, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in a given language are kept distinct.\n\n@param itemIdValue\nid of the document to be updated\n@param addLabels\nlabels to be set on the item. They will overwrite existing values\nin the same language.\n@param addDescriptions\ndescription to be set on the item. They will overwrite existing values\nin the same language.\n@param addAliases\naliases to be added. Existing aliases will be kept.\n@param deleteAliases\naliases to be deleted.\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection" ]
[ "Retrieves the class object for the class with the given name.\n\n@param name The class name\n@return The class object\n@throws ClassNotFoundException If the class is not on the classpath (the exception message contains the class name)", "Returns the link for the given workplace resource.\n\nThis should only be used for resources under /system or /shared.<p<\n\n@param cms the current OpenCms user context\n@param resourceName the resource to generate the online link for\n@param forceSecure forces the secure server prefix\n\n@return the link for the given resource", "Serializes descriptor instance to XML\n@param descriptor descriptor to be serialized\n@return xml representation of descriptor as string", "Return a new File object based on the baseDir and the segments.\n\nThis method does not perform any operation on the file system.", "Remove the set of partitions from the node provided\n\n@param node The node from which we're removing the partitions\n@param donatedPartitions The list of partitions to remove\n@return The new node without the partitions", "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 field definition with the specified name.\n\n@param name The name of the desired field\n@return The field definition or <code>null</code> if there is no such field", "Creates the graphic element to be shown when the datasource is empty", "Perform the given work with a Jedis connection from the given pool.\nWraps any thrown checked exceptions in a RuntimeException.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work" ]
private Double zeroIsNull(Double value) { if (value != null && value.doubleValue() == 0) { value = null; } return value; }
[ "Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero" ]
[ "Add a post-effect to this camera's render chain.\n\nPost-effects are GL shaders, applied to the texture (hardware bitmap)\ncontaining the rendered scene graph. Each post-effect combines a shader\nselector with a set of parameters: This lets you pass different\nparameters to the shaders for each eye.\n\n@param postEffectData\nPost-effect to append to this camera's render chain", "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", "Attempts to insert a colon so that a value without a colon can\nbe parsed.", "Used to get the complex value of a matrix element.\n@param row The row of the element.\n@param col The column of the element.\n@param output Storage for the value", "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", "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", "Invokes the exit logger if and only if no ExitLogger was previously invoked.\n@param logger the logger. Cannot be {@code null}", "Find a Constructor on the given type that matches the given arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a Constructor from the given type that matches the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments", "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()" ]
public static <K,V> MultiValueMap<K,V> unmodifiableMultiValueMap(MultiValueMap<? extends K, ? extends V> map) { Assert.notNull(map, "'map' must not be null"); Map<K, List<V>> result = new LinkedHashMap<K, List<V>>(map.size()); for (Map.Entry<? extends K, ? extends List<? extends V>> entry : map.entrySet()) { List<V> values = Collections.unmodifiableList(entry.getValue()); result.put(entry.getKey(), values); } Map<K, List<V>> unmodifiableMap = Collections.unmodifiableMap(result); return toMultiValueMap(unmodifiableMap); }
[ "Returns an unmodifiable view of the specified multi-value map.\n\n@param map the map for which an unmodifiable view is to be returned.\n@return an unmodifiable view of the specified multi-value map." ]
[ "create a new instance of class clazz.\nfirst use the public default constructor.\nIf this fails also try to use protected an private constructors.\n@param clazz the class to instantiate\n@return the fresh instance of class clazz\n@throws InstantiationException", "Retrieve list of assignment extended attributes.\n\n@return list of extended attributes", "This method formats a time unit.\n\n@param timeUnit time unit instance\n@return formatted time unit instance", "Returns iterable with all non-deleted file version legal holds for this legal hold policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing file version legal holds info.", "Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Random matrix", "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", "We have identified that we have a zip file. Extract the contents into\na temporary directory and process.\n\n@param stream schedule data\n@return ProjectFile instance", "The quick way to detect for a tier of devices.\nThis method detects for devices which can\ndisplay iPhone-optimized web content.\nIncludes iPhone, iPod Touch, Android, Windows Phone 7 and 8, BB10, WebOS, Playstation Vita, etc.\n@return detection of any device in the iPhone/Android/Windows Phone/BlackBerry/WebOS Tier", "Return the numeraire at a given time.\nThe numeraire is provided for interpolated points. If requested on points which are not\npart of the tenor discretization, the numeraire uses a linear interpolation of the reciprocal\nvalue. See ISBN 0470047224 for details.\n\n@param time Time time <i>t</i> for which the numeraire should be returned <i>N(t)</i>.\n@return The numeraire at the specified time as <code>RandomVariableFromDoubleArray</code>\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method." ]
public static cmpglobal_cmppolicy_binding[] get(nitro_service service) throws Exception{ cmpglobal_cmppolicy_binding obj = new cmpglobal_cmppolicy_binding(); cmpglobal_cmppolicy_binding response[] = (cmpglobal_cmppolicy_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch a cmpglobal_cmppolicy_binding resources." ]
[ "Handle a value change.\n@param propertyId the column in which the value has changed.", "First reduce the Criteria to the normal disjunctive form, then\ncalculate the necessary tree of joined tables for each item, then group\nitems with the same tree of joined tables.", "Use this API to fetch filtered set of vpnglobal_auditnslogpolicy_binding resources.\nset the filter parameter values in filtervalue object.", "this class requires that the supplied enum is not fitting a\nCollection case for casting", "Use this API to fetch nsacl6 resources of given names .", "Add an appliable \"post-run\" dependent for this task item.\n\n@param appliable the appliable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve updated \"post-run\" dependent", "Write an int to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The int to write\n@param offset The offset to begin writing at", "1-D Perlin noise function.\n\n@param x X Value.\n@return Returns function's value at point x.", "Returns a new color that has the alpha adjusted by the\nspecified amount." ]
public static boolean isAlternative(EnhancedAnnotated<?, ?> annotated, MergedStereotypes<?, ?> mergedStereotypes) { return annotated.isAnnotationPresent(Alternative.class) || mergedStereotypes.isAlternative(); }
[ "Is alternative.\n\n@param annotated the annotated\n@param mergedStereotypes merged stereotypes\n@return true if alternative, false otherwise" ]
[ "Constructs a reference of the given type to the given\nreferent. The reference is registered with the queue\nfor later purging.\n\n@param type HARD, SOFT or WEAK\n@param referent the object to refer to\n@param hash the hash code of the <I>key</I> of the mapping;\nthis number might be different from referent.hashCode() if\nthe referent represents a value and not a key", "Allocates a database connection.\n\n@throws SQLException", "Use this API to fetch vpnvserver_vpnnexthopserver_binding resources of given name .", "Use this API to fetch filterpolicy_binding resource of given name .", "Get all the names of inputs that are required to be in the Values object when this graph is executed.", "Returns all scripts\n\n@param model\n@param type - optional to specify type of script to return\n@return\n@throws Exception", "Use this API to Import responderhtmlpage.", "Evict cached object\n\n@param key\nthe key indexed the cached object to be evicted", "Gets the boxed type of a class\n\n@param type The type\n@return The boxed type" ]
public void loadProfile(Object key) { if (!isEnablePerThreadChanges()) { throw new MetadataException("Can not load profile with disabled per thread mode"); } DescriptorRepository rep = (DescriptorRepository) metadataProfiles.get(key); if (rep == null) { throw new MetadataException("Can not find profile for key '" + key + "'"); } currentProfileKey.set(key); setDescriptor(rep); }
[ "Load the given metadata profile for the current thread." ]
[ "Removes file from your assembly.\n\n@param name field name of the file to remove.", "returns an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searched objects\n@param query the query", "Converts an MPXJ Duration instance into the string representation\nof a Planner duration.\n\nPlanner represents durations as a number of seconds in its\nfile format, however it displays durations as days and hours,\nand seems to assume that a working day is 8 hours.\n\n@param value string representation of a duration\n@return Duration instance", "Put a new value in map.\n\n@param key id of the value for looking up.\n@param value the value.", "helper method to set the TranslucentStatusFlag\n\n@param on", "The derivative of the objective function. You may override this method\nif you like to implement your own derivative.\n\n@param parameters Input value. The parameter vector.\n@param derivatives Output value, where derivatives[i][j] is d(value(j)) / d(parameters(i)\n@throws SolverException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Return a list of place IDs for a query string.\n\nThe flickr.places.find method is not a geocoder. It will round \"up\" to the nearest place type to which place IDs apply. For example, if you pass it a\nstreet level address it will return the city that contains the address rather than the street, or building, itself.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param query\n@return PlacesList\n@throws FlickrException", "Build a Dataset from some data.\n\n@param oldData This {@link Dataset} represents data for which we which to\nsome features, specifically those features not in the {@link edu.stanford.nlp.util.Index}\ngoodFeatures.\n@param goodFeatures An {@link edu.stanford.nlp.util.Index} of features we wish to retain.\n@return A new {@link Dataset} wheres each datapoint contains only features\nwhich were in goodFeatures.", "Adds listeners and reads from a stream.\n\n@param reader reader for file type\n@param stream schedule data\n@return ProjectFile instance" ]
public static nsconfig get(nitro_service service) throws Exception{ nsconfig obj = new nsconfig(); nsconfig[] response = (nsconfig[])obj.get_resources(service); return response[0]; }
[ "Use this API to fetch all the nsconfig resources that are configured on netscaler." ]
[ "Cleans up the given group and adds it to the list of groups if still valid\n@param group\n@param groups", "Cancel request and worker on host.\n\n@param targetHosts\nthe target hosts", "This method is used by JNI, do not call or modify.\n\n@param type the type\n@param number the number", "Extract a list of work pattern assignments.\n\n@param workPatterns string representation of work pattern assignments\n@return list of work pattern assignment rows", "Returns an encrypted token combined with answer.", "Creates an element that represents an image drawn at the specified coordinates in the page.\n@param x the X coordinate of the image\n@param y the Y coordinate of the image\n@param width the width coordinate of the image\n@param height the height coordinate of the image\n@param type the image type: <code>\"png\"</code> or <code>\"jpeg\"</code>\n@param resource the image data depending on the specified type\n@return", "Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store", "Internal method which is called when the user has finished editing the title.\n\n@param box the text box which has been edited", "Removes top of thread-local shell stack." ]
void init( DMatrixSparseCSC A ) { this.A = A; this.m = A.numRows; this.n = A.numCols; this.next = 0; this.head = m; this.tail = m + n; this.nque = m + 2*n; if( parent.length < n || leftmost.length < m) { parent = new int[n]; post = new int[n]; pinv = new int[m+n]; countsR = new int[n]; leftmost = new int[m]; } gwork.reshape(m+3*n); }
[ "Initializes data structures" ]
[ "Loads the configuration XML from the given string.\n@since 1.3", "Use this API to add responderpolicy.", "Sets the texture this render target will render to.\nIf no texture is provided, the render target will\nnot render anything.\n@param texture GVRRenderTexture to render to.", "Determines if a token stream contains only numeric tokens\n@param stream\n@return true if all tokens in the given stream can be parsed as an integer", "Writes a list of UDF types.\n\n@author lsong\n@param type parent entity type\n@param mpxj parent entity\n@return list of UDFAssignmentType instances", "Unmarshals the descriptor content.\n\n@throws CmsXmlException thrown if the XML structure of the descriptor is wrong.\n@throws CmsException thrown if reading the descriptor file fails.", "Release a connection by placing the connection back in the pool.\n@param connectionHandle Connection being released.\n@throws SQLException", "Declares a shovel.\n\n@param vhost virtual host where to declare the shovel\n@param info Shovel info.", "Puts the cached security context in the thread local.\n\n@param context the cache context" ]
protected Class getPrototypeClass(T content) { if (prototypes.size() == 1) { return prototypes.get(0).getClass(); } else { return binding.get(content.getClass()); } }
[ "Method to be implemented by the RendererBuilder subtypes. In this method the library user will\ndefine the mapping between content and renderer class.\n\n@param content used to map object to Renderers.\n@return the class associated to the renderer." ]
[ "Use this API to fetch lbmonitor_binding resource of given name .", "Use this API to fetch lbvserver_filterpolicy_binding resources of given name .", "Processes an anonymous field definition specified at the class level.\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 field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"true,false\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the field\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"", "Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.\n@return a JSON string containing the pending changes.", "Obtains a local date in Ethiopic calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to create the date", "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", "Converts a TimeUnit instance to an integer value suitable for\nwriting to an MPX file.\n\n@param recurrence RecurringTask instance\n@return integer value", "Calculate start dates for a daily recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Creates a Sink Processor\n\n@param dataSink the data sink itself\n@param parallelism the parallelism of this processor\n@param description the description for this processor\n@param taskConf the configuration for this processor\n@param system actor system\n@return the new created sink processor" ]
public List<List<String>> getAllScopes() { this.checkInitialized(); final ImmutableList.Builder<List<String>> builder = ImmutableList.<List<String>>builder(); final Consumer<Integer> _function = (Integer it) -> { List<String> _get = this.scopes.get(it); StringConcatenation _builder = new StringConcatenation(); _builder.append("No scopes are available for index: "); _builder.append(it); builder.add(Preconditions.<List<String>>checkNotNull(_get, _builder)); }; this.scopes.keySet().forEach(_function); return builder.build(); }
[ "Returns with a view of all scopes known by this manager." ]
[ "note that for read from file, this will just load all to memory. not fit\nif need to read a very large file. However for getting the host name.\nnormally it is fine.\n\nfor reading large file, should use iostream.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the content from path\n@throws IOException\nSignals that an I/O exception has occurred.", "Multiply scalar value to a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the multiply of specified complex number with the scalar value.", "Read all configuration files.\n@return the list with all available configurations", "Computes execution time\n@param extra", "Removes the observation that fits the model the worst and recomputes the coefficients.\nThis is done efficiently by using an adjustable solver. Often times the elements with\nthe largest errors are outliers and not part of the system being modeled. By removing them\na more accurate set of coefficients can be computed.", "Use this API to update cacheselector.", "Returns the bounding sphere of the vertices.\n@param sphere destination array to get bounding sphere.\nThe first entry is the radius, the next\nthree are the center.\n@return radius of bounding sphere or 0.0 if no vertices", "Validates a String to be a valid name to be used in MongoDB for a collection name.\n\n@param collectionName", "Acquire the exclusive lock allowing the acquisition to be interrupted.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@throws InterruptedException - if the acquiring thread is interrupted.\n@throws IllegalArgumentException if {@code permit} is null." ]
public static boolean isTrait(final ClassNode cNode) { return cNode!=null && ((cNode.isInterface() && !cNode.getAnnotations(TRAIT_CLASSNODE).isEmpty()) || isAnnotatedWithTrait(cNode)); }
[ "Returns true if the specified class node is a trait.\n@param cNode a class node to test\n@return true if the classnode represents a trait" ]
[ "Processes the template for the object cache 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\"", "Extract data for a single resource.\n\n@param row Synchro resource data", "Applies the mask to this address section and then compares values with the given address section\n\n@param mask\n@param other\n@return", "Computes the householder vector used in QR decomposition.\n\nu = x / max(x)\nu(0) = u(0) + |u|\nu = u / u(0)\n\n@param x Input vector. Unmodified.\n@return The found householder reflector vector", "Creates a new section in a project.\n\nReturns the full record of the newly created section.\n\n@param project The project to create the section in\n@return Request object", "Checks if a document exist in the database.\n\n@param id The document _id field.\n@return true If the document is found, false otherwise.", "Get the pickers date.", "Creates a new Box Developer Edition connection with enterprise token leveraging BoxConfig.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection.", "Mbeans for FETCH_KEYS" ]
public Map<String, Integer> getAggregateResultCountSummary() { Map<String, Integer> summaryMap = new LinkedHashMap<String, Integer>(); for (Entry<String, LinkedHashSet<String>> entry : aggregateResultMap .entrySet()) { summaryMap.put(entry.getKey(), entry.getValue().size()); } return summaryMap; }
[ "Gets the aggregate result count summary. only list the counts for brief\nunderstanding\n\n@return the aggregate result count summary" ]
[ "Gets the element view.\n\n@return the element view", "Alternative implementation for the drift. For experimental purposes.\n\n@param timeIndex\n@param componentIndex\n@param realizationAtTimeIndex\n@param realizationPredictor\n@return", "Perform a post-boot scan to remove any deployments added during boot that failed to deploy properly.\nThis method isn't private solely to allow a unit test in the same package to call it.", "Use this API to fetch sslservicegroup_sslcertkey_binding resources of given name .", "Operates on one dimension at a time.", "Load the given configuration file.", "Initialize the metadata cache with system store list", "Set the parent from which this week is derived.\n\n@param parent parent week", "Get the context for a photo in the group pool.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@param groupId\nThe group ID\n@return The PhotoContext\n@throws FlickrException" ]
private void executeProxyRequest(HttpMethod httpMethodProxyRequest, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, History history) { try { RequestInformation requestInfo = requestInformation.get(); // Execute the request // set virtual host so the server knows how to direct the request // If the host header exists then this uses that value // Otherwise the hostname from the URL is used processVirtualHostName(httpMethodProxyRequest, httpServletRequest); cullDisabledPaths(); // check for existence of ODO_PROXY_HEADER // finding it indicates a bad loop back through the proxy if (httpServletRequest.getHeader(Constants.ODO_PROXY_HEADER) != null) { logger.error("Request has looped back into the proxy. This will not be executed: {}", httpServletRequest.getRequestURL()); return; } // set ODO_PROXY_HEADER httpMethodProxyRequest.addRequestHeader(Constants.ODO_PROXY_HEADER, "proxied"); requestInfo.blockRequest = hasRequestBlock(); PluginResponse responseWrapper = new PluginResponse(httpServletResponse); requestInfo.jsonpCallback = stripJSONPToOutstr(httpServletRequest, responseWrapper); if (!requestInfo.blockRequest) { logger.info("Sending request to server"); history.setModified(requestInfo.modified); history.setRequestSent(true); executeRequest(httpMethodProxyRequest, httpServletRequest, responseWrapper, history); } else { history.setRequestSent(false); } logOriginalResponseHistory(responseWrapper, history); applyResponseOverrides(responseWrapper, httpServletRequest, httpMethodProxyRequest, history); // store history history.setModified(requestInfo.modified); logRequestHistory(httpMethodProxyRequest, responseWrapper, history); writeResponseOutput(responseWrapper, requestInfo.jsonpCallback); } catch (Exception e) { e.printStackTrace(); } }
[ "Execute a request through Odo processing\n\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@param history" ]
[ "Extract where the destination is reshaped to match the extracted region\n@param src The original matrix which is to be copied. Not modified.\n@param srcX0 Start column.\n@param srcX1 Stop column+1.\n@param srcY0 Start row.\n@param srcY1 Stop row+1.\n@param dst Where the submatrix are stored. Modified.", "Determine how many forked JVMs to use.", "Try to extract a numeric version from a collection of strings.\n\n@param versionStrings Collection of string properties.\n@return The version string if exists in the collection.", "Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class", "The cell String is the string representation of the object.\nIf padLeft is greater than 0, it is padded. Ditto right", "Use this API to fetch a filterglobal_filterpolicy_binding resources.", "Helper to read a line from the config file.\n@param propValue the property value\n@return the value of the variable set at this line.", "Set some initial values.", "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." ]
public synchronized void tick() { long currentTime = GVRTime.getMilliTime(); long cutoffTime = currentTime - BUFFER_SECONDS * 1000; ListIterator<Long> it = mTimestamps.listIterator(); while (it.hasNext()) { Long timestamp = it.next(); if (timestamp < cutoffTime) { it.remove(); } else { break; } } mTimestamps.add(currentTime); mStatColumn.addValue(((float)mTimestamps.size()) / BUFFER_SECONDS); }
[ "Should be called each frame." ]
[ "Convert a date to the String representation we use in the JSON.\n@param d the date to convert\n@return the String representation we use in the JSON.", "Read metadata by populating an instance of the target class\nusing SAXParser.", "No need to expose. Client side work.", "Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nmetadata updates will use available caches only\n\n@return the metadata found, if any", "Check the variable name and if not set, set it with the singleton variable name being on the top of the stack.", "Check if number is valid\n\n@return boolean", "Shows the provided list of dates as current dates.\n@param dates the current dates to show, accompanied with the information if they are exceptions or not.", "Enables or disabled shadow casting for a spot light.\nEnabling shadows attaches a GVRShadowMap component to the\nGVRSceneObject which owns the light and provides the\ncomponent with an perspective camera for shadow casting.\n@param enableFlag true to enable shadow casting, false to disable", "Get the names of the paths that would apply to the request\n\n@param requestUrl URL of the request\n@param requestType Type of the request: GET, POST, PUT, or DELETE as integer\n@return JSONArray of path names\n@throws Exception" ]
public boolean ifTaskCompletedSuccessOrFailureFromResponse( ResponseOnSingeRequest myResponse) { boolean isCompleted = false; try { if (myResponse == null || myResponse.isFailObtainResponse()) { return isCompleted; } String responseBody = myResponse.getResponseBody(); if (responseBody.matches(successRegex) || responseBody.matches(failureRegex)) { isCompleted = true; } } catch (Exception t) { logger.error("fail " + t); } return isCompleted; }
[ "If task completed success or failure from response.\n\n@param myResponse\nthe my response\n@return true, if successful" ]
[ "Non-blocking call that will throw any Exceptions in the traditional\nmanner on access\n\n@param key\n@param value\n@return", "Set the value as provided.\n@param value the serial date value as JSON string.", "Retrieve a duration field.\n\n@param type field type\n@return Duration instance", "Mbeans for FETCH_ENTRIES", "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.", "Sets the polling status.\n\n@param status the polling status.\n@param statusCode the HTTP status code\n@throws IllegalArgumentException thrown if status is null.", "Use this API to fetch vlan_nsip_binding resources of given name .", "Construct new root step. Used for inspect problems with Allure lifecycle\n\n@return new root step marked as broken", "Set the offsets in the compressed data area for each mip-map level.\n@param offsets array of offsets" ]
private String getSubQuerySQL(Query subQuery) { ClassDescriptor cld = getRoot().cld.getRepository().getDescriptorFor(subQuery.getSearchClass()); String sql; if (subQuery instanceof QueryBySQL) { sql = ((QueryBySQL) subQuery).getSql(); } else { sql = new SqlSelectStatement(this, m_platform, cld, subQuery, m_logger).getStatement(); } return sql; }
[ "Convert subQuery to SQL\n@param subQuery the subQuery value of SelectionCriteria" ]
[ "Deletes the device pin.", "Utility function that fetches partitions.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return all partitions on cluster", "Add the given, single header value under the given name.\n@param headerName the header name\n@param headerValue the header value\n@throws UnsupportedOperationException if adding headers is not supported\n@see #put(String, List)\n@see #set(String, String)", "Use this API to fetch all the gslbrunningconfig resources that are configured on netscaler.", "Creates a real agent in the platform\n\n@param agent_name\nThe name that the agent is gonna have in the platform\n@param path\nThe path of the description (xml) of the agent", "Returns the vertex points in this hull.\n\n@return array of vertex points\n@see QuickHull3D#getVertices(double[])\n@see QuickHull3D#getFaces()", "delete of files more than 1 day old", "Use this API to fetch all the cacheobject resources that are configured on netscaler.\nThis uses cacheobject_args which is a way to provide additional arguments while fetching the resources.", "package scope in order to test the method" ]
public synchronized Response doCommandFullResponse(String command) throws CommandFormatException, IOException { ModelNode request = cmdCtx.buildRequest(command); boolean replacedBytes = replaceFilePathsWithBytes(request); OperationResponse response = execute(request, isSlowCommand(command) || replacedBytes); return new Response(command, request, response); }
[ "User-initiated commands use this method.\n\n@param command The CLI command\n@return A Response object containing the command line, DMR request, and DMR response\n@throws CommandFormatException\n@throws IOException" ]
[ "Stops the background stream thread.", "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.", "Perform the entire sort operation", "Ensures that the given collection descriptor has the collection-class property if necessary.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If collection-class is given for an array or if no collection-class is given but required", "Retrieve the result produced by a task with the given id in the group.\n\nThis method can be used to retrieve the result of invocation of both dependency\nand \"post-run\" dependent tasks. If task with the given id does not exists then\nIllegalArgumentException exception will be thrown.\n\n@param taskId the task item id\n@return the task result, null will be returned if task has not yet been invoked", "Set text parameters from properties\n@param context Valid Android {@link Context}\n@param properties JSON text properties", "Private helper method which decodes the Stitch error from the body of an HTTP `Response`\nobject. If the error is successfully decoded, this function will throw the error for the end\nuser to eventually consume. If the error cannot be decoded, this is likely not an error from\nthe Stitch server, and this function will return an error message that the calling function\nshould use as the message of a StitchServiceException with an unknown code.", "Return the profileId for a path\n\n@param path_id ID of path\n@return ID of profile\n@throws Exception exception", "Returns with an iterable of URIs that points to all elements that are\nreferenced by the argument or vice-versa.\n\n@return an iterable of URIs that are referenced by the argument or the\nother way around." ]
private static int tribus(int version, int a, int b, int c) { if (version < 10) { return a; } else if (version >= 10 && version <= 26) { return b; } else { return c; } }
[ "Choose from three numbers based on version." ]
[ "The click handler for the add button.", "Parses a PDF document and serializes the resulting DOM tree to an output. This requires\na DOM Level 3 capable implementation to be available.", "Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under", "package for testing purpose", "Returns if a MongoDB document is a todo item.", "This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance", "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", "Use this API to update cachecontentgroup.", "Generate heroku-like random names\n\n@return String" ]
public void deleteMetadata(String templateName, String scope) { URL url = METADATA_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID(), scope, templateName); BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE"); BoxAPIResponse response = request.send(); response.disconnect(); }
[ "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\")." ]
[ "Matches the styles and adjusts the size. This needs to be\ncalled after the input is added to the DOM, so we do it in\nonLoad.", "Pops resource requests off the queue until queue is empty or an unexpired\nresource request is found. Invokes .handleTimeout on all expired resource\nrequests popped off the queue.\n\n@return null or a valid ResourceRequest", "Checks attributes for rejection\n\n@param rejectedAttributes gathers information about failed attributes\n@param attributeValue the attribute value", "Use this API to fetch onlinkipv6prefix resources of given names .", "Use this API to add authenticationradiusaction.", "Sets maintenance mode for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param enable true to enable; false to disable", "Adds listeners and reads from a stream.\n\n@param reader reader for file type\n@param stream schedule data\n@return ProjectFile instance", "Issue the database statements to drop the table associated with a dao.\n\n@param dao\nAssociated dao.\n@return The number of statements executed to do so.", "Extracts baseline work from the MPP file for a specific baseline.\nReturns null if no baseline work is present, otherwise returns\na list of timephased work items.\n\n@param assignment parent assignment\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work" ]
private void verifiedCopyFile(File sourceFile, File destFile) throws IOException { if(!destFile.exists()) { destFile.createNewFile(); } FileInputStream source = null; FileOutputStream destination = null; LogVerificationInputStream verifyStream = null; try { source = new FileInputStream(sourceFile); destination = new FileOutputStream(destFile); verifyStream = new LogVerificationInputStream(env, source, sourceFile.getName()); final byte[] buf = new byte[LOGVERIFY_BUFSIZE]; while(true) { final int len = verifyStream.read(buf); if(len < 0) { break; } destination.write(buf, 0, len); } } finally { if(verifyStream != null) { verifyStream.close(); } if(destination != null) { destination.close(); } } }
[ "Copies the jdb log files, with additional verification of the checksums.\n\n@param sourceFile\n@param destFile\n@throws IOException" ]
[ "Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException", "Returns a canonical type for a given class.\n\nIf the class is a raw type of a parameterized class, the matching {@link ParameterizedType} (with unresolved type\nvariables) is resolved.\n\nIf the class is an array then the component type of the array is canonicalized\n\nOtherwise, the class is returned.\n\n@return", "Gets the positive integer.\n\n@param number the number\n@return the positive integer", "Overridden to do only the clean-part of the linking but not\nthe actual linking. This is deferred until someone wants to access\nthe content of the resource.", "Use this API to fetch all the nsconfig resources that are configured on netscaler.", "Use this API to unset the properties of clusterinstance resources.\nProperties that need to be unset are specified in args array.", "Determine whether we should use the normal repaint process, or delegate that to another component that is\nhosting us in a soft-loaded manner to save memory.\n\n@param x the left edge of the region that we want to have redrawn\n@param y the top edge of the region that we want to have redrawn\n@param width the width of the region that we want to have redrawn\n@param height the height of the region that we want to have redrawn", "Retuns the Windows UNC style path with backslashs intead of forward slashes.\n\n@return The UNC path.", "Process a text-based PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance" ]
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { // not now: 6.0.0 // digester.setLogger(CmsLog.getLog(digester.getClass())); // Push an array to capture the parameter values if necessary if (m_paramCount > 0) { Object[] parameters = new Object[m_paramCount]; for (int i = 0; i < parameters.length; i++) { parameters[i] = null; } getDigester().pushParams(parameters); } }
[ "Process the start of this element.\n\n@param attributes The attribute list for this element\n@param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace\naware or the element has no namespace\n@param name the local name if the parser is namespace aware, or just the element name otherwise\n@throws Exception if something goes wrong" ]
[ "Performs a Versioned put operation with the specified composite request\nobject\n\n@param requestWrapper Composite request object containing the key and the\nversioned object\n@return Version of the value for the successful put\n@throws ObsoleteVersionException", "Use this API to fetch the statistics of all authenticationvserver_stats resources that are configured on netscaler.", "Load in a number of database configuration entries from a buffered reader.", "Set the pattern scheme to either \"by weekday\" or \"by day of month\".\n@param isByWeekDay flag, indicating if the pattern \"by weekday\" should be set.\n@param fireChange flag, indicating if a value change event should be fired.", "Notify listeners that the tree structure has changed.", "Print the class's operations m", "Adds format information to eval.", "Does the headset the device is docked into have a dedicated home key\n@return", "Renames the current base log file to the roll file name.\n\n@param from\nThe current base log file.\n@param to\nThe backup file." ]
private void lockAndRegisterReferences(ClassDescriptor cld, Object sourceObject, int lockMode, List registeredObjects) throws LockNotGrantedException { if (implicitLocking) { Iterator i = cld.getObjectReferenceDescriptors(true).iterator(); while (i.hasNext()) { ObjectReferenceDescriptor rds = (ObjectReferenceDescriptor) i.next(); Object refObj = rds.getPersistentField().get(sourceObject); if (refObj != null) { boolean isProxy = ProxyHelper.isProxy(refObj); RuntimeObject rt = isProxy ? new RuntimeObject(refObj, this, false) : new RuntimeObject(refObj, this); if (!registrationList.contains(rt.getIdentity())) { lockAndRegister(rt, lockMode, registeredObjects); } } } } }
[ "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." ]
[ "Send JSON representation of a data object to all connections of a certain user\n\n@param data the data to be sent\n@param username the username\n@return this context", "Provides an object that can build SQL clauses to match this string representation.\n\nThis method can be overridden for other IP address types to match in their own ways.\n\n@param isEntireAddress\n@param translator\n@return", "Retrieve the request History based on the specified filters.\nIf no filter is specified, return the default size history.\n\n@param filters filters to be applied\n@return array of History items\n@throws Exception exception", "Select this tab item.", "The amount of time to keep an idle client thread alive\n\n@param threadIdleTime", "Use this API to fetch aaauser_binding resource of given name .", "Consumes the next character in the request, checking that it matches the\nexpected one. This method should be used when the", "refresh all deliveries dependencies for a particular product", "Sets the provided filters.\n@param filters a map \"column id -> filter\"." ]
public static void deleteFilePath(FilePath workspace, String path) throws IOException { if (StringUtils.isNotBlank(path)) { try { FilePath propertiesFile = new FilePath(workspace, path); propertiesFile.delete(); } catch (Exception e) { throw new IOException("Could not delete temp file: " + path); } } }
[ "Deletes a FilePath file.\n\n@param workspace The build workspace.\n@param path The path in the workspace.\n@throws IOException In case of missing file." ]
[ "Extract information from a resource ID string with the resource type\nas the identifier.\n\n@param id the resource ID\n@param identifier the identifier to match, e.g. \"resourceGroups\", \"storageAccounts\"\n@return the information extracted from the identifier", "Get the AuthInterface.\n\n@return The AuthInterface", "Sets the target translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining", "Runs through the log removing segments older than a certain age\n\n@throws IOException", "Initializes unspecified sign properties using available defaults\nand global settings.", "Perform the merge\n\n@param stereotypeAnnotations The stereotype annotations", "Returns a pretty printed string of nodes that host specific \"hot\"\npartitions, where hot is defined as following a contiguous run of\npartitions of some length in another zone.\n\n@param cluster The cluster to analyze\n@param hotContiguityCutoff cutoff below which a contiguous run is not\nhot.\n@return pretty string of hot partitions", "Deletes the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name.", "Returns real unquoted value for a DisplayValue\n@param key\n@return" ]
public static String getAt(GString text, int index) { return (String) getAt(text.toString(), index); }
[ "Support the subscript operator for GString.\n\n@param text a GString\n@param index the index of the Character to get\n@return the Character at the given index\n@since 2.3.7" ]
[ "Gets the persistence broker used by this indirection handler.\nIf no PBKey is available a runtime exception will be thrown.\n\n@return a PersistenceBroker", "There is a race condition that is not handled properly by the DialogFragment class.\nIf we don't check that this onDismiss callback isn't for the old progress dialog from before\nthe device orientation change, then this will cause the newly created dialog after the\norientation change to be dismissed immediately.", "Revisit message to set their item ref to a item definition\n@param def Definitions", "Asynchronous call that begins execution of the task\nand returns immediately.", "Map the given region of the given file descriptor into memory.\nReturns a Pointer to the newly mapped memory throws an\nIOException on error.", "Emit status line for an aggregated event.", "Introspect the given object.\n\n@param obj object for introspection.\n\n@return a map containing object's field values.\n\n@throws IntrospectionException if an exception occurs during introspection\n@throws InvocationTargetException if property getter throws an exception\n@throws IllegalAccessException if property getter is inaccessible", "Read all top level tasks.", "Specify additional query parameters to be passed to the filter function.\n\n@param queryParams map of key-value parameters\n@return this Replication instance to set more options or trigger the replication" ]
public static base_responses delete(nitro_service client, String fipskeyname[]) throws Exception { base_responses result = null; if (fipskeyname != null && fipskeyname.length > 0) { sslfipskey deleteresources[] = new sslfipskey[fipskeyname.length]; for (int i=0;i<fipskeyname.length;i++){ deleteresources[i] = new sslfipskey(); deleteresources[i].fipskeyname = fipskeyname[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "Use this API to delete sslfipskey resources of given names." ]
[ "Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate", "Returns a string describing 'time' as a time relative to 'now'.\n\nSee {@link android.text.format.DateUtils#getRelativeTimeSpanString} for full docs.\n\n@param context the context\n@param time the time to describe\n@param flags a bit mask for formatting options, usually FORMAT_ABBREV_RELATIVE\n@return a string describing 'time' as a time relative to 'now'.", "Add a Renderer instance as prototype.\n\n@param renderer to use as prototype.\n@return the current RendererBuilder instance.", "Stops the playback of a sound and destroys the corresponding Sound Object or Soundfield.", "Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string", "Remember the order of execution", "Adds the worker thread pool attributes to the subysystem add method", "Creates a new immutable set that consists of given elements.\n\n@param elements the given elements\n@return a new immutable set that consists of given elements", "Collect the URIs of resources, that are referenced by the given description.\n@return the list of referenced URIs. Never <code>null</code>." ]
public void setFieldByAlias(String alias, Object value) { set(getParentFile().getCustomFields().getFieldByAlias(FieldTypeClass.TASK, alias), value); }
[ "Set the value of a field using its alias.\n\n@param alias field alias\n@param value field value" ]
[ "Obtain a connection asynchronously by queueing a request to obtain a connection in a separate thread.\n\nUse as follows:<p>\nFuture&lt;Connection&gt; result = pool.getAsyncConnection();<p>\n... do something else in your application here ...<p>\nConnection connection = result.get(); // get the connection<p>\n\n@return A Future task returning a connection.", "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}).", "Get transformer to use.\n\n@return transformation to apply", "Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value.", "Add a file to notify the script that asked to stop the print that it is now done processing the remain\njobs.", "URLEncode a string\n@param s\n@return", "Returns an array of all endpoints\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param filters filters to apply to endpoints\n@return Collection of endpoints\n@throws Exception exception", "Initialize the local plugins registry\n@param context the servlet context necessary to grab\nthe files inside the servlet.\n@return the set of local plugins organized by name", "Wrapper to avoid throwing an exception over JMX" ]
public void fireAssignmentWrittenEvent(ResourceAssignment resourceAssignment) { if (m_projectListeners != null) { for (ProjectListener listener : m_projectListeners) { listener.assignmentWritten(resourceAssignment); } } }
[ "This method is called to alert project listeners to the fact that\na resource assignment has been written to a project file.\n\n@param resourceAssignment resourceAssignment instance" ]
[ "Loads the data from the database. Override this method if the objects\nshall be loaded in a specific way.\n\n@return The loaded data", "This method is designed to be called from the diverse subclasses", "Check whether the given id is included in the list of includes and not excluded.\n\n@param id id to check\n@param includes list of include regular expressions\n@param excludes list of exclude regular expressions\n@return true when id included and not excluded", "Use this API to fetch sslciphersuite resources of given names .", "return a HashMap with all properties, name as key, value as value\n@return the properties", "Wrapper functions with no bounds checking are used to access matrix internals", "Read an individual GanttProject resource assignment.\n\n@param gpAllocation GanttProject resource assignment.", "Use this API to update nslimitselector resources.", "Remove any device announcements that are so old that the device seems to have gone away." ]
public Topic getTopicInfo(String topicId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_TOPICS_GET_INFO); parameters.put("topic_id", topicId); Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element topicElement = response.getPayload(); return parseTopic(topicElement); }
[ "Get info for a given topic\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getInfo.html\">API Documentation</a>" ]
[ "Creates the database.\n\n@throws PlatformException If some error occurred", "Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either\njar files or references to directories containing class files.\n\nThe sourcePaths must be a reference to the top level directory for sources (eg, for a file\nsrc/main/java/org/example/Foo.java, the source path would be src/main/java).\n\nThe wildcard resolver provides a fallback for processing wildcard imports that the underlying parser was unable\nto resolve.", "Append the WHERE part of the statement to the StringBuilder.", "Adds each of the specified followers to the task, if they are not already\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to add followers to.\n@return Request object", "returns an Array with an Objects CURRENT locking VALUES , BRJ\n@throws PersistenceBrokerException if there is an erros accessing o field values", "Configure a selector to choose documents that should be added to the index.", "Adds a resource collection with execution hints.", "Maps all views that don't start with \"android\" namespace.\n\n@param names All shared element names.\n@return The obsolete shared element names.", "Scan the segments to find the largest height value present.\n\n@return the largest waveform height anywhere in the preview." ]
public VerticalLayout getEmptyLayout() { m_emptyLayout = CmsVaadinUtils.getInfoLayout(CmsOuTreeType.USER.getEmptyMessageKey()); setVisible(size() > 0); m_emptyLayout.setVisible(size() == 0); return m_emptyLayout; }
[ "Layout which gets displayed if table is empty.\n\n@see org.opencms.ui.apps.user.I_CmsFilterableTable#getEmptyLayout()" ]
[ "Returns data tree structured as Transloadit expects it.\n\n@param data\n@return {@link Map}\n@throws LocalOperationException", "Creates a new RDF serializer based on the current configuration of this\nobject.\n\n@return the newly created RDF serializer\n@throws IOException\nif there were problems opening the output files", "Lists the formation info for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.", "Provides a method that compares two comparables using Groovy's\ndefault number aware comparator.\n\n@param self a Comparable\n@param other another Comparable\n@return a -ve number, 0 or a +ve number according to Groovy's compareTo contract\n@since 1.6.0", "Validates the producer method", "Compares two annotated types and returns true if they are the same", "Converts assignment duration values from minutes to hours.\n\n@param list assignment data", "Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid", "Return the next word of the string, in other words it stops when a space is encountered." ]
private float max(float x, float y, float z) { if (x > y) { // not y if (x > z) { return x; } else { return z; } } else { // not x if (y > z) { return y; } else { return z; } } }
[ "misc utility methods" ]
[ "Use this API to update rnatparam.", "End building the script, adding a return value statement\n@param config the configuration for the script to build\n@param value the value to return\n@return the new {@link LuaScript} instance", "Determine the size of a field in a fixed data block.\n\n@param type field data type\n@return field size in bytes", "We have received notification that a device is no longer on the network, so clear out its metadata.\n\n@param announcement the packet which reported the device’s disappearance", "Use this API to fetch all the vlan resources that are configured on netscaler.", "Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault", "Restores the dropout descriptor to a previously saved-off state", "This method retrieves the UID for a calendar associated with a task.\n\n@param mpx MPX Task instance\n@return calendar UID", "Get a property as a float or throw an exception.\n\n@param key the property name" ]
public Path relativize(Path other) { if (other.isAbsolute() != isAbsolute()) throw new IllegalArgumentException("This path and the given path are not both absolute or both relative: " + toString() + " | " + other.toString()); if (startsWith(other)) { return internalRelativize(this, other); } else if (other.startsWith(this)) { return internalRelativize(other, this); } return null; }
[ "Constructs a relative path between this path and a given path.\n\n<p> Relativization is the inverse of {@link #getAbsolutePath(Path) resolution}.\nThis method attempts to construct a {@link #isAbsolute relative} path\nthat when {@link #getAbsolutePath(Path) resolved} against this path, yields a\npath that locates the same file as the given path. For example, on UNIX,\nif this path is {@code \"/a/b\"} and the given path is {@code \"/a/b/c/d\"}\nthen the resulting relative path would be {@code \"c/d\"}.\nBoth paths must be absolute and and either this path or the given path must be a\n{@link #startsWith(Path) prefix} of the other.\n\n@param other\nthe path to relativize against this path\n\n@return the resulting relative path or null if neither of the given paths is a prefix of the other\n\n@throws IllegalArgumentException\nif this path and {@code other} are not both absolute or relative" ]
[ "Cancel the pause operation", "Converts any path into something that can be placed in an Android directory.\n\nTraverses any subdirectories and flattens it all into a single filename. Also\ngets rid of commonly seen illegal characters in tz identifiers, and lower cases\nthe entire thing.\n\n@param path the path to convert\n@return a flat path with no directories (and lower-cased)", "Non-supported in JadeAgentIntrospector", "Use this API to fetch sslpolicy_lbvserver_binding resources of given name .", "Use this API to fetch all the appfwsignatures resources that are configured on netscaler.", "Get the minutes difference", "Resolves line alpha based on distance comparing to max distance.\nWhere alpha is close to 0 for maxDistance, and close to 1 to 0 distance.\n\n@param distance line length\n@param maxDistance max line length\n@return line alpha", "The main method. See the class documentation.", "Handles a failed SendData request. This can either be because of the stick actively reporting it\nor because of a time-out of the transaction in the send thread.\n@param originalMessage the original message that was sent" ]
public static nssimpleacl get(nitro_service service, String aclname) throws Exception{ nssimpleacl obj = new nssimpleacl(); obj.set_aclname(aclname); nssimpleacl response = (nssimpleacl) obj.get_resource(service); return response; }
[ "Use this API to fetch nssimpleacl resource of given name ." ]
[ "Find out which method to call on the service bean.", "List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.", "Returns package name of a class\n\n@param clazz\nthe class\n@return\nthe package name of the class", "Deletes a template.\n\n@param id id of the template to delete.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "Extract predecessor data.", "Read custom fields for a GanttProject task.\n\n@param gpTask GanttProject task\n@param mpxjTask MPXJ Task instance", "Append a SubQuery the SQL-Clause\n@param subQuery the subQuery value of SelectionCriteria", "Converts a time represented as an integer to a Date instance.\n\n@param time integer time\n@return Date instance", "Sets the real offset.\n\n@param start the start\n@param end the end" ]
public GroovyFieldDoc[] enumConstants() { Collections.sort(enumConstants); return enumConstants.toArray(new GroovyFieldDoc[enumConstants.size()]); }
[ "returns a sorted array of enum constants" ]
[ "Use this API to fetch vpnsessionaction resource of given name .", "Processes the template for all column definitions of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Allow for the use of text shading and auto formatting.", "Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads\nhave actually been paused if possible.\n\n@throws LocalOperationException if the method is called while no upload is going on.", "Write a duration field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Use this API to fetch dnspolicy_dnsglobal_binding resources of given name .", "Remove the group and all references to it\n\n@param groupId ID of group", "Adds a slash to a path if it doesn't end with a slash.\n\n@param folderName The path to append a possible slash.\n@return The new, correct path.", "Factory method that returns an Identity object created from a serializated representation.\n\n@param anArray The serialized representation\n@return The identity\n@see {@link #serialize}.\n@deprecated" ]
public static base_response update(nitro_service client, sslcertkey resource) throws Exception { sslcertkey updateresource = new sslcertkey(); updateresource.certkey = resource.certkey; updateresource.expirymonitor = resource.expirymonitor; updateresource.notificationperiod = resource.notificationperiod; return updateresource.update_resource(client); }
[ "Use this API to update sslcertkey." ]
[ "Find the length of the block starting from 'start'.", "Set the host running the Odo instance to configure\n\n@param hostName name of host", "If the specified value is not greater than or equal to the specified minimum and\nless than or equal to the specified maximum, adjust it so that it is.\n@param value The value to check.\n@param min The minimum permitted value.\n@param max The maximum permitted value.\n@return {@code value} if it is between the specified limits, {@code min} if the value\nis too low, or {@code max} if the value is too high.\n@since 1.2", "Switches to the next tab.", "Checks if the specified latitude is correct.\n\n@param name the name of the latitude field\n@param latitude the value of the latitude field\n@return the latitude", "Write flow id to message.\n\n@param message the message\n@param flowId the flow id", "Convert the Values using the FieldConversion.sqlToJava\n@param fcs\n@param values", "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", "Executes a API query action to get a new token.\nThe method only executes the action, without doing any\nchecks first. If errors occur, they are logged and null is returned.\n\n@param tokenType The kind of token to retrieve like \"csrf\" or \"login\"\n@return newly retrieved token or null if no token was retrieved" ]
private void addStatement(RecordImpl record, String subject, String property, String object) { Collection<Column> cols = columns.get(property); if (cols == null) { if (property.equals(RDF_TYPE) && !types.isEmpty()) addValue(record, subject, property, object); return; } for (Column col : cols) { String cleaned = object; if (col.getCleaner() != null) cleaned = col.getCleaner().clean(object); if (cleaned != null && !cleaned.equals("")) addValue(record, subject, col.getProperty(), cleaned); } }
[ "common utility method for adding a statement to a record" ]
[ "Checks given permissions are needed to show rationale.\n\n@return returns true if one of the permission is needed to show rationale.", "Adds an option to the JVM arguments to enable JMX connection\n\n@param jvmArgs the JVM args\n@return a new list of JVM args", "Returns whether the values of this division grouping contain the prefix block for the given prefix length\n\n@param prefixLength\n@return", "Updates the internal list of dates and fires a value change if necessary.\n\n@param dates the dates to set.", "rollback the transaction", "Use this API to update vridparam.", "Checks a returned Javascript value where we expect a boolean but could\nget null.\n\n@param val The value from Javascript to be checked.\n@param def The default return value, which can be null.\n@return The actual value, or if null, returns false.", "Gets the file from which boot operations should be parsed.\n@return the file. Will not be {@code null}", "Executes a HTTP request and parses the JSON response into a Response instance.\n\n@param connection The HTTP request to execute.\n@return Response object of the deserialized JSON response" ]
public Bundler put(String key, Parcelable value) { delegate.putParcelable(key, value); return this; }
[ "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" ]
[ "Remove all scene objects.", "Sends the JSON-formatted spellchecking results to the client.\n\n@param res The HttpServletResponse object.\n@param request The spellchecking request object.\n\n@throws IOException in case writing the response fails", "Delete an artifact in the Grapes server\n\n@param gavc\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Write the criteria elements, extracting the information of the sub-model.\n\n@param writer the xml stream writer\n@param subModel the interface model\n@param nested whether it the criteria elements are nested as part of <not /> or <any />\n@throws XMLStreamException", "Use this API to fetch all the sslfipskey resources that are configured on netscaler.", "This method takes the textual version of a constraint name\nand returns an appropriate class instance. Note that unrecognised\nvalues are treated as \"As Soon As Possible\" constraints.\n\n@param locale target locale\n@param type text version of the constraint type\n@return ConstraintType instance", "compute Exp using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "Converts B and X into block matrices and calls the block matrix solve routine.\n\n@param B A matrix &real; <sup>m &times; p</sup>. Not modified.\n@param X A matrix &real; <sup>n &times; p</sup>, where the solution is written to. Modified.", "Use this API to disable clusterinstance of given name." ]
public String getUserProfile(String userId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_USER_PROFILE); parameters.put("user_id", userId); Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element payload = response.getPayload(); return payload.getAttribute("url"); }
[ "Get the URL for the user's profile.\n\n@param userId\nThe user ID\n@return The URL\n@throws FlickrException" ]
[ "Upgrade the lock on the given object to the given lock mode. The call has\nno effect if the object's current lock is already at or above that level of\nlock mode.\n\n@param obj object to acquire a lock on.\n@param lockMode lock mode to acquire. The lock modes\nare <code>READ</code> , <code>UPGRADE</code> , and <code>WRITE</code> .\n\n@exception LockNotGrantedException Description of Exception", "Read hints from a file and merge with the given hints map.", "we have only one implementation on classpath.", "Return the class's name, possibly by stripping the leading path", "Non-blocking call that will throw any Exceptions in the traditional\nmanner on access\n\n@param key\n@param value\n@return", "Triggers the building process, builds, creates and starts the docker container associated with the requested\ncontainer object, creates the container object and returns it\n\n@return the created container object\n\n@throws IllegalAccessException\nif there is an error accessing the container object fields\n@throws IOException\nif there is an I/O error while preparing the docker build\n@throws InvocationTargetException\nif there is an error while calling the DockerFile archive creation", "This method prints plan information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return plans the IPlan[] with all the information, so the tester can\nlook for information", "Finds all nWise combinations of a set of variables, each with a given domain of values\n\n@param nWise the number of variables in each combination\n@param coVariables the varisbles\n@param variableDomains the domains\n@return all nWise combinations of the set of variables", "Returns the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.\n\n@param namespace the namespace referring to the undo collection.\n@return the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure." ]
private void buildTransformers_3_0(ResourceTransformationDescriptionBuilder builder) { /* ====== Resource root address: ["subsystem" => "remoting"] - Current version: 4.0.0; legacy version: 3.0.0 ======= --- Problems for relative address to root ["configuration" => "endpoint"]: Different 'default' for attribute 'sasl-protocol'. Current: "remote"; legacy: "remoting" ## both are valid also for legacy servers --- Problems for relative address to root ["connector" => "*"]: Missing attributes in current: []; missing in legacy [sasl-authentication-factory, ssl-context] Missing parameters for operation 'add' in current: []; missing in legacy [sasl-authentication-factory, ssl-context] --- Problems for relative address to root ["http-connector" => "*"]: Missing attributes in current: []; missing in legacy [sasl-authentication-factory] Missing parameters for operation 'add' in current: []; missing in legacy [sasl-authentication-factory] --- Problems for relative address to root ["remote-outbound-connection" => "*"]: Missing attributes in current: []; missing in legacy [authentication-context] Different 'alternatives' for attribute 'protocol'. Current: ["authentication-context"]; legacy: undefined Different 'alternatives' for attribute 'security-realm'. Current: ["authentication-context"]; legacy: undefined Different 'alternatives' for attribute 'username'. Current: ["authentication-context"]; legacy: undefined Missing parameters for operation 'add' in current: []; missing in legacy [authentication-context] Different 'alternatives' for parameter 'protocol' of operation 'add'. Current: ["authentication-context"]; legacy: undefined Different 'alternatives' for parameter 'security-realm' of operation 'add'. Current: ["authentication-context"]; legacy: undefined Different 'alternatives' for parameter 'username' of operation 'add'. Current: ["authentication-context"]; legacy: undefined */ builder.addChildResource(ConnectorResource.PATH).getAttributeBuilder() .setDiscard(DiscardAttributeChecker.UNDEFINED, ConnectorCommon.SASL_AUTHENTICATION_FACTORY, ConnectorResource.SSL_CONTEXT) .addRejectCheck(RejectAttributeChecker.DEFINED, ConnectorCommon.SASL_AUTHENTICATION_FACTORY, ConnectorResource.SSL_CONTEXT); builder.addChildResource(RemotingEndpointResource.ENDPOINT_PATH).getAttributeBuilder() .setValueConverter(new AttributeConverter.DefaultAttributeConverter() { @Override protected void convertAttribute(PathAddress address, String attributeName, ModelNode attributeValue, TransformationContext context) { if (!attributeValue.isDefined()) { attributeValue.set("remoting"); //if value is not defined, set it to EAP 7.0 default valueRemotingSubsystemTransformersTestCase } } }, RemotingSubsystemRootResource.SASL_PROTOCOL); builder.addChildResource(HttpConnectorResource.PATH).getAttributeBuilder() .setDiscard(DiscardAttributeChecker.UNDEFINED, ConnectorCommon.SASL_AUTHENTICATION_FACTORY) .addRejectCheck(RejectAttributeChecker.DEFINED, ConnectorCommon.SASL_AUTHENTICATION_FACTORY); builder.addChildResource(RemoteOutboundConnectionResourceDefinition.ADDRESS).getAttributeBuilder() .setDiscard(DiscardAttributeChecker.UNDEFINED, ConnectorCommon.SASL_AUTHENTICATION_FACTORY) .addRejectCheck(RejectAttributeChecker.DEFINED, RemoteOutboundConnectionResourceDefinition.AUTHENTICATION_CONTEXT); }
[ "EAP 7.0" ]
[ "Use this API to fetch autoscaleprofile resource of given name .", "This method determines whether the given date falls in the range of\ndates covered by this exception. Note that this method assumes that both\nthe start and end date of this exception have been set.\n\n@param date Date to be tested\n@return Boolean value", "Returns the complete Grapes root URL\n\n@return String", "Create an image of the proper size to hold a new waveform preview image and draw it.", "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}", "Use this API to fetch all the nspbr6 resources that are configured on netscaler.\nThis uses nspbr6_args which is a way to provide additional arguments while fetching the resources.", "Creates a real valued diagonal matrix of the specified type", "Write entries into the storage.\nOverriding methods should first delegate to super before adding their own entries.", "Returns sql statement used in this prepared statement together with the parameters.\n@param sql base sql statement\n@param logParams parameters to print out\n@return returns printable statement" ]
public List<Integer> getAsyncOperationList(boolean showCompleted) { /** * Create a copy using an immutable set to avoid a * {@link java.util.ConcurrentModificationException} */ Set<Integer> keySet = ImmutableSet.copyOf(operations.keySet()); if(showCompleted) return new ArrayList<Integer>(keySet); List<Integer> keyList = new ArrayList<Integer>(); for(int key: keySet) { AsyncOperation operation = operations.get(key); if(operation != null && !operation.getStatus().isComplete()) keyList.add(key); } return keyList; }
[ "Get list of asynchronous operations on this node. By default, only the\npending operations are returned.\n\n@param showCompleted Show completed operations\n@return A list of operation ids." ]
[ "Adjusts beforeIndex to account for the possibility that the given widget is\nalready a child of this panel.\n\n@param child the widget that might be an existing child\n@param beforeIndex the index at which it will be added to this panel\n@return the modified index", "End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance", "Adds multiple observers using unique integer prefixes for each.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}", "set the layout which will host the ScrimInsetsFrameLayout and its layoutParams\n\n@param container\n@param layoutParams\n@return", "Add a clause where the ID is equal to the argument.", "Clears the Parameters before performing a new search.\n@return this.true;", "Use this API to rename a cmppolicylabel resource.", "Set the classpath for loading the driver using the classpath reference.\n\n@param r reference to the classpath", "Answer the FieldConversions for the PkFields\n@param cld\n@return the pk FieldConversions" ]
private void setExceptions(ProjectCalendar mpxjCalendar, Calendars gpCalendar) { List<net.sf.mpxj.ganttproject.schema.Date> dates = gpCalendar.getDate(); for (net.sf.mpxj.ganttproject.schema.Date date : dates) { addException(mpxjCalendar, date); } }
[ "Add exceptions to the calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param gpCalendar GanttProject calendar" ]
[ "This method writes project properties to a Planner file.", "Initialize the class if this is being called with Spring.", "Upload file and set odo overrides and configuration of odo\n\n@param fileName File containing configuration\n@param odoImport Import odo configuration in addition to overrides\n@return If upload was successful", "1-D Forward Discrete Cosine Transform.\n\n@param data Data.", "Stops the playback of a sound and destroys the corresponding Sound Object or Soundfield.", "This method is used to process an MPP14 file. This is the file format\nused by Project 14.\n\n@param reader parent file reader\n@param file parent MPP file\n@param root Root of the POI file system.", "Use this API to fetch all the configstatus resources that are configured on netscaler.", "Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discarded, since these fields are used system internally.\n@return the manipulated document", "Gets a SerialMessage with the SENSOR_ALARM_GET command\n@return the serial message" ]
public CrosstabBuilder useMainReportDatasource(boolean preSorted) { DJDataSource datasource = new DJDataSource("ds",DJConstants.DATA_SOURCE_ORIGIN_REPORT_DATASOURCE,DJConstants.DATA_SOURCE_TYPE_JRDATASOURCE); datasource.setPreSorted(preSorted); crosstab.setDatasource(datasource); return this; }
[ "To use main report datasource. There should be nothing else in the detail band\n@param preSorted\n@return" ]
[ "Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian or false if Low Endian\n@throws IOException if an IOException occurs.\n@since 1.0", "Use this API to fetch all the snmpalarm resources that are configured on netscaler.", "Get the content-type, including the optional \";base64\".", "Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Random matrix", "Create an import declaration and delegates its registration for an upper class.", "Determines run length for each 'initial' partition ID. Note that a\ncontiguous run may \"wrap around\" the end of the ring.\n\n@param cluster\n@param zoneId\n@return map of initial partition Id to length of contiguous run of\npartition IDs within the same zone..", "Removes and returns a random element from the set.\n@return the removed element, or <code>null</code> when the key does not exist.", "Extracts out a matrix from source given a sub matrix with arbitrary rows and columns specified in\ntwo array lists\n\n@param src Source matrix. Not modified.\n@param rows array of row indexes\n@param rowsSize maximum element in row array\n@param cols array of column indexes\n@param colsSize maximum element in column array\n@param dst output matrix. Must be correct shape.", "Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value" ]
public void remove(I_CmsEditableGroupRow row) { int index = m_container.getComponentIndex(row); if (index >= 0) { m_container.removeComponent(row); } updatePlaceholder(); updateButtonBars(); updateGroupValidation(); }
[ "Removes the given row.\n\n@param row the row to remove" ]
[ "This method retrieves an int value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of an integer\n@return int value", "Creates a resource key for given enumeration value. By convention,\nresource bundle for enumerations has the name of enumeration class\nand value identifier is the same as enumeration value name.\n@param value the enumeration value\n@return the resource key", "Create the navigation frame.\n@param outputDirectory The target directory for the generated file(s).", "Determine if a CharSequence can be parsed as a Float.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isFloat(String)\n@since 1.8.2", "Retrieves the working hours on the given date.\n\n@param date required date\n@param cal optional calendar instance\n@param day optional day instance\n@return working hours", "Returns the connection count by key specified in this registry\n\nNote it might count connections that are closed but not removed from registry yet\n\n@param key\nthe key\n@return connection count by key", "Creates an object from the given JSON data.\n\n@param data the JSON data\n@param clazz the class object for the content of the JSON data\n@param <T> the type of the class object extending {@link InterconnectObject}\n@return the object contained in the given JSON data\n@throws JsonParseException if a the JSON data could not be parsed\n@throws JsonMappingException if the mapping of the JSON data to the IVO failed\n@throws IOException if an I/O related problem occurred", "Remove a named object", "Exports a single queue to an XML file." ]
public Collection<String> getMethods() throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_METHODS); Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element methodsElement = response.getPayload(); List<String> methods = new ArrayList<String>(); NodeList methodElements = methodsElement.getElementsByTagName("method"); for (int i = 0; i < methodElements.getLength(); i++) { Element methodElement = (Element) methodElements.item(i); methods.add(XMLUtilities.getValue(methodElement)); } return methods; }
[ "Get a list of all methods.\n\n@return The method names\n@throws FlickrException" ]
[ "Plots the MSD curve for trajectory t.\n@param t List of trajectories\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds", "Checks if there's exactly one option that exists among all possible opts.\n\n@param options OptionSet to checked\n@param opt1 Possible required option to check\n@param opt2 Possible required option to check\n@throws VoldemortException", "Returns the finish date for this resource assignment.\n\n@return finish date", "Delete the proxy history for the active profile\n\n@throws Exception exception", "Returns the full record for the given webhook.\n\n@param webhook The webhook to get.\n@return Request object", "Initializes the model", "Apply all attributes on the given context, hereby existing entries are preserved.\n\n@param context the context to be applied, not null.\n@return this Builder, for chaining\n@see #importContext(AbstractContext, boolean)", "return the squared area of the triangle defined by the half edge hedge0\nand the point at the head of hedge1.\n\n@param hedge0\n@param hedge1\n@return", "Gets a first data set value.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation" ]
private void readTasks() { Integer rootID = Integer.valueOf(1); readWBS(m_projectFile, rootID); readTasks(rootID); m_projectFile.getTasks().synchronizeTaskIDToHierarchy(); }
[ "Read task data from a PEP file." ]
[ "This logic is shared for all actual types i.e. raw types, parameterized types and generic array types.", "add a new producer, either synchronous or asynchronous, connecting\nto the specified broker\n\n@param broker broker to producer", "Sets the path to the script file to load and loads the script.\n\n@param filePath path to script file\n@throws IOException if the script cannot be read.\n@throws GVRScriptException if a script processing error occurs.", "Return the name of the current conf set\n@return the conf set name", "Broadcast a packet that tells some players to start playing and others to stop. If a player number is in\nboth sets, it will be told to stop. Numbers outside the range 1 to 4 are ignored.\n\n@param deviceNumbersToStart the players that should start playing if they aren't already\n@param deviceNumbersToStop the players that should stop playing\n\n@throws IOException if there is a problem broadcasting the command to the players\n@throws IllegalStateException if the {@code VirtualCdj} is not active", "Initializes the default scope type", "Generates a HashMap used to store expanded state for items in the list\non configuration change or whenever onResume is called.\n\n@return A HashMap containing the expanded state of all parents", "Search for a publisher of the given type in a project and return it, or null if it is not found.\n\n@return The publisher", "Execute a HTTP request and handle common error cases.\n\n@param connection the HttpConnection request to execute\n@return the executed HttpConnection\n@throws CouchDbException for HTTP error codes or if an IOException was thrown" ]
public void addAppenderEvent(final Category cat, final Appender appender) { updateDefaultLayout(appender); if (appender instanceof FoundationFileRollingAppender) { final FoundationFileRollingAppender timeSizeRollingAppender = (FoundationFileRollingAppender) appender; // update the appender with default vales such as logging pattern, file size etc. //updateDefaultTimeAndSizeRollingAppender(timeSizeRollingAppender); // read teh proeprties and determine if archiving should be enabled. updateArchivingSupport(timeSizeRollingAppender); // by default add the rolling file listener to enable application // state. timeSizeRollingAppender.setFileRollEventListener(FoundationRollEventListener.class.getName()); boolean rollOnStartup = true; if (FoundationLogger.log4jConfigProps != null && FoundationLogger.log4jConfigProps.containsKey(FoundationLoggerConstants.Foundation_ROLL_ON_STARTUP.toString())) { rollOnStartup = Boolean.valueOf(FoundationLogger.log4jConfigProps.getProperty(FoundationLoggerConstants.Foundation_ROLL_ON_STARTUP.toString())); } timeSizeRollingAppender.setRollOnStartup(rollOnStartup); // refresh the appender timeSizeRollingAppender.activateOptions(); // timeSizeRollingAppender.setOriginalLayout(); //So application state will not make any problems }else if(!(appender instanceof FoundationFileRollingAppender) && (appender instanceof TimeAndSizeRollingAppender)){ //TimeAndSizeRollingAppender final TimeAndSizeRollingAppender timeSizeRollingAppender = (TimeAndSizeRollingAppender) appender; // update the appender with default vales such as logging pattern, file size etc. updateDefaultTimeAndSizeRollingAppender(timeSizeRollingAppender); // read teh proeprties and determine if archiving should be enabled. updateArchivingSupport(timeSizeRollingAppender); // by default add the rolling file listener to enable application // state. timeSizeRollingAppender.setFileRollEventListener(FoundationRollEventListener.class.getName()); boolean rollOnStartup = true; if (FoundationLogger.log4jConfigProps != null && FoundationLogger.log4jConfigProps.containsKey(FoundationLoggerConstants.Foundation_ROLL_ON_STARTUP.toString())) { rollOnStartup = Boolean.valueOf(FoundationLogger.log4jConfigProps.getProperty(FoundationLoggerConstants.Foundation_ROLL_ON_STARTUP.toString())); } timeSizeRollingAppender.setRollOnStartup(rollOnStartup); // refresh the appender timeSizeRollingAppender.activateOptions(); // timeSizeRollingAppender.setOriginalLayout(); } if ( ! (appender instanceof org.apache.log4j.AsyncAppender)) initiateAsyncSupport(appender); }
[ "In this method perform the actual override in runtime.\n\n@see org.apache.log4j.spi.HierarchyEventListener#addAppenderEvent(org.apache.log4j.Category, org.apache.log4j.Appender)" ]
[ "Calculates the static drift. Static means, that the drift does not change direction or intensity over time.\n\n@param tracks Tracks which seems to exhibit a local drift\n@return The static drift over all trajectories", "Returns the intersection of sets s1 and s2.", "Invokes the ready tasks.\n\n@param context group level shared context that need be passed to\n{@link TaskGroupEntry#invokeTaskAsync(boolean, InvocationContext)}\nmethod of each entry in the group when it is selected for execution\n\n@return an observable that emits the result of tasks in the order they finishes.", "Returns all base types.\n\n@return An iterator of the base types", "Creates an observer\n\n@param method The observer method abstraction\n@param declaringBean The declaring bean\n@param manager The Bean manager\n@return An observer implementation built from the method abstraction", "Converts from an Accumulo Key to a Fluo RowColumn\n\n@param key Key\n@return RowColumn", "Use this API to export application.", "Used for DI frameworks to inject values into stages.", "Pushes a class type onto the stack from the string representation This can\nalso handle primitives\n\n@param b the bytecode\n@param classType the type descriptor for the class or primitive to push.\nThis will accept both the java.lang.Object form and the\nLjava/lang/Object; form" ]
@Override public Object instantiateItem(ViewGroup parent, int position) { T content = getItem(position); rendererBuilder.withContent(content); rendererBuilder.withParent(parent); rendererBuilder.withLayoutInflater(LayoutInflater.from(parent.getContext())); Renderer<T> renderer = rendererBuilder.build(); if (renderer == null) { throw new NullRendererBuiltException("RendererBuilder have to return a not null Renderer"); } updateRendererExtraValues(content, renderer, position); renderer.render(); View view = renderer.getRootView(); parent.addView(view); return view; }
[ "Main method of VPRendererAdapter. This method has the responsibility of update the\nRendererBuilder values and create or recycle a new Renderer. Once the renderer has been\nobtained the RendereBuilder will call the render method in the renderer and will return the\nRenderer root view to the ViewPager.\n\nIf RendererBuilder returns a null Renderer this method will throw a\nNullRendererBuiltException.\n\n@param parent The containing View in which the page will be shown.\n@param position to render.\n@return view rendered." ]
[ "Configs created by this ConfigBuilder will use the given Redis sentinels.\n\n@param sentinels the Redis set of sentinels\n@return this ConfigBuilder", "Checks to see if a handler is disabled\n\n@param handlerName the name of the handler to enable.", "Private helper method which decodes the Stitch error from the body of an HTTP `Response`\nobject. If the error is successfully decoded, this function will throw the error for the end\nuser to eventually consume. If the error cannot be decoded, this is likely not an error from\nthe Stitch server, and this function will return an error message that the calling function\nshould use as the message of a StitchServiceException with an unknown code.", "Wrap CallableStatement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a Callablestatement.", "Convert a collection of objects to a JSON array with the string representations of that objects.\n@param collection the collection of objects.\n@return the JSON array with the string representations.", "Use this API to update autoscaleaction.", "generate a prepared SELECT-Statement for the Class\ndescribed by cld\n@param cld the ClassDescriptor", "This method creates the flattened POM what is the main task of this plugin.\n\n@param pomFile is the name of the original POM file to read and transform.\n@return the {@link Model} of the flattened POM.\n@throws MojoExecutionException if anything goes wrong (e.g. POM can not be processed).\n@throws MojoFailureException if anything goes wrong (logical error).", "Updates the information about this weblink with any info fields that have been modified locally.\n\n<p>The only fields that will be updated are the ones that have been modified locally. For example, the following\ncode won't update any information (or even send a network request) since none of the info's fields were\nchanged:</p>\n\n<pre>BoxWebLink webLink = new BoxWebLink(api, id);\nBoxWebLink.Info info = webLink.getInfo();\nwebLink.updateInfo(info);</pre>\n\n@param info the updated info." ]
public static String plus(Number value, String right) { return DefaultGroovyMethods.toString(value) + right; }
[ "Appends a String to the string representation of this number.\n\n@param value a Number\n@param right a String\n@return a String\n@since 1.0" ]
[ "Send a track metadata update announcement to all registered listeners.", "Recursively read a task, and any sub tasks.\n\n@param mpxjParent Parent for the MPXJ tasks\n@param gpTask GanttProject task", "OJB can handle only classes that declare at least one primary key attribute,\nthis method checks this condition.\n\n@param realObject The real object to check\n@throws ClassNotPersistenceCapableException thrown if no primary key is specified for the objects class", "Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler.", "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.", "Changes the index buffer associated with this mesh.\n@param ibuf new index buffer to use\n@see #setIndices(int[])\n@see #getIndexBuffer()\n@see #getIntIndices()", "This method extracts resource data from a Planner file.\n\n@param plannerProject Root node of the Planner file", "Returns server group by ID\n\n@param id ID of server group\n@return ServerGroup\n@throws Exception exception", "Places the real component of the input matrix into the output matrix.\n\n@param input Complex matrix. Not modified.\n@param output real matrix. Modified." ]
public <T> T fetchObject(String objectId, Class<T> type) { URI uri = URIBuilder.fromUri(getBaseGraphApiUrl() + objectId).build(); return getRestTemplate().getForObject(uri, type); }
[ "low-level Graph API operations" ]
[ "Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data", "read messages beginning from offset\n\n@param offset next message offset\n@param length the max package size\n@return a MessageSet object with length data or empty\n@see MessageSet#Empty\n@throws IOException any exception", "Compute pose of skeleton at the given time from the animation channels.\n@param timeInSec animation time in seconds.", "Sets a single element of this vector. Elements 0, 1, and 2 correspond to\nx, y, and z.\n\n@param i\nelement index\n@param value\nelement value\n@return element value throws ArrayIndexOutOfBoundsException if i is not\nin the range 0 to 2.", "Obtain host header value for a hostname\n\n@param hostName\n@return", "Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key", "Obtain override ID\n\n@param overrideIdentifier can be the override ID or class name\n@return\n@throws Exception", "Use this API to delete dnstxtrec of given name.", "Visits a method instruction. A method instruction is an instruction that\ninvokes a method.\n\n@param opcode\nthe opcode of the type instruction to be visited. This opcode\nis either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or\nINVOKEINTERFACE.\n@param owner\nthe internal name of the method's owner class (see\n{@link Type#getInternalName() getInternalName}).\n@param name\nthe method's name.\n@param desc\nthe method's descriptor (see {@link Type Type}).\n@param itf\nif the method's owner class is an interface." ]
@Override public HandlerRegistration addSearchNoResultHandler(final SearchNoResultEvent.SearchNoResultHandler handler) { return addHandler(handler, SearchNoResultEvent.TYPE); }
[ "This handler will be triggered when there's no search result" ]
[ "Add another store destination to an existing streaming session\n\n\n@param store the name of the store to stream to", "Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads\nhave actually been paused if possible.\n\n@throws LocalOperationException if the method is called while no upload is going on.", "Try Oracle update batching and call setExecuteBatch or revert to\nJDBC update batching. See 12-2 Update Batching in the Oracle9i\nJDBC Developer's Guide and Reference.\n@param stmt the prepared statement to be used for batching\n@throws PlatformException upon JDBC failure", "Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data", "Get the scale at the given index.\n\n@param index the index of the zoom level to access.\n@param unit the unit.", "Retrieves a specific range of child items in this folder.\n\n@param offset the index of the first child item to retrieve.\n@param limit the maximum number of children to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of child items.", "Calculate entropy value.\n@param values Values.\n@return Returns entropy value of the specified histogram array.", "Default settings set type loader to ClasspathTypeLoader if not set before.", "Gets whether the given server can be updated.\n\n@param server the id of the server. Cannot be <code>null</code>\n\n@return <code>true</code> if the server can be updated; <code>false</code>\nif the update should be cancelled\n\n@throws IllegalStateException if this policy is not expecting a request\nto update the given server" ]
private double getExpectedProbability(double x) { double y = 1 / (standardDeviation * Math.sqrt(Math.PI * 2)); double z = -(Math.pow(x - mean, 2) / (2 * Math.pow(standardDeviation, 2))); return y * Math.exp(z); }
[ "This is the probability density function for the Gaussian\ndistribution." ]
[ "This method retrieves the offset of a given entry in the Var2Data block.\nEach entry can be uniquely located by the identifier of the object to\nwhich the data belongs, and the type of the data.\n\n@param id unique identifier of an entity\n@param type data type identifier\n@return offset of requested item", "Writes the given configuration to the given file.", "Figure out, based on how much time has elapsed since we received an update, and the playback position,\nspeed, and direction at the time of that update, where the player will be now.\n\n@param update the most recent update received from a player\n@param currentTimestamp the nanosecond timestamp representing when we want to interpolate the track's position\n\n@return the playback position we believe that player has reached now", "Use this API to fetch all the nspbr6 resources that are configured on netscaler.", "Return a new File object based on the baseDir and the segments.\n\nThis method does not perform any operation on the file system.", "Parses the query facet configurations.\n@param rangeFacetObject The JSON sub-node with the query facet configurations.\n@return The query facet configurations.", "GetJob helper - String predicates are all created the same way, so this factors some code.", "Use this API to expire cacheobject.", "Random string from string array\n\n@param s Array\n@return String" ]
void endOfRunDb() { DbConn cnx = null; try { cnx = Helpers.getNewDbSession(); // Done: put inside history & remove instance from queue. History.create(cnx, this.ji, this.resultStatus, endDate); jqmlogger.trace("An History was just created for job instance " + this.ji.getId()); cnx.runUpdate("ji_delete_by_id", this.ji.getId()); cnx.commit(); } catch (RuntimeException e) { endBlockDbFailureAnalysis(e); } finally { Helpers.closeQuietly(cnx); } }
[ "Part of the endOfRun process that needs the database. May be deferred if the database is not available." ]
[ "Helper method used to peel off spurious wrappings of DateTimeException\n\n@param e DateTimeException to peel\n\n@return DateTimeException that does not have another DateTimeException as its cause.", "Uploads a new file to this folder with custom upload parameters.\n\n@param uploadParams the custom upload parameters.\n@return the uploaded file's info.", "Get the first 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 or null", "Creates a new row representing a rule.\n@param type the type for the rule row, must not be null nor {@link TableRowType#CONTENT} nor {@link TableRowType#UNKNOWN}\n@param style the style for the rule row, must not be null nor {@link TableRowStyle#UNKNOWN}\n@return a new row representing a rule\n@throws {@link NullPointerException} if type or style where null\n@throws {@link IllegalStateException} if type or style where unknown or if type was {@link TableRowType#CONTENT}", "Animate de-selection of visible views and clear\nselected set.", "Returns the arguments as a list in their command line form.\n\n@return the arguments for the command line", "Return the regression basis functions.\n\n@param exerciseDate The date w.r.t. which the basis functions should be measurable.\n@param model The model.\n@return Array of random variables.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Returns the list of Solr fields a search result must have to initialize the gallery search result correctly.\n@return the list of Solr fields.", "Whether the address has the well-known prefix for IPv4 translatable addresses as in rfc 6052 and 6144\n@return" ]
static EntityIdValue fromId(String id, String siteIri) { switch (guessEntityTypeFromId(id)) { case EntityIdValueImpl.JSON_ENTITY_TYPE_ITEM: return new ItemIdValueImpl(id, siteIri); case EntityIdValueImpl.JSON_ENTITY_TYPE_PROPERTY: return new PropertyIdValueImpl(id, siteIri); case EntityIdValueImpl.JSON_ENTITY_TYPE_LEXEME: return new LexemeIdValueImpl(id, siteIri); case EntityIdValueImpl.JSON_ENTITY_TYPE_FORM: return new FormIdValueImpl(id, siteIri); case EntityIdValueImpl.JSON_ENTITY_TYPE_SENSE: return new SenseIdValueImpl(id, siteIri); default: throw new IllegalArgumentException("Entity id \"" + id + "\" is not supported."); } }
[ "Parses an item id\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@param siteIri\nthe siteIRI that this value refers to\n@throws IllegalArgumentException\nif the id is invalid" ]
[ "Write a boolean field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Draw a rounded rectangular boundary.\n\n@param rect rectangle\n@param color colour\n@param linewidth line width\n@param r radius for rounded corners", "Add the set with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The set of all packages to add.", "The file we are working with has a byte order mark. Skip this and try again to read the file.\n\n@param stream schedule data\n@param length length of the byte order mark\n@param charset charset indicated by byte order mark\n@return ProjectFile instance", "Remove colProxy from list of pending collections and\nregister its contents with the transaction.", "Build a stack trace for this path. This can be used in generating more meaningful exceptions\nwhile using Crawljax in conjunction with JUnit for example.\n\n@return a array of StackTraceElements denoting the steps taken by this path. The first\nelement [0] denotes the last {@link Eventable} on this path while the last item\ndenotes the first {@link Eventable} executed.", "Leave a group.\n\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.leave.html\">lickr.groups.leave</a> for a description of the various behaviors possible\nwhen a user leaves a group.\n\n@param groupId\n- the id of the group to leave\n@param deletePhotos\n- delete photos by this user from group", "The indices space is ignored for reduce ops other than min or max.", "Converts from a bitmap to individual day flags for a weekly recurrence,\nusing the array of masks.\n\n@param days bitmap\n@param masks array of mask values" ]
public void unlock() { String queryString = new QueryStringBuilder().appendParam("fields", "lock").toString(); URL url = FILE_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), queryString, this.getID()); BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "PUT"); JsonObject lockObject = new JsonObject(); lockObject.add("lock", JsonObject.NULL); request.setBody(lockObject.toString()); request.send(); }
[ "Unlocks a file." ]
[ "Remove a role from the list of defined roles.\n\n@param roleName - The name of the role to be removed.\n@return A key that can be used to undo the removal.", "Used by TracedParallelBatch where its used to wrap a TraceContext and puts it in the\nregistry for the forked execution. This is marked deprecated as we prefer not to\nexpose details of the RatpackCurrentTraceContext implementation.\n\n@param traceContext a trace context.\n@return a holder for the trace context, which can be put into the registry.", "Scale all widgets in Main Scene hierarchy\n@param scale", "Sets the underlying read timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#readTimeout(long, TimeUnit)", "Creates a map of identifiers or page titles to documents retrieved via\nthe API URL\n\n@param properties\nparameter setting for wbgetentities\n@return map of document identifiers or titles to documents retrieved via\nthe API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\nif we encounter network issues or HTTP 500 errors from Wikibase", "Sets the HTTP poller processor to handle Async API.\nWill auto enable the pollable mode with this call\n\n@param httpPollerProcessor\nthe http poller processor\n@return the parallel task builder", "Returns the index of the eigenvalue which has the largest magnitude.\n\n@return index of the largest magnitude eigen value.", "See if there is an auto-attach cache file that seems to match the media in the specified slot, and if so,\nattach it.\n\n@param slot the player slot that is under consideration for automatic cache attachment", "Store some state on this request context associated with the specified interceptor instance.\nUsed where a single interceptor instance needs to associate state with each HTTP request.\n\n@param interceptor the interceptor instance\n@param stateName the key to store the state object under\n@param stateObjectToStore the state object to store\n@param <T> the type of the state object to store\n@see #getState(HttpConnectionInterceptor, String, Class)\n@since 2.6.0" ]
public void fillFromToWith(int from, int to, Object val) { checkRangeFromTo(from,to,this.size); for (int i=from; i<=to;) setQuick(i++,val); }
[ "Sets the specified range of elements in the specified array to the specified value.\n\n@param from the index of the first element (inclusive) to be filled with the specified value.\n@param to the index of the last element (inclusive) to be filled with the specified value.\n@param val the value to be stored in the specified elements of the receiver." ]
[ "Adds a new row after the given one.\n\n@param row the row after which a new one should be added", "Initializes module enablement.\n\n@see ModuleEnablement", "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", "Use this API to fetch lbvserver_scpolicy_binding resources of given name .", "Makes a DocumentReaderAndWriter based on the flags the CRFClassifier\nwas constructed with. Will create the flags.readerAndWriter and\ninitialize it with the CRFClassifier's flags.", "This method evaluates a if a graphical indicator should\nbe displayed, given a set of Task or Resource data. The\nmethod will return -1 if no indicator should be displayed.\n\n@param container Task or Resource instance\n@return indicator index", "Returns the first found autoincrement field\ndefined in this class descriptor. Use carefully\nwhen multiple autoincrement field were defined.\n@deprecated does not make sense because it's possible to\ndefine more than one autoincrement field. Alternative\nsee {@link #getAutoIncrementFields}", "Convert a Planner time into a Java date.\n\n0800\n\n@param value Planner time\n@return Java Date instance", "Get parent digest of an image.\n\n@param digest\n@param host\n@return" ]
public ComplexDouble divi(ComplexDouble c, ComplexDouble result) { double d = c.r * c.r + c.i * c.i; double newR = (r * c.r + i * c.i) / d; double newI = (i * c.r - r * c.i) / d; result.r = newR; result.i = newI; return result; }
[ "Divide two complex numbers, in-place\n\n@param c complex number to divide this by\n@param result complex number to hold result\n@return same as result" ]
[ "Ask the specified player for the specified artwork from the specified media slot, first checking if we have a\ncached copy.\n\n@param artReference uniquely identifies the desired artwork\n@param trackType the kind of track that owns the artwork\n\n@return the artwork, if it was found, or {@code null}\n\n@throws IllegalStateException if the ArtFinder is not running", "Sets the global. Does not add the global to the ExecutionResults.\n\n@param identifier\nThe identifier of the global\n@param object\nThe instance to be set as the global.\n@return", "Frees the temporary LOBs when an exception is raised in the application\nor when the LOBs are no longer needed. If the LOBs are not freed, the\nspace used by these LOBs are not reclaimed.\n@param clob CLOB-wrapper to free or null\n@param blob BLOB-wrapper to free or null", "This method is used to initiate a release staging process using the Artifactory Release Staging API.", "Retrieve all Collection attributes of a given instance, and make all of the Proxy Collections\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs", "Get new vector clock based on this clock but incremented on index nodeId\n\n@param nodeId The id of the node to increment\n@return A vector clock equal on each element execept that indexed by\nnodeId", "Generates a file of random data in a format suitable for the DIEHARD test.\nDIEHARD requires 3 million 32-bit integers.\n@param rng The random number generator to use to generate the data.\n@param outputFile The file that the random data is written to.\n@throws IOException If there is a problem writing to the file.", "Stops the HTTP service gracefully and release all resources.\n\n@param quietPeriod the quiet period as described in the documentation of {@link EventExecutorGroup}\n@param timeout the maximum amount of time to wait until the executor is\n{@linkplain EventExecutorGroup#shutdown()}\nregardless if a task was submitted during the quiet period\n@param unit the unit of {@code quietPeriod} and {@code timeout}\n@throws Exception if there is exception raised during shutdown.", "Set the default styles. the case of the keys are not important. The retrieval will be case\ninsensitive.\n\n@param defaultStyle the mapping from geometry type name (point, polygon, etc...) to the style\nto use for that type." ]
public void addFileSet(FileSet fs) { add(fs); if (fs.getProject() == null) { fs.setProject(getProject()); } }
[ "Adds a set of tests based on pattern matching." ]
[ "Browse groups for the given category ID. If a null value is passed for the category then the root category is used.\n\n@param catId\nThe optional category id. Null value will be ignored.\n@return The Collection of Photo objects\n@throws FlickrException\n@deprecated Flickr returns just empty results", "Tries to load a class using the specified ResourceLoader. Returns null if the class is not found.\n@param className\n@param resourceLoader\n@return the loaded class or null if the given class cannot be loaded", "Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance", "Write the document object to a file.\n\n@param document the document object.\n@param filePathname the path name of the file to be written to.\n@param method the output method: for instance html, xml, text\n@param indent amount of indentation. -1 to use the default.\n@throws TransformerException if an exception occurs.\n@throws IOException if an IO exception occurs.", "Adds the complex number with a scalar value.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the add of specified complex number with scalar value.", "Retrieve a finish date time in the form required by Phoenix.\n\n@param value Date instance\n@return formatted date time", "Get a default style. If null a simple black line style will be returned.\n\n@param geometryType the name of the geometry type (point, line, polygon)", "Reads an argument of type \"number\" from the request.", "Checks the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated" ]
private void processDefaultCurrency(Integer currencyID) throws SQLException { List<Row> rows = getRows("select * from " + m_schema + "currtype where curr_id=?", currencyID); if (!rows.isEmpty()) { Row row = rows.get(0); m_reader.processDefaultCurrency(row); } }
[ "Select the default currency properties from the database.\n\n@param currencyID default currency ID" ]
[ "Creates the JSON serialized form of the accessory for use over the Homekit Accessory Protocol.\n\n@param instanceId the static id of the accessory.\n@return a future that will complete with the JSON builder for the object.", "Issue the database statements to drop the table associated with a table configuration.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.", "Retrieve a specific row by index number, creating a blank row if this row does not exist.\n\n@param index index number\n@return MapRow instance", "Adds a new row after the given one.\n\n@param row the row after which a new one should be added", "This method writes data for a single resource to a Planner file.\n\n@param mpxjResource MPXJ Resource instance\n@param plannerResource Planner Resource instance", "Signal that all threads have run to completion, and the multithreaded\nenvironment is over.\n@param check The name of the thread group passed to startThreads()", "Checks if Docker Machine is installed by running docker-machine and inspect the result.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n\n@return true if it is installed, false otherwise.", "Uses getResult to get the final Result and executes it\n\n@throws ConfigurationException\nIf not result can be found with the returned code", "Notification that a state transition failed.\n\n@param state the failed transition" ]
public void close() throws SQLException { try { if (this.resetConnectionOnClose /*FIXME: && !getAutoCommit() && !isTxResolved() */){ /*if (this.autoCommitStackTrace != null){ logger.debug(this.autoCommitStackTrace); this.autoCommitStackTrace = null; } else { logger.debug(DISABLED_AUTO_COMMIT_WARNING); }*/ rollback(); if (!getAutoCommit()){ setAutoCommit(true); } } if (this.logicallyClosed.compareAndSet(false, true)) { if (this.threadWatch != null){ this.threadWatch.interrupt(); // if we returned the connection to the pool, terminate thread watch thread if it's // running even if thread is still alive (eg thread has been recycled for use in some // container). this.threadWatch = null; } if (this.closeOpenStatements){ for (Entry<Statement, String> statementEntry: this.trackedStatement.entrySet()){ statementEntry.getKey().close(); if (this.detectUnclosedStatements){ logger.warn(String.format(UNCLOSED_LOG_ERROR_MESSAGE, statementEntry.getValue())); } } this.trackedStatement.clear(); } if (!this.connectionTrackingDisabled){ pool.getFinalizableRefs().remove(this.connection); } ConnectionHandle handle = null; //recreate can throw a SQLException in constructor on recreation try { handle = this.recreateConnectionHandle(); this.pool.connectionStrategy.cleanupConnection(this, handle); this.pool.releaseConnection(handle); } catch(SQLException e) { //check if the connection was already closed by the recreation if (!isClosed()) { this.pool.connectionStrategy.cleanupConnection(this, handle); this.pool.releaseConnection(this); } throw e; } if (this.doubleCloseCheck){ this.doubleCloseException = this.pool.captureStackTrace(CLOSED_TWICE_EXCEPTION_MESSAGE); } } else { if (this.doubleCloseCheck && this.doubleCloseException != null){ String currentLocation = this.pool.captureStackTrace("Last closed trace from thread ["+Thread.currentThread().getName()+"]:\n"); logger.error(String.format(LOG_ERROR_MESSAGE, this.doubleCloseException, currentLocation)); } } } catch (SQLException e) { throw markPossiblyBroken(e); } }
[ "Release the connection back to the pool.\n\n@throws SQLException Never really thrown" ]
[ "Obtains a local date in Coptic calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Coptic era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Coptic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code CopticEra}", "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", "Verify that the given channels are all valid.\n\n@param channels\nthe given channels", "Creates and returns a GVRSceneObject with the specified mesh attributes.\n\n@param vertices the vertex positions of that make up the mesh. (x1, y1, z1, x2, y2, z2, ...)\n@param velocities the velocity attributes for each vertex. (vx1, vy1, vz1, vx2, vy2, vz2...)\n@param particleTimeStamps the spawning times of each vertex. (t1, 0, t2, 0, t3, 0 ..)\n\n@return The GVRSceneObject with this mesh.", "Specifies convergence criteria\n\n@param maxIterations Maximum number of iterations\n@param ftol convergence based on change in function value. try 1e-12\n@param gtol convergence based on residual magnitude. Try 1e-12", "generate a message for loglevel WARN\n\n@param pObject the message Object", "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.", "Write a standard CoNLL format output file.\n\n@param doc The document: A List of CoreLabel\n@param out Where to send the answers to", "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." ]
@Override public void setCursorDepth(float depth) { super.setCursorDepth(depth); if (mRayModel != null) { mRayModel.getTransform().setScaleZ(mCursorDepth); } }
[ "Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth" ]
[ "Record a prepare operation timeout.\n\n@param failedOperation the prepared operation", "Copy new data to an existing float-point texture.\n\nCreating a new {@link GVRFloatImage} is pretty cheap, but it's still\nnot a totally trivial operation: it does involve some memory management\nand some GL hardware handshaking. Reusing the texture reduces this\noverhead (primarily by delaying garbage collection). Do be aware that\nupdating a texture will affect any and all {@linkplain GVRMaterial\nmaterials} (and/or post effects that use the texture!\n\n@param width\nTexture width, in pixels\n@param height\nTexture height, in pixels\n@param data\nA linear array of float pairs.\n@return {@code true} if the updateGPU succeeded, and {@code false} if it\nfailed. Updating a texture requires that the new data parameter\nhas the exact same {@code width} and {@code height} and pixel\nformat as the original data.\n@throws IllegalArgumentException\nIf {@code width} or {@code height} is {@literal <= 0,} or if\n{@code data} is {@code null}, or if\n{@code data.length < height * width * 2}", "Used for unit tests only.\n\nFIXME: Refactor test code with dependency injection or scope restrictions so this function is not public.\n\n@deprecated Do not use for production code, use {@link #fetch(String, String, voldemort.server.protocol.admin.AsyncOperationStatus, String, long, voldemort.store.metadata.MetadataStore, Long diskQuotaSizeInKB)} instead.", "Use this API to fetch authenticationvserver_authenticationlocalpolicy_binding resources of given name .", "Use this API to fetch vrid6 resource of given name .", "Returns a sampling of the source at the specified line and column,\nof null if it is unavailable.", "Use this API to expire cachecontentgroup resources.", "Add groups to the tree.\n\n@param parentNode parent tree node\n@param file group container", "Should this request URI be compressed?\n\n@param requestUri request URI\n@return true when should be compressed" ]
public void addFkToItemClass(String column) { if (fksToItemClass == null) { fksToItemClass = new Vector(); } fksToItemClass.add(column); fksToItemClassAry = null; }
[ "add a FK column pointing to the item Class" ]
[ "Write the criteria elements, extracting the information of the sub-model.\n\n@param writer the xml stream writer\n@param subModel the interface model\n@param nested whether it the criteria elements are nested as part of <not /> or <any />\n@throws XMLStreamException", "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", "Get the element at the index as a string.\n\n@param i the index of the element to access", "Use this API to fetch the statistics of all tunnelip_stats resources that are configured on netscaler.", "Post a module to the server\n\n@param module\n@param user\n@param password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Fling the content\n\n@param velocityX The initial velocity in the X direction. Positive numbers mean that the\nfinger/cursor is moving to the left on the screen, which means we want to\nscroll towards the beginning.\n@param velocityY The initial velocity in the Y direction. Positive numbers mean that the\nfinger/cursor is moving down the screen, which means we want to scroll\ntowards the top.\n@param velocityZ TODO: Z-scrolling is currently not supported\n@return", "Register capabilities associated with this resource.\n\n<p>Classes that overrides this method <em>MUST</em> call {@code super.registerCapabilities(resourceRegistration)}.</p>\n\n@param resourceRegistration a {@link ManagementResourceRegistration} created from this definition", "Stops all transitions.", "Set the individual dates.\n@param dates the dates to set." ]
private CmsMessageBundleEditorTypes.BundleType initBundleType() { String resourceTypeName = OpenCms.getResourceManager().getResourceType(m_resource).getTypeName(); return CmsMessageBundleEditorTypes.BundleType.toBundleType(resourceTypeName); }
[ "Init the bundle type member variable.\n@return the bundle type of the opened resource." ]
[ "The file we are working with has a byte order mark. Skip this and try again to read the file.\n\n@param stream schedule data\n@param length length of the byte order mark\n@param charset charset indicated by byte order mark\n@return ProjectFile instance", "This method checks for paging information and returns the appropriate\ndata\n\n@param result\n@param httpResponse\n@param where\n@return a {@link WrappingPagedList} if there is paging, result if not.", "Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object", "Use this API to update sslocspresponder resources.", "Runs a query that returns a single int.", "Use this API to add tmtrafficaction resources.", "Creates a build\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param build the build information", "Returns a Span that covers all rows beginning with a prefix String parameters will be encoded\nas UTF-8", "Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager" ]
static String fromPackageName(String packageName) { List<String> tokens = tokenOf(packageName); return fromTokens(tokens); }
[ "Infer app name from scan package\n\n@param packageName\nthe package name\n@return\napp name inferred from the package name" ]
[ "Obtain the profile name associated with a profile ID\n\n@param id ID of profile\n@return Name of corresponding profile", "Invokes the observer method immediately passing the event.\n\n@param event The event to notify observer with", "Add the operation at the end of Stage MODEL if this operation has not already been registered.\n\nThis operation should be added if any of the following occur: -\n- The authorization configuration is removed from a security realm.\n- The rbac provider is changed to rbac.\n- A role is removed.\n- An include is removed from a role.\n- A management interface is removed.\n\nNote: This list only includes actions that could invalidate the configuration, actions that would not invalidate the\nconfiguration do not need this operation registering. e.g. Adding a role, if the configuration was already valid this\ncould not invalidate it.\n\n@param context - The OperationContext to use to register the step.", "Determine whether the given property matches this element.\nA property matches this element when property name and this key are equal,\nvalues are equal or this element value is a wildcard.\n@param property the property to check\n@return {@code true} if the property matches", "returns position of xpath element which match the expression xpath in the String dom.\n\n@param dom the Document to search in\n@param xpath the xpath query\n@return position of xpath element, if fails returns -1", "Removes a named property from the object.\n\nIf the property is not found, no action is taken.\n\n@param name the name of the property", "Add another store destination to an existing streaming session\n\n\n@param store the name of the store to stream to", "Use this API to fetch statistics of appfwpolicylabel_stats resource of given name .", "Write a string attribute.\n\n@param name attribute name\n@param value attribute value" ]
public Collection<String> getCurrencyCodes() { Collection<String> result = get(KEY_QUERY_CURRENCY_CODES, Collection.class); if (result == null) { return Collections.emptySet(); } return result; }
[ "Gets the currency codes, or the regular expression to select codes.\n\n@return the query for chaining." ]
[ "Use this API to fetch all the aaaparameter resources that are configured on netscaler.", "If the variable is a local temporary variable it will be resized so that the operation can complete. If not\ntemporary then it will not be reshaped\n@param mat Variable containing the matrix\n@param numRows Desired number of rows\n@param numCols Desired number of columns", "A comment.\n\n@param args the parameters", "Returns the z-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the z coordinate", "Take four bytes from the specified position in the specified\nblock and convert them into a 32-bit int, using the big-endian\nconvention.\n@param bytes The data to read from.\n@param offset The position to start reading the 4-byte int from.\n@return The 32-bit integer represented by the four bytes.", "Starts the ephemeral node and waits for it to be created\n\n@param node Node to start\n@param maxWaitSec Maximum time in seconds to wait", "Create an Product delivery\n\n@throws AuthenticationException, GrapesCommunicationException, IOException", "Checks if a given number is in the range of a double.\n\n@param number\na number which should be in the range of a double (positive or negative)\n\n@see java.lang.Double#MIN_VALUE\n@see java.lang.Double#MAX_VALUE\n\n@return number as a double", "Adds an array of groupby fieldNames for ReportQueries.\n@param fieldNames The groupby to set\n@deprecated use QueryByCriteria#addGroupBy" ]
public void printProbs(String filename, DocumentReaderAndWriter<IN> readerAndWriter) { // only for the OCR data does this matter flags.ocrTrain = false; ObjectBank<List<IN>> docs = makeObjectBankFromFile(filename, readerAndWriter); printProbsDocuments(docs); }
[ "Takes the file, reads it in, and prints out the likelihood of each possible\nlabel at each point.\n\n@param filename\nThe path to the specified file" ]
[ "crops the srcBmp with the canvasView bounds and returns the cropped bitmap", "Finds or opens a client to talk to the dbserver on the specified player, incrementing its use count.\n\n@param targetPlayer the player number whose database needs to be interacted with\n@param description a short description of the task being performed for error reporting if it fails,\nshould be a verb phrase like \"requesting track metadata\"\n\n@return the communication client for talking to that player, or {@code null} if the player could not be found\n\n@throws IllegalStateException if we can't find the target player or there is no suitable player number for us\nto pretend to be\n@throws IOException if there is a problem communicating", "Join the Collection of Strings using the specified delimter and optionally quoting each\n\n@param s\nThe String collection\n@param delimiter\nthe delimiter String\n@param doQuote\nwhether or not to quote the Strings\n@return The joined String", "Gets the Java subclass of GVRShader which implements\nthis shader type.\n@param ctx GVRContext shader is associated with\n@return GVRShader class implementing the shader type", "Use this API to fetch csvserver_cachepolicy_binding resources of given name .", "Copies all node meta data from the other node to this one\n@param other - the other node", "To get all the textual content in the dom\n\n@param document\n@param individualTokens : default True : when set to true, each text node from dom is used to build the\ntext content : when set to false, the text content of whole is obtained at once.\n@return", "Gets the instance associated with the current thread.", "Print the class's attributes fd" ]
public void addImportedPackages(Set<String> importedPackages) { addImportedPackages(importedPackages.toArray(new String[importedPackages.size()])); }
[ "Add the set with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The set of all packages to add." ]
[ "Returns true if \"file\" is a subfile or subdirectory of \"dir\".\n\nFor example with the directory /path/to/a, the following return values would occur:\n\n/path/to/a/foo.txt - true /path/to/a/bar/zoo/boo/team.txt - true /path/to/b/foo.txt - false", "Returns the port as configured by the system variables, fallback is the default port value\n\n@param portIdentifier - SYS_*_PORT defined in Constants\n@return", "Convert a Java String instance into the equivalent array of single or\ndouble bytes.\n\n@param value Java String instance representing text\n@param unicode true if double byte characters are required\n@return byte array representing the supplied text", "IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery", "Remove an addon from an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param addonName Addon name. See {@link #listAppAddons} for a list of addons that can be used.\n@return the request object", "Records that there is no media mounted in a particular media player slot, updating listeners if this is a change,\nand clearing any affected items from our in-memory caches.\n\n@param slot the slot in which no media is mounted", "Returns the next object in the table.\n\n@throws IllegalStateException\nIf there was a problem extracting the object from SQL.", "Remove script for a given ID\n\n@param id ID of script\n@throws Exception exception", "Transforms a single configuration file using the given transformation source.\n\n@param file the configuration file\n@param transformSource the transform soruce\n\n@throws TransformerConfigurationException -\n@throws IOException -\n@throws SAXException -\n@throws TransformerException -\n@throws ParserConfigurationException -" ]
public static Class<?> resolveReturnType(Method method, Class<?> clazz) { Assert.notNull(method, "Method must not be null"); Type genericType = method.getGenericReturnType(); Assert.notNull(clazz, "Class must not be null"); Map<TypeVariable, Type> typeVariableMap = getTypeVariableMap(clazz); Type rawType = getRawType(genericType, typeVariableMap); return (rawType instanceof Class ? (Class<?>) rawType : method.getReturnType()); }
[ "Determine the target type for the generic return type of the given method,\nwhere formal type variables are declared on the given class.\n@param method the method to introspect\n@param clazz the class to resolve type variables against\n@return the corresponding generic parameter or return type\n@see #resolveReturnTypeForGenericMethod" ]
[ "We have received an update that invalidates any previous metadata for that player, so clear it out, and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we can have no metadata for the associated player", "Return a string that ensures that no line is longer then 512 characters\nand lines are broken according to manifest specification.\n\n@param input The buffer containing the content that should be made safe\n@param newline The string to use to create newlines (usually \"\\n\" or\n\"\\r\\n\")\n@return The string with no longer lines then 512, ready to be read again\nby {@link MergeableManifest2}.", "From v3_epoly.js, calculates the distance between this LatLong point and\nanother.\n\n@param end The end point to calculate the distance to.\n@return The distance, in metres, to the end point.", "Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate", "Use this API to fetch all the vlan resources that are configured on netscaler.", "if you want to parse an argument, you need a converter from String to Object\n\n@param commandLineOption specification of the command line options\n@param converter how to convert your String value to a castable Object", "Gets a single byte return or -1 if no data is available.", "An internal method, public only so that GVRContext can make cross-package\ncalls.\n\nA synchronous (blocking) wrapper around\n{@link android.graphics.BitmapFactory#decodeStream(InputStream)\nBitmapFactory.decodeStream} that uses an\n{@link android.graphics.BitmapFactory.Options} <code>inTempStorage</code>\ndecode buffer. On low memory, returns half (quarter, eighth, ...) size\nimages.\n<p>\nIf {@code stream} is a {@link FileInputStream} and is at offset 0 (zero),\nuses\n{@link android.graphics.BitmapFactory#decodeFileDescriptor(FileDescriptor)\nBitmapFactory.decodeFileDescriptor()} instead of\n{@link android.graphics.BitmapFactory#decodeStream(InputStream)\nBitmapFactory.decodeStream()}.\n\n@param stream\nBitmap stream\n@param closeStream\nIf {@code true}, closes {@code stream}\n@return Bitmap, or null if cannot be decoded into a bitmap", "This method writes task data to a JSON file.\nNote that we write the task hierarchy in order to make rebuilding the hierarchy easier." ]
public QueryBuilder<T, ID> selectColumns(String... columns) { for (String column : columns) { addSelectColumnToList(column); } return this; }
[ "Add columns to be returned by the SELECT query. If no columns are selected then all columns are returned by\ndefault. For classes with id columns, the id column is added to the select list automagically. This can be called\nmultiple times to add more columns to select.\n\n<p>\n<b>WARNING:</b> If you specify any columns to return, then any foreign-collection fields will be returned as null\n<i>unless</i> their {@link ForeignCollectionField#columnName()} is also in the list.\n</p>" ]
[ "Maps a bindingId to its corresponding BindingType.\n@param bindingId\n@return", "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", "Remember the order of execution", "Disable certificate verification.\n\n@throws KeyManagementException\nthe key management exception\n@throws NoSuchAlgorithmException\nthe no such algorithm exception", "Multiply scalar value to a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the multiply of specified complex number with the scalar value.", "Checks to make sure that pseudo scoped beans (i.e. @Dependent scoped beans) have no circular dependencies.", "Set the repeat type.\n\nIn the default {@linkplain GVRRepeatMode#ONCE run-once} mode, animations\nrun once, ignoring the {@linkplain #getRepeatCount() repeat count.} In\n{@linkplain GVRRepeatMode#PINGPONG ping pong} and\n{@linkplain GVRRepeatMode#REPEATED repeated} modes, animations do honor\nthe repeat count, which {@linkplain #DEFAULT_REPEAT_COUNT defaults} to 2.\n\n@param repeatMode\nOne of the {@link GVRRepeatMode} constants\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code repetitionType} is not one of the\n{@link GVRRepeatMode} constants", "Specifies the ARM resource id of the user assigned managed service identity resource that\nshould be used to retrieve the access token.\n\n@param identityId the ARM resource id of the user assigned identity resource\n@return MSICredentials", "Use this API to fetch vpnvserver_appcontroller_binding resources of given name ." ]
public static HashMap<Integer, List<Integer>> getBalancedNumberOfPrimaryPartitionsPerNode(final Cluster nextCandidateCluster, Map<Integer, Integer> targetPartitionsPerZone) { HashMap<Integer, List<Integer>> numPartitionsPerNode = Maps.newHashMap(); for(Integer zoneId: nextCandidateCluster.getZoneIds()) { List<Integer> partitionsOnNode = Utils.distributeEvenlyIntoList(nextCandidateCluster.getNumberOfNodesInZone(zoneId), targetPartitionsPerZone.get(zoneId)); numPartitionsPerNode.put(zoneId, partitionsOnNode); } return numPartitionsPerNode; }
[ "Determines how many primary partitions each node within each zone should\nhave. The list of integers returned per zone is the same length as the\nnumber of nodes in that zone.\n\n@param nextCandidateCluster\n@param targetPartitionsPerZone\n@return A map of zoneId to list of target number of partitions per node\nwithin zone." ]
[ "Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach.", "Use this API to unset the properties of snmpalarm resource.\nProperties that need to be unset are specified in args array.", "Search for groups. 18+ groups will only be returned for authenticated calls where the authenticated user is over 18. This method does not require\nauthentication.\n\n@param text\nThe text to search for.\n@param perPage\nNumber of groups to return per page. If this argument is 0, it defaults to 100. The maximum allowed value is 500.\n@param page\nThe page of results to return. If this argument is 0, it defaults to 1.\n@return A GroupList Object. Only the fields <em>id</em>, <em>name</em> and <em>eighteenplus</em> in the Groups will be set.\n@throws FlickrException", "Enables or disables auto closing when selecting a date.", "Adds the given value to the list of values that should still be\nserialized. The given RDF resource will be used as a subject.\n\n@param value\nthe value to be serialized\n@param resource\nthe RDF resource that is used as a subject for serialization", "Populates a recurring task.\n\n@param record MPX record\n@param task recurring task\n@throws MPXJException", "The primary run loop of the event processor.", "Detach a connection from a key.\n\n@param key\nthe key\n@param connection\nthe connection", "Stop a timer of the given string name for the current thread. If no such\ntimer exists, -1 will be returned. Otherwise the return value is the CPU\ntime that was measured.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return CPU time if timer existed and was running, and -1 otherwise" ]
private TrackSourceSlot findTrackSourceSlot() { TrackSourceSlot result = TRACK_SOURCE_SLOT_MAP.get(packetBytes[41]); if (result == null) { return TrackSourceSlot.UNKNOWN; } return result; }
[ "Determine the enum value corresponding to the track source slot found in the packet.\n\n@return the proper value" ]
[ "Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object.", "Clears all properties of specified entity.\n\n@param entity to clear.", "Use this API to update dospolicy resources.", "A specific, existing section can be deleted by making a DELETE request\non the URL for that section.\n\nNote that sections must be empty to be deleted.\n\nThe last remaining section in a board view cannot be deleted.\n\nReturns an empty data block.\n\n@param section The section to delete.\n@return Request object", "May have to be changed to let multiple touch", "Use this API to fetch all the dnspolicylabel resources that are configured on netscaler.", "Internal method used to retrieve a byte array from one\nor more embedded data blocks. Consecutive data blocks may\nneed to be concatenated by this method in order to retrieve\nthe complete set of data.\n\n@param blocks list of data blocks\n@param length expected length of the data\n@return byte array", "Reads a string from input stream saved as a sequence of UTF chunks.\n\n@param stream stream to read from.\n@return output string\n@throws IOException if something went wrong", "Sends the error to responder." ]
private File getDisabledMarkerFile(long version) throws PersistenceFailureException { File[] versionDirArray = ReadOnlyUtils.getVersionDirs(rootDir, version, version); if (versionDirArray.length == 0) { throw new PersistenceFailureException("getDisabledMarkerFile did not find the requested version directory" + " on disk. Version: " + version + ", rootDir: " + rootDir); } File disabledMarkerFile = new File(versionDirArray[0], DISABLED_MARKER_NAME); return disabledMarkerFile; }
[ "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." ]
[ "Convert a given date to a floating point date using a given reference date.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param date The given date to be associated with the return value \\( T \\).\n@return The value T measuring the distance of reference date and date by ACT/365 with SECONDS_PER_DAY seconds used as the smallest time unit and SECONDS_PER_DAY is a constant 365*24*60*60.", "Generate node data map.\n\n@param task\nthe job info", "Creates a Blob holding a single-sheet spreadsheet with a pivot of the domain objects. The sheet name is derived from the\nclass name.\n\n<p>\nMinimal requirements for the domain object are:\n</p>\n<ul>\n<li>\nOne property has annotation {@link PivotRow} and will be used as row identifier in left column of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotColumn}. Its values will be used in columns of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotValue}. Its values will be distributed in the pivot.\n</li>\n</ul>", "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.", "Copy the contents of this buffer to the destination LBuffer\n@param srcOffset\n@param dest\n@param destOffset\n@param size", "Figures out the correct class loader to use for a proxy for a given bean", "Register a loader with the 'sniffer'.\n\n'Factory loaders' are pre-registered. To load a format we don't support,\ncreate a {@link GVRCompressedTextureLoader} descendant. Then, before\ntrying to load any files in that format, create an instance and call\n{@link #register()}:\n\n<pre>\n\nnew MyCompressedFormat().register();\n</pre>", "Deletes all outgoing links of specified entity.\n\n@param entity the entity.", "Retrieves the overallocated flag.\n\n@return overallocated flag" ]
private FieldConversion[] getPkFieldConversion(ClassDescriptor cld) { FieldDescriptor[] pks = cld.getPkFields(); FieldConversion[] fc = new FieldConversion[pks.length]; for (int i= 0; i < pks.length; i++) { fc[i] = pks[i].getFieldConversion(); } return fc; }
[ "Answer the FieldConversions for the PkFields\n@param cld\n@return the pk FieldConversions" ]
[ "Applies the given filter to each of the given elems, and returns the\nlist of elems that were accepted. The runtime type of the returned\narray is the same as the passed in array.", "Use this API to unset the properties of gslbservice resources.\nProperties that need to be unset are specified in args array.", "Format a cue countdown indicator in the same way as the CDJ would at this point in the track.\n\n@return the value that the CDJ would display to indicate the distance to the next cue\n@see #getCueCountdown()", "parse json text to specified class\n\n@param jsonRtn\n@param jsonRtnClazz\n@return", "Overridden to ensure that our timestamp handling is as expected", "Shutdown task scheduler.", "Use this API to fetch lbmonitor_binding resource of given name .", "Support the range subscript operator for String with IntRange\n\n@param text a String\n@param range an IntRange\n@return the resulting String\n@since 1.0", "Retrieves the formatted parent WBS value.\n\n@return formatted parent WBS value" ]
public static base_response delete(nitro_service client, String ipv6address) throws Exception { nsip6 deleteresource = new nsip6(); deleteresource.ipv6address = ipv6address; return deleteresource.delete_resource(client); }
[ "Use this API to delete nsip6 of given name." ]
[ "Sets the day of the month.\n@param day the day to set.", "Used to map from a var data key to a field type. Note this\nis designed for diagnostic use only, and uses an inefficient search.\n\n@param key var data key\n@return field type", "Get all categories\nGet all tags marked as categories\n@return ApiResponse&lt;TagsEnvelope&gt;\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "Restore the recorded state from the rollback xml.\n\n@param target the patchable target\n@param rollbackPatchId the rollback patch id\n@param patchType the the current patch type\n@param history the recorded history\n@throws PatchingException", "Copies entries in the source map to target map.\n\n@param source source map\n@param target target map", "If the resource has ordered child types, those child types will be stored in the attachment. If there are no\nordered child types, this method is a no-op.\n\n@param resourceAddress the address of the resource\n@param resource the resource which may or may not have ordered children.", "Set ViewPort visibility of the object.\n\n@see ViewPortVisibility\n@param viewportVisibility\nThe ViewPort visibility of the object.\n@return {@code true} if the ViewPort visibility was changed, {@code false} if it\nwasn't.", "Add statistics about a created map.\n\n@param mapContext the\n@param mapValues the", "Obtains the transform for a specific time in animation.\n\n@param animationTime The time in animation.\n\n@return The transform." ]
public void setMaintenanceMode(String appName, boolean enable) { connection.execute(new AppUpdate(appName, enable), apiKey); }
[ "Sets maintenance mode for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param enable true to enable; false to disable" ]
[ "Creates a clone using java serialization\n\n@param from Object to be cloned\n@param <T> type of the cloned object\n@return Clone of the object", "Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian or false if Low Endian\n@throws IOException if an IOException occurs.\n@since 1.0", "This method take a list of fileName of the type partitionId_Replica_Chunk\nand returns file names that match the regular expression\nmasterPartitionId_", "Parses btch api response to create a list of BoxAPIResponse objects.\n@param batchResponse response of a batch api request\n@return list of BoxAPIResponses", "If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X.", "Returns if this has any mapping for the specified cell.\n\n@param cell the cell name\n@return {@code true} if there is any mapping for the cell, {@code false} otherwise", "Whether the address has the well-known prefix for IPv4 translatable addresses as in rfc 6052 and 6144\n@return", "Create a random permutation of the numbers 0, ..., size - 1.\n\nsee Algorithm P, D.E. Knuth: The Art of Computer Programming, Vol. 2, p. 145", "Use this API to add snmpuser." ]
private List<T> computePagedList(List<T> result, HeaderAndBody httpResponse, JSONObject where, Pipe<T> requestingPipe) { ReadFilter previousRead = null; ReadFilter nextRead = null; if (PageConfig.MetadataLocations.WEB_LINKING.equals(pageConfig.getMetadataLocation())) { String webLinksRaw = ""; final String relHeader = "rel"; final String nextIdentifier = pageConfig.getNextIdentifier(); final String prevIdentifier = pageConfig.getPreviousIdentifier(); try { webLinksRaw = getWebLinkHeader(httpResponse); if (webLinksRaw == null) { // no paging, return result return result; } List<WebLink> webLinksParsed = WebLinkParser.parse(webLinksRaw); for (WebLink link : webLinksParsed) { if (nextIdentifier.equals(link.getParameters().get(relHeader))) { nextRead = new ReadFilter(); nextRead.setLinkUri(new URI(link.getUri())); } else if (prevIdentifier.equals(link.getParameters().get(relHeader))) { previousRead = new ReadFilter(); previousRead.setLinkUri(new URI(link.getUri())); } } } catch (URISyntaxException ex) { Log.e(TAG, webLinksRaw + " did not contain a valid context URI", ex); throw new RuntimeException(ex); } catch (ParseException ex) { Log.e(TAG, webLinksRaw + " could not be parsed as a web link header", ex); throw new RuntimeException(ex); } } else if (pageConfig.getMetadataLocation().equals(PageConfig.MetadataLocations.HEADERS)) { nextRead = pageConfig.getPageParameterExtractor().getNextFilter(httpResponse, RestAdapter.this.pageConfig); previousRead = pageConfig.getPageParameterExtractor().getPreviousFilter(httpResponse, RestAdapter.this.pageConfig); } else if (pageConfig.getMetadataLocation().equals(PageConfig.MetadataLocations.BODY)) { nextRead = pageConfig.getPageParameterExtractor().getNextFilter(httpResponse, RestAdapter.this.pageConfig); previousRead = pageConfig.getPageParameterExtractor().getPreviousFilter(httpResponse, RestAdapter.this.pageConfig); } else { throw new IllegalStateException("Not supported"); } if (nextRead != null) { nextRead.setWhere(where); } if (previousRead != null) { previousRead.setWhere(where); } return new WrappingPagedList<T>(requestingPipe, result, nextRead, previousRead); }
[ "This method checks for paging information and returns the appropriate\ndata\n\n@param result\n@param httpResponse\n@param where\n@return a {@link WrappingPagedList} if there is paging, result if not." ]
[ "Send an empty request using a standard HTTP connection.", "Removes the specified objects.\n\n@param collection The collection to remove.", "Return a capitalized version of the specified property name.\n\n@param s\nThe property name", "Str map to str.\n\n@param map\nthe map\n@return the string", "Use this API to fetch vpntrafficpolicy_aaagroup_binding resources of given name .", "Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string.", "This is the main entry point used to convert the internal representation\nof timephased baseline cost into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range", "Remove any mapping for this key, and return any previously\nmapped value.\n\n@param key the key whose mapping is to be removed\n@return the value removed, or null", "Remove a list of stores from the session\n\nFirst commit all entries for these stores and then cleanup resources\n\n@param storeNameToRemove List of stores to be removed from the current\nstreaming session" ]
public static double Entropy( int[] values ){ int n = values.length; int total = 0; double entropy = 0; double p; // calculate total amount of hits for ( int i = 0; i < n; i++ ) { total += values[i]; } if ( total != 0 ) { // for all values for ( int i = 0; i < n; i++ ) { // get item's probability p = (double) values[i] / total; // calculate entropy if ( p != 0 ) entropy += ( -p * (Math.log10(p)/Math.log10(2)) ); } } return entropy; }
[ "Calculate entropy value.\n@param values Values.\n@return Returns entropy value of the specified histogram array." ]
[ "Support the subscript operator for CharSequence.\n\n@param text a CharSequence\n@param index the index of the Character to get\n@return the Character at the given index\n@since 1.0", "Answer the SQL-Clause for a LikeCriteria\n\n@param c\n@param buf", "Returns the compact tag records for all tags in the workspace.\n\n@param workspace The workspace or organization to find tags in.\n@return Request object", "Returns an iban with replaced check digit.\n\n@param iban The iban\n@return The iban without the check digit", "Checks whether two internet addresses are on the same subnet.\n\n@param prefixLength the number of bits within an address that identify the network\n@param address1 the first address to be compared\n@param address2 the second address to be compared\n\n@return true if both addresses share the same network bits", "Add a photo to the user's favorites.\n\n@param photoId\nThe photo ID\n@throws FlickrException", "Return the number of days between startDate and endDate given the\nspecific daycount convention.\n\n@param startDate The start date given as a {@link org.threeten.bp.LocalDate}.\n@param endDate The end date given as a {@link org.threeten.bp.LocalDate}.\n@param convention A convention string.\n@return The number of days within the given period.", "Adds a JSON string to the DB.\n\n@param obj the JSON to record\n@param table the table to insert into\n@return the number of rows in the table, or DB_OUT_OF_MEMORY_ERROR/DB_UPDATE_ERROR", "Creates a non-binary text media type with the given subtype and a specified encoding" ]
public AssemblyResponse save(boolean isResumable) throws RequestException, LocalOperationException { Request request = new Request(getClient()); options.put("steps", steps.toMap()); // only do tus uploads if files will be uploaded if (isResumable && getFilesCount() > 0) { Map<String, String> tusOptions = new HashMap<String, String>(); tusOptions.put("tus_num_expected_upload_files", Integer.toString(getFilesCount())); AssemblyResponse response = new AssemblyResponse( request.post("/assemblies", options, tusOptions, null, null), true); // check if the assembly returned an error if (response.hasError()) { throw new RequestException("Request to Assembly failed: " + response.json().getString("error")); } try { handleTusUpload(response); } catch (IOException e) { throw new LocalOperationException(e); } catch (ProtocolException e) { throw new RequestException(e); } return response; } else { return new AssemblyResponse(request.post("/assemblies", options, null, files, fileStreams)); } }
[ "Submits the configured assembly to Transloadit for processing.\n\n@param isResumable boolean value that tells the assembly whether or not to use tus.\n@return {@link AssemblyResponse} the response received from the Transloadit server.\n@throws RequestException if request to Transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations." ]
[ "Get the VCS revision from the Jenkins build environment. The search will one of \"SVN_REVISION\", \"GIT_COMMIT\",\n\"P4_CHANGELIST\" in the environment.\n\n@param env Th Jenkins build environment.\n@return The vcs revision for supported VCS", "Gets the first value for the key.\n\n@param key the key to check for the value\n\n@return the value or {@code null} if the key is not found or the value was {@code null}", "Set ViewPort visibility of the object.\n\n@see ViewPortVisibility\n@param viewportVisibility\nThe ViewPort visibility of the object.\n@return {@code true} if the ViewPort visibility was changed, {@code false} if it\nwasn't.", "Specify the class represented by this `ClassNode` implements\nan interface specified by the given name\n\n@param name the name of the interface class\n@return this `ClassNode` instance", "Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response", "Use this API to fetch the statistics of all ipseccounters_stats resources that are configured on netscaler.", "retrieve a collection of type collectionClass matching the Query query\n\n@see org.apache.ojb.broker.PersistenceBroker#getCollectionByQuery(Class, Query)", "Read a single resource assignment.\n\n@param resource MPXJ resource\n@param assignment Phoenix assignment", "Use this API to fetch spilloverpolicy_lbvserver_binding resources of given name ." ]
public static gslbsite get(nitro_service service, String sitename) throws Exception{ gslbsite obj = new gslbsite(); obj.set_sitename(sitename); gslbsite response = (gslbsite) obj.get_resource(service); return response; }
[ "Use this API to fetch gslbsite resource of given name ." ]
[ "1-D Gaussian function.\n\n@param x value.\n@return Function's value at point x.", "Checks that the modified features exist.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "the transaction id are generated as unique timestamps\n\n@param timeMs in milliseconds\n@return a unique transactionId", "This method is called to format an accrue type value.\n\n@param type accrue type\n@return formatted accrue type", "Put the core auto-code algorithm here so an external class can call it", "Throw fault.\n\n@param code the fault code\n@param message the message\n@param t the throwable type\n@throws PutEventsFault", "This method writes project property data to a JSON file.", "Layout children inside the layout container", "Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs." ]
public void fire(StepFinishedEvent event) { Step step = stepStorage.adopt(); event.process(step); notifier.fire(event); }
[ "Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process" ]
[ "Creates a pattern choice radio button and adds it where necessary.\n@param pattern the pattern that should be chosen by the button.\n@param messageKey the message key for the button's label.", "Answer the SQL-Clause for a SelectionCriteria\nIf the Criteria references a class with extents an OR-Clause is\nadded for each extent\n@param c SelectionCriteria", "Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content", "Runs the given xpath and returns a boolean result.", "Defers an event for processing in a later phase of the current\ntransaction.\n\n@param metadata The event object", "Use this API to fetch auditsyslogpolicy_vpnglobal_binding resources of given name .", "test, how many times the group was present in the list of groups.", "k\nReturns a list of artifact regarding the filters\n\n@return List<DbArtifact>", "All tests completed." ]
protected String sendRequestToDF(String df_service, Object msgContent) { IDFComponentDescription[] receivers = getReceivers(df_service); if (receivers.length > 0) { IMessageEvent mevent = createMessageEvent("send_request"); mevent.getParameter(SFipa.CONTENT).setValue(msgContent); for (int i = 0; i < receivers.length; i++) { mevent.getParameterSet(SFipa.RECEIVERS).addValue( receivers[i].getName()); logger.info("The receiver is " + receivers[i].getName()); } sendMessage(mevent); } logger.info("Message sended to " + df_service + " to " + receivers.length + " receivers"); return ("Message sended to " + df_service); }
[ "Method to send Request messages to a specific df_service\n\n@param df_service\nThe name of the df_service\n@param msgContent\nThe content of the message to be sent\n@return Message sent to + the name of the df_service" ]
[ "Calculate the finish variance.\n\n@return finish variance", "Prepare a parallel TCP Task.\n\n@param command\nthe command\n@return the parallel task builder", "Singleton of MetaClassRegistry.\n\n@param includeExtension\n@return the registry", "We have received an update that invalidates the waveform preview for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no waveform preview for the associated player", "Replies the elements of the left map without the pairs in the right map.\nIf the pair's values differ from\nthe value within the map, the map entry is not removed.\n\n<p>\nThe difference is an immutable\nsnapshot of the state of the maps at the time this method is called. It\nwill never change, even if the maps change at a later time.\n</p>\n\n<p>\nSince this method uses {@code HashMap} instances internally, the keys of\nthe supplied maps must be well-behaved with respect to\n{@link Object#equals} and {@link Object#hashCode}.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to update.\n@param right the pairs to remove.\n@return the map with the content of the left map except the pairs of the right map.\n@since 2.15", "Use this API to fetch nsrpcnode resource of given name .", "Update a note.\n\n@param note\nThe Note to update\n@throws FlickrException", "Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together", "Add the given pair to a given map for obtaining a new map.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n<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@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to consider.\n@param right the entry (key, value) to add into the map.\n@return an immutable map with the content of the map and with the given entry.\n@throws IllegalArgumentException - when the right operand key exists in the left operand.\n@since 2.15" ]
private void writeFields(String objectName, FieldContainer container, FieldType[] fields) throws IOException { m_writer.writeStartObject(objectName); for (FieldType field : fields) { Object value = container.getCurrentValue(field); if (value != null) { writeField(field, value); } } m_writer.writeEndObject(); }
[ "Write a set of fields from a field container to a JSON file.\n@param objectName name of the object, or null if no name required\n@param container field container\n@param fields fields to write" ]
[ "This takes into account scrolling and will be in absolute\ncoordinates where the top left corner of the page is 0,0 but\nthe viewport may be scrolled to something else.", "Create and return a new Violation for this rule and the specified import className and alias\n@param sourceCode - the SourceCode\n@param className - the class name (as specified within the import statement)\n@param alias - the alias for the import statement\n@param violationMessage - the violation message; may be null\n@return a new Violation object", "Use this API to update responderpolicy resources.", "Gets the default options to be passed when no custom properties are given.\n\n@return properties with formatter options", "Update a variable name with a date if the variable is detected as being a date.\n\n@param variableName the variable name.\n@param date the date to replace the value with if the variable is a date variable.", "When the descriptor was added while editing, but the change was not saved, it has to be removed\nwhen the editor is closed.\n@throws CmsException thrown when deleting the descriptor resource fails", "return request is success by JsonRtn object\n\n@param jsonRtn\n@return", "Visit all child nodes but not this one.\n\n@param visitor The visitor to use.", "Sets the set of site filters based on the given string.\n\n@param filters\ncomma-separates list of site keys, or \"-\" to filter all site\nlinks" ]
private void deriveProjectCalendar() { // // Count the number of times each calendar is used // Map<ProjectCalendar, Integer> map = new HashMap<ProjectCalendar, Integer>(); for (Task task : m_project.getTasks()) { ProjectCalendar calendar = task.getCalendar(); Integer count = map.get(calendar); if (count == null) { count = Integer.valueOf(1); } else { count = Integer.valueOf(count.intValue() + 1); } map.put(calendar, count); } // // Find the most frequently used calendar // int maxCount = 0; ProjectCalendar defaultCalendar = null; for (Entry<ProjectCalendar, Integer> entry : map.entrySet()) { if (entry.getValue().intValue() > maxCount) { maxCount = entry.getValue().intValue(); defaultCalendar = entry.getKey(); } } // // Set the default calendar for the project // and remove it's use as a task-specific calendar. // if (defaultCalendar != null) { m_project.setDefaultCalendar(defaultCalendar); for (Task task : m_project.getTasks()) { if (task.getCalendar() == defaultCalendar) { task.setCalendar(null); } } } }
[ "Asta Powerproject assigns an explicit calendar for each task. This method\nis used to find the most common calendar and use this as the default project\ncalendar. This allows the explicitly assigned task calendars to be removed." ]
[ "absolute for advancedJDBCSupport\n@param row", "Retrieve a field from a particular entity using its alias.\n\n@param typeClass the type of entity we are interested in\n@param alias the alias\n@return the field type referred to be the alias, or null if not found", "Creates a random symmetric matrix. The entire matrix will be filled in, not just a triangular\nportion.\n\n@param N Number of rows and columns\n@param nz_total Number of nonzero elements in the triangular portion of the matrix\n@param min Minimum element value, inclusive\n@param max Maximum element value, inclusive\n@param rand Random number generator\n@return Randomly generated matrix", "Ignore some element from the AST\n\n@param element\n@return", "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})", "Returns all model classes registered on this datasource\n\n@return model classes talk to this datasource", "Use this API to delete dnsaaaarec.", "Returns PatternParser used to parse the conversion string. Subclasses may\noverride this to return a subclass of PatternParser which recognize\ncustom conversion characters.\n\n@since 0.9.0", "Treats the object as iterable, iterating through the values it represents and returns the first non-null result obtained from calling the closure, otherwise returns the defaultResult.\n\n@param self an Object with an iterator returning its values\n@param defaultResult an Object that should be returned if all closure results are null\n@param closure a closure that returns a non-null value when processing should stop\n@return the first non-null result of the closure, otherwise the default value\n@since 1.7.5" ]
public EventBus emit(Enum<?> event, Object... args) { return _emitWithOnceBus(eventContext(event, args)); }
[ "Emit an enum event with parameters supplied.\n\nThis will invoke all {@link SimpleEventListener} bound to the specific\nenum value and all {@link SimpleEventListener} bound to the enum class\ngiven the listeners has the matching argument list.\n\nFor example, given the following enum definition:\n\n```java\npublic enum UserActivity {LOGIN, LOGOUT}\n```\n\nWe have the following simple event listener methods:\n\n```java\n{@literal @}OnEvent\npublic void handleUserActivity(UserActivity, User user) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGIN)\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGOUT)\npublic void logUserLogout(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` method:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGIN, user, System.currentTimeMills());\n```\n\nThe `handleUserActivity` is not invoked because\n\n* The method parameter `(UserActivity, User, long)` does not match the declared argument list `(UserActivity, User)`\n\nWhile the following code will invoke both `handleUserActivity` and `logUserLogout` methods:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGOUT, user);\n```\n\nThe `logUserLogin` method will not be invoked because\n\n1. the method is bound to `UserActivity.LOGIN` enum value specifically, while `LOGOUT` is triggered\n2. the method has a `long timestamp` in the argument list and it is not passed to `eventBus.emit`\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener" ]
[ "Given a string with the scenario or story name, creates a Class Name with\nno spaces and first letter capital\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name", "This method extracts predecessor data from a Planner file.\n\n@param plannerTask Task data", "Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory", "This method retrieves the data at the given offset and returns\nit as a String, assuming the underlying data is composed of\nsingle byte characters.\n\n@param offset offset of required data\n@return string containing required data", "We have received notification that a device is no longer on the network, so clear out all its beat grids.\n\n@param announcement the packet which reported the device’s disappearance", "This method allows a resource assignment workgroup fields record\nto be added to the current resource assignment. A maximum of\none of these records can be added to a resource assignment record.\n\n@return ResourceAssignmentWorkgroupFields object\n@throws MPXJException if MSP defined limit of 1 is exceeded", "Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler.", "Converts the node to JSON\n@return JSON object", "Only meant to be called once\n\n@throws Exception exception" ]
public double get( int index ) { MatrixType type = mat.getType(); if( type.isReal()) { if (type.getBits() == 64) { return ((DMatrixRMaj) mat).data[index]; } else { return ((FMatrixRMaj) mat).data[index]; } } else { throw new IllegalArgumentException("Complex matrix. Call get(int,Complex64F) instead"); } }
[ "Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index whose value is to be returned\n@return The value of the specified element." ]
[ "Resolve the server registry.\n\n@param mgmtVersion the mgmt version\n@param subsystems the subsystems\n@return the transformer registry", "Adds a patch operation.\n@param op the operation type. Must be add, replace, remove, or test.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value to be set.", "Add an executable \"post-run\" dependent for this model.\n\n@param executable the executable \"post-run\" dependent\n@return the key to be used as parameter to taskResult(string) method to retrieve result of executing\nthe executable \"post-run\" dependent", "Removes a named property from the object.\n\nIf the property is not found, no action is taken.\n\n@param name the name of the property", "Returns a list of files in given addon passing given filter.", "Delegates file rolling to composed objects.\n\n@see FileRollable#roll(org.apache.log4j.spi.LoggingEvent)", "Serialize specified object to directory with specified name. Given output stream will be closed.\n\n@param obj object to serialize\n@return number of bytes written to directory", "Process TestCaseStartedEvent. New testCase will be created and added\nto suite as child.\n\n@param event to process", "Loads configuration from File. Later loads have lower priority.\n\n@param file File to load from\n@since 1.2.0" ]
public static EffectiveAssignmentInsnFinder newInstance(final FieldNode targetVariable, final Collection<ControlFlowBlock> controlFlowBlocks) { return new EffectiveAssignmentInsnFinder(checkNotNull(targetVariable), checkNotNull(controlFlowBlocks)); }
[ "Static factory method.\n\n@param targetVariable\nthe variable to find the effective {@code putfield} or\n{@code putstatic} instruction for.\n@param controlFlowBlocks\nall control flow blocks of an initialising constructor or\nmethod.\n@return a new instance of this class." ]
[ "Convert a GanttProject task relationship type into an MPXJ RelationType instance.\n\n@param gpType GanttProject task relation type\n@return RelationType instance", "Applies the given filter to each of the given elems, and returns the\nlist of elems that were accepted. The runtime type of the returned\narray is the same as the passed in array.", "Sets the protocol.\n@param protocol The protocol to be set.", "Print out the configuration that the client needs to make a request.\n\n@param json the output writer.\n@throws JSONException", "Use this API to fetch filtered set of authenticationradiusaction resources.\nset the filter parameter values in filtervalue object.", "Appends the GROUP BY clause for the Query\n@param groupByFields\n@param buf", "Deletes a story. A user can only delete stories they have created. Returns an empty data record.\n\n@param story Globally unique identifier for the story.\n@return Request object", "Get the collection of public contacts for the specified user ID.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The Collection of Contact objects\n@throws FlickrException", "Get a property as a boolean or null.\n\n@param key the property name" ]
private <T extends ProgramElementDoc> List<T> filterByVisibility(T[] docs, Visibility visibility) { if (visibility == Visibility.PRIVATE) return Arrays.asList(docs); List<T> filtered = new ArrayList<T>(); for (T doc : docs) { if (Visibility.get(doc).compareTo(visibility) > 0) filtered.add(doc); } return filtered; }
[ "Returns all program element docs that have a visibility greater or\nequal than the specified level" ]
[ "Parse the XML for a collection as returned by getInfo call.\n\n@param collectionElement\n@return", "Determine if the buffer, when expressed as text, matches a fingerprint regular expression.\n\n@param buffer bytes from file\n@param fingerprint fingerprint regular expression\n@return true if the file matches the fingerprint", "Parse currency.\n\n@param value currency value\n@return currency value", "Upload a photo from an InputStream.\n\n@param in\n@param metaData\n@return photoId or ticketId\n@throws FlickrException", "Get all sub-lists of the given list of the given sizes.\n\nFor example:\n\n<pre>\nList&lt;String&gt; items = Arrays.asList(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;);\nSystem.out.println(CollectionUtils.getNGrams(items, 1, 2));\n</pre>\n\nwould print out:\n\n<pre>\n[[a], [a, b], [b], [b, c], [c], [c, d], [d]]\n</pre>\n\n@param <T>\nThe type of items contained in the list.\n@param items\nThe list of items.\n@param minSize\nThe minimum size of an ngram.\n@param maxSize\nThe maximum size of an ngram.\n@return All sub-lists of the given sizes.", "Sets the alert sound to be played.\n\nPassing {@code null} disables the notification sound.\n\n@param sound the file name or song name to be played\nwhen receiving the notification\n@return this", "Uploads chunk of a stream to an open upload session.\n@param stream the stream that is used to read the chunck using the offset and part size.\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.", "Set the url for the shape file.\n\n@param url shape file url\n@throws LayerException file cannot be accessed\n@since 1.7.1", "Returns the classDescriptor.\n\n@return ClassDescriptor" ]
static Type getRawType(Type genericType, Map<TypeVariable, Type> typeVariableMap) { Type resolvedType = genericType; if (genericType instanceof TypeVariable) { TypeVariable tv = (TypeVariable) genericType; resolvedType = typeVariableMap.get(tv); if (resolvedType == null) { resolvedType = extractBoundForTypeVariable(tv); } } if (resolvedType instanceof ParameterizedType) { return ((ParameterizedType) resolvedType).getRawType(); } else { return resolvedType; } }
[ "Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type" ]
[ "Description accessor provided for JSON serialization only.", "Pushes a class type onto the stack from the string representation This can\nalso handle primitives\n\n@param b the bytecode\n@param classType the type descriptor for the class or primitive to push.\nThis will accept both the java.lang.Object form and the\nLjava/lang/Object; form", "Use this API to fetch all the nslimitselector resources that are configured on netscaler.", "Curries a procedure that takes three arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes two arguments. Never <code>null</code>.", "makes a deep clone of the object, using reflection.\n@param toCopy the object you want to copy\n@return", "Triggers a replication request.", "Calls the specified function with the specified arguments. This is used for v2 response overrides\n\n@param className name of class\n@param methodName name of method\n@param pluginArgs plugin arguments\n@param args arguments to supply to function\n@throws Exception exception", "Builds a batch-fetch capable loader based on the given persister, lock-mode, etc.\n\n@param persister The entity persister\n@param batchSize The maximum number of ids to batch-fetch at once\n@param lockMode The lock mode\n@param factory The SessionFactory\n@param influencers Any influencers that should affect the built query\n@param innerEntityLoaderBuilder Builder of the entity loader receiving the subset of batches\n\n@return The loader.", "This method takes the textual version of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param locale target locale\n@param priority text version of the priority\n@return Priority class instance" ]
@Nullable public ByteIterable get2(@NotNull final Transaction txn, @NotNull final ByteIterable second) { return this.second.get(txn, second); }
[ "Search for the second entry in the second database. Use this method for databases configured with no duplicates.\n\n@param second second key (value for first).\n@return null if no entry found, otherwise the value." ]
[ "If provided with an AVRO schema, validates it and checks if there are\nbackwards compatible.\n\nTODO should probably place some similar checks for other serializer types\nas well?\n\n@param serializerDef", "Parses command-line and gets metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "test, how many times the group was present in the list of groups.", "Returns the classDescriptor.\n\n@return ClassDescriptor", "Deregister shutdown hook and execute it immediately", "Populate a file creation record.\n\n@param record MPX record\n@param properties project properties", "Set the pattern scheme.\n@param isWeekDayBased flag, indicating if the week day based scheme should be set.", "If the \"org.talend.esb.sam.agent.log.messageContent\" property value is \"true\" then log the message content\nIf it is \"false\" then skip the message content logging\nElse fall back to global property \"log.messageContent\"\n\n@param message\n@param logMessageContent\n@param logMessageContentOverride\n@return", "This may cost twice what it would in the original Map.\n\n@param key key whose associated value is to be returned.\n@return the value to which this map maps the specified key, or\n<tt>null</tt> if the map contains no mapping for this key." ]
public Class<? extends MonetaryAmount> getAmountType() { Class<?> clazz = get(AMOUNT_TYPE, Class.class); return clazz.asSubclass(MonetaryAmount.class); }
[ "Get the MonetaryAmount implementation class.\n\n@return the implementation class of the containing amount instance, never null.\n@see MonetaryAmount#getContext()" ]
[ "Returns the complete task record for a single task.\n\n@param task The task to get.\n@return Request object", "Total count of partition-stores moved in this task.\n\n@return number of partition stores moved in this task.", "Byte run automaton map.\n\n@param automatonMap the automaton map\n@return the map", "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", "Writes all auxiliary triples that have been buffered recently. This\nincludes OWL property restrictions but it also includes any auxiliary\ntriples required by complex values that were used in snaks.\n\n@throws RDFHandlerException\nif there was a problem writing the RDF triples", "Creates a spin wrapper for a data input of a given data format.\n\n@param input the input to wrap\n@param format the data format of the input\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')", "Adds an option to the Jvm options\n\n@param value the option to add", "Get the bean if it exists in the contexts.\n\n@return An instance of the bean\n@throws ContextNotActiveException if the context is not active\n@see javax.enterprise.context.spi.Context#get(BaseBean, boolean)", "Generate attachment extension from mime type\n\n@param type valid mime-type\n@return extension if it's known for specified mime-type, or empty string\notherwise" ]
public static void addHeaders(BoundRequestBuilder builder, Map<String, String> headerMap) { for (Entry<String, String> entry : headerMap.entrySet()) { String name = entry.getKey(); String value = entry.getValue(); builder.addHeader(name, value); } }
[ "Adds the headers.\n\n@param builder\nthe builder\n@param headerMap\nthe header map" ]
[ "Perform a security check against OpenCms.\n\n@param cms The OpenCms object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user", "Returns a name for the principal based upon one of the attributes\nof the main CommonProfile. The attribute name used to query the CommonProfile\nis specified in the constructor.\n\n@return a name for the Principal or null if the attribute is not populated.", "Set the mbean server on the QueryExp and try and pass back any previously set one", "Helper method to load a property file from class path.\n\n@param filesToLoad\nan array of paths (class path paths) designating where the files may be. All files are loaded, in the order\ngiven. Missing files are silently ignored.\n\n@return a Properties object, which may be empty but not null.", "Return the IP address as text such as \"192.168.1.15\".", "Concatenate all the arrays in the list into a vector.\n\n@param arrays List of arrays.\n@return Vector.", "We have received an update that invalidates the waveform preview for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no waveform preview for the associated player", "Converts an Accumulo Range to a Fluo Span\n\n@param range Range\n@return Span", "Given a parameter, builds a new parameter for which the known generics placeholders are resolved.\n@param genericFromReceiver resolved generics from the receiver of the message\n@param placeholdersFromContext, resolved generics from the method context\n@param methodParameter the method parameter for which we want to resolve generic types\n@param paramType the (unresolved) type of the method parameter\n@return a new parameter with the same name and type as the original one, but with resolved generic types" ]
public Map<String, String> getSitePath() { if (m_sitePaths == null) { m_sitePaths = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() { public Object transform(Object rootPath) { if (rootPath instanceof String) { return getRequestContext().removeSiteRoot((String)rootPath); } return null; } }); } return m_sitePaths; }
[ "Transforms root paths to site paths.\n\n@return lazy map from root paths to site paths.\n\n@see CmsRequestContext#removeSiteRoot(String)" ]
[ "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()", "Convert an Object to a Time, without an Exception", "Reads a duration value. This method relies on the fact that\nthe units of the duration have been specified elsewhere.\n\n@param value Duration value\n@param type type of units of the duration\n@return Duration instance", "Adds OPT_FORMAT option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "In this method perform the actual override in runtime.\n\n@see org.apache.log4j.spi.HierarchyEventListener#addAppenderEvent(org.apache.log4j.Category, org.apache.log4j.Appender)", "Increment the version info associated with the given node\n\n@param node The node", "Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup the SMTP setup.", "Returns the timestamp for the time at which the suite finished executing.\nThis is determined by finding the latest end time for each of the individual\ntests in the suite.\n@param suite The suite to find the end time of.\n@return The end time (as a number of milliseconds since 00:00 1st January 1970 UTC).", "Flat the map of list of string to map of strings, with theoriginal values, seperated by comma" ]
public String stripThreadName(String threadId) { if (threadId == null) { return null; } else { int index = threadId.lastIndexOf('@'); return index >= 0 ? threadId.substring(0, index) : threadId; } }
[ "TestNG returns a compound thread ID that includes the thread name and its numeric ID,\nseparated by an 'at' sign. We only want to use the thread name as the ID is mostly\nunimportant and it takes up too much space in the generated report.\n@param threadId The compound thread ID.\n@return The thread name." ]
[ "Copies all node meta data from the other node to this one\n@param other - the other node", "Copied from AbstractEntityPersister", "Delete a photo from flickr.\n\nThis method requires authentication with 'delete' permission.\n\n@param photoId\n@throws FlickrException", "Calculate start dates for a weekly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Insert syntax for our special table\n@param sequenceName\n@param maxKey\n@return sequence insert statement", "Use this API to fetch nsacl6 resource of given name .", "Utility function that copies a string array and add another string to\nfirst\n\n@param arr Original array of strings\n@param add\n@return Copied array of strings", "Extract resource type from a resource ID string.\n@param id the resource ID string\n@return the resource type", "Extent aware Delete by Query\n@param query\n@param cld\n@throws PersistenceBrokerException" ]
public static List<String> getChildrenParentMayNotExist(ZkClient zkClient, String path) { try { return zkClient.getChildren(path); } catch (ZkNoNodeException e) { return null; } }
[ "get children nodes name\n\n@param zkClient zkClient\n@param path full path\n@return children nodes name or null while path not exist" ]
[ "Scans given directory for files passing given filter, adds the results into given list.", "Adds a new cell to the current grid\n@param cell the td component", "Run the JavaScript program, Output saved in localBindings", "Get the best guess we have for the current track position on the specified player.\n\n@param player the player number whose position is desired\n\n@return the milliseconds into the track that we believe playback has reached, or -1 if we don't know\n\n@throws IllegalStateException if the TimeFinder is not running", "Creates a ServiceCall from a paging operation that returns a header response.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@param <V> the header object type\n@return the future based ServiceCall", "Removes all documents from the collection that match the given query filter. If no documents\nmatch, the collection is not modified.\n\n@param filter the query filter to apply the the delete operation\n@return the result of the remove many operation", "Returns the directory of the file.\n\n@param filePath Path of the file.\n@return The directory string or {@code null} if\nthere is no parent directory.\n@throws IllegalArgumentException if path is bad", "Print an extended attribute value.\n\n@param writer parent MSPDIWriter instance\n@param value attribute value\n@param type type of the value being passed\n@return string representation", "Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD\n@param _jasperPrint\n@param _format\n@param _parameters\n@return" ]