query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public int readFrom(ByteBuffer src, long destOffset) { if (src.remaining() + destOffset >= size()) throw new BufferOverflowException(); int readLen = src.remaining(); ByteBuffer b = toDirectByteBuffer(destOffset, readLen); b.position(0); b.put(src); return readLen; }
[ "Reads the given source byte buffer into this buffer at the given offset\n@param src source byte buffer\n@param destOffset offset in this buffer to read to\n@return the number of bytes read" ]
[ "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.", "Get the FieldDescriptors of the extent based on the FieldDescriptors of the parent.", "Get replication document state for a given replication document ID.\n\n@param docId The replication document ID\n@return Replication document for {@code docId}", "The list of device types on which this application can run.", "Creates a text box with the given parent and text node assigned.\n@param contblock The parent node (and the containing block in the same time)\n@param n The corresponding text node in the DOM tree.\n@return The new text box.", "Use this API to fetch statistics of cmppolicy_stats resource of given name .", "Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value", "Indicates if this file represents a directory on the underlying file system.\n\n@param directoryPath\n@return", "Write the patch.xml\n\n@param rollbackPatch the patch\n@param file the target file\n@throws IOException" ]
public static base_response unset(nitro_service client, tmsessionparameter resource, String[] args) throws Exception{ tmsessionparameter unsetresource = new tmsessionparameter(); return unsetresource.unset_resource(client,args); }
[ "Use this API to unset the properties of tmsessionparameter resource.\nProperties that need to be unset are specified in args array." ]
[ "Retrieves a prompt value.\n\n@param field field type\n@param block criteria data block\n@return prompt value", "Add all the items from an iterable to a collection.\n\n@param <T>\nThe type of items in the iterable and the collection\n@param collection\nThe collection to which the items should be added.\n@param items\nThe items to add to the collection.", "Makes http DELETE request\n@param url url to makes request to\n@param params data to add to params field\n@return {@link okhttp3.Response}\n@throws RequestException\n@throws LocalOperationException", "Get a System property by its name.\n\n@param name the name of the wanted System property.\n@return the System property value - null if it is not defined.", "Constructs credentials for the given account and key file.\n\n@param serviceAccountId service account ID (typically an e-mail address).\n@param privateKeyFile the file name from which to get the private key.\n@param serviceAccountScopes Collection of OAuth scopes to use with the the service\naccount flow or {@code null} if not.\n@return valid credentials or {@code null}", "Extract raw table data from the input stream.\n\n@param is input stream", "Returns the dimensions for the video\n@param videoFile Video file\n@return the dimensions\n@throws IOException", "Render the scalebar.\n\n@param mapContext The context of the map for which the scalebar is created.\n@param scalebarParams The scalebar parameters.\n@param tempFolder The directory in which the graphic file is created.\n@param template The template that containts the scalebar processor", "Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@param fHeight What to multiply the height by. value < 1 scales down, and value > one scales up\n@return A scaled image" ]
public static void composeThroughMask(Raster src, WritableRaster dst, Raster sel) { int x = src.getMinX(); int y = src.getMinY(); int w = src.getWidth(); int h = src.getHeight(); int srcRGB[] = null; int selRGB[] = null; int dstRGB[] = null; for ( int i = 0; i < h; i++ ) { srcRGB = src.getPixels(x, y, w, 1, srcRGB); selRGB = sel.getPixels(x, y, w, 1, selRGB); dstRGB = dst.getPixels(x, y, w, 1, dstRGB); int k = x; for ( int j = 0; j < w; j++ ) { int sr = srcRGB[k]; int dir = dstRGB[k]; int sg = srcRGB[k+1]; int dig = dstRGB[k+1]; int sb = srcRGB[k+2]; int dib = dstRGB[k+2]; int sa = srcRGB[k+3]; int dia = dstRGB[k+3]; float a = selRGB[k+3]/255f; float ac = 1-a; dstRGB[k] = (int)(a*sr + ac*dir); dstRGB[k+1] = (int)(a*sg + ac*dig); dstRGB[k+2] = (int)(a*sb + ac*dib); dstRGB[k+3] = (int)(a*sa + ac*dia); k += 4; } dst.setPixels(x, y, w, 1, dstRGB); y++; } }
[ "Compose src onto dst using the alpha of sel to interpolate between the two.\nI can't think of a way to do this using AlphaComposite.\n@param src the source raster\n@param dst the destination raster\n@param sel the mask raster" ]
[ "Remove a part of a CharSequence by replacing the first occurrence\nof target within self with '' and returns the result.\n\n@param self a CharSequence\n@param target an object representing the part to remove\n@return a String containing the original minus the part to be removed\n@see #minus(String, Object)\n@since 1.8.2", "Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails.", "Helper method to abstract out the common logic from the various users methods.\n\n@param api the API connection to be used when retrieving the users.\n@param filterTerm The filter term to lookup users by (login for external, login or name for managed)\n@param userType The type of users we want to search with this request.\nValid values are 'managed' (enterprise users), 'external' or 'all'\n@param externalAppUserId the external app user id that has been set for an app user\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return An iterator over the selected users.", "Use this API to fetch a systemglobal_authenticationldappolicy_binding resources.", "Gets a SerialMessage with the WAKE_UP_NO_MORE_INFORMATION command.\n@return the serial message", "This method extracts project extended attribute data from an MSPDI file.\n\n@param project Root node of the MSPDI file", "Creates metadata on this folder using a specified template.\n\n@param templateName the name of the metadata template.\n@param metadata the new metadata values.\n@return the metadata returned from the server.", "Adds the scroll position CSS extension to the given component\n\n@param componentContainer the component to extend\n@param scrollBarrier the scroll barrier\n@param barrierMargin the margin\n@param styleName the style name to set beyond the scroll barrier", "Triggers a replication request." ]
public static Span exact(Bytes row) { Objects.requireNonNull(row); return new Span(row, true, row, true); }
[ "Creates a span that covers an exact row" ]
[ "Use this API to fetch lbvserver_cachepolicy_binding resources of given name .", "Insert an entity into the datastore.\n\nThe entity must have no ids.\n\n@return The key for the inserted entity.\n@throws DatastoreException on error", "This method generates a list of lists. Each list represents the data\nfor an embedded object, and contains set set of RTFEmbeddedObject instances\nthat make up the embedded object. This method will return null\nif there are no embedded objects in the RTF document.\n\n@param text RTF document\n@return list of lists of RTFEmbeddedObject instances", "Generate a schedule for the given start and end date.\n\n@param referenceDate The reference date (corresponds to \\( t = 0 \\).\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule", "Use this API to delete ntpserver resources of given names.", "Append Join for SQL92 Syntax", "Gets an item that was shared with a password-protected shared link.\n@param api the API connection to be used by the shared item.\n@param sharedLink the shared link to the item.\n@param password the password for the shared link.\n@return info about the shared item.", "Use this API to fetch lbvserver_cachepolicy_binding resources of given name .", "Process TestCaseStartedEvent. New testCase will be created and added\nto suite as child.\n\n@param event to process" ]
public void begin(String key) { if (key == null) { return; } TimingData data = executionInfo.get(key); if (data == null) { data = new TimingData(key); executionInfo.put(key, data); } data.begin(); }
[ "Start timing an operation with the given identifier." ]
[ "Parses and adds dictionaries to the Solr index.\n\n@param cms the OpenCms object.\n\n@throws CmsRoleViolationException in case the user does not have the required role ROOT_ADMIN", "Manually set the breaker to be reset and ready for use. This\nis only useful after a manual trip otherwise the breaker will\ntrip automatically again if the service is still unavailable.\nJust like a real breaker. WOOT!!!", "Put event.\n\n@param eventType the event type\n@throws Exception the exception", "Return the releaseId\n\n@return releaseId", "Creates the container for a bundle descriptor.\n@return the container for a bundle descriptor.", "Load a list of entities using the information in the context\n\n@param session The session\n@param lockOptions The locking details\n@param ogmContext The context with the information to load the entities\n@return the list of entities corresponding to the given context", "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", "Counts the number of lines.\n\n@param str the input string\n@return Returns the number of lines terminated by '\\n' in string", "Returns an empty model of a Dependency in Json\n\n@return String\n@throws IOException" ]
public static double SymmetricKullbackLeibler(double[] p, double[] q) { double dist = 0; for (int i = 0; i < p.length; i++) { dist += (p[i] - q[i]) * (Math.log(p[i]) - Math.log(q[i])); } return dist; }
[ "Gets the Symmetric Kullback-Leibler distance.\nThis metric is valid only for real and positive P and Q.\n\n@param p P vector.\n@param q Q vector.\n@return The Symmetric Kullback Leibler distance between p and q." ]
[ "Checks the given class descriptor for correct object cache setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "Stop finding signatures for all active players.", "Processes the template for all columns of the current table index.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Runs the module import script.\n\n@param cms the CMS context to use\n@param module the module for which to run the script", "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", "Record a Screen View event\n@param screenName String, the name of the screen", "Use this API to update dbdbprofile resources.", "Samples a batch of indices in the range [0, numExamples) without replacement.", "In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config" ]
public static base_response unset(nitro_service client, nsacl6 resource, String[] args) throws Exception{ nsacl6 unsetresource = new nsacl6(); unsetresource.acl6name = resource.acl6name; return unsetresource.unset_resource(client,args); }
[ "Use this API to unset the properties of nsacl6 resource.\nProperties that need to be unset are specified in args array." ]
[ "Returns the modules paths used on the command line.\n\n@return the paths separated by the {@link File#pathSeparator path separator}", "Creates the code mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param realOffsetStart\nthe real offset start\n@param realOffsetEnd\nthe real offset end\n@param codePositions\nthe code positions\n@throws IOException\nSignals that an I/O exception has occurred.", "Called on mouse up in the caption area, ends dragging by ending event\ncapture.\n\n@param event the mouse up event that ended dragging\n\n@see DOM#releaseCapture\n@see #beginDragging\n@see #endDragging", "Separate from other findNonProgressingOp variant to allow unit testing without needing a mock OperationContext", "This method returns the mapped certificate for a hostname, or generates a \"standard\"\nSSL server certificate issued by the CA to the supplied subject if no mapping has been\ncreated. This is not a true duplication, just a shortcut method\nthat is adequate for web browsers.\n\n@param hostname\n@return\n@throws CertificateParsingException\n@throws InvalidKeyException\n@throws CertificateExpiredException\n@throws CertificateNotYetValidException\n@throws SignatureException\n@throws CertificateException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws KeyStoreException\n@throws UnrecoverableKeyException", "Get list of replies\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A reply object\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html\">API Documentation</a>", "Test the list of TimephasedWork instances to see\nif any of them have been modified.\n\n@param list list of TimephasedWork instances\n@return boolean flag", "Add a date with a certain check state.\n@param date the date to add.\n@param checkState the check state.", "Converts the transpose of a row major matrix into a row major block matrix.\n\n@param src Original DMatrixRMaj. Not modified.\n@param dst Equivalent DMatrixRBlock. Modified." ]
protected float getLayoutOffset() { //final int offsetSign = getOffsetSign(); final float axisSize = getViewPortSize(getOrientationAxis()); float layoutOffset = - axisSize / 2; Log.d(LAYOUT, TAG, "getLayoutOffset(): dimension: %5.2f, layoutOffset: %5.2f", axisSize, layoutOffset); return layoutOffset; }
[ "Calculate the layout offset" ]
[ "Unpack report face to given directory.\n\n@param outputDirectory the output directory to unpack face.\n@throws IOException if any occurs.", "Get the default provider used.\n\n@return the default provider, never {@code null}.", "Use to generate a file based on generator node.", "Update the id field of the object in the database.", "Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException", "Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file", "Use this API to add gslbsite.", "Overridden 'consume' method. Corresponding parent method will be called necessary number of times\n\n@param initialVars - a map containing the initial variables assignments\n@return the number of lines written", "Set the value for a floating point vector of length 3.\n@param key name of uniform to set.\n@param x new X value\n@param y new Y value\n@param z new Z value\n@see #getVec3\n@see #getFloatVec(String)" ]
protected int _countPeriods(String str) { int commas = 0; for (int i = 0, end = str.length(); i < end; ++i) { int ch = str.charAt(i); if (ch < '0' || ch > '9') { if (ch == '.') { ++commas; } else { return -1; } } } return commas; }
[ "Helper method to find Strings of form \"all digits\" and \"digits-comma-digits\"" ]
[ "Sets the value for the API's \"props\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters", "Clear JobContext of current thread", "Registers add operation\n\n@param registration resource on which to register\n@param handler operation handler to register\n@param flags with flags\n@deprecated use {@link #registerAddOperation(org.jboss.as.controller.registry.ManagementResourceRegistration, AbstractAddStepHandler, org.jboss.as.controller.registry.OperationEntry.Flag...)}", "Scroll to the next page. To process the scrolling by pages LayoutScroller must be constructed\nwith a pageSize greater than zero.\n@return the new current item after the scrolling processed.", "Create a patch element for the rollback patch.\n\n@param entry the entry\n@return the new patch element", "Generates a download id for the request and adds the download request to the download request queue for the dispatchers pool to act on immediately.\n\n@param request\n@return downloadId", "Use this API to fetch statistics of authenticationvserver_stats resource of given name .", "Obtains a local date in International Fixed 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 International Fixed local date, not null\n@throws DateTimeException if unable to create the date", "Invalidating just the GVRView associated with the GVRViewSceneObject\nincorrectly set the clip rectangle to just that view. To fix this,\nwe have to create a full screen android View and invalidate this\nto restore the clip rectangle.\n@return full screen View object" ]
public static AiScene importFile(String filename) throws IOException { return importFile(filename, EnumSet.noneOf(AiPostProcessSteps.class)); }
[ "Imports a file via assimp without post processing.\n\n@param filename the file to import\n@return the loaded scene\n@throws IOException if an error occurs" ]
[ "Get an interpolated value for a given argument x.\n\n@param x The abscissa at which the interpolation should be performed.\n@return The interpolated value (ordinate).", "Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance", "This method takes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent\n@param belief_name\nThe name of the belief inside agent's adf\n@param connector\nThe connector to get the external access\n@return belief_value The value of the requested belief", "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", "Use this API to fetch auditsyslogpolicy_systemglobal_binding resources of given name .", "Returns the JRDesignGroup for the DJGroup passed\n@param jd\n@param layoutManager\n@param group\n@return", "Load a classifier from the specified InputStream. The classifier is\nreinitialized from the flags serialized in the classifier. This does not\nclose the InputStream.\n\n@param in\nThe InputStream to load the serialized classifier from\n@param props\nThis Properties object will be used to update the\nSeqClassifierFlags which are read from the serialized classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data", "Abort and close the transaction. Calling abort abandons all persistent\nobject modifications and releases the associated locks. Aborting a\ntransaction does not restore the state of modified transient objects", "Confirm that all nodes shared between clusters host exact same partition\nIDs and that nodes only in the super set cluster have no partition IDs.\n\n@param subsetCluster\n@param supersetCluster" ]
private FieldType findForeignFieldType(Class<?> clazz, Class<?> foreignClass, Dao<?, ?> foreignDao) throws SQLException { String foreignColumnName = fieldConfig.getForeignCollectionForeignFieldName(); for (FieldType fieldType : foreignDao.getTableInfo().getFieldTypes()) { if (fieldType.getType() == foreignClass && (foreignColumnName == null || fieldType.getField().getName().equals(foreignColumnName))) { if (!fieldType.fieldConfig.isForeign() && !fieldType.fieldConfig.isForeignAutoRefresh()) { // this may never be reached throw new SQLException("Foreign collection object " + clazz + " for field '" + field.getName() + "' contains a field of class " + foreignClass + " but it's not foreign"); } return fieldType; } } // build our complex error message StringBuilder sb = new StringBuilder(); sb.append("Foreign collection class ").append(clazz.getName()); sb.append(" for field '").append(field.getName()).append("' column-name does not contain a foreign field"); if (foreignColumnName != null) { sb.append(" named '").append(foreignColumnName).append('\''); } sb.append(" of class ").append(foreignClass.getName()); throw new SQLException(sb.toString()); }
[ "If we have a class Foo with a collection of Bar's then we go through Bar's DAO looking for a Foo field. We need\nthis field to build the query that is able to find all Bar's that have foo_id that matches our id." ]
[ "loading Properties from files\n\n@param filename file path\n@return properties\n@throws RuntimeException while file not exist or loading fail", "Get a value from a multiselect metadata field.\n@param path the key path in the metadata object. Must be prefixed with a \"/\".\n@return the list of values set in the field.", "Links the form with an HTML element which can be clicked.\n\n@param form the collection of the input fields\n@return a FormAction\n@see Form", "Returns an array of all the singular values", "First looks for zeros and then performs the implicit single step in the QR Algorithm.", "Use this API to fetch crvserver_binding resource of given name .", "Returns the list of user defined attribute names.\n\n@return the list of user defined attribute names, if there are none it returns an empty set.", "Imports a file via assimp without post processing.\n\n@param filename the file to import\n@return the loaded scene\n@throws IOException if an error occurs", "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." ]
private void stereotype(Options opt, Doc c, Align align) { for (Tag tag : c.tags("stereotype")) { String t[] = tokenize(tag.text()); if (t.length != 1) { System.err.println("@stereotype expects one field: " + tag.text()); continue; } tableLine(align, guilWrap(opt, t[0])); } }
[ "Return as a string the stereotypes associated with c\nterminated by the escape character term" ]
[ "Writes and reads the XOP attachment using a CXF JAX-RS WebClient.\nNote that WebClient is created with the help of JAXRSClientFactoryBean.\nJAXRSClientFactoryBean can be used when neither of the WebClient factory\nmethods is appropriate. For example, in this case, an \"mtom-enabled\"\nproperty is set on the factory bean first.\n\n\n@throws Exception", "Populate the UDF values for this entity.\n\n@param tableName parent table name\n@param type entity type\n@param container entity\n@param uniqueID entity Unique ID", "Get file size\n\n@return Long", "Process UDFs for a specific object.\n\n@param mpxj field container\n@param udfs UDF values", "Get layer style by name.\n\n@param name layer style name\n@return layer style", "Extract the parameters from a method using the Jmx annotation if present,\nor just the raw types otherwise\n\n@param m The method to extract parameters from\n@return An array of parameter infos", "Signal that this thread will not log any more messages in the multithreaded\nenvironment", "Returns a string representation of the receiver, containing\nthe String representation of each key-value pair, sorted ascending by value.", "Initialize the field factories for the messages table." ]
public static transformpolicy[] get(nitro_service service) throws Exception{ transformpolicy obj = new transformpolicy(); transformpolicy[] response = (transformpolicy[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the transformpolicy resources that are configured on netscaler." ]
[ "Creates an empty block style definition.\n@return", "Perform construction.\n\n@param callbackHandler", "Queues up a callback to be removed and invoked on the next change event.", "Obtain the path ID for a profile\n\n@param identifier Can be the path ID, or friendly name\n@param profileId\n@return\n@throws Exception", "Clears the collection and uses the iterator to run through the dao and delete all of the items in the collection\nfrom the associated database table. This is different from removing all of the elements in the table since this\niterator is across just one item's foreign objects.", "Converts the given list of a type to paged list of a different type.\n\n@param list the list to convert to paged list\n@param mapper the mapper to map type in input list to output list\n@param <OutT> the type of items in output paged list\n@param <InT> the type of items in input paged list\n@return the paged list", "The CommandContext can be retrieved thatnks to the ExecutableBuilder.", "Sets the time to wait when close connection watch threads are enabled. 0 = wait forever.\n@param closeConnectionWatchTimeout the watchTimeout to set\n@param timeUnit Time granularity", "Initialize all components of this URI builder with the components of the given URI.\n@param uri the URI\n@return this UriComponentsBuilder" ]
public static HazardCurve createHazardCurveFromSurvivalProbabilities(String name, double[] times, double[] givenSurvivalProbabilities){ HazardCurve survivalProbabilities = new HazardCurve(name); for(int timeIndex=0; timeIndex<times.length;timeIndex++) { survivalProbabilities.addSurvivalProbability(times[timeIndex], givenSurvivalProbabilities[timeIndex], times[timeIndex] > 0); } return survivalProbabilities; }
[ "Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this hazard curve.\n@param times Array of times as doubles.\n@param givenSurvivalProbabilities Array of corresponding survival probabilities.\n@return A new discount factor object." ]
[ "Start a server.\n\n@return the http server\n@throws Exception the exception", "Use this API to disable snmpalarm of given name.", "Sets the bottom padding for all cells in the table.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining", "rollback the transaction", "Checks, if the end type is valid for the set pattern type.\n@return a flag, indicating if the end type is valid for the pattern type.", "Use this API to fetch statistics of service_stats resource of given name .", "Append the data of another lattice to this lattice. If the other lattice follows a different quoting convention, it is automatically converted.\nHowever, this method does not check, whether the two lattices are aligned in terms of reference date, curve names and meta schedules.\nIf the two lattices have shared data points, the data from this lattice will be overwritten.\n\n@param other The lattice containing the data to be appended.\n@param model The model to use for context, in case the other lattice follows a different convention.\n\n@return The lattice with the combined swaption entries.", "Get a list of referring domains for a photostream.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotostreamDomains.html\"", "Checks whether a user account can be locked because of inactivity.\n\n@param cms the CMS context\n@param user the user to check\n@return true if the user may be locked after being inactive for too long" ]
private void countEntity() { if (!this.timer.isRunning()) { startTimer(); } this.entityCount++; if (this.entityCount % 100 == 0) { timer.stop(); int seconds = (int) (timer.getTotalWallTime() / 1000000000); if (seconds >= this.lastSeconds + this.reportInterval) { this.lastSeconds = seconds; printStatus(); if (this.timeout > 0 && seconds > this.timeout) { logger.info("Timeout. Aborting processing."); throw new TimeoutException(); } } timer.start(); } }
[ "Counts one entity. Every once in a while, the current time is checked so\nas to print an intermediate report roughly every ten seconds." ]
[ "Creates a non-binary media type with the given type, subtype, and charSet\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}", "Adds the remaining tokens to the processed tokens list.\n\n@param iter An iterator over the remaining tokens", "This method reads an eight byte integer from the input array.\n\n@param data the input array\n@param offset offset of integer data in the array\n@return integer value", "Parse the json string to the diagram model, assumes that the json is\nhierarchical ordered\n@param json\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException", "Return the value from the field in the object that is defined by this FieldType. If the field is a foreign object\nthen the ID of the field is returned instead.", "Add the given entries of the input map into the output map.\n\n<p>\nIf a key in the inputMap already exists in the outputMap, its value is\nreplaced in the outputMap by the value from the inputMap.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param outputMap the map to update.\n@param inputMap the entries to add.\n@since 2.15", "Creates an operations that targets the valiadating handler.\n\n@param operationToValidate the operation that this handler will validate\n@return the validation operation", "Begin writing a named object attribute.\n\n@param name attribute name", "Removes the value connected to the given key\nfrom all levels of the cache. Will not throw an\nexception on fail.\n\n@param cacheKey" ]
public static boolean isConstant(Expression expression, Object expected) { return expression instanceof ConstantExpression && expected.equals(((ConstantExpression) expression).getValue()); }
[ "Tells you if an expression is the expected constant.\n@param expression\nany expression\n@param expected\nthe expected int or String\n@return\nas described" ]
[ "Returns an Organization that suits the Module or null if there is none\n\n@param dbModule DbModule\n@return DbOrganization", "Reset a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked", "Inject external stylesheets.", "Determines the field name based on an accessor method name.\n\n@param methodName\nan accessor method name\n@return the resulting field name", "Called when a ParentViewHolder has triggered an expansion for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be expanded", "Returns the y-coordinate of a vertex bitangent.\n\n@param vertex the vertex index\n@return the y coordinate", "Helper method called recursively to list child tasks.\n\n@param task task whose children are to be displayed\n@param indent whitespace used to indent hierarchy levels", "Checks if user exists.\n\n@param userId the user id, which can be an email or the login.\n@return true, if user exists.", "Use this API to fetch dbdbprofile resource of given name ." ]
private void createTasks(ChildTaskContainer parent, String parentName, List<Row> rows) { for (Row row : rows) { boolean rowIsBar = (row.getInteger("BARID") != null); // // Don't export hammock tasks. // if (rowIsBar && row.getChildRows().isEmpty()) { continue; } Task task = parent.addTask(); // // Do we have a bar, task, or milestone? // if (rowIsBar) { // // If the bar only has one child task, we skip it and add the task directly // if (skipBar(row)) { populateLeaf(row.getString("NAMH"), row.getChildRows().get(0), task); } else { populateBar(row, task); createTasks(task, task.getName(), row.getChildRows()); } } else { populateLeaf(parentName, row, task); } m_eventManager.fireTaskReadEvent(task); } }
[ "Recursively descend through the hierarchy creating tasks.\n\n@param parent parent task\n@param parentName parent name\n@param rows rows to add as tasks to this parent" ]
[ "Retrieve the FeatureSource object from the data store.\n\n@return An OpenGIS FeatureSource object;\n@throws LayerException\noops", "Sets orientation of loopbar\n\n@param orientation int value of orientation. Must be one of {@link Orientation}", "Checks if the selected template context is \"templatemapper\".\n\n@param request the current request\n@return true if the selected template context is \"templatemapper\"", "Add a '=' clause so the column must be equal to the value.", "Returns a map of all variables in scope.\n@return map of all variables in scope.", "Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead", "Construct a Libor index for a given curve and schedule.\n\n@param forwardCurveName\n@param schedule\n@return The Libor index or null, if forwardCurveName is null.", "Initialize an instance of Widget Lib. It has to be done before any usage of library.\nThe application needs to hold onto the returned WidgetLib reference for as long as the\nlibrary is going to be used.\n@param gvrContext A valid {@link GVRContext} instance\n@param customPropertiesAsset An optional asset JSON file containing custom and overridden\nproperties for the application\n@return Instance of Widget library\n@throws InterruptedException\n@throws JSONException\n@throws NoSuchMethodException", "Get a list of modules regarding filters\n\n@param filters Map<String,String>\n@return List<Module>\n@throws GrapesCommunicationException" ]
private static int nextIndex( String description, int defaultIndex ) { Pattern startsWithNumber = Pattern.compile( "(\\d+).*" ); Matcher matcher = startsWithNumber.matcher( description ); if( matcher.matches() ) { return Integer.parseInt( matcher.group( 1 ) ) - 1; } return defaultIndex; }
[ "Returns the next index of the argument by decrementing 1 from the possibly parsed number\n\n@param description this String will be searched from the start for a number\n@param defaultIndex this will be returned if the match does not succeed\n@return the parsed index or the defaultIndex" ]
[ "read data from channel to buffer\n\n@param channel readable channel\n@param buffer bytebuffer\n@return read size\n@throws IOException any io exception", "Performs a similar transform on A-pI", "is ready to service requests", "Runs a Story with the given configuration and steps, applying the given\nmeta filter, and staring from given state.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@param beforeStories the State before running any of the stories, if not\n<code>null</code>\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.", "Returns new instance of OptionalValue with given value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue", "Only meant to be called once\n\n@throws Exception exception", "Returns the nested object definition with the specified name.\n\n@param name The name of the attribute of the nested object\n@return The nested object definition or <code>null</code> if there is no such nested object", "Add a '&gt;' clause so the column must be greater-than the value.", "Creates an immutable list that consists of the elements in the given array. A copy of the given array is used which means\nthat any modifications to the given array will not affect the immutable list.\n\n@param elements the given array of elements\n@return an immutable list" ]
boolean awaitState(final InternalState expected) { synchronized (this) { final InternalState initialRequired = this.requiredState; for(;;) { final InternalState required = this.requiredState; // Stop in case the server failed to reach the state if(required == InternalState.FAILED) { return false; // Stop in case the required state changed } else if (initialRequired != required) { return false; } final InternalState current = this.internalState; if(expected == current) { return true; } try { wait(); } catch(InterruptedException e) { Thread.currentThread().interrupt(); return false; } } } }
[ "Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise" ]
[ "Apply the matching client UUID for the request\n\n@param httpServletRequest\n@param history", "Returns the result of the performed spellcheck formatted in JSON.\n\n@param request The CmsSpellcheckingRequest.\n@return JSONObject that contains the result of the performed spellcheck.", "Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0", "This method retrieves a string of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required string data", "perform the actual matching", "Sets the bean store\n\n@param beanStore The bean store", "Calculate UserInfo strings.", "Recursively construct a LblTree from DOM tree\n\n@param walker tree walker for DOM tree traversal\n@return tree represented by DOM tree", "Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations" ]
public static boolean intersectsPointWithRectF(RectF _Rect, float _X, float _Y) { return _X > _Rect.left && _X < _Rect.right && _Y > _Rect.top && _Y < _Rect.bottom; }
[ "Checks if a point is in the given rectangle.\n\n@param _Rect rectangle which is checked\n@param _X x-coordinate of the point\n@param _Y y-coordinate of the point\n@return True if the points intersects with the rectangle." ]
[ "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", "Convert this update description to an update document.\n\n@return an update document with the appropriate $set and $unset documents.", "Sets the bottom padding for all cells in the table.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining", "Use this API to update spilloverpolicy.", "Get a unique reference to a media slot on the network from which tracks can be loaded.\n\n@param player the player in which the slot is found\n@param slot the specific type of the slot\n\n@return the instance that will always represent the specified slot\n\n@throws NullPointerException if {@code slot} is {@code null}", "Checks that sequence-name is only used with autoincrement='ojb'\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "Deserialize a javascript design document file to a DesignDocument object.\n\n@param file the design document javascript file (UTF-8 encoded)\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read", "Sets an attribute in the main section of the manifest to a map.\nThe map entries will be joined with a single whitespace character, and each key-value pair will be joined with a '='.\n\n@param name the attribute's name\n@param values the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.", "Replace a photo from a File.\n\n@param file\n@param flickrId\n@param async\n@return photoId or ticketId\n@throws FlickrException" ]
public AT_Row setHtmlElementTranslator(HtmlElementTranslator htmlElementTranslator) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setHtmlElementTranslator(htmlElementTranslator); } } return this; }
[ "Sets the HTML entity 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 htmlElementTranslator translator\n@return this to allow chaining" ]
[ "Read correlation id.\n\n@param message the message\n@return correlation id from the message", "Returns the given dialect, narrowed down to the given dialect facet in case it is implemented by the dialect.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return the given dialect, narrowed down to the given dialect facet or {@code null} in case the given dialect\ndoes not implement the given facet", "Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer", "Get a property as a json object or null.\n\n@param key the property name", "Ask the specified player for the beat grid of the track in the specified slot with the specified rekordbox ID,\nfirst checking if we have a cache we can use instead.\n\n@param track uniquely identifies the track whose beat grid is desired\n\n@return the beat grid, if any", "Prints a few aspects of the TreebankLanguagePack, just for debugging.", "Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set", "Array of fieldNames for which counts should be produced\n\n@param countsfields array of the field names\n@return this for additional parameter setting or to query", "Get a random pod that provides the specified service in the specified namespace.\n\n@param client\nThe client instance to use.\n@param name\nThe name of the service.\n@param namespace\nThe namespace of the service.\n\n@return The pod or null if no pod matches." ]
public void setCalendar(ProjectCalendar calendar) { set(TaskField.CALENDAR, calendar); setCalendarUniqueID(calendar == null ? null : calendar.getUniqueID()); }
[ "Sets the name of the base calendar associated with this task.\nNote that this attribute appears in MPP9 and MSPDI files.\n\n@param calendar calendar instance" ]
[ "Read the tag structure from the provided stream.", "helper to calculate the statusBar height\n\n@param context\n@param force pass true to get the height even if the device has no translucent statusBar\n@return", "Waits for the current outstanding request retrying it with exponential backoff if it fails.\n\n@throws ClosedByInterruptException if request was interrupted\n@throws IOException In the event of FileNotFoundException, MalformedURLException\n@throws RetriesExhaustedException if exceeding the number of retries", "Returns a source excerpt of the type parameters of this type, including angle brackets.\nAlways an empty string if the type class is not generic.\n\n<p>e.g. {@code <N, C>}", "Handle the given response, return the deserialized object when the response is successful.\n\n@param <T> Type\n@param response Response\n@param returnType Return type\n@throws ApiException If the response has a unsuccessful status code or\nfail to deserialize the response body\n@return Type", "Utility method used to convert an integer time representation into a\nDuration instance.\n\n@param totalTime integer time representation\n@param format required time format\n@return new Duration instance", "Creates a simple, annotation defined Web Bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return A Web Bean", "Returns the name under which this dump file. This is the name used online\nand also locally when downloading the file.\n\n@param dumpContentType\nthe type of the dump\n@param projectName\nthe project name, e.g. \"wikidatawiki\"\n@param dateStamp\nthe date of the dump in format YYYYMMDD\n@return file name string", "Retuns the Windows UNC style path with backslashs intead of forward slashes.\n\n@return The UNC path." ]
public static void checkCreateUpload(CmsObject cms, CmsUgcConfiguration config, String name, long size) throws CmsUgcException { if (!config.getUploadParentFolder().isPresent()) { String message = Messages.get().container(Messages.ERR_NO_UPLOADS_ALLOWED_0).key( cms.getRequestContext().getLocale()); throw new CmsUgcException(CmsUgcConstants.ErrorCode.errNoUploadAllowed, message); } if (config.getMaxUploadSize().isPresent()) { if (config.getMaxUploadSize().get().longValue() < size) { String message = Messages.get().container(Messages.ERR_UPLOAD_TOO_BIG_1, name).key( cms.getRequestContext().getLocale()); throw new CmsUgcException(CmsUgcConstants.ErrorCode.errMaxUploadSizeExceeded, message); } } if (config.getValidExtensions().isPresent()) { List<String> validExtensions = config.getValidExtensions().get(); boolean foundExtension = false; for (String extension : validExtensions) { if (name.toLowerCase().endsWith(extension.toLowerCase())) { foundExtension = true; break; } } if (!foundExtension) { String message = Messages.get().container(Messages.ERR_UPLOAD_FILE_EXTENSION_NOT_ALLOWED_1, name).key( cms.getRequestContext().getLocale()); throw new CmsUgcException(CmsUgcConstants.ErrorCode.errInvalidExtension, message); } } }
[ "Checks whether an uploaded file can be created in the VFS, and throws an exception otherwise.\n\n@param cms the current CMS context\n@param config the form configuration\n@param name the file name of the uploaded file\n@param size the size of the uploaded file\n\n@throws CmsUgcException if something goes wrong" ]
[ "Filters all exceptions from the provided dates.\n@param dates the dates to filter.\n@return the provided dates, except the ones that match some exception.", "Return the index associated to the Renderer.\n\n@param renderer used to search in the prototypes collection.\n@return the prototype index associated to the renderer passed as argument.", "Returns the value for a given key from the database properties.\n\n@param key the property key\n\n@return the string value for a given key", "Destroys the context", "Parse a currency symbol position value.\n\n@param value currency symbol position\n@return CurrencySymbolPosition instance", "Read the header data for a single file.\n\n@param header header data\n@return SynchroTable instance", "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", "Write a resource.\n\n@param record resource instance\n@throws IOException", "Returns true if super class of the parameter exists and is abstract and package private. In such case we want to omit such method.\n\nSee WELD-2507 and Oracle issue - https://bugs.java.com/view_bug.do?bug_id=6342411\n\n@return true if the super class exists and is abstract and package private" ]
public static void show(DMatrixD1 A , String title ) { JFrame frame = new JFrame(title); int width = 300; int height = 300; if( A.numRows > A.numCols) { width = width*A.numCols/A.numRows; } else { height = height*A.numRows/A.numCols; } DMatrixComponent panel = new DMatrixComponent(width,height); panel.setMatrix(A); frame.add(panel, BorderLayout.CENTER); frame.pack(); frame.setVisible(true); }
[ "Creates a window visually showing the matrix's state. Block means an element is zero.\nRed positive and blue negative. More intense the color larger the element's absolute value\nis.\n\n@param A A matrix.\n@param title Name of the window." ]
[ "Closes the server socket. No new clients are accepted afterwards.", "Use this API to fetch all the vpnclientlessaccesspolicy resources that are configured on netscaler.", "Adds the class descriptor to this model.\n\n@param classDef The class descriptor\n@return The class descriptor or <code>null</code> if there is no such class in this model", "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", "Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix.", "Toggles a style name on a ui object\n\n@param uiObject Object to toggle style on\n@param toggleStyle whether or not to toggle the style name on the object\n@param styleName Style name", "get all consumers for the group\n\n@param zkClient the zookeeper client\n@param group the group name\n@return topic-&gt;(consumerIdStringA-0,consumerIdStringA-1...consumerIdStringB-0,consumerIdStringB-1)", "Returns the given text with the first letter in upper case.\n\n<h2>Examples:</h2>\n<pre>\ncapitalize(\"hi\") == \"Hi\"\ncapitalize(\"Hi\") == \"Hi\"\ncapitalize(\"hi there\") == \"hi there\"\ncapitalize(\"\") == \"\"\ncapitalize(null) == null\n</pre>\n@param text the text to capitalize\n@return text with the first letter in upper case", "Gets the node list from string line seperate or space seperate.\n\n@param listStr\nthe list str\n@param removeDuplicate\nthe remove duplicate\n@return the node list from string line seperate or space seperate" ]
private void writeResourceAssignmentWorkgroupFields(ResourceAssignmentWorkgroupFields record) throws IOException { m_buffer.setLength(0); m_buffer.append(MPXConstants.RESOURCE_ASSIGNMENT_WORKGROUP_FIELDS_RECORD_NUMBER); m_buffer.append(m_delimiter); m_buffer.append(format(record.getMessageUniqueID())); m_buffer.append(m_delimiter); m_buffer.append(record.getConfirmed() ? "1" : "0"); m_buffer.append(m_delimiter); m_buffer.append(record.getResponsePending() ? "1" : "0"); m_buffer.append(m_delimiter); m_buffer.append(format(formatDateTimeNull(record.getUpdateStart()))); m_buffer.append(m_delimiter); m_buffer.append(format(formatDateTimeNull(record.getUpdateFinish()))); m_buffer.append(m_delimiter); m_buffer.append(format(record.getScheduleID())); stripTrailingDelimiters(m_buffer); m_buffer.append(MPXConstants.EOL); m_writer.write(m_buffer.toString()); }
[ "Write resource assignment workgroup.\n\n@param record resource assignment workgroup instance\n@throws IOException" ]
[ "There appear to be two ways of representing task notes in an MPP8 file.\nThis method tries to determine which has been used.\n\n@param task task\n@param data task data\n@param taskExtData extended task data\n@param taskVarData task var data", "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}).", "Parses all child Shapes recursively and adds them to the correct JSON\nObject\n\n@param childShapes\n@throws org.json.JSONException", "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", "Request to join a group.\n\nNote: if a group has rules, the client must display the rules to the user and the user must accept them (which is indicated by passing a true value to\nacceptRules) prior to making the join request.\n\n@param groupId\n- groupId parameter\n@param message\n- (required) message to group administrator\n@param acceptRules\n- (required) parameter indicating user has accepted groups rules", "EAP 7.1", "Get an extent aware RsIterator based on the Query\n\n@param query\n@param cld\n@param factory the Factory for the RsIterator\n@return OJBIterator", "Return whether or not the data object has a default value passed for this field of this type.", "Use this API to fetch all the bridgetable resources that are configured on netscaler." ]
public double stdev() { double m = mean(); double total = 0; final int N = getNumElements(); if( N <= 1 ) throw new IllegalArgumentException("There must be more than one element to compute stdev"); for( int i = 0; i < N; i++ ) { double x = get(i); total += (x - m)*(x - m); } total /= (N-1); return Math.sqrt(total); }
[ "Computes the unbiased standard deviation of all the elements.\n\n@return standard deviation" ]
[ "Wrap an existing setter.", "Turn this profile on or off\n\n@param enabled true or false\n@return true on success, false otherwise", "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", "Use this API to unset the properties of ntpserver resource.\nProperties that need to be unset are specified in args array.", "Use this API to delete dnsaaaarec.", "Writes the given configuration to the given file.", "Gets the health memory.\n\n@return the health memory", "Gets the data handler from event.\n\n@param event the event\n@return the data handler", "Progress info message\n\n@param tag Message that precedes progress info. Indicate 'keys' or\n'entries'." ]
public ExecutionChain setErrorCallback(ErrorCallback callback) { if (state.get() == State.RUNNING) { throw new IllegalStateException( "Invalid while ExecutionChain is running"); } errorCallback = callback; return this; }
[ "Set a callback to handle any exceptions in the chain of execution.\n\n@param callback\nInstance of {@link ErrorCallback}.\n@return Reference to the {@code ExecutionChain}\n@throws IllegalStateException\nif the chain of execution has already been {@link #execute()\nstarted}." ]
[ "Use this API to fetch auditnslogpolicy_vpnvserver_binding resources of given name .", "Reads and returns the mediator URN from the JSON content.\n\n@see #RegistrationConfig(String)", "Calculates the squared curvature of the LIBOR instantaneous variance.\n\n@param evaluationTime Time at which the product is evaluated.\n@param model A model implementing the LIBORModelMonteCarloSimulationModel\n@return The squared curvature of the LIBOR instantaneous variance (reduced a possible tolerance). The return value is &ge; 0.", "Use this API to fetch a filterglobal_filterpolicy_binding resources.", "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", "Gets a list of any tasks on this file with requested fields.\n\n@param fields optional fields to retrieve for this task.\n@return a list of tasks on this file.", "Acquire a permit for a particular node id so as to allow rebalancing\n\n@param nodeId The id of the node for which we are acquiring a permit\n@return Returns true if permit acquired, false if the permit is already\nheld by someone", "Starts or stops capturing.\n\n@param capture If true, capturing is started. If false, it is stopped.\n@param fps Capturing FPS (frames per second).", "Computes the blend weights for the given time and\nupdates them in the target." ]
public static String chomp(String s) { if(s.length() == 0) return s; int l_1 = s.length() - 1; if (s.charAt(l_1) == '\n') { return s.substring(0, l_1); } return s; }
[ "Returns the supplied string with any trailing '\\n' removed." ]
[ "Build a valid datastore URL.", "Get the authorization uri, where the user logs in.\n\n@param redirectUri\nUri the user is redirected to, after successful authorization.\nThis must be the same as specified at the Eve Online developer\npage.\n@param scopes\nScopes of the Eve Online SSO.\n@param state\nThis should be some secret to prevent XRSF, please read:\nhttp://www.thread-safe.com/2014/05/the-correct-use-of-state-\nparameter-in.html\n@return", "Returns the earlier of two dates, handling null values. A non-null Date\nis always considered to be earlier than a null Date.\n\n@param d1 Date instance\n@param d2 Date instance\n@return Date earliest date", "Run a task periodically, with a callback.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@param callback\nCallback that lets you cancel the task. {@code null} means run\nindefinitely.\n@return An interface that lets you query the status; cancel; or\nreschedule the event.", "Creates the database.\n\n@throws PlatformException If some error occurred", "Generate random velocities for every particle. The direction is obtained by assuming\nthe position of a particle as a vector. This normalised vector is scaled by\nthe speed range.\n\n@return", "Sets the top padding for all cells in the row.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining", "Load a classifier from the specified InputStream. The classifier is\nreinitialized from the flags serialized in the classifier. This does not\nclose the InputStream.\n\n@param in\nThe InputStream to load the serialized classifier from\n@param props\nThis Properties object will be used to update the\nSeqClassifierFlags which are read from the serialized classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data", "Open a database and build a set of table names.\n\n@param url database URL\n@return set containing table names" ]
private void initializeLogging() { // Since logging is static, make sure this is done only once even if // multiple clients are created (e.g., during tests) if (consoleAppender != null) { return; } consoleAppender = new ConsoleAppender(); consoleAppender.setLayout(new PatternLayout(LOG_PATTERN)); consoleAppender.setThreshold(Level.INFO); LevelRangeFilter filter = new LevelRangeFilter(); filter.setLevelMin(Level.TRACE); filter.setLevelMax(Level.INFO); consoleAppender.addFilter(filter); consoleAppender.activateOptions(); org.apache.log4j.Logger.getRootLogger().addAppender(consoleAppender); errorAppender = new ConsoleAppender(); errorAppender.setLayout(new PatternLayout(LOG_PATTERN)); errorAppender.setThreshold(Level.WARN); errorAppender.setTarget(ConsoleAppender.SYSTEM_ERR); errorAppender.activateOptions(); org.apache.log4j.Logger.getRootLogger().addAppender(errorAppender); }
[ "Sets up Log4J to write log messages to the console. Low-priority messages\nare logged to stdout while high-priority messages go to stderr." ]
[ "Write 'properties' map to given log in given level - with pipe separator between each entry\nWrite exception stack trace to 'logger' in 'error' level, if not empty\n@param logger\n@param level - of logging", "Determine whether the user has followed bean-like naming convention or not.", "Should this request URI be compressed?\n\n@param requestUri request URI\n@return true when should be compressed", "Prints a suggestion to stderr for the argument based on the levenshtein distance metric\n\n@param arg the argument which could not be assigned to a flag\n@param co the {@link ConfigOption} List where every flag is stored", "Sets the protocol.\n@param protocol The protocol to be set.", "Prints a cluster xml to a file.\n\n@param outputDirName\n@param fileName\n@param cluster", "Removes the given value to the set.\n\n@return true if the value was actually removed", "Restarts a single dyno\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param dynoId the unique identifier of the dyno to restart", "Parse JSON parameters from this request.\n\n@param jsonRequest The request in the JSON format.\n@return CmsSpellcheckingRequest object that contains parsed parameters or null, if JSON input is not well\ndefined." ]
@Override public CopticDate dateYearDay(Era era, int yearOfEra, int dayOfYear) { return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); }
[ "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}" ]
[ "Helper method for formatting connection establishment messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@return A formatted message in the format:\n\"[&lt;connectionName&gt;] remote host[&lt;host&gt;] &lt;connectionReason&gt;\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG.", "Adds a redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@param srcUrl\n@param destUrl\n@param hostHeader\n@return\n@throws Exception", "Returns the counters with keys as the first key and count as the\ntotal count of the inner counter for that key\n\n@return counter of type K1", "Process the next event in a given stream.\n@return the fully processed event\n@throws IOException if a stream is in the wrong state, IO errors can be thrown", "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)", "JSObject will return the String \"undefined\" at certain times, so we\nneed to make sure we're not getting a value that looks valid, but isn't.\n\n@param val The value from Javascript to be checked.\n@return Either null or the value passed in.", "Computes the p=2 norm. If A is a matrix then the induced norm is computed. This\nimplementation is faster, but more prone to buffer overflow or underflow problems.\n\n@param A Matrix or vector.\n@return The norm.", "Implement this to do your drawing.\n\n@param canvas the canvas on which the background will be drawn", "Gets a collection of all the email aliases for this user.\n\n<p>Note that the user's primary login email is not included in the collection of email aliases.</p>\n\n@return a collection of all the email aliases for this user." ]
private static TransportType map2TransportType(String transportId) { TransportType type; if (CXF_HTTP_TRANSPORT_ID.equals(transportId) || SOAP_HTTP_TRANSPORT_ID.equals(transportId)) { type = TransportType.HTTP; } else { type = TransportType.OTHER; } return type; }
[ "Maps a transportId to its corresponding TransportType.\n@param transportId\n@return" ]
[ "Command line method to walk the directories provided on the command line\nand print out their contents\n\n@param args Directory names", "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", "Set RGB output range.\n\n@param outRGB Range.", "Add an object into cache by key with expiration time specified\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached\n@param expiration\nthe seconds after which the object will be evicted from the cache", "Returns the path in the RFS where the Solr spellcheck files reside.\n@return String representation of Solrs spellcheck RFS path.", "Call when you are done with the client\n\n@throws Exception", "Checks the given model.\n\n@param modelDef The model\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "Emit a string event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)", "Bhattacharyya distance between two normalized histograms.\n\n@param histogram1 Normalized histogram.\n@param histogram2 Normalized histogram.\n@return The Bhattacharyya distance between the two histograms." ]
public static Map<String,String> unserializeBuildInfo(final String buildInfo) throws IOException { final ObjectMapper mapper = new ObjectMapper(); mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS); return mapper.readValue(buildInfo, new TypeReference<Map<String, Object>>(){}); }
[ "Un-serialize a Json into BuildInfo\n@param buildInfo String\n@return Map<String,String>\n@throws IOException" ]
[ "removes all data for an annotation class. This should be called after an\nannotation has been modified through the SPI", "Returns the coupon payment of the period with the given index. The analytic model is needed in case of floating bonds.\n\n@param periodIndex The index of the period of interest.\n@param model The model under which the product is valued.\n@return The value of the coupon payment in the given period.", "Convert an Image into a TYPE_INT_ARGB BufferedImage. If the image is already of this type, the original image is returned unchanged.\n@param image the image to convert\n@return the converted image", "Resets the resend counter and possibly resets the\nnode stage to DONE when previous initialization was\ncomplete.", "Returns values aggregated from all the delegates, without overriding\nvalues that already exist.\n\n@return The Map of aggregated values", "Parses the supplied text and converts it to a Long\ncorresponding to that midnight in UTC on the specified date.\n\n@return null if it fails to parsing using the specified\nDateTimeFormat", "Returns a set that contains all the unique entries of the given iterator in the order of their appearance.\nThe result set is a copy of the iterator with stable order.\n\n@param iterator\nthe iterator. May not be <code>null</code>.\n@return a set with the unique entries of the given iterator. Never <code>null</code>.", "Build list of style filters from style definitions.\n\n@param styleDefinitions\nlist of style definitions\n@return list of style filters\n@throws GeomajasException", "Compares two vectors and determines if they are numeric equals,\nindependent of its type.\n\n@param vector1\nthe first vector\n@param vector2\nthe second vector\n@return true if the vectors are numeric equals" ]
public IPv6AddressSegment join(IPv6AddressCreator creator, IPv4AddressSegment low) throws IncompatibleAddressException { int shift = IPv4Address.BITS_PER_SEGMENT; Integer prefix = getJoinedSegmentPrefixLength(shift, getSegmentPrefixLength(), low.getSegmentPrefixLength()); if(isMultiple()) { //if the high segment has a range, the low segment must match the full range, //otherwise it is not possible to create an equivalent range when joining if(!low.isFullRange()) { throw new IncompatibleAddressException(this, low, "ipaddress.error.invalidMixedRange"); } } return creator.createSegment( (getSegmentValue() << shift) | low.getSegmentValue(), (getUpperSegmentValue() << shift) | low.getUpperSegmentValue(), prefix); }
[ "Joins with another IPv4 segment to produce a IPv6 segment.\n\n@param creator\n@param low\n@return" ]
[ "Returns the full record for a single team.\n\n@param team Globally unique identifier for the team.\n@return Request object", "Creates builder for passed path element\n\n@param elementName name of xml element that is used as decorator\n@return PersistentResourceXMLBuilder\n@deprecated decorator element support is currently considered as preview\n@since 4.0", "Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder", "Use this API to fetch spilloverpolicy_lbvserver_binding resources of given name .", "Use this API to delete locationfile.", "Answer the counted size\n\n@return int", "This is generally only useful for extensions that delegate some of their functionality to other \"internal\"\nextensions of their own that they need to configure.\n\n@param configuration the configuration to be supplied with the returned analysis context.\n@return an analysis context that is a clone of this instance but its configuration is replaced with the provided\none.", "Convert an Object to a Date, without an Exception", "Inserts the currently contained data objects into the database.\n\n@param platform The (connected) database platform for inserting data\n@param model The database model\n@param batchSize The batch size; use 1 for not using batch mode" ]
public String createTorqueSchema(Properties attributes) throws XDocletException { String dbName = (String)getDocletContext().getConfigParam(CONFIG_PARAM_DATABASENAME); _torqueModel = new TorqueModelDef(dbName, _model); return ""; }
[ "Generates a torque schema for the model.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"" ]
[ "Writes and reads the XOP attachment using a CXF JAX-RS Proxy\nThe proxy automatically sets the \"mtom-enabled\" property by checking\nthe CXF EndpointProperty set on the XopAttachment interface.\n\n@throws Exception", "Extract the outline level from a task's WBS attribute.\n\n@param task Task instance\n@return outline level", "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.", "Magnitude of complex number.\n\n@param z Complex number.\n@return Magnitude of complex number.", "Decodes a signed request, returning the payload of the signed request as a Map\n@param signedRequest the value of the signed_request parameter sent by Facebook.\n@return the payload of the signed request as a Map\n@throws SignedRequestException if there is an error decoding the signed request", "Reads characters into a portion of an array, then replace invalid XML characters\n\n@throws IOException If an I/O error occurs\n@see ru.yandex.qatools.allure.config.AllureNamingUtils#isBadXmlCharacter(char) by space", "Create a new Violation for the AST node.\n@param sourceCode - the SourceCode\n@param node - the Groovy AST Node\n@param message - the message for the violation; defaults to null", "Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0", "Resolve the boot updates and register at the local HC.\n\n@param controller the model controller\n@param callback the completed callback\n@throws Exception for any error" ]
public static double[][] factorReductionUsingCommonsMath(double[][] correlationMatrix, int numberOfFactors) { // Extract factors corresponding to the largest eigenvalues double[][] factorMatrix = getFactorMatrix(correlationMatrix, numberOfFactors); // Renormalize rows for (int row = 0; row < correlationMatrix.length; row++) { double sumSquared = 0; for (int factor = 0; factor < numberOfFactors; factor++) { sumSquared += factorMatrix[row][factor] * factorMatrix[row][factor]; } if(sumSquared != 0) { for (int factor = 0; factor < numberOfFactors; factor++) { factorMatrix[row][factor] = factorMatrix[row][factor] / Math.sqrt(sumSquared); } } else { // This is a rare case: The factor reduction of a completely decorrelated system to 1 factor for (int factor = 0; factor < numberOfFactors; factor++) { factorMatrix[row][factor] = 1.0; } } } // Orthogonalized again double[][] reducedCorrelationMatrix = (new Array2DRowRealMatrix(factorMatrix).multiply(new Array2DRowRealMatrix(factorMatrix).transpose())).getData(); return getFactorMatrix(reducedCorrelationMatrix, numberOfFactors); }
[ "Returns a correlation matrix which has rank &lt; n and for which the first n factors agree with the factors of correlationMatrix.\n\n@param correlationMatrix The given correlation matrix.\n@param numberOfFactors The requested number of factors (Eigenvectors).\n@return Factor reduced correlation matrix." ]
[ "Convert event type.\n\n@param eventType the event type\n@return the event enum type", "Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.", "Returns the effective batch size. If the dialect is multiget capable and a batch size has been configured, use\nthat one, otherwise the default.", "Determines the constraints relating to a task.\n\n@param row row data\n@param task Task instance", "Transform the given bytes into an object.\n\n@param bytes The bytes to construct the object from\n@return The object constructed", "Rename an existing app.\n@param appName Existing app name. See {@link #listApps()} for names that can be used.\n@param newName New name to give the existing app.\n@return the new name of the object", "Adds the correct load instruction based on the type descriptor\n\n@param code the bytecode to add the instruction to\n@param type the type of the variable\n@param variable the variable number", "add a new producer, either synchronous or asynchronous, connecting\nto the specified broker\n\n@param broker broker to producer", "Calculate power of a complex number.\n\n@param z1 Complex Number.\n@param n Power.\n@return Returns a new complex number containing the power of a specified number." ]
public static String stringify(ObjectMapper mapper, Object object) { try { return mapper.writeValueAsString(object); } catch (JsonProcessingException e) { throw new IllegalArgumentException(e); } }
[ "Takes an object and converts it to a string.\n\n@param mapper the object mapper\n@param object the object to convert\n@return json string" ]
[ "Use this API to fetch all the auditmessages resources that are configured on netscaler.\nThis uses auditmessages_args which is a way to provide additional arguments while fetching the resources.", "Reads and returns the mediator URN from the JSON content.\n\n@see #RegistrationConfig(String)", "Use this API to update clusternodegroup.", "Formats a percentage value.\n\n@param number MPXJ percentage value\n@return Primavera percentage value", "Checks if the given group of statements contains the given value as the\nvalue of a main snak of some statement.\n\n@param statementGroup\nthe statement group to scan\n@param value\nthe value to scan for\n@return true if value was found", "Given a year, month, and day, find the number of occurrences of that day in the month\n\n@param year the year\n@param month the month\n@param day the day\n@return the number of occurrences of the day in the month", "Removes a design document using the id and rev from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}", "Produce an iterator over the input values in sorted order. Sorting will\noccur in the fixed space configured in the constructor, data will be\ndumped to disk as necessary.\n\n@param input An iterator over the input values\n@return An iterator over the values", "1-D Double array to integer array.\n\n@param array Double array.\n@return Integer array." ]
private InputValue getInputValue(FormInput input) { /* Get the DOM element from Selenium. */ WebElement inputElement = browser.getWebElement(input.getIdentification()); switch (input.getType()) { case TEXT: case PASSWORD: case HIDDEN: case SELECT: case TEXTAREA: return new InputValue(inputElement.getAttribute("value")); case RADIO: case CHECKBOX: default: String value = inputElement.getAttribute("value"); Boolean checked = inputElement.isSelected(); return new InputValue(value, checked); } }
[ "Generates the InputValue for the form input by inspecting the current\nvalue of the corresponding WebElement on the DOM.\n\n@return The current InputValue for the element on the DOM." ]
[ "A smoothed step function. A cubic function is used to smooth the step between two thresholds.\n@param a the lower threshold position\n@param b the upper threshold position\n@param x the input parameter\n@return the output value", "Associate a type with the given resource model.", "Retrieve a value from the map, ensuring that a key exists in the map\nwith the specified name.\n\n@param name column name\n@return column value", "Write a relation list field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.", "Report all Java ClassFile files available on the class path within\nthe specified packages and sub packages.\n\n@see #detect(File...)", "Gets a list of AssignmentRows based on the current Assignments\n@return", "Returns the names of the involved fields when post processing.\n\n@return the names of the involved fields", "Removes any configured observers.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}" ]
@Override public void removeStorageEngine(StorageEngine<ByteArray, byte[], byte[]> engine) { String storeName = engine.getName(); BdbStorageEngine bdbEngine = (BdbStorageEngine) engine; synchronized(lock) { // Only cleanup the environment if it is per store. We cannot // cleanup a shared 'Environment' object if(useOneEnvPerStore) { Environment environment = this.environments.get(storeName); if(environment == null) { // Nothing to clean up. return; } // Remove from the set of unreserved stores if needed. if(this.unreservedStores.remove(environment)) { logger.info("Removed environment for store name: " + storeName + " from unreserved stores"); } else { logger.info("No environment found in unreserved stores for store name: " + storeName); } // Try to delete the BDB directory associated File bdbDir = environment.getHome(); if(bdbDir.exists() && bdbDir.isDirectory()) { String bdbDirPath = bdbDir.getPath(); try { FileUtils.deleteDirectory(bdbDir); logger.info("Successfully deleted BDB directory : " + bdbDirPath + " for store name: " + storeName); } catch(IOException e) { logger.error("Unable to delete BDB directory: " + bdbDirPath + " for store name: " + storeName); } } // Remove the reference to BdbEnvironmentStats, which holds a // reference to the Environment BdbEnvironmentStats bdbEnvStats = bdbEngine.getBdbEnvironmentStats(); this.aggBdbStats.unTrackEnvironment(bdbEnvStats); // Unregister the JMX bean for Environment if(voldemortConfig.isJmxEnabled()) { ObjectName name = JmxUtils.createObjectName(JmxUtils.getPackageName(bdbEnvStats.getClass()), storeName); // Un-register the environment stats mbean JmxUtils.unregisterMbean(name); } // Cleanup the environment environment.close(); this.environments.remove(storeName); logger.info("Successfully closed the environment for store name : " + storeName); } } }
[ "Clean up the environment object for the given storage engine" ]
[ "Parse a duration in minutes form a number of hours.\n\n@param value String representation\n@return Integer instance", "This method calculates the total amount of working time in a single\nday, which intersects with the supplied time range.\n\n@param hours collection of working hours in a day\n@param startDate time range start\n@param endDate time range end\n@return length of time in milliseconds", "Initializes custom prefix for all junit4 properties. This must be consistent\nacross all junit4 invocations if done from the same classpath. Use only when REALLY needed.", "get all parts of module name apart from first", "Method generates abbreviated exception message.\n\n@param message\nOriginal log message\n@param throwable\nThe attached throwable\n@return Abbreviated exception message", "Given a date represented by a Calendar instance, set the time\ncomponent of the date based on the hours and minutes of the\ntime supplied by the Date instance.\n\n@param cal Calendar instance representing the date\n@param time Date instance representing the time of day", "Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected", "absolute for advancedJDBCSupport\n@param row", "Use this API to delete route6." ]
public void setAngle(float angle) { this.angle = angle; float cos = (float) Math.cos(angle); float sin = (float) Math.sin(angle); m00 = cos; m01 = sin; m10 = -sin; m11 = cos; }
[ "Specifies the angle of the effect.\n\n@param angle the angle of the effect.\n@angle" ]
[ "Method used to create missing timephased data.\n\n@param file project file\n@param assignment resource assignment\n@param timephasedPlanned planned timephased data\n@param timephasedComplete complete timephased data", "Formats a date or a time according to the local conventions.\n\nSince ReadablePartials don't support all fields, we fill in any blanks\nneeded for formatting by using the epoch (1970-01-01T00:00:00Z).\n\nSee {@link android.text.format.DateUtils#formatDateTime} for full docs.\n\n@param context the context is required only if the time is shown\n@param time a point in time\n@param flags a bit mask of formatting options\n@return a string containing the formatted date/time.", "Handle changes of the series check box.\n@param event the change event.", "This functions reads SAM flowId and sets it\nas message property for subsequent store in CallContext\n@param message", "Mojos perform different dependency resolution, so we add dependencies for each mojo.", "Populates the project header.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException", "Append the html-code to finish a html mail message to the given buffer.\n\n@param buffer The StringBuffer to add the html code to.", "Add a LIKE clause so the column must mach the value using '%' patterns.", "Generic method to extract Primavera fields and assign to MPXJ fields.\n\n@param map map of MPXJ field types and Primavera field names\n@param row Primavera data container\n@param container MPXJ data contain" ]
@Override public int getShadowSize() { Element shadowElement = shadow.getElement(); shadowElement.setScrollTop(10000); return shadowElement.getScrollTop(); }
[ "Returns the size of the shadow element" ]
[ "Generate a groupId tree regarding the filters\n\n@param moduleId\n@return TreeNode", "Remove a tag from a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param tagId\nThe tag ID\n@throws FlickrException", "Performs a variety of tests to see if the provided matrix is a valid\ncovariance matrix.\n\n@return 0 = is valid 1 = failed positive diagonal, 2 = failed on symmetry, 2 = failed on positive definite", "Returns the Field for a given parent class and a dot-separated path of\nfield names.\n\n@param clazz\nParent class.\n@param path\nPath to the desired field.", "Adds OPT_J | OPT_JSON option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Returns the arguments as a list in their command line form.\n\n@return the arguments for the command line", "Write a short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at", "Serialize a content into a targeted file, checking that the parent directory exists.\n\n@param folder File\n@param content String\n@param fileName String", "Generates a change event for a local update of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param update the update specifier.\n@return a change event for a local update of a document in the given namespace referring\nto the given document _id." ]
public Try<R,Throwable> execute(T input){ return Try.withCatch( ()->transactionTemplate.execute(status-> transaction.apply(input))); }
[ "Execute the transactional flow - catch all exceptions\n\n@param input Initial data input\n@return Try that represents either success (with result) or failure (with errors)" ]
[ "Read task data from a Gantt Designer file.\n\n@param gantt Gantt Designer file", "Create a clone of this LevenbergMarquardt optimizer with a new vector for the\ntarget values and weights.\n\nThe clone will use the same objective function than this implementation,\ni.e., the implementation of {@link #setValues(RandomVariable[], RandomVariable[])} and\nthat of {@link #setDerivatives(RandomVariable[], RandomVariable[][])} is reused.\n\nThe initial values of the cloned optimizer will either be the original\ninitial values of this object or the best parameters obtained by this\noptimizer, the latter is used only if this optimized signals a {@link #done()}.\n\n@param newTargetVaues New list of target values.\n@param newWeights New list of weights.\n@param isUseBestParametersAsInitialParameters If true and this optimizer is done(), then the clone will use this.{@link #getBestFitParameters()} as initial parameters.\n@return A new LevenbergMarquardt optimizer, cloning this one except modified target values and weights.\n@throws CloneNotSupportedException Thrown if this optimizer cannot be cloned.", "Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions.", "Gets the object whose index is the integer argument.\n\n@param i the integer index to be queried for the corresponding argument\n@return the object whose index is the integer argument.", "Show books.\n\n@param booksList the books list", "Adds a new Pie Slice to the PieChart. After inserting and calculation of the highlighting color\na complete recalculation is initiated.\n\n@param _Slice The newly added PieSlice.", "Make superclasses method protected??", "Computes eigenvalues only\n\n@return", "Process any StepEvent. You can change last added to stepStorage\nstep using this method.\n\n@param event to process" ]
private String quoteFormatCharacters(String literal) { StringBuilder sb = new StringBuilder(); int length = literal.length(); char c; for (int loop = 0; loop < length; loop++) { c = literal.charAt(loop); switch (c) { case '0': case '#': case '.': case '-': case ',': case 'E': case ';': case '%': { sb.append("'"); sb.append(c); sb.append("'"); break; } default: { sb.append(c); break; } } } return (sb.toString()); }
[ "This method is used to quote any special characters that appear in\nliteral text that is required as part of the currency format.\n\n@param literal Literal text\n@return literal text with special characters in quotes" ]
[ "Gets a method based on data in the override_db table\n\n@param overrideId ID of override\n@return Method found", "Stops this progress bar.", "Build all children.\n\n@return the child descriptions", "Returns the Set of entities recognized by this Classifier.\n\n@return The Set of entities recognized by this Classifier.", "Provides a reverse view on the given list which is especially useful to traverse a list backwards in a for-each\nloop. The list itself is not modified by calling this method.\n\n@param list\nthe list whose elements should be traversed in reverse. May not be <code>null</code>.\n@return a list with the same elements as the given list, in reverse", "Return the list of module ancestors\n\n@param moduleName\n@param moduleVersion\n@return List<Dependency>\n@throws GrapesCommunicationException", "Creates a map between a calendar ID and a list of\nwork pattern assignment rows.\n\n@param rows work pattern assignment rows\n@return work pattern assignment map", "Removes each of the specified followers from the task if they are\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to remove followers from.\n@return Request object", "Determines the feature state\n\n@param context the template context\n@param tag the tag\n@param attributeName the attribute name\n@param attributeValue the attribute value\n@param defaultState the default state if the expression evaluates to null\n@return the feature state" ]
public static ModelNode createListDeploymentsOperation() { final ModelNode op = createOperation(READ_CHILDREN_NAMES); op.get(CHILD_TYPE).set(DEPLOYMENT); return op; }
[ "Creates an operation to list the deployments.\n\n@return the operation" ]
[ "Use this API to delete systemuser of given name.", "Use this API to unset the properties of snmpmanager resource.\nProperties that need to be unset are specified in args array.", "Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nunless we have a metadata cache available for the specified media slot, in which case that will be used instead.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n\n@return the metadata, if any", "Set sizes to override the generated URLs of the different sizes.\n\n@param sizes\n@see com.flickr4java.flickr.photos.PhotosInterface#getSizes(String)", "Expands all tabs into spaces. Assumes the CharSequence represents a single line of text.\n\n@param self A line to expand\n@param tabStop The number of spaces a tab represents\n@return The expanded toString() of this CharSequence\n@see #expandLine(String, int)\n@since 1.8.2", "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", "Returns the compression type of this kind of dump file using file suffixes\n\n@param fileName the name of the file\n@return compression type\n@throws IllegalArgumentException\nif the given dump file type is not known", "Performs a delete operation with the specified composite request object\n\n@param deleteRequestObject Composite request object containing the key to\ndelete\n@return true if delete was successful. False otherwise", "Creates a document for the resource without extracting the content. The aim is to get a content indexed,\neven if extraction runs into a timeout.\n\n@return the document for the resource generated if the content is discarded,\ni.e., only meta information are indexed." ]
public PhotoContext getContext(String photoId, String userId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_CONTEXT); parameters.put("photo_id", photoId); parameters.put("user_id", userId); Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Collection<Element> payload = response.getPayloadCollection(); PhotoContext photoContext = new PhotoContext(); for (Element element : payload) { String elementName = element.getTagName(); if (elementName.equals("prevphoto")) { Photo photo = new Photo(); photo.setId(element.getAttribute("id")); photoContext.setPreviousPhoto(photo); } else if (elementName.equals("nextphoto")) { Photo photo = new Photo(); photo.setId(element.getAttribute("id")); photoContext.setNextPhoto(photo); } else { if (logger.isInfoEnabled()) { logger.info("unsupported element name: " + elementName); } } } return photoContext; }
[ "Returns next and previous favorites for a photo in a user's favorites\n\n@param photoId\nThe photo id\n@param userId\nThe user's ID\n@see <a href=\"http://www.flickr.com/services/api/flickr.favorites.getContext.html\">flickr.favorites.getContext</a>" ]
[ "Generate node data map.\n\n@param task\nthe job info", "Select a List of values from a Matcher using a Collection\nto identify the indices to be selected.\n\n@param self a Matcher\n@param indices a Collection of indices\n@return a String of the values at the given indices\n@since 1.6.0", "Over simplistic helper to compare two strings to check radio buttons.\n\n@param value1 the first value\n@param value2 the second value\n@return \"checked\" if both values are equal, the empty String \"\" otherwise", "Create a plan. The plan consists of batches. Each batch involves the\nmovement of no more than batchSize primary partitions. The movement of a\nsingle primary partition may require migration of other n-ary replicas,\nand potentially deletions. Migrating a primary or n-ary partition\nrequires migrating one partition-store for every store hosted at that\npartition.", "Set the week day.\n@param weekDayStr the week day to set.", "Converts the suggestions from the Solrj format to JSON format.\n\n@param response The SpellCheckResponse object containing the spellcheck results.\n@return The spellcheck suggestions as JSON object or null if something goes wrong.", "Creates and start an engine representing the node named as the given parameter.\n\n@param name\nname of the node, as present in the configuration (case sensitive)\n@param handler\ncan be null. A set of callbacks hooked on different engine life cycle events.\n@return an object allowing to stop the engine.", "Gets the specified SPI, using the current thread context classloader\n\n@param <T> type of spi class\n@param spiType spi class to retrieve\n@return object", "Count the number of non-zero elements in V" ]
private void processChildTasks(Task task, MapRow row) throws IOException { List<MapRow> tasks = row.getRows("TASKS"); if (tasks != null) { for (MapRow childTask : tasks) { processTask(task, childTask); } } }
[ "Extract child task data.\n\n@param task MPXJ task\n@param row Synchro task data" ]
[ "Suite end.", "Returns an attribute's map value from this JAR's manifest's main section.\nThe attributes string value will be split on whitespace into map entries, and each entry will be split on '=' to get the key-value pair.\nThe returned map may be safely modified.\n\n@param name the attribute's name", "Enable a host\n\n@param hostName\n@throws Exception", "Checks if the specified longitude is correct.\n\n@param name the name of the longitude field\n@param longitude the value of the longitude field\n@return the longitude", "Generates the cache key for Online links.\n@param cms the current CmsObject\n@param targetSiteRoot the target site root\n@param detailPagePart the detail page part\n@param absoluteLink the absolute (site-relative) link to the resource\n@return the cache key", "Log a message line to the output.", "Report on the filtered data in DMR .", "Convert a Java date into a Planner date.\n\n20070222\n\n@param value Java Date instance\n@return Planner date", "Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder" ]
private static BundleCapability getExportedPackage(BundleContext context, String packageName) { List<BundleCapability> packages = new ArrayList<BundleCapability>(); for (Bundle bundle : context.getBundles()) { BundleRevision bundleRevision = bundle.adapt(BundleRevision.class); for (BundleCapability packageCapability : bundleRevision.getDeclaredCapabilities(BundleRevision.PACKAGE_NAMESPACE)) { String pName = (String) packageCapability.getAttributes().get(BundleRevision.PACKAGE_NAMESPACE); if (pName.equalsIgnoreCase(packageName)) { packages.add(packageCapability); } } } Version max = Version.emptyVersion; BundleCapability maxVersion = null; for (BundleCapability aPackage : packages) { Version version = (Version) aPackage.getAttributes().get("version"); if (max.compareTo(version) <= 0) { max = version; maxVersion = aPackage; } } return maxVersion; }
[ "Return the BundleCapability of a bundle exporting the package packageName.\n\n@param context The BundleContext\n@param packageName The package name\n@return the BundleCapability of a bundle exporting the package packageName" ]
[ "Propagate onEnter events to listeners\n@param hit collision object", "Given a string with method or package name, creates a Class Name with no\nspaces and first letter lower case\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name", "Register the given callback as to be executed after request completion.\n\n@param name The name of the bean.\n@param callback The callback of the bean to be executed for destruction.", "Operators which affect the variables to its left and right", "Internal method for recursivly searching for a class descriptor that avoids\nclass loading when we already have a class object.\n\n@param clazz The class whose descriptor we need to find\n@return ClassDescriptor for <code>clazz</code> or <code>null</code>\nif no ClassDescriptor could be located.", "Update the underlying buffer using the short\n\n@param number number to be stored in checksum buffer", "A final cluster ought to be a super set of current cluster. I.e.,\nexisting node IDs ought to map to same server, but partition layout can\nhave changed and there may exist new nodes.\n\n@param currentCluster\n@param finalCluster", "Returns the key of the entity targeted by the represented association, retrieved from the given tuple.\n\n@param tuple the tuple from which to retrieve the referenced entity key\n@return the key of the entity targeted by the represented association", "Process a single criteria block.\n\n@param list parent criteria list\n@param block current block" ]
public void addDependency(final Dependency dependency) { if(dependency != null && !dependencies.contains(dependency)){ this.dependencies.add(dependency); } }
[ "Add a dependency to the module.\n\n@param dependency Dependency" ]
[ "AND operation which takes the previous clause and the next clause and AND's them together.", "Pretty-print the object.", "Closes off all connections in all partitions.", "Process the next event in a given stream.\n@return the fully processed event\n@throws IOException if a stream is in the wrong state, IO errors can be thrown", "Removes all resources deployed using this class.", "Acquire the exclusive lock, with a max wait timeout to acquire.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the timeout scalar quantity.\n@param unit - see {@code TimeUnit} for quantities.\n@return {@code boolean} true on successful acquire.\n@throws InterruptedException - if the acquiring thread was interrupted.\n@throws IllegalArgumentException if {@code permit} is null.", "Ensures that the element is child element of the parent element.\n\n@param parentElement the parent xml dom element\n@param childElement the child element\n@throws SpinXmlElementException if the element is not child of the parent element", "Close a transaction and do all the cleanup associated with it.", "Create a new custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object" ]
public ItemRequest<Workspace> update(String workspace) { String path = String.format("/workspaces/%s", workspace); return new ItemRequest<Workspace>(this, Workspace.class, path, "PUT"); }
[ "A specific, existing workspace can be updated by making a PUT request on\nthe URL for that workspace. Only the fields provided in the data block\nwill be updated; any unspecified fields will remain unchanged.\n\nCurrently the only field that can be modified for a workspace is its `name`.\n\nReturns the complete, updated workspace record.\n\n@param workspace The workspace to update.\n@return Request object" ]
[ "Normalizes the name so it can be used as Maven artifactId or groupId.", "Calls afterMaterialization on all registered listeners in the reverse\norder of registration.", "Resize picture to desired size.\n\n@param width Desired width.\n@param height Desired height.\n@throws IllegalArgumentException if {@code width} or {@code height} is less than 0 or both are\n0.", "Initializes the service.\n\nStores the <code>Service.Context</code> in instance variables and calls the {@link #init()} method.\n\n@param context Service context.\n@return The list of configuration issues found during initialization, an empty list if none.", "Called when the pattern has changed.", "Processes the template for all columns of the current table index.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "get the converted object corresponding to sourceObject as converted to\ndestination type by converter\n\n@param converter\n@param sourceObject\n@param destinationType\n@return", "Set the correct day for the date with year and month already fixed.\n@param date the date, where year and month are already correct.", "Returns list of files matches specified regex in specified directories\n\n@param regex to match file names\n@param directories to find\n@return list of files matches specified regex in specified directories" ]
@Override public void sendResponse(StoreStats performanceStats, boolean isFromLocalZone, long startTimeInMs) throws Exception { ChannelBuffer responseContent = ChannelBuffers.dynamicBuffer(this.responseValue.length); responseContent.writeBytes(responseValue); // 1. Create the Response object HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK); // 2. Set the right headers response.setHeader(CONTENT_TYPE, "binary"); response.setHeader(CONTENT_TRANSFER_ENCODING, "binary"); // 3. Copy the data into the payload response.setContent(responseContent); response.setHeader(CONTENT_LENGTH, response.getContent().readableBytes()); if(logger.isDebugEnabled()) { logger.debug("Response = " + response); } // Write the response to the Netty Channel this.messageEvent.getChannel().write(response); if(performanceStats != null && isFromLocalZone) { recordStats(performanceStats, startTimeInMs, Tracked.GET); } }
[ "Sends a normal HTTP response containing the serialization information in\na XML format" ]
[ "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()", "Deletes an entity by its primary key.\n\n@param id\nPrimary key of the entity.", "compute Sin using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "get TypeSignature given the signature\n\n@param typeSignature\n@param useInternalFormFullyQualifiedName\nif true, fqn in parameterizedTypeSignature must be in the form\n'java/lang/Thread'. If false fqn must be of the form\n'java.lang.Thread'\n@return", "Creates a scatter query from the given user query\n\n@param query the user's query.\n@param numSplits the number of splits to create.", "Use this API to fetch all the tmsessionparameter resources that are configured on netscaler.", "Create a JsonParser for a given json node.\n@param jsonNode the json node\n@return the json parser\n@throws IOException", "Provides a RunAs client login context", "Returns the root path for this source file, based upon the package name.\n\nFor example, if path is \"/project/src/main/java/org/example/Foo.java\" and the package is \"org.example\", then this\nshould return \"/project/src/main/java\".\n\nReturns null if the folder structure does not match the package name." ]
public static GVRCameraRig makeInstance(GVRContext gvrContext) { final GVRCameraRig result = gvrContext.getApplication().getDelegate().makeCameraRig(gvrContext); result.init(gvrContext); return result; }
[ "Constructs a camera rig with cameras attached. An owner scene object is automatically\ncreated for the camera rig.\n\nDo not try to change the owner object of the camera rig - not supported currently and will\nlead to native crashes." ]
[ "Read metadata by populating an instance of the target class\nusing SAXParser.", "Get the type created by selecting only a subset of properties from this\ntype. The type must be a map for this to work\n\n@param properties The properties to select\n@return The new type definition", "Determines whether the given array only contains unbounded type variables or Object.class.\n\n@param types the given array of types\n@return true if and only if the given array only contains unbounded type variables or Object.class", "Get a property as an long or throw an exception.\n\n@param key the property name", "Check if the given color string can be parsed.\n\n@param colorString The color to parse.", "Given a DocumentVersionInfo, returns a BSON document representing the next version. This means\nand incremented version count for a non-empty version, or a fresh version document for an\nempty version.\n@return a BsonDocument representing a synchronization version", "Traces the duration between origin time in the http Request and time just\nbefore being processed by the fat client\n\n@param operationType\n@param originTimeInMS - origin time in the Http Request\n@param requestReceivedTimeInMs - System Time in ms\n@param keyString", "Maps the text representation of column data to Java types.\n\n@param table table name\n@param column column name\n@param data text representation of column data\n@param type column data type\n@param epochDateFormat true if date is represented as an offset from an epoch\n@return Java representation of column data\n@throws MPXJException", "Parse a command line with the defined command as base of the rules.\nIf any options are found, but not defined in the command object an\nCommandLineParserException will be thrown.\nAlso, if a required option is not found or options specified with value,\nbut is not given any value an CommandLineParserException will be thrown.\n\n@param line input\n@param mode parser mode" ]
public static RowColumn toRowColumn(Key key) { if (key == null) { return RowColumn.EMPTY; } if ((key.getRow() == null) || key.getRow().getLength() == 0) { return RowColumn.EMPTY; } Bytes row = ByteUtil.toBytes(key.getRow()); if ((key.getColumnFamily() == null) || key.getColumnFamily().getLength() == 0) { return new RowColumn(row); } Bytes cf = ByteUtil.toBytes(key.getColumnFamily()); if ((key.getColumnQualifier() == null) || key.getColumnQualifier().getLength() == 0) { return new RowColumn(row, new Column(cf)); } Bytes cq = ByteUtil.toBytes(key.getColumnQualifier()); if ((key.getColumnVisibility() == null) || key.getColumnVisibility().getLength() == 0) { return new RowColumn(row, new Column(cf, cq)); } Bytes cv = ByteUtil.toBytes(key.getColumnVisibility()); return new RowColumn(row, new Column(cf, cq, cv)); }
[ "Converts from an Accumulo Key to a Fluo RowColumn\n\n@param key Key\n@return RowColumn" ]
[ "Process the graphical indicator data.", "Set an outline code value.\n\n@param index outline code index (1-10)\n@param value outline code value", "Generates a Map of query parameters for Module regarding the filters\n\n@return Map<String, Object>", "Set the named arguments.\n\n@param vars\nthe new named arguments", "Resolve the given class if it is a primitive class,\nreturning the corresponding primitive wrapper type instead.\n@param clazz the class to check\n@return the original class, or a primitive wrapper for the original primitive type", "Get a random sample of k out of n elements.\n\nSee Algorithm S, D. E. Knuth, The Art of Computer Programming, Vol. 2, p.142.", "This static method calculated the rho of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The rho of the option", "Require that the namespace of the current element matches the required namespace.\n\n@param reader the reader\n@param requiredNs the namespace required\n@throws XMLStreamException if the current namespace does not match the required namespace", "Clear out our DAO caches." ]
public static double getRobustTreeEditDistance(String dom1, String dom2) { LblTree domTree1 = null, domTree2 = null; try { domTree1 = getDomTree(dom1); domTree2 = getDomTree(dom2); } catch (IOException e) { e.printStackTrace(); } double DD = 0.0; RTED_InfoTree_Opt rted; double ted; rted = new RTED_InfoTree_Opt(1, 1, 1); // compute tree edit distance rted.init(domTree1, domTree2); int maxSize = Math.max(domTree1.getNodeCount(), domTree2.getNodeCount()); rted.computeOptimalStrategy(); ted = rted.nonNormalizedTreeDist(); ted /= (double) maxSize; DD = ted; return DD; }
[ "Get a scalar value for the DOM diversity using the Robust Tree Edit Distance\n\n@param dom1\n@param dom2\n@return" ]
[ "This method allows a subsection of a byte array to be copied.\n\n@param data source data\n@param offset offset into the source data\n@param size length of the source data to copy\n@return new byte array containing copied data", "Expands the directories from the given list and and returns a list of subfiles.\nFiles from the original list are kept as is.", "Writes a vInt directly to a byte array\n\n@param dest The destination array for the vInt to be written to\n@param offset The location where to write the vInt to\n@param i The Value being written into byte array\n@return Returns the new offset location", "Send a device found announcement to all registered listeners.\n\n@param announcement the message announcing the new device", "Get the time zone for a specific stock or index.\nFor stocks, the exchange suffix is extracted from the stock symbol to retrieve the time zone.\n\n@param symbol stock symbol in YahooFinance\n@return time zone of the exchange on which this stock is traded", "Creates a new CRFDatum from the preprocessed allData format, given the\ndocument number, position number, and a List of Object labels.\n\n@return A new CRFDatum", "Get the days difference", "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\"", "Send an event to other applications\n\n@param context context in which to send the broadcast\n@param event event to send" ]
public static String trim(String s, int maxWidth) { if (s.length() <= maxWidth) { return (s); } return (s.substring(0, maxWidth)); }
[ "Returns s if it's at most maxWidth chars, otherwise chops right side to fit." ]
[ "Create users for the given array of addresses. The passwords will be set to the email addresses.\n\n@param greenMail Greenmail instance to create users for\n@param addresses Addresses", "Confirms a user with the given token and token id.\n\n@param token the confirmation token.\n@param tokenId the id of the confirmation token.\n@return A {@link Task} that completes when confirmation completes/fails.", "Use this API to disable vserver of given name.", "Returns the locale specified by the named scoped attribute or context\nconfiguration parameter.\n\n<p> The named scoped attribute is searched in the page, request,\nsession (if valid), and application scope(s) (in this order). If no such\nattribute exists in any of the scopes, the locale is taken from the\nnamed context configuration parameter.\n\n@param pageContext the page in which to search for the named scoped\nattribute or context configuration parameter\n@param name the name of the scoped attribute or context configuration\nparameter\n\n@return the locale specified by the named scoped attribute or context\nconfiguration parameter, or <tt>null</tt> if no scoped attribute or\nconfiguration parameter with the given name exists", "Copy the specified bytes into a new array\n\n@param array The array to copy from\n@param from The index in the array to begin copying from\n@param to The least index not copied\n@return A new byte[] containing the copied bytes", "This filter adds rounded corners to the image using the specified color as the background.\n\n@param radiusInner amount of pixels to use as radius.\n@param radiusOuter specifies the second value for the ellipse used for the radius. Use 0 for\nno value.\n@param color fill color for clipped region.", "Save the current file as the given type.\n\n@param file target file\n@param type file type", "set proper expression text invoking the DJCRosstabMeasurePrecalculatedTotalProvider for the cell\n@param auxRows\n@param auxCols\n@param measureExp\n@param djmeasure\n@param crosstabColumn\n@param crosstabRow\n@param meausrePrefix", "Returns the optional query modifier.\n@return the optional query modifier." ]
public static void moveBandsElemnts(int yOffset, JRDesignBand band) { if (band == null) return; for (JRChild jrChild : band.getChildren()) { JRDesignElement elem = (JRDesignElement) jrChild; elem.setY(elem.getY() + yOffset); } }
[ "Moves the elements contained in \"band\" in the Y axis \"yOffset\"\n@param yOffset\n@param band" ]
[ "Returns an iterator equivalent to this iterator with all duplicated items removed\nby using the default comparator. The original iterator will become\nexhausted of elements after determining the unique values. A new iterator\nfor the unique values will be returned.\n\n@param self an Iterator\n@return the modified Iterator\n@since 1.5.5", "Generate a path select string\n\n@return Select query string", "Set the locking values\n@param cld\n@param obj\n@param oldLockingValues", "Bessel function of the second kind, of order n.\n\n@param n Order.\n@param x Value.\n@return Y value.", "Returns all model classes registered on this datasource\n\n@return model classes talk to this datasource", "Use this API to fetch nsacl6 resource of given name .", "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", "Creates PollingState from another polling state.\n\n@param other other polling state\n@param result the final result of the LRO\n@param <ResultT> the result that the poll operation produces\n@return the polling state", "Query zipcode from Yahoo to find associated WOEID" ]
public void printExtraClasses(RootDoc root) { Set<String> names = new HashSet<String>(classnames.keySet()); for(String className: names) { ClassInfo info = getClassInfo(className, true); if (info.nodePrinted) continue; ClassDoc c = root.classNamed(className); if(c != null) { printClass(c, false); continue; } // Handle missing classes: Options opt = optionProvider.getOptionsFor(className); if(opt.matchesHideExpression(className)) continue; w.println(linePrefix + "// " + className); w.print(linePrefix + info.name + "[label="); externalTableStart(opt, className, classToUrl(className)); innerTableStart(); String qualifiedName = qualifiedName(opt, className); int startTemplate = qualifiedName.indexOf('<'); int idx = qualifiedName.lastIndexOf('.', startTemplate < 0 ? qualifiedName.length() - 1 : startTemplate); if(opt.postfixPackage && idx > 0 && idx < (qualifiedName.length() - 1)) { String packageName = qualifiedName.substring(0, idx); String cn = qualifiedName.substring(idx + 1); tableLine(Align.CENTER, Font.CLASS.wrap(opt, escape(cn))); tableLine(Align.CENTER, Font.PACKAGE.wrap(opt, packageName)); } else { tableLine(Align.CENTER, Font.CLASS.wrap(opt, escape(qualifiedName))); } innerTableEnd(); externalTableEnd(); if (className == null || className.length() == 0) w.print(",URL=\"" + classToUrl(className) + "\""); nodeProperties(opt); } }
[ "Print classes that were parts of relationships, but not parsed by javadoc" ]
[ "Request a database sends a list of UUIDs.\n\n@param count The count of UUIDs.", "Use this API to delete dnstxtrec.", "Use this API to add vpath.", "Set the current playback position. This method can only be used in situations where the component is\ntied to a single player, and therefore always has a single playback position.\n\nWill cause part of the component to be redrawn if the position has\nchanged. This will be quickly overruled if a player is being monitored, but\ncan be used in other contexts.\n\n@param milliseconds how far into the track has been played\n\n@see #setPlaybackState", "Use this API to fetch all the lbvserver resources that are configured on netscaler.", "Returns the primary port of the server.\n\n@return the primary {@link ServerPort} if the server is started. {@link Optional#empty()} otherwise.", "Removes an element from the observation matrix.\n\n@param index which element is to be removed", "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.", "Sets a configuration option to the specified value." ]
public final void notifyFooterItemMoved(int fromPosition, int toPosition) { if (fromPosition < 0 || toPosition < 0 || fromPosition >= footerItemCount || toPosition >= footerItemCount) { throw new IndexOutOfBoundsException("The given fromPosition " + fromPosition + " or toPosition " + toPosition + " is not within the position bounds for footer items [0 - " + (footerItemCount - 1) + "]."); } notifyItemMoved(fromPosition + headerItemCount + contentItemCount, toPosition + headerItemCount + contentItemCount); }
[ "Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position." ]
[ "Defines how messages should be logged. This method can be modified to\nrestrict the logging messages that are shown on the console or to change\ntheir formatting. See the documentation of Log4J for details on how to do\nthis.", "Generates the body of a toString method that uses a StringBuilder and a separator variable.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\noptional, we have no choice but to track the separators at runtime, as apart from the first\none, all properties will need to have a comma prepended. We could do this with a boolean,\nmaybe called \"separatorNeeded\", or \"firstValueOutput\", but then we need either a ternary\noperator or an extra nested if block. More readable is to use an initially-empty \"separator\"\nstring, which has a comma placed in it once the first value is written.\n\n<p>For extra tidiness, we note that the first if block need not try writing the separator\n(it is always empty), and the last one need not update it (it will not be used again).", "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.", "Set new list data set\n@param list new data set", "Calls the specified Stitch function.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pass to the Stitch function.\n@param requestTimeout the number of milliseconds the client should wait for a response from the\nserver before failing with an error.", "Read the projects from a ConceptDraw PROJECT file as top level tasks.\n\n@param cdp ConceptDraw PROJECT file", "This method returns the value it is passed, or null if the value\nmatches the nullValue argument.\n\n@param value value under test\n@param nullValue return null if value under test matches this value\n@return value or null", "Reads GIF image from stream.\n\n@param is containing GIF file.\n@return read status code (0 = no errors).", "Converts from a Fluo RowColumn to a Accumulo Key\n\n@param rc RowColumn\n@return Key" ]
public double[][] getPositionsAsArray(){ double[][] posAsArr = new double[size()][3]; for(int i = 0; i < size(); i++){ if(get(i)!=null){ posAsArr[i][0] = get(i).x; posAsArr[i][1] = get(i).y; posAsArr[i][2] = get(i).z; } else{ posAsArr[i] = null; } } return posAsArr; }
[ "Converts the positions to a 2D double array\n@return 2d double array [i][j], i=Time index, j=coordinate index" ]
[ "Calculates the tiles width and height.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile width and the second value is the\ntile height.", "This method must be called on the stop of the component. Stop the directory monitor and unregister all the\ndeclarations.", "Helper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry.", "Inserts a single document locally and being to synchronize it based on its _id. Inserting\na document with the same _id twice will result in a duplicate key exception.\n\n@param namespace the namespace to put the document in.\n@param document the document to insert.", "Returns the steps instances associated to CandidateSteps\n\n@param candidateSteps\nthe List of CandidateSteps\n@return The List of steps instances", "Validate arguments.", "Parser for forecast\n\n@param feed\n@return", "Parse a string representation of a Boolean value.\n\n@param value string representation\n@return Boolean value", "Joins the given parts to recover the original secret.\n\n<p><b>N.B.:</b> There is no way to determine whether or not the returned value is actually the\noriginal secret. If the parts are incorrect, or are under the threshold value used to split the\nsecret, a random value will be returned.\n\n@param parts a map of part IDs to part values\n@return the original secret\n@throws IllegalArgumentException if {@code parts} is empty or contains values of varying\nlengths" ]
public static <T> SessionBean<T> of(BeanAttributes<T> attributes, InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl beanManager, EnhancedAnnotatedType<T> type) { return new SessionBeanImpl<T>(attributes, type, ejbDescriptor, new StringBeanIdentifier(SessionBeans.createIdentifier(type, ejbDescriptor)), beanManager); }
[ "Creates a simple, annotation defined Enterprise Web Bean using the annotations specified on type\n\n@param <T> The type\n@param beanManager the current manager\n@param type the AnnotatedType to use\n@return An Enterprise Web Bean" ]
[ "Detect and apply waves, now or when the widget is attached.\n\n@param widget target widget to ensure is attached first", "a small static helper to set the image from the imageHolder nullSave to the imageView\n\n@param imageHolder\n@param imageView\n@param tag used to identify imageViews and define different placeholders\n@return true if an image was set", "Gets the appropriate cache dir\n\n@param ctx\n@return", "Get a property as a double or throw an exception.\n\n@param key the property name", "Bessel function of the second kind, of order 1.\n\n@param x Value.\n@return Y value.", "Converts the given hash code into an index into the\nhash table.", "Create a style from a list of rules.\n\n@param styleRules the rules", "Stops the server. This method does nothing if the server is stopped already.", "Use this API to fetch all the vlan resources that are configured on netscaler." ]
public void setVertexBuffer(GVRVertexBuffer vbuf) { if (vbuf == null) { throw new IllegalArgumentException("Vertex buffer cannot be null"); } mVertices = vbuf; NativeMesh.setVertexBuffer(getNative(), vbuf.getNative()); }
[ "Changes the vertex buffer associated with this mesh.\n@param vbuf new vertex buffer to use\n@see #setVertices(float[])\n@see #getVertexBuffer()\n@see #getVertices()" ]
[ "True if deleted, false if not found.", "Parses chroot section of Zookeeper connection string\n\n@param zookeepers Zookeeper connection string\n@return Returns root path or \"/\" if none found", "Generate a sql where-clause matching the contraints defined by the array of fields\n\n@param columns array containing all columns used in WHERE clause", "Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master.", "This method allows nested tasks to be added, with the WBS being\ncompleted automatically.\n\n@return new task", "Reads and returns the mediator URN from the JSON content.\n\n@see #RegistrationConfig(String)", "Convert a floating point date to a LocalDateTime.\n\nNote: This method currently performs a rounding to the next second.\n\nIf referenceDate is null, the method returns null.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param floatingPointDate The value to the time offset \\( t \\).\n@return The date resulting from adding Math.round(fixingTime*SECONDS_PER_DAY) seconds to referenceDate, where one day has SECONDS_PER_DAY seconds and SECONDS_PER_DAY is a constant 365*24*60*60", "Use this API to fetch all the vridparam resources that are configured on netscaler.", "Marks inbox message as read for given messageId\n@param messageId String messageId\n@return boolean value depending on success of operation" ]
public void assertGLThread() { if (Thread.currentThread().getId() != mGLThreadID) { RuntimeException e = new RuntimeException( "Should not run GL functions from a non-GL thread!"); e.printStackTrace(); throw e; } }
[ "Throws an exception if the current thread is not a GL thread.\n\n@since 1.6.5" ]
[ "Print work units.\n\n@param value TimeUnit instance\n@return work units value", "Type variables are not supported.\n\n@param value\n@return the type", "Assigns retention policy with givenID to folder or enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param assignTo object representing folder or enterprise to assign policy to.\n@return info about created assignment.", "Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.", "Writes back hints file.", "Destroys the context", "Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() method on the JavascriptEnum\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property.", "Creates an element that represents a single page.\n@return the resulting DOM element", "Takes an HTML file, looks for the first instance of the specified insertion point, and\ninserts the diagram image reference and a client side map in that point." ]
public static <T, ID> int dropTable(ConnectionSource connectionSource, DatabaseTableConfig<T> tableConfig, boolean ignoreErrors) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); Dao<T, ID> dao = DaoManager.createDao(connectionSource, tableConfig); if (dao instanceof BaseDaoImpl<?, ?>) { return doDropTable(databaseType, connectionSource, ((BaseDaoImpl<?, ?>) dao).getTableInfo(), ignoreErrors); } else { tableConfig.extractFieldTypes(databaseType); TableInfo<T, ID> tableInfo = new TableInfo<T, ID>(databaseType, tableConfig); return doDropTable(databaseType, connectionSource, tableInfo, ignoreErrors); } }
[ "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." ]
[ "lookup a ClassDescriptor in the internal Hashtable\n@param strClassName a fully qualified class name as it is returned by Class.getName().", "Gets the event type from message.\n\n@param message the message\n@return the event type", "Use this API to fetch all the sslocspresponder resources that are configured on netscaler.", "Return true if the processor of the node has previously been executed.\n\n@param processorGraphNode the node to test.", "Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default.", "Checks to see within the flags if a reload, i.e. not a full restart, is required.\n\n@param flags the flags to check\n\n@return {@code true} if a reload is required, otherwise {@code false}", "Add image in the document.\n\n@param context\nPDF context\n@param imageResult\nimage\n@throws BadElementException\nPDF construction problem\n@throws IOException\nPDF construction problem", "Computes the p=1 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.", "Permanently close the ClientRequestExecutor pool. Resources subsequently\nchecked in will be destroyed." ]
@Override public void close() throws VoldemortException { logger.debug("Close called for read-only store."); this.fileModificationLock.writeLock().lock(); try { if(isOpen) { this.isOpen = false; fileSet.close(); } else { logger.debug("Attempt to close already closed store " + getName()); } } finally { this.fileModificationLock.writeLock().unlock(); } }
[ "Close the store." ]
[ "Display a Notification message\n@param event", "Lists the buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.", "Returns the intersection of sets s1 and s2.", "Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p", "Returns an integer array that contains the default values for all the\ntexture parameters.\n\n@return an integer array that contains the default values for all the\ntexture parameters.", "The full path of a jrxml file, or the path in the classpath of a jrxml\nresource.\n\n@param path\n@return", "Use this API to add dospolicy resources.", "Removes the specified entry point\n\n@param controlPoint The entry point", "Use this API to fetch all the gslbservice resources that are configured on netscaler." ]
public static CrashReport fromJson(String json) throws IllegalArgumentException { try { return new CrashReport(json); } catch (JSONException je) { throw new IllegalArgumentException(je.toString()); } }
[ "Exports json encoded content to CrashReport object\n\n@param json valid json body.\n@return new instance of CrashReport" ]
[ "Assign FK value to target object by reading PK values of referenced object.\n\n@param targetObject real (non-proxy) target object\n@param cld {@link ClassDescriptor} of the real target object\n@param rds An {@link ObjectReferenceDescriptor} or {@link CollectionDescriptor}\nassociated with the real object.\n@param referencedObject referenced object or proxy\n@param insert Show if \"linking\" is done while insert or update.", "This method is called to format a relation list.\n\n@param value relation list instance\n@return formatted relation list", "Convenience method for setting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field to set.\n@param value\nValue to which to set the field.", "Mbeans for FETCH_ENTRIES", "Use this API to save cacheobject.", "Show a toast-like message for the specified duration\n\n@param message\n@param duration in seconds", "Runs Crawljax with the given configuration.\n\n@return The {@link CrawlSession} once the Crawl is done.", "Refresh children using read-resource operation.", "Use this API to add nsacl6 resources." ]
public boolean measureAll(List<Widget> measuredChildren) { boolean changed = false; for (int i = 0; i < mContainer.size(); ++i) { if (!isChildMeasured(i)) { Widget child = measureChild(i, false); if (child != null) { if (measuredChildren != null) { measuredChildren.add(child); } changed = true; } } } if (changed) { postMeasurement(); } return changed; }
[ "Measure all children from container if needed\n@param measuredChildren the list of measured children\nmeasuredChildren list can be passed as null if it's not needed to\ncreate the list of the measured items\n@return true if the layout was recalculated, otherwise - false" ]
[ "B = -A. Changes the sign of elements in A and stores it in B. A and B can be the same instance.\n\n@param A (Input) Matrix. Not modified.\n@param B (Output) Matrix. Modified.", "Calculate the start variance.\n\n@return start variance", "By default all bean archives see each other.", "Obtain all groups\n\n@return All Groups", "Saves the favorites.\n\n@param favorites the list of favorites to save\n@throws CmsException if something goes wrong", "Old SOAP client uses new SOAP service", "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", "Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException", "Get the spatial object from the cache.\n\n@param key key to get object for\n@param type type of object which should be returned\n@return object for key or null if object does not exist or is a different type" ]
public static base_response disable(nitro_service client, nsfeature resource) throws Exception { nsfeature disableresource = new nsfeature(); disableresource.feature = resource.feature; return disableresource.perform_operation(client,"disable"); }
[ "Use this API to disable nsfeature." ]
[ "Load a list of entities using the information in the context\n\n@param session The session\n@param lockOptions The locking details\n@param ogmContext The context with the information to load the entities\n@return the list of entities corresponding to the given context", "get the property source method corresponding to given destination\nproperty\n\n@param sourceObject\n@param destinationObject\n@param destinationProperty\n@return", "Use this API to unset the properties of protocolhttpband resource.\nProperties that need to be unset are specified in args array.", "Print a percent complete value.\n\n@param value Double instance\n@return percent complete value", "Try to provide an escaped, ready-to-use shell line to repeat a given command line.", "Mirrors the given bitmap", "performs a primary key lookup operation against RDBMS and materializes\nan object from the resulting row. Only skalar attributes are filled from\nthe row, references are not resolved.\n@param oid contains the primary key info.\n@param cld ClassDescriptor providing mapping information.\n@return the materialized object, null if no matching row was found or if\nany error occured.", "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)", "Handles adding a key. Calls the registered listener and wraps it's method in some GUI adjustments." ]
public double distance(Vector3d v) { double dx = x - v.x; double dy = y - v.y; double dz = z - v.z; return Math.sqrt(dx * dx + dy * dy + dz * dz); }
[ "Returns the Euclidean distance between this vector and vector v.\n\n@return distance between this vector and v" ]
[ "Read the table headers. This allows us to break the file into chunks\nrepresenting the individual tables.\n\n@param is input stream\n@return list of tables in the file", "Randomly generates matrix with the specified number of non-zero elements filled with values from min to max.\n\n@param numRows Number of rows\n@param numCols Number of columns\n@param nz_total Total number of non-zero elements in 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", "Utility function to set the current value in a ListBox.\n\n@return returns true if the option corresponding to the value\nwas successfully selected in the ListBox", "Deploys application reading resources from specified URLs\n\n@param applicationName to configure in cluster\n@param urls where resources are read\n@return the name of the application\n@throws IOException", "1-D Gaussian function.\n\n@param x value.\n@return Function's value at point x.", "Creates the publish button.\n\n@param updateListener the update listener\n@return the publish button", "Use this API to unlink sslcertkey resources.", "Converts the Conditionals into real headers.\n@return real headers.", "Sets up this object to represent an argument that will be set to a\nconstant value.\n\n@param constantValue the constant value." ]
public static ModelNode addCurrentServerGroupsToHostInfoModel(boolean ignoreUnaffectedServerGroups, Resource hostModel, ModelNode model) { if (!ignoreUnaffectedServerGroups) { return model; } model.get(IGNORE_UNUSED_CONFIG).set(ignoreUnaffectedServerGroups); addServerGroupsToModel(hostModel, model); return model; }
[ "Used by the slave host when creating the host info dmr sent across to the DC during the registration process\n\n@param ignoreUnaffectedServerGroups whether the slave host is set up to ignore config for server groups it does not have servers for\n@param hostModel the resource containing the host model\n@param model the dmr sent across to theDC\n@return the modified dmr" ]
[ "Use this API to fetch all the ipset resources that are configured on netscaler.", "Enable the use of the given controller type by\nadding it to the cursor controller types list.\n@param controllerType GVRControllerType to add to the list", "Parse a list of Photos from given Element.\n\n@param photosElement\n@return PhotoList", "Find the style filter that must be applied to this feature.\n\n@param feature\nfeature to find the style for\n@param styles\nstyle filters to select from\n@return a style filter", "Retrieves a thumbnail, or smaller image representation, of this file. Sizes of 32x32, 64x64, 128x128,\nand 256x256 can be returned in the .png format and sizes of 32x32, 94x94, 160x160, and 320x320 can be returned\nin the .jpg format.\n\n@param fileType either PNG of JPG\n@param minWidth minimum width\n@param minHeight minimum height\n@param maxWidth maximum width\n@param maxHeight maximum height\n@return the byte array of the thumbnail image", "True if a CharSequence only contains whitespace characters.\n\n@param self The CharSequence to check the characters in\n@return true If all characters are whitespace characters\n@see #isAllWhitespace(String)\n@since 1.8.2", "Writes a buffered some-value restriction.\n\n@param propertyUri\nURI of the property to which the restriction applies\n@param rangeUri\nURI of the class or datatype to which the restriction applies\n@param bnode\nblank node representing the restriction\n@throws RDFHandlerException\nif there was a problem writing the RDF triples", "Append data to JSON response.\n@param param\n@param value", "Fetches the current online data for the given item, and fixes the\nprecision of integer quantities if necessary.\n\n@param itemIdValue\nthe id of the document to inspect\n@param propertyId\nid of the property to consider" ]
private void reorder() { if(getTransaction().isOrdering() && needsCommit && mhtObjectEnvelopes.size() > 1) { ObjectEnvelopeOrdering ordering = new ObjectEnvelopeOrdering(mvOrderOfIds, mhtObjectEnvelopes); ordering.reorder(); Identity[] newOrder = ordering.getOrdering(); mvOrderOfIds.clear(); for(int i = 0; i < newOrder.length; i++) { mvOrderOfIds.add(newOrder[i]); } } }
[ "Reorder the objects in the table to resolve referential integrity dependencies." ]
[ "Returns the specified process time out in milliseconds.\n\n@return The process time out in milliseconds.", "Return a logger associated with a particular class name.", "Specifies the maximum capacity of the counter.\n\n@param capacity\n<code>long</code>\n@throws IllegalArgumentException\nif windowMillis is less than 1.", "This method can be called to ensure that the IDs of all\nentities are sequential, and start from an\nappropriate point. If entities are added to and removed from\nthis list, then the project is loaded into Microsoft\nproject, if the ID values have gaps in the sequence, there will\nbe blank rows shown.", "Whether the rows of the given association should be stored in a hash using the single row key column as key or\nnot.", "Wait for the read side to close. Used when the writer needs to know when\nthe reader finishes consuming a message.", "This method extracts data for a single resource from a Planner file.\n\n@param plannerResource Resource data", "Sums up the square of each element in the matrix. This is equivalent to the\nFrobenius norm squared.\n\n@param m Matrix.\n@return Sum of elements squared.", "Sets a new config and clears the previous cache" ]
private void addMembersInclSupertypes(Collection memberNames, HashMap members, XClass type, String tagName, String paramName, String paramValue) throws XDocletException { addMembers(memberNames, members, type, tagName, paramName, paramValue); if (type.getInterfaces() != null) { for (Iterator it = type.getInterfaces().iterator(); it.hasNext(); ) { addMembersInclSupertypes(memberNames, members, (XClass)it.next(), tagName, paramName, paramValue); } } if (!type.isInterface() && (type.getSuperclass() != null)) { addMembersInclSupertypes(memberNames, members, type.getSuperclass(), tagName, paramName, paramValue); } }
[ "Retrieves the members of the type and of its super types.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the MembersInclSupertypes attribute\n@param paramValue The feature to be added to the MembersInclSupertypes attribute\n@throws XDocletException If an error occurs" ]
[ "Ranks a map based on integer values\n@param inputMap Input\n@return The ranked map", "Given a GanttProject priority value, turn this into an MPXJ Priority instance.\n\n@param gpPriority GanttProject priority\n@return Priority instance", "called periodically to check that the heartbeat has been received\n\n@return {@code true} if we have received a heartbeat recently", "Sets the specified float attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Parses the list of query items for the query facet.\n@param queryFacetObject JSON object representing the node with the query facet.\n@return list of query options\n@throws JSONException if the list cannot be parsed.", "Returns the \"msgCount\" belief\n\n@return int - the count", "Retrieve all addresses of a host by it's address. NetBIOS hosts can\nhave many names for a given IP address. The name and IP address make the\nNetBIOS address. This provides a way to retrieve the other names for a\nhost with the same IP address.\n\n@param addr the address to query\n@throws UnknownHostException if address cannot be resolved", "Returns the naming context.", "Tokenizes the input file and extracts the required data.\n\n@param is input stream\n@throws MPXJException" ]
public List<Cluster> cluster(final Collection<Point2D> points) { final List<Cluster> clusters = new ArrayList<Cluster>(); final Map<Point2D, PointStatus> visited = new HashMap<Point2D, DBScan.PointStatus>(); KDTree<Point2D> tree = new KDTree<Point2D>(2); // Populate the kdTree for (final Point2D point : points) { double[] key = {point.x, point.y}; tree.insert(key, point); } for (final Point2D point : points) { if (visited.get(point) != null) { continue; } final List<Point2D> neighbors = getNeighbors(point, tree); if (neighbors.size() >= minPoints) { // DBSCAN does not care about center points final Cluster cluster = new Cluster(clusters.size()); clusters.add(expandCluster(cluster, point, neighbors, tree, visited)); } else { visited.put(point, PointStatus.NOISE); } } for (Cluster cluster : clusters) { cluster.calculateCentroid(); } return clusters; }
[ "Performs DBSCAN cluster analysis.\n\n@param points the points to cluster\n@return the list of clusters\n@throws NullArgumentException if the data points are null" ]
[ "Receive some bytes from the player we are requesting metadata from.\n\n@param is the input stream associated with the player metadata socket.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response", "Adds OPT_U | OPT_URL option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Search down all extent classes and return max of all found\nPK values.", "Sets whether an individual list value is selected.\n\n@param value the value of the item to be selected or unselected\n@param selected <code>true</code> to select the item", "Creates a Parameter\n\n@param name the name\n@param value the value, or <code>null</code>\n@return a name-value pair representing the arguments", "Return the max bounds of the layer as envelope.\n\n@param layer the layer to get envelope from\n@return Envelope the envelope", "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", "Overridden 'consume' method. Corresponding parent method will be called necessary number of times\n\n@param initialVars - a map containing the initial variables assignments\n@return the number of lines written", "Use this API to delete application." ]
public void setColorForTotal(int row, int column, Color color){ int mapC = (colors.length-1) - column; int mapR = (colors[0].length-1) - row; colors[mapC][mapR]=color; }
[ "Sets the color for the big total between the column and row\n@param row row index (starting from 1)\n@param column column index (starting from 1)\n@param color" ]
[ "Reads basic summary details from the project properties.\n\n@param file MPX file", "checks whether the specified Object obj is write-locked by Transaction tx.\n@param tx the transaction\n@param obj the Object to be checked\n@return true if lock exists, else false", "Extracts the column from a matrix.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column.", "Loads a CRF classifier from a filepath, and returns it.\n\n@param file\nFile to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data", "Reads a stringtemplate group from a stream.\n\nThis will always return a group (empty if necessary), even if reading it from the stream fails.\n\n@param stream the stream to read from\n@return the string template group", "To sql pattern.\n\n@param attribute the attribute\n@return the string", "Instantiates an instance of input Java shader class,\nwhich must be derived from GVRShader or GVRShaderTemplate.\n@param id Java class which implements shaders of this type.\n@param ctx GVRContext shader belongs to\n@return GVRShader subclass which implements this shader type", "Uploads a new large file.\n@param boxApi the API connection to be used by the upload session.\n@param folderId the id of the folder in which the file will be uploaded.\n@param stream the input stream that feeds the content of the file.\n@param url the upload session URL.\n@param fileName the name of the file to be created.\n@param fileSize the total size of the file.\n@return the created file instance.\n@throws InterruptedException when a thread gets interupted.\n@throws IOException when reading a stream throws exception.", "Configure all UI elements in the exceptions panel." ]
@SuppressWarnings("unchecked") private static void parseProperties(JSONObject modelJSON, Shape current, Boolean keepGlossaryLink) throws JSONException { if (modelJSON.has("properties")) { JSONObject propsObject = modelJSON.getJSONObject("properties"); Iterator<String> keys = propsObject.keys(); Pattern pattern = Pattern.compile(jsonPattern); while (keys.hasNext()) { StringBuilder result = new StringBuilder(); int lastIndex = 0; String key = keys.next(); String value = propsObject.getString(key); if (!keepGlossaryLink) { Matcher matcher = pattern.matcher(value); while (matcher.find()) { String id = matcher.group(1); current.addGlossaryIds(id); String text = matcher.group(2); result.append(text); lastIndex = matcher.end(); } result.append(value.substring(lastIndex)); value = result.toString(); } current.putProperty(key, value); } } }
[ "create a HashMap form the json properties and add it to the shape\n@param modelJSON\n@param current\n@throws org.json.JSONException" ]
[ "Remove the listener active in this session.\n\n@param listenerId the id of the listener to remove", "Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement", "Features are only cacheable when not converted lazily as lazy features are incomplete, it would put detached\nobjects in the cache.\n\n@return true when features are not converted lazily", "With the QR algorithm it is possible for the found singular values to be native. This\nmakes them all positive by multiplying it by a diagonal matrix that has", "Add an additional SSExtension\n@param ssExt the ssextension to set", "Convert from Hadoop Text to Bytes", "Gets the name for the getter for this property\n\n@return The name of the property. The name is \"get\"+ the capitalized propertyName\nor, in the case of boolean values, \"is\" + the capitalized propertyName", "Loads the properties file using the classloader provided. Creating a string from the properties\n\"user.agent.name\" and \"user.agent.version\".\n@param loader The class loader to use to load the resource.\n@param filename The name of the file to load.\n@return A string that represents the first part of the UA string eg java-cloudant/2.6.1", "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" ]
private ModelNode resolveSubsystems(final List<ModelNode> extensions) { HostControllerLogger.ROOT_LOGGER.debug("Applying extensions provided by master"); final ModelNode result = operationExecutor.installSlaveExtensions(extensions); if (!SUCCESS.equals(result.get(OUTCOME).asString())) { throw HostControllerLogger.ROOT_LOGGER.failedToAddExtensions(result.get(FAILURE_DESCRIPTION)); } final ModelNode subsystems = new ModelNode(); for (final ModelNode extension : extensions) { extensionRegistry.recordSubsystemVersions(extension.asString(), subsystems); } return subsystems; }
[ "Resolve the subsystem versions.\n\n@param extensions the extensions to install\n@return the subsystem versions" ]
[ "Creates an immutable map. A copy of the given map is used. As a result, it is safe to modify the source map afterwards.\n\n@param map the given map\n@return an immutable map", "Returns the end time of the event.\n@return the end time of the event.", "Accessor method used to retrieve a Number instance representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails", "Use this API to renumber nspbr6 resources.", "Gets an item that was shared with a password-protected shared link.\n@param api the API connection to be used by the shared item.\n@param sharedLink the shared link to the item.\n@param password the password for the shared link.\n@return info about the shared item.", "Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string.", "Look-up the results data for a particular test class.", "Calculates the length of the next block of RTF data.\n\n@param text RTF data\n@param offset current offset into this data\n@return block length", "Add assignments to the tree.\n\n@param parentNode parent tree node\n@param file assignments container" ]
public CollectionRequest<Task> projects(String task) { String path = String.format("/tasks/%s/projects", task); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
[ "Returns a compact representation of all of the projects the task is in.\n\n@param task The task to get projects on.\n@return Request object" ]
[ "Should only called on a column that is being set to null.\n\nReturns the most outer embeddable containing {@code column} that is entirely null.\nReturn null otherwise i.e. not embeddable.\n\nThe implementation lazily compute the embeddable state and caches it.\nThe idea behind the lazy computation is that only some columns will be set to null\nand only in some situations.\nThe idea behind caching is that an embeddable contains several columns, no need to recompute its state.", "Append the Parameter\nAdd the place holder ? or the SubQuery\n@param value the value of the criteria", "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.", "Checks whether a character sequence matches against a specified pattern or not.\n\n@param pattern\npattern, that the {@code chars} must correspond to\n@param chars\na readable sequence of {@code char} values which should match the given pattern\n@return {@code true} when {@code chars} matches against the passed {@code pattern}, otherwise {@code false}", "Stop announcing ourselves and listening for status updates.", "Get random geographical location\n@return 2-Tuple of ints (latitude, longitude)", "Use this API to fetch a cmpglobal_cmppolicy_binding resources.", "Lookup a PortComponentMetaData by wsdl-port local part\n\n@param name - the wsdl-port local part\n@return PortComponentMetaData if found, null otherwise", "Checks if there's exactly one option that exists among all opts.\n\n@param options OptionSet to checked\n@param opts List of options to be checked\n@throws VoldemortException" ]
public boolean isFinished(final ProcessorGraphNode processorGraphNode) { this.processorLock.lock(); try { return this.executedProcessors.containsKey(processorGraphNode.getProcessor()); } finally { this.processorLock.unlock(); } }
[ "Return true if the processor of the node has previously been executed.\n\n@param processorGraphNode the node to test." ]
[ "Post a license to the server\n\n@param license\n@param user\n@param password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "1-D Forward Discrete Cosine Transform.\n\n@param data Data.", "Sets divider padding for axis. If axis does not match the orientation, it has no effect.\n@param padding\n@param axis {@link Axis}", "performs a primary key lookup operation against RDBMS and materializes\nan object from the resulting row. Only skalar attributes are filled from\nthe row, references are not resolved.\n@param oid contains the primary key info.\n@param cld ClassDescriptor providing mapping information.\n@return the materialized object, null if no matching row was found or if\nany error occured.", "Checks if class package match provided list of package locators\n\n@param classPackageName\nname of class package\n@return true if class package is on the {@link #packageLocators} list", "Fetches the current online data for the given item, and fixes the\nprecision of integer quantities if necessary.\n\n@param itemIdValue\nthe id of the document to inspect\n@param propertyId\nid of the property to consider", "Generates a set of HTML files that contain data about the outcome of\nthe specified test suites.\n@param suites Data about the test runs.\n@param outputDirectoryName The directory in which to create the report.", "Add a polygon symbolizer definition to the rule.\n\n@param styleJson The old style.", "Returns a new color with a new value of the specified HSL\ncomponent." ]
private static long createLongSeed(byte[] seed) { if (seed == null || seed.length != SEED_SIZE_BYTES) { throw new IllegalArgumentException("Java RNG requires a 64-bit (8-byte) seed."); } return BinaryUtils.convertBytesToLong(seed, 0); }
[ "Helper method to convert seed bytes into the long value required by the\nsuper class." ]
[ "Dumps a single material property to stdout.\n\n@param property the property", "Get the class name without the package\n\n@param c The class name with package\n@return the class name without the package", "Perform construction with custom thread pool size.", "Stores the gathered usage statistics about property uses to a CSV file.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use", "returns &gt; 0 when o1 is more specific than o2,\n\nreturns == 0 when o1 and o2 are equal or unrelated,\n\nreturns &lt; 0 when o2 is more specific than o1,", "Parses the list of query items for the query facet.\n@param queryFacetObject JSON object representing the node with the query facet.\n@return list of query options\n@throws JSONException if the list cannot be parsed.", "Removes the specified objects.\n\n@param collection The collection to remove.", "Removes an Object from the cache.", "Set an enterprise text value.\n\n@param index text index (1-40)\n@param value text value" ]
private Send handle(SelectionKey key, Receive request) { final short requestTypeId = request.buffer().getShort(); final RequestKeys requestType = RequestKeys.valueOf(requestTypeId); if (requestLogger.isTraceEnabled()) { if (requestType == null) { throw new InvalidRequestException("No mapping found for handler id " + requestTypeId); } String logFormat = "Handling %s request from %s"; requestLogger.trace(format(logFormat, requestType, channelFor(key).socket().getRemoteSocketAddress())); } RequestHandler handlerMapping = requesthandlerFactory.mapping(requestType, request); if (handlerMapping == null) { throw new InvalidRequestException("No handler found for request"); } long start = System.nanoTime(); Send maybeSend = handlerMapping.handler(requestType, request); stats.recordRequest(requestType, System.nanoTime() - start); return maybeSend; }
[ "Handle a completed request producing an optional response" ]
[ "Produces an IPv4 address section from any sequence of bytes in this IPv6 address section\n\n@param startIndex the byte index in this section to start from\n@param endIndex the byte index in this section to end at\n@throws IndexOutOfBoundsException\n@return\n\n@see #getEmbeddedIPv4AddressSection()\n@see #getMixedAddressSection()", "Computes execution time\n@param extra", "The Baseline Start field shows the planned beginning date for a task at\nthe time you saved a baseline. Information in this field becomes available\nwhen you set a baseline.\n\n@return Date", "Determines whether the specified permission is permitted.\n\n@param permission\n@return <tt>false<tt> if the specified permission is not permitted, based on the current security policy; <tt>true<tt> otherwise", "Retrieve and validate the zone id value from the REST request.\n\"X-VOLD-Zone-Id\" is the zone id header.\n\n@return valid zone id or -1 if there is no/invalid zone id", "If this node represents a bean property this method returns all annotations of its getter.\n\n@return A set of annotations of this nodes property getter or an empty set.", "Convert the server side feature to a DTO feature that can be sent to the client.\n\n@param feature\nThe server-side feature representation.\n@param featureIncludes\nIndicate which aspects of the should be included see {@link VectorLayerService}\n@return Returns the DTO feature.", "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.", "Initialise an extension module's extensions in the extension registry\n\n@param extensionRegistry the extension registry\n@param module the name of the module containing the extensions\n@param rootRegistration The parent registration of the extensions. For a server or domain.xml extension, this will be the root resource registration. For a host.xml extension, this will be the host resource registration\n@param extensionRegistryType The type of the registry" ]
protected void parseBracketCreateMatrix(TokenList tokens, Sequence sequence) { List<TokenList.Token> left = new ArrayList<TokenList.Token>(); TokenList.Token t = tokens.getFirst(); while( t != null ) { TokenList.Token next = t.next; if( t.getSymbol() == Symbol.BRACKET_LEFT ) { left.add(t); } else if( t.getSymbol() == Symbol.BRACKET_RIGHT ) { if( left.isEmpty() ) throw new RuntimeException("No matching left bracket for right"); TokenList.Token start = left.remove(left.size() - 1); // Compute everything inside the [ ], this will leave a // series of variables and semi-colons hopefully TokenList bracketLet = tokens.extractSubList(start.next,t.previous); parseBlockNoParentheses(bracketLet, sequence, true); MatrixConstructor constructor = constructMatrix(bracketLet); // define the matrix op and inject into token list Operation.Info info = Operation.matrixConstructor(constructor); sequence.addOperation(info.op); tokens.insert(start.previous, new TokenList.Token(info.output)); // remove the brackets tokens.remove(start); tokens.remove(t); } t = next; } if( !left.isEmpty() ) throw new RuntimeException("Dangling ["); }
[ "Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together" ]
[ "Sets the specified many-to-one attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Get interfaces implemented by clazz\n\n@param clazz\n@return", "Access an attribute.\n\n@param type the attribute's type, not {@code null}\n@param key the attribute's key, not {@code null}\n@return the attribute value, or {@code null}.", "Commit an upload session after all parts have been uploaded, creating the new file or the version.\n@param digest the base64-encoded SHA-1 hash of the file being uploaded.\n@param parts the list of uploaded parts to be committed.\n@param attributes the key value pairs of attributes from the file instance.\n@param ifMatch ensures that your app only alters files/folders on Box if you have the current version.\n@param ifNoneMatch ensure that it retrieve unnecessary data if the most current version of file is on-hand.\n@return the created file instance.", "Apply the necessary rotation to the transform so that it is in front of\nthe camera. The actual rotation is performed not using the yaw angle but\nusing equivalent quaternion values for better accuracy. But the yaw angle\nis still returned for backward compatibility.\n\n@param widget The transform to modify.\n@return The camera's yaw in degrees.", "Used for DI frameworks to inject values into stages.", "Add a dependency to this node.\n\n@param node the dependency to add.", "Get all Groups\n\n@return\n@throws Exception", "Returns all the deployment runtime names associated with an overlay accross all server groups.\n\n@param context the current OperationContext.\n@param overlay the name of the overlay.\n@return all the deployment runtime names associated with an overlay accross all server groups." ]
public void edit(int currentChangeListId, FilePath filePath) throws Exception { establishConnection().editFile(currentChangeListId, new File(filePath.getRemote())); }
[ "Opens file for editing.\n\n@param currentChangeListId The current change list id to open the file for editing at\n@param filePath The filePath which contains the file we need to edit\n@throws IOException Thrown in case of perforce communication errors\n@throws InterruptedException" ]
[ "Writes a resource assignment to a PM XML file.\n\n@param mpxj MPXJ ResourceAssignment instance", "Parse the URI and get all the parameters in map form. Query name -&gt; List of Query values.\n\n@param rawQuery query portion of the uri to analyze.", "Find Flickr Places information by Place URL.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link PlacesInterface#getInfoByUrl(String)} instead.\n@param flickrPlacesUrl\n@return A Location\n@throws FlickrException", "Creates a scenario with 3 different steps classes.\n\nTo share state between the different steps instances use the\n{@link com.tngtech.jgiven.annotation.ScenarioState} annotation\n\n@param givenClass the Given steps class\n@param whenClass the When steps class\n@param thenClass the Then steps class\n@return the new scenario", "Returns true if required properties for FluoClient are set", "Sets the proxy class to be used.\n@param newProxyClass java.lang.Class", "Get the beat grids available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the beat grids associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the BeatGridFinder is not running", "Compute 1-dimensional Perlin noise.\n@param x the x value\n@return noise value at x in the range -1..1", "Select this tab item." ]
public static final boolean setSelectedValue(ListBox list, String value, boolean addMissingValues) { if (value == null) { list.setSelectedIndex(0); return false; } else { int index = findValueInListBox(list, value); if (index >= 0) { list.setSelectedIndex(index); return true; } if (addMissingValues) { list.addItem(value, value); // now that it's there, search again index = findValueInListBox(list, value); list.setSelectedIndex(index); return true; } return false; } }
[ "Utility function to set the current value in a ListBox.\n\n@return returns true if the option corresponding to the value\nwas successfully selected in the ListBox" ]
[ "Used only for unit testing. Please do not use this method in other ways.\n\n@param key\n@return\n@throws Exception", "Authenticate with the target database using OAuth.\n\n@param consumerSecret consumer secret\n@param consumerKey consumer key\n@param tokenSecret token secret\n@param token token\n@return this Replication instance to set more options\n@deprecated OAuth 1.0 implementation has been <a href=\"http://docs.couchdb.org/en/stable/whatsnew/2.1.html?highlight=oauth#upgrade-notes\"\ntarget=\"_blank\">removed in CouchDB 2.1</a>", "Checks that the data starting at startLocRecord looks like a local file record header.\n\n@param channel the channel\n@param startLocRecord offset into channel of the start of the local record\n@param compressedSize expected compressed size of the file, or -1 to indicate this isn't known", "Extract definition records from the table and divide into groups.", "For running queries embebed in the report design\n\n@param dr\n@param layoutManager\n@param con\n@param _parameters\n@return\n@throws JRException", "Retrieve the ordinal text for a given integer.\n\n@param value integer value\n@return ordinal text", "Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5", "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", "Called from the native side\n@param eye" ]
public static appfwpolicylabel_policybinding_binding[] get(nitro_service service, String labelname) throws Exception{ appfwpolicylabel_policybinding_binding obj = new appfwpolicylabel_policybinding_binding(); obj.set_labelname(labelname); appfwpolicylabel_policybinding_binding response[] = (appfwpolicylabel_policybinding_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch appfwpolicylabel_policybinding_binding resources of given name ." ]
[ "Determines whether a project has the specified publisher type, wrapped by the \"Flexible Publish\" publisher.\n@param project The project\n@param type The type of the publisher\n@return true if the project contains a publisher of the specified type wrapped by the \"Flexible Publish\" publisher.", "Find the fields in which the Activity ID and Activity Type are stored.", "Sets an argument to the collection of arguments. This guarantees only one value will be assigned to the\nargument key.\n\n@param argument the argument to add", "Returns a TypeConverter for a given class.\n\n@param cls The class for which the TypeConverter should be fetched.", "Returns the data sources belonging to a particular group of data\nsources. Data sources are grouped in record linkage mode, but not\nin deduplication mode, so only use this method in record linkage\nmode.", "Converts a date to an instance date bean.\n@return the instance date bean.", "Generate a sql where-clause matching the contraints defined by the array of fields\n\n@param columns array containing all columns used in WHERE clause", "return a HashMap with all properties, name as key, value as value\n@return the properties", "Read a nested table. Instantiates the supplied reader class to\nextract the data.\n\n@param reader table reader class\n@return table rows" ]
private String hibcProcess(String source) { // HIBC 2.6 allows up to 110 characters, not including the "+" prefix or the check digit if (source.length() > 110) { throw new OkapiException("Data too long for HIBC LIC"); } source = source.toUpperCase(); if (!source.matches("[A-Z0-9-\\. \\$/+\\%]+?")) { throw new OkapiException("Invalid characters in input"); } int counter = 41; for (int i = 0; i < source.length(); i++) { counter += positionOf(source.charAt(i), HIBC_CHAR_TABLE); } counter = counter % 43; char checkDigit = HIBC_CHAR_TABLE[counter]; encodeInfo += "HIBC Check Digit Counter: " + counter + "\n"; encodeInfo += "HIBC Check Digit: " + checkDigit + "\n"; return "+" + source + checkDigit; }
[ "Adds the HIBC prefix and check digit to the specified data, returning the resultant data string.\n\n@see <a href=\"https://sourceforge.net/p/zint/code/ci/master/tree/backend/library.c\">Corresponding Zint code</a>" ]
[ "Attempts shared acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success.", "Shows the given step.\n\n@param step the step", "Write a project file in SDEF format to an output stream.\n\n@param projectFile ProjectFile instance\n@param out output stream", "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}).", "Returns the accrued interest of the bond for a given date.\n\n@param date The date of interest.\n@param model The model under which the product is valued.\n@return The accrued interest.", "Wrap Statement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a statement.", "Use this API to fetch all the vlan resources that are configured on netscaler.", "Execute push docker image on agent\n\n@param launcher\n@param log\n@param imageTag\n@param username\n@param password\n@param host @return\n@throws IOException\n@throws InterruptedException", "Check if the object has a property with the key.\n\n@param key key to check for." ]
public String get() { synchronized (LOCK) { if (!initialised) { // generate the random number Random rnd = new Random(); // @todo need a different seed, this is now time based and I // would prefer something different, like an object address // get the random number, instead of getting an integer and converting that to base64 later, // we get a string and narrow that down to base64, use the top 6 bits of the characters // as they are more random than the bottom ones... rnd.nextBytes(value); // get some random characters value[3] = BASE64[((value[3] >> 2) & BITS_6)]; // NOSONAR value[4] = BASE64[((value[4] >> 2) & BITS_6)]; // NOSONAR value[5] = BASE64[((value[5] >> 2) & BITS_6)]; // NOSONAR value[6] = BASE64[((value[6] >> 2) & BITS_6)]; // NOSONAR value[7] = BASE64[((value[7] >> 2) & BITS_6)]; // NOSONAR // complete the time part in the HIGH value of the token // this also sets the initial low value completeToken(rnd); initialised = true; } // fill in LOW value in id int l = low; value[0] = BASE64[(l & BITS_6)]; l >>= SHIFT_6; value[1] = BASE64[(l & BITS_6)]; l >>= SHIFT_6; value[2] = BASE64[(l & BITS_6)]; String res = new String(value); // increment LOW low++; if (low == LOW_MAX) { low = 0; } if (low == lowLast) { time = System.currentTimeMillis(); completeToken(); } return res; } }
[ "Get a new token.\n\n@return 14 character String" ]
[ "Adds OPT_F | OPT_FILE 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", "Checks to see if every value in the matrix is the specified value.\n\n@param mat The matrix being tested. Not modified.\n@param val Checks to see if every element in the matrix has this value.\n@param tol True if all the elements are within this tolerance.\n@return true if the test passes.", "Returns the value of this product under the given model.\n\n@param evaluationTime Evaluation time.\n@param model The model.\n@return Value of this product und the given model.", "This intro hides the system bars.", "Handle a simple ping request.\n\n@param channel the channel\n@param header the protocol header\n@throws IOException for any error", "Closes the connection to the Z-Wave controller.", "Iterate and insert each of the elements of the Collection.\n\n@param objects\nThe objects to insert\n@param outIdentifier\nIdentifier to lookup the returned objects\n@param returnObject\nboolean to specify whether the inserted Collection is part of the ExecutionResults\n@param entryPoint\nOptional EntryPoint for the insertions\n@return", "Add a Renderer instance as prototype.\n\n@param renderer to use as prototype.\n@return the current RendererBuilder instance.", "Merges this with the list of sections to produce the smallest array of sequential block subnets, going from smallest to largest\n\n@param sections the sections to merge with this\n@return" ]
@Override public RendererViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) { rendererBuilder.withParent(viewGroup); rendererBuilder.withLayoutInflater(LayoutInflater.from(viewGroup.getContext())); rendererBuilder.withViewType(viewType); RendererViewHolder viewHolder = rendererBuilder.buildRendererViewHolder(); if (viewHolder == null) { throw new NullRendererBuiltException("RendererBuilder have to return a not null viewHolder"); } return viewHolder; }
[ "One of the two main methods in this class. Creates a RendererViewHolder instance with a\nRenderer inside ready to be used. The RendererBuilder to create a RendererViewHolder using the\ninformation given as parameter.\n\n@param viewGroup used to create the ViewHolder.\n@param viewType associated to the renderer.\n@return ViewHolder extension with the Renderer it has to use inside." ]
[ "Prints the data for a single class to the given stream. This will be a\nsingle line in CSV.\n\n@param out\nthe output to write to\n@param classRecord\nthe class record to write\n@param entityIdValue\nthe item id that this class record belongs to", "Returns the supplied string with any trailing '\\n' removed.", "Determines whether the given documentation part contains the specified tag with the given parameter having the\ngiven value.\n\n@param doc The documentation part\n@param tagName The tag to be searched for\n@param paramName The parameter that the tag is required to have\n@param paramValue The value of the parameter\n@return boolean Whether the documentation part has the tag and parameter", "Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class", "Parse duration represented in thousandths of minutes.\n\n@param properties project properties\n@param value duration value\n@param targetTimeUnit required output time units\n@return Duration instance", "Perform a one-off scan during boot to establish deployment tasks to execute during boot", "Gets the final transform of the bone.\n\n@return the 4x4 matrix representing the final transform of the\nbone during animation, which comprises bind pose and skeletal\ntransform at the current time of the animation.", "Checks the given reference descriptor.\n\n@param refDef The reference descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows" ]
public static boolean start(RootDoc root) { root.printNotice("UmlGraphDoc version " + Version.VERSION + ", running the standard doclet"); Standard.start(root); root.printNotice("UmlGraphDoc version " + Version.VERSION + ", altering javadocs"); try { String outputFolder = findOutputPath(root.options()); Options opt = UmlGraph.buildOptions(root); opt.setOptions(root.options()); // in javadoc enumerations are always printed opt.showEnumerations = true; opt.relativeLinksForSourcePackages = true; // enable strict matching for hide expressions opt.strictMatching = true; // root.printNotice(opt.toString()); generatePackageDiagrams(root, opt, outputFolder); generateContextDiagrams(root, opt, outputFolder); } catch(Throwable t) { root.printWarning("Error: " + t.toString()); t.printStackTrace(); return false; } return true; }
[ "Standard doclet entry point\n@param root\n@return" ]
[ "Read configuration from zookeeper", "Adds OPT_N | OPT_NODE option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default.", "Passes the Socket's InputStream and OutputStream to the closure. The\nstreams will be closed after the closure returns, even if an exception\nis thrown.\n\n@param socket a Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.2", "Does a query for the object's Id and copies in each of the field values from the database to refresh the data\nparameter.", "Process the standard working hours for a given day.\n\n@param mpxjCalendar MPXJ Calendar instance\n@param uniqueID unique ID sequence generation\n@param day Day instance\n@param typeList Planner list of days", "Update the server group's name\n\n@param serverGroupId ID of server group\n@param name new name of server group\n@return updated ServerGroup", "Calculate a shift value that can be used to create a power-of-two value between\nthe specified maximum and minimum values.\n@param minimumValue the minimum value\n@param maximumValue the maximum value\n@return the calculated shift (use {@code 1 << shift} to obtain a value)", "Create a new DirectByteBuffer from a given address and size.\nThe returned DirectByteBuffer does not release the memory by itself.\n\n@param addr\n@param size\n@param att object holding the underlying memory to attach to the buffer.\nThis will prevent the garbage collection of the memory area that's\nassociated with the new <code>DirectByteBuffer</code>\n@return" ]
@Inline(value = "$1.putAll($2)", statementExpression = true) public static <K, V> void operator_add(Map<K, V> outputMap, Map<? extends K, ? extends V> inputMap) { outputMap.putAll(inputMap); }
[ "Add the given entries of the input map into the output map.\n\n<p>\nIf a key in the inputMap already exists in the outputMap, its value is\nreplaced in the outputMap by the value from the inputMap.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param outputMap the map to update.\n@param inputMap the entries to add.\n@since 2.15" ]
[ "Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix.", "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()", "Determine the height of the preview given an index into it.\n\n@param segment the index of the waveform preview segment to examine\n@param front if {@code true} the height of the front (brighter) segment of a color waveform preview is returned,\notherwise the height of the back (dimmer) segment is returned. Has no effect for blue previews.\n\n@return a value from 0 to 31 representing the height of the waveform at that segment, which may be an average\nof a number of values starting there, determined by the scale", "Sets the current configuration if it is a valid configuration. Otherwise the configuration is not set.\n@param configuration the configuration to set.\n@return flag, indicating if the configuration is set.", "Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag.", "Define the set of extensions.\n\n@param extensions\n@return self", "Generates a module regarding the parameters.\n\n@param name String\n@param version String\n@return Module", "Delete a database for a given path and userId.\n@param appInfo the info for this application\n@param serviceName the name of the associated service\n@param clientFactory the associated factory that creates clients\n@param userId the id of the user's to delete\n@return true if successfully deleted, false if not", "Creates an object instance from the Groovy resource\n\n@param resource the Groovy resource to parse\n@return An Object instance" ]
public static dnspolicylabel get(nitro_service service, String labelname) throws Exception{ dnspolicylabel obj = new dnspolicylabel(); obj.set_labelname(labelname); dnspolicylabel response = (dnspolicylabel) obj.get_resource(service); return response; }
[ "Use this API to fetch dnspolicylabel resource of given name ." ]
[ "Create a set containing all the processors in the graph.", "Processes text as a FreeMarker template. Usually used to process an inner body of a tag.\n\n@param text text of a template.\n@param params map with parameters for processing.\n@param writer writer to write output to.", "A tie-in for subclasses such as AdaGrad.", "Method used to create missing timephased data.\n\n@param file project file\n@param assignment resource assignment\n@param timephasedPlanned planned timephased data\n@param timephasedComplete complete timephased data", "Adds an array of groupby fieldNames for ReportQueries.\n@param fieldNames The groupby to set\n@deprecated use QueryByCriteria#addGroupBy", "Use this API to unset the properties of clusterinstance resource.\nProperties that need to be unset are specified in args array.", "Use this API to unset the properties of cmpparameter resource.\nProperties that need to be unset are specified in args array.", "Adds a parameter to the MIMEType.\n\n@param name name of parameter\n@param value value of parameter\n@return returns a new instance with the parameter set", "below is testing code" ]
public Map<String, ClientWidgetInfo> securityClone(Map<String, ClientWidgetInfo> widgetInfo) { Map<String, ClientWidgetInfo> res = new HashMap<String, ClientWidgetInfo>(); for (Map.Entry<String, ClientWidgetInfo> entry : widgetInfo.entrySet()) { ClientWidgetInfo value = entry.getValue(); if (!(value instanceof ServerSideOnlyInfo)) { res.put(entry.getKey(), value); } } return res; }
[ "Clone a widget info map considering what may be copied to the client.\n\n@param widgetInfo widget info map\n@return cloned copy including only records which are not {@link ServerSideOnlyInfo}" ]
[ "Add a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param newHash the new hash of the added content\n@return the builder", "Return the value from the field in the object that is defined by this FieldType.", "Convert this update description to an update document.\n\n@return an update document with the appropriate $set and $unset documents.", "Remove a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param isDirectory whether the file is a directory or not\n@return the builder", "Creates the graphic element to be shown when the datasource is empty", "Returns the name of the bone.\n\n@return the name", "Use this API to disable vserver of given name.", "Use this API to add lbroute.", "This method takes an array of data and uses this to populate the\nfield map.\n\n@param defaultData field map default data" ]
public static FormValidation validateArtifactoryCombinationFilter(String value) throws IOException, InterruptedException { String url = Util.fixEmptyAndTrim(value); if (url == null) return FormValidation.error("Mandatory field - You don`t have any deploy matches"); return FormValidation.ok(); }
[ "Validate the Combination filter field in Multi configuration jobs" ]
[ "Whether this association contains no rows.\n\n@return {@code true} if this association contains no rows, {@code false} otherwise", "Notifies all registered BufferChangeLogger instances of a change.\n\n@param newData the buffer that contains the new data being added\n@param numChars the number of valid characters in the buffer", "Find any standard methods the user has 'underridden' in their type.", "Remove attachments matches pattern from step and all step substeps\n\n@param context from which attachments will be removed", "Lists the formation info for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.", "Creates an empty block style definition.\n@return", "Output method responsible for sending the updated content to the Subscribers.\n\n@param cn", "This method is called to format a units value.\n\n@param value numeric value\n@return currency value", "Determines if entry is accepted. For normal usage, this means confirming that the key is\nneeded. For orphan usage, this simply means confirming the key belongs to the node.\n\n@param key\n@return true iff entry is accepted." ]
private synchronized HostServerGroupEffect getHostEffect(PathAddress address, String host, Resource root) { if (requiresMapping) { map(root); requiresMapping = false; } Set<String> mapped = hostsToGroups.get(host); if (mapped == null) { // Unassigned host. Treat like an unassigned profile or socket-binding-group; // i.e. available to all server group scoped roles. // Except -- WFLY-2085 -- the master HC is not open to all s-g-s-rs Resource hostResource = root.getChild(PathElement.pathElement(HOST, host)); if (hostResource != null) { ModelNode dcModel = hostResource.getModel().get(DOMAIN_CONTROLLER); if (!dcModel.hasDefined(REMOTE)) { mapped = Collections.emptySet(); // prevents returning HostServerGroupEffect.forUnassignedHost(address, host) } } } return mapped == null ? HostServerGroupEffect.forUnassignedHost(address, host) : HostServerGroupEffect.forMappedHost(address, mapped, host); }
[ "Creates an appropriate HSGE for resources in the host tree, excluding the server and server-config subtrees" ]
[ "called per frame of animation to update the camera position", "Start the socket server and waiting for finished\n\n@throws InterruptedException thread interrupted", "generate a prepared DELETE-Statement according to query\n@param query the Query\n@param cld the ClassDescriptor", "Get the server redirects belonging to a server group\n\n@param profileId ID of profile\n@param serverGroupId ID of server group\n@return Collection of ServerRedirect for a server group", "Calls the provided metric getter on all the tracked environments and\nobtains their values\n\n@param metricGetterName\n@return", "Append field with quotes and escape characters added in the key, if required.\nThe value is added without quotes and any escape characters.\n\n@return this", "Use this API to fetch all the vrid6 resources that are configured on netscaler.", "Records the list of backedup files into a text file\n\n@param filesInEnv\n@param backupDir", "Use this API to unset the properties of callhome resource.\nProperties that need to be unset are specified in args array." ]
protected int getRequestTypeFromString(String requestType) { if ("GET".equals(requestType)) { return REQUEST_TYPE_GET; } if ("POST".equals(requestType)) { return REQUEST_TYPE_POST; } if ("PUT".equals(requestType)) { return REQUEST_TYPE_PUT; } if ("DELETE".equals(requestType)) { return REQUEST_TYPE_DELETE; } return REQUEST_TYPE_ALL; }
[ "Convert a request type string to value\n\n@param requestType String value of request type GET/POST/PUT/DELETE\n@return Matching REQUEST_TYPE. Defaults to ALL" ]
[ "Checks if a given number is in the range of a float.\n\n@param number\na number which should be in the range of a float (positive or negative)\n\n@see java.lang.Float#MIN_VALUE\n@see java.lang.Float#MAX_VALUE\n\n@return number as a float", "Queues up a callback to be removed and invoked on the next change event.", "Sets an element in at the specified index.", "Determine the length of a nul terminated UTF16LE string in bytes.\n\n@param data string data\n@param offset offset into string data\n@return length in bytes", "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.", "Given a GanttProject priority value, turn this into an MPXJ Priority instance.\n\n@param gpPriority GanttProject priority\n@return Priority instance", "Write throwable as attachment.\n\n@param throwable to write\n@param title title of attachment\n@return Created {@link ru.yandex.qatools.allure.model.Attachment}", "Set the String-representation of size.\n\nLike: Square, Thumbnail, Small, Medium, Large, Original.\n\n@param label", "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." ]
@Override public Iterator<BoxItem.Info> iterator() { URL url = GET_COLLECTION_ITEMS_URL.build(this.getAPI().getBaseURL(), BoxCollection.this.getID()); return new BoxItemIterator(BoxCollection.this.getAPI(), url); }
[ "Returns an iterator over the items in this collection.\n@return an iterator over the items in this collection." ]
[ "Initializes the fields on the changes file with the values of the specified\nbinary package control file.\n\n@param packageControlFile", "Returns real unquoted value for a DisplayValue\n@param key\n@return", "This snapshot is meant to be used when updating data.", "Register the given Converter objects with the given target ConverterRegistry.\n@param converters the converter objects: implementing {@link Converter},\n{@link ConverterFactory}, or {@link GenericConverter}\n@param registry the target registry", "Set the featureModel.\n\n@param featureModel\nfeature model\n@throws LayerException\nproblem setting the feature model\n@since 1.8.0", "Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, or the default if the value is null or the key is not part of the map.", "Use this API to count sslvserver_sslciphersuite_binding resources configued on NetScaler.", "judge if an point in the area or not\n\n@param point\n@param area\n@param offsetRatio\n@return", "Normalize the list of selected categories to fit for the ids of the tree items." ]
public static boolean isOperationDefined(final ModelNode operation) { for (final AttributeDefinition def : ROOT_ATTRIBUTES) { if (operation.hasDefined(def.getName())) { return true; } } return false; }
[ "Test whether the operation has a defined criteria attribute.\n\n@param operation the operation\n@return" ]
[ "This method must be called on the start of the component. Initialize and start the directory monitor.\n\n@param monitoredDirectory\n@param pollingTime", "Creates the event for endpoint with specific type.\n\n@param endpoint the endpoint\n@param type the type\n@return the event", "Checks whether the given field definition is used as the primary key of a class referenced by\na reference.\n\n@param modelDef The model\n@param fieldDef The current field descriptor def\n@return The reference that uses the field or <code>null</code> if the field is not used in this way", "Load all string recognize.", "Add columns to the tree.\n\n@param parentNode parent tree node\n@param table columns container", "Static method to convert a binary operator into a string.\n\n@param oper is the binary comparison operator to be converted", "Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions.", "Use this API to fetch nd6ravariables resources of given names .", "Returns whether or not the host editor service is available\n\n@return\n@throws Exception" ]
public static DesignDocument fromFile(File file) throws FileNotFoundException { assertNotEmpty(file, "Design js file"); DesignDocument designDocument; Gson gson = new Gson(); InputStreamReader reader = null; try { reader = new InputStreamReader(new FileInputStream(file),"UTF-8"); //Deserialize JS file contents into DesignDocument object designDocument = gson.fromJson(reader, DesignDocument.class); return designDocument; } catch (UnsupportedEncodingException e) { //UTF-8 should be supported on all JVMs throw new RuntimeException(e); } finally { IOUtils.closeQuietly(reader); } }
[ "Deserialize a javascript design document file to a DesignDocument object.\n\n@param file the design document javascript file (UTF-8 encoded)\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read" ]
[ "Decodes stream data based on content encoding\n@param contentEncoding\n@param bytes\n@return String representing the stream data", "Pushes the Notification Viewed event to CleverTap.\n\n@param extras The {@link Bundle} object that contains the\nnotification details", "Random string from string array\n\n@param s Array\n@return String", "Create and bind a server socket\n\n@return the server socket\n@throws IOException", "Either gets an existing lock on the specified resource or creates one if none exists.\nThis methods guarantees to do this atomically.\n\n@param resourceId the resource to get or create the lock on\n@param isolationId the isolation level identity key. See {@link CommonsOJBLockManager}.\n@return the lock for the specified resource", "Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid.", "Create the Grid Point style.", "get the default profile\n\n@return representation of default profile\n@throws Exception exception", "This is a convenience method provided to allow a day to be set\nas working or non-working, by using the day number to\nidentify the required day.\n\n@param day required day\n@param working flag indicating if the day is a working day" ]
public BoxFile.Info getFileInfo(String fileID, String... fields) { String queryString = new QueryStringBuilder().appendParam("fields", fields).toString(); URL url = FILE_INFO_URL_TEMPLATE.buildWithQuery(this.api.getBaseURL(), queryString, fileID); BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject jsonObject = JsonObject.readFrom(response.getJSON()); BoxFile file = new BoxFile(this.api, jsonObject.get("id").asString()); return file.new Info(response.getJSON()); }
[ "Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields." ]
[ "Implement the persistence handler for storing the user properties.", "Gets id of a link and creates the new one if necessary.\n\n@param linkName name of the link.\n@param allowCreate if set to true and if there is no link named as linkName,\ncreate the new id for the linkName.\n@return < 0 if there is no such link and create=false, else id of the link", "Returns a sampling of the source at the specified line and column,\nof null if it is unavailable.", "This is the original, naive implementation, using the Wagner &\nFischer algorithm from 1974. It uses a flattened matrix for\nspeed, but still computes the entire matrix.", "Parse a version String and add the components to a properties object.\n\n@param version the version to parse", "Get the class name without the qualified package name.\n@param className the className to get the short name for\n@return the class name of the class without the package name\n@throws IllegalArgumentException if the className is empty", "Obtain the annotation associated with this type descriptor of the specified type.\n@param annotationType the annotation type\n@return the annotation, or {@code null} if no such annotation exists on this type descriptor", "Creates an observable that emits the given item after the specified time in milliseconds.\n\n@param event the event to emit\n@param milliseconds the delay in milliseconds\n@param <T> the type of event\n@return delayed observable", "Use this API to fetch all the appfwjsoncontenttype resources that are configured on netscaler." ]
public ActivityCodeValue addValue(Integer uniqueID, String name, String description) { ActivityCodeValue value = new ActivityCodeValue(this, uniqueID, name, description); m_values.add(value); return value; }
[ "Add a value to this activity code.\n\n@param uniqueID value unique ID\n@param name value name\n@param description value description\n@return ActivityCodeValue instance" ]
[ "Returns the connection that has been saved or null if none.", "Heuristic check if string might be an IPv6 address.\n\n@param input Any string or null\n@return true, if input string contains only hex digits and at least two colons, before '.' or '%' character.", "Create a list out of the items in the Iterable.\n\n@param <T>\nThe type of items in the Iterable.\n@param items\nThe items to be made into a list.\n@return A list consisting of the items of the Iterable, in the same order.", "Creates a tag directly from the working copy.\n\n@param tagUrl The URL of the tag to create.\n@param commitMessage Commit message\n@return The commit info upon successful operation.\n@throws IOException On IO of SVN failure", "Adds the dependencies typical for particular deployment types.\nThis is not accurate and doesn't cover the real needs of the project.\nBasically it's just to have \"something\" for the initial implementation.", "Specifies an input field to assign a value to. Crawljax first tries to match the found HTML\ninput element's id and then the name attribute.\n\n@param type\nthe type of input field\n@param identification\nthe locator of the input field\n@return an InputField", "Returns an object which represents the data to be transferred. The class\nof the object returned is defined by the representation class of the flavor.\n\n@param flavor the requested flavor for the data\n@see DataFlavor#getRepresentationClass\n@exception IOException if the data is no longer available\nin the requested flavor.\n@exception UnsupportedFlavorException if the requested data flavor is\nnot supported.", "Prepare a parallel UDP Task.\n\n@param command\nthe command\n@return the parallel task builder", "Determines if this connection's access token has expired and needs to be refreshed.\n@return true if the access token needs to be refreshed; otherwise false." ]
private byte[] readStreamCompressed(InputStream stream) throws IOException { ByteArrayOutputStream bao = new ByteArrayOutputStream(); GZIPOutputStream gos = new GZIPOutputStream(bao); OutputStreamWriter output = new OutputStreamWriter(gos); BufferedReader input = new BufferedReader(new InputStreamReader(stream)); String line; while ((line = input.readLine()) != null) { output.write(line); output.write('\n'); } input.close(); stream.close(); output.close(); gos.close(); bao.close(); return bao.toByteArray(); }
[ "Reads the given text stream and compressed its content.\n\n@param stream The input stream\n@return A byte array containing the GZIP-compressed content of the stream\n@throws IOException If an error ocurred" ]
[ "Get the MVT type mapping for the provided JTS Geometry.\n\n@param geometry JTS Geometry to get MVT type for\n@return MVT type for the given JTS Geometry, may return\n{@link com.wdtinc.mapbox_vector_tile.VectorTile.Tile.GeomType#UNKNOWN}", "Use this API to fetch statistics of rnatip_stats resource of given name .", "Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.", "Adds one or several attributes to facet on for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining.", "Given the byte buffer containing album art, build an actual image from it for easy rendering.\n\n@return the newly-created image, ready to be drawn", "End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance", "Inserts 'token' after 'where'. if where is null then it is inserted to the beginning of the list.\n@param where Where 'token' should be inserted after. if null the put at it at the beginning\n@param token The token that is to be inserted", "Sets the database dialect.\n\n@param dialect\nthe database dialect", "Returns a copy of this year-week with the new year and week, checking\nto see if a new object is in fact required.\n\n@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR\n@param newWeek the week to represent, validated from 1 to 53\n@return the year-week, not null" ]
private void checkRateLimit(String quotaKey, Tracked trackedOp) { String quotaValue = null; try { if(!metadataStore.getQuotaEnforcingEnabledUnlocked()) { return; } quotaValue = quotaStore.cacheGet(quotaKey); // Store may not have any quotas if(quotaValue == null) { return; } // But, if it does float currentRate = getThroughput(trackedOp); float allowedRate = Float.parseFloat(quotaValue); // TODO the histogram should be reasonably accurate to do all // these things.. (ghost qps and all) // Report the current quota usage level quotaStats.reportQuotaUsed(trackedOp, Utils.safeGetPercentage(currentRate, allowedRate)); // check if we have exceeded rate. if(currentRate > allowedRate) { quotaStats.reportRateLimitedOp(trackedOp); throw new QuotaExceededException("Exceeded rate limit for " + quotaKey + ". Maximum allowed : " + allowedRate + " Current: " + currentRate); } } catch(NumberFormatException nfe) { // move on, if we cannot parse quota value properly logger.debug("Invalid formatting of quota value for key " + quotaKey + " : " + quotaValue); } }
[ "Ensure the current throughput levels for the tracked operation does not\nexceed set quota limits. Throws an exception if exceeded quota.\n\n@param quotaKey\n@param trackedOp" ]
[ "Used to populate Map with given annotations\n\n@param annotations initial value for annotations", "We will always try to gather as many results as possible and never throw an exception.\n\nTODO: Make MemberResponse hold an exception that we can populate if something bad happens so we always\nget to return something for a member in order to indicate a failure. Getting the result when there\nis an error should throw an exception.\n\n@param execSvc\n@param members\n@param callable\n@param maxWaitTime - a value of 0 indicates forever\n@param unit\n@return", "Sets the bottom padding character for all cells in the row.\n@param paddingBottomChar new padding character, ignored if null\n@return this to allow chaining", "Restores a trashed file to a new location with a new name.\n@param fileID the ID of the trashed file.\n@param newName an optional new name to give the file. This can be null to use the file's original name.\n@param newParentID an optional new parent ID for the file. This can be null to use the file's original\nparent.\n@return info about the restored file.", "Used by FreeStyle Maven jobs only", "Reads GIF image from stream.\n\n@param is containing GIF file.\n@return read status code (0 = no errors).", "Run through the map and remove any references that have been null'd out by the GC.", "Provides lookup of elements by non-namespaced name.\n\n@param name the name or shortcut key for nodes of interest\n@return the nodes of interest which match name", "Return the raw source line corresponding to the specified AST node\n\n@param node - the Groovy AST node" ]
public ManageableCollection createCollectionProxy(PBKey brokerKey, Query query, Class collectionClass) { Object args[] = {brokerKey, collectionClass, query}; try { return (ManageableCollection) getCollectionProxyConstructor(collectionClass).newInstance(args); } catch(InstantiationException ex) { throw new PersistenceBrokerException("Exception while creating a new collection proxy instance", ex); } catch(InvocationTargetException ex) { throw new PersistenceBrokerException("Exception while creating a new collection proxy instance", ex); } catch(IllegalAccessException ex) { throw new PersistenceBrokerException("Exception while creating a new collection proxy instance", ex); } }
[ "Create a Collection Proxy for a given query.\n\n@param brokerKey The key of the persistence broker\n@param query The query\n@param collectionClass The class to build the proxy for\n@return The collection proxy" ]
[ "Sets the color of the drop shadow.\n\n@param color The color of the drop shadow.", "Creates custom Http Client connection pool to be used by Http Client\n\n@return {@link PoolingHttpClientConnectionManager}", "Used to load a classifier stored as a resource inside a jar file. THIS\nFUNCTION WILL ONLY WORK IF THE CODE WAS LOADED FROM A JAR FILE WHICH HAS A\nSERIALIZED CLASSIFIER STORED INSIDE IT.\n\n@param resourceName\nName of clasifier resource inside the jar file.\n@return A CRFClassifier stored in the jar file", "Increases the maximum number of columns in the matrix.\n@param desiredColumns Desired number of columns.\n@param preserveValue If the array needs to be expanded should it copy the previous values?", "Gets the automaton by id.\n\n@param id the id\n@return the automaton by id\n@throws IOException Signals that an I/O exception has occurred.", "A recursive getAttribute method. In case a one-to-many is passed, an array will be returned.\n\n@param feature The feature wherein to search for the attribute\n@param name The attribute's full name. (can be attr1.attr2)\n@return Returns the value. In case a one-to-many is passed along the way, an array will be returned.\n@throws LayerException oops", "Shutdown each AHC client in the map.", "First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe error\n@param errorMessage\nthe error message\n@param stackTrace\nthe stack trace\n@param statusCode\nthe status code\n@param statusCodeInt\nthe status code int", "Scale the mesh at x, y and z axis.\n\n@param mesh Mesh to be scaled.\n@param x Scale to be applied on x-axis.\n@param y Scale to be applied on y-axis.\n@param z Scale to be applied on z-axis." ]
private void initPatternButtonGroup() { m_groupPattern = new CmsRadioButtonGroup(); m_patternButtons = new HashMap<>(); createAndAddButton(PatternType.DAILY, Messages.GUI_SERIALDATE_TYPE_DAILY_0); m_patternButtons.put(PatternType.NONE, m_patternButtons.get(PatternType.DAILY)); createAndAddButton(PatternType.WEEKLY, Messages.GUI_SERIALDATE_TYPE_WEEKLY_0); createAndAddButton(PatternType.MONTHLY, Messages.GUI_SERIALDATE_TYPE_MONTHLY_0); createAndAddButton(PatternType.YEARLY, Messages.GUI_SERIALDATE_TYPE_YEARLY_0); // createAndAddButton(PatternType.INDIVIDUAL, Messages.GUI_SERIALDATE_TYPE_INDIVIDUAL_0); m_groupPattern.addValueChangeHandler(new ValueChangeHandler<String>() { public void onValueChange(ValueChangeEvent<String> event) { if (handleChange()) { String value = event.getValue(); if (value != null) { m_controller.setPattern(value); } } } }); }
[ "Initialize the pattern choice button group." ]
[ "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", "Use this API to fetch aaauser_vpntrafficpolicy_binding resources of given name .", "Creates a scheduled thread pool where each thread has the daemon\nproperty set to true. This allows the program to quit without\nexplicitly calling shutdown on the pool\n\n@param corePoolSize the number of threads to keep in the pool,\neven if they are idle\n\n@return a newly created scheduled thread pool", "Fire an event and notify observers that belong to this module.\n@param eventType\n@param event\n@param qualifiers", "Retrieve a UUID from an input stream.\n\n@param is input stream\n@return UUID instance", "Shutdown task scheduler.", "Use this API to add responderpolicy.", "Removes the given key with its associated element from the receiver, if present.\n\n@param key the key to be removed from the receiver.\n@return <tt>true</tt> if the receiver contained the specified key, <tt>false</tt> otherwise.", "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." ]