query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public static boolean isPunct(String s){ Pattern p = Pattern.compile("^[\\p{Punct}]+$"); Matcher m = p.matcher(s); return m.matches(); }
[ "Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid" ]
[ "Return a logger associated with a particular class name.", "Gets the attributes provided by the processor.\n\n@return the attributes", "Deletes a user from an enterprise account.\n@param notifyUser whether or not to send an email notification to the user that their account has been deleted.\n@param force whether or not this user should be deleted even if they still own files.", "Computes the unbiased standard deviation of all the elements.\n\n@return standard deviation", "Within a single zone, tries swapping some minimum number of random\npartitions per node with some minimum number of random partitions from\nother nodes within the zone. Chooses the best swap in each iteration.\nLarge values of the greedSwapMaxPartitions... arguments make this method\nequivalent to comparing every possible swap. This is very expensive.\n\nNormal case should be :\n\n#zones X #nodes/zone X max partitions/node X max partitions/zone\n\n@param nextCandidateCluster cluster object.\n@param greedyAttempts See RebalanceCLI.\n@param greedySwapMaxPartitionsPerNode See RebalanceCLI.\n@param greedySwapMaxPartitionsPerZone See RebalanceCLI.\n@param greedySwapZoneIds The set of zoneIds to consider. Each zone is done\nindependently.\n@param storeDefs\n@return updated cluster", "Derives the OJB platform to use for a database that is connected via a url using the specified\nsubprotocol, and where the specified jdbc driver is used.\n\n@param jdbcSubProtocol The JDBC subprotocol used to connect to the database\n@param jdbcDriver The JDBC driver used to connect to the database\n@return The platform identifier or <code>null</code> if no platform could be found", "Send a database announcement to all registered listeners.\n\n@param slot the media slot whose database availability has changed\n@param database the database whose relevance has changed\n@param available if {@code} true, the database is newly available, otherwise it is no longer relevant", "Prepares Artifactory server either from serverID or from ArtifactoryServer.\n\n@param artifactoryServerID\n@param pipelineServer\n@return", "Find the current layout and extract the activity code order and visibility.\n\n@param phoenixProject phoenix project data" ]
private static boolean matches(@Nonnull final Pattern pattern, @Nonnull final CharSequence chars) { return pattern.matcher(chars).matches(); }
[ "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}" ]
[ "Check if this is a redeployment triggered after the removal of a link.\n@param operation the current operation.\n@return true if this is a redeploy after the removal of a link.\n@see org.jboss.as.server.deploymentoverlay.DeploymentOverlayDeploymentRemoveHandler", "Stops the currently running animation, if any.\n@see GVRAvatar#start(String)\n@see GVRAnimationEngine#stop(GVRAnimation)", "Computes the rank of a matrix using the specified tolerance.\n\n@param A Matrix whose rank is to be calculated. Not modified.\n@param threshold The numerical threshold used to determine a singular value.\n@return The matrix's rank.", "Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return", "Add a '=' clause so the column must be equal to the value.", "Use this API to fetch inat resource of given name .", "This is a convenience method used to add a default set of calendar\nhours to a calendar.\n\n@param day Day for which to add default hours for", "Setter for blob handle value.\n\n@param txn enclosing transaction\n@param localId entity local id.\n@param blobId blob id\n@param value property value.", "Use this API to fetch a filterglobal_filterpolicy_binding resources." ]
private org.apache.log4j.Logger getLogger() { /* Logger interface extends Serializable, thus Log field is declared 'transient' and we have to null-check */ if (logger == null) { logger = org.apache.log4j.Logger.getLogger(name); } return logger; }
[ "Gets the logger.\n\n@return Returns a Category" ]
[ "If credentials are incorrect or not provided for Basic Auth, then Android\nmay throw this exception when an HTTP 401 is received. A separate exception\nis thrown for proxy authentication errors. Checking for this response and\nreturning the proper status.\n@param ex the exception raised from Android\n@return HTTP Status Code", "Mbeans for SLOP_UPDATE", "Gets the i-th half-edge associated with the face.\n\n@param i\nthe half-edge index, in the range 0-2.\n@return the half-edge", "We have received notification that a device is no longer on the network, so clear out all its waveforms.\n\n@param announcement the packet which reported the device’s disappearance", "Processes the template if the property value of the current object on the specified level equals the given value.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"\[email protected] name=\"value\" optional=\"false\" description=\"The value to check for\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"", "Get new vector clock based on this clock but incremented on index nodeId\n\n@param nodeId The id of the node to increment\n@return A vector clock equal on each element execept that indexed by\nnodeId", "Queues a job for execution in specified time.\n\n@param job the job.\n@param millis execute the job in this time.", "Go through all partition IDs and determine which node is \"first\" in the\nreplicating node list for every zone. This determines the number of\n\"zone primaries\" each node hosts.\n\n@return map of nodeId to number of zone-primaries hosted on node.", "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." ]
public static String getChildValue(Element element, String name) { return getValue(getChild(element, name)); }
[ "Get the value of the fist child element with the given name.\n\n@param element\nThe parent element\n@param name\nThe child element name\n@return The child element value or null" ]
[ "Get the real Object\n\n@param objectOrProxy\n@return Object", "Helper to read a mandatory String value.\n@param path The XML path of the element to read.\n@return The String value stored in the XML.\n@throws Exception thrown if the value could not be read.", "Handle a start time change.\n\n@param event the change event", "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}", "Encodes the given URI scheme with the given encoding.\n@param scheme the scheme to be encoded\n@param encoding the character encoding to encode to\n@return the encoded scheme\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "Use this API to disable Interface resources of given names.", "Calculates the legend bounds for a custom list of legends.", "Created a fresh CancelIndicator", "Invoke an HTTP GET request on a remote host. You must close the InputStream after you are done with.\n\n@param path The request path\n@param parameters The parameters (collection of Parameter objects)\n@return The Response" ]
private ProjectFile handleByteOrderMark(InputStream stream, int length, Charset charset) throws Exception { UniversalProjectReader reader = new UniversalProjectReader(); reader.setSkipBytes(length); reader.setCharset(charset); return reader.read(stream); }
[ "The file we are working with has a byte order mark. Skip this and try again to read the file.\n\n@param stream schedule data\n@param length length of the byte order mark\n@param charset charset indicated by byte order mark\n@return ProjectFile instance" ]
[ "From three tagNames, if one is under sectorTag and one under rowTag, returns the remaining one, which is supposedly the a box label. Otherwise,\nreturns null.", "returns the values of the orientation tag", "Use this API to export appfwlearningdata.", "On key down we assume the key will go at the end. It's the most\ncommon case and not that distracting if that's not true.", "add a new producer, either synchronous or asynchronous, connecting\nto the specified broker\n\n@param broker broker to producer", "Factory method to do the setup and transformation of inputs\n\n@param matrix a {@link TestMatrixArtifact} loaded by ProctorLoader\n@param loadResult a {@link ProctorLoadResult} which contains result of validation of test definition\n@param functionMapper a given el {@link FunctionMapper}\n@return constructed Proctor object", "Transform the operation into something the proxy controller understands.\n\n@param identity the server identity\n@return the transformed operation", "Set some initial values.", "Retrieve the value of a UDF.\n\n@param udf UDF value holder\n@return UDF value" ]
public void addChild(final DiffNode node) { if (node == this) { throw new IllegalArgumentException("Detected attempt to add a node to itself. " + "This would cause inifite loops and must never happen."); } else if (node.isRootNode()) { throw new IllegalArgumentException("Detected attempt to add root node as child. " + "This is not allowed and must be a mistake."); } else if (node.getParentNode() != null && node.getParentNode() != this) { throw new IllegalArgumentException("Detected attempt to add child node that is already the " + "child of another node. Adding nodes multiple times is not allowed, since it could " + "cause infinite loops."); } if (node.getParentNode() == null) { node.setParentNode(this); } children.put(node.getElementSelector(), node); if (state == State.UNTOUCHED && node.hasChanges()) { state = State.CHANGED; } }
[ "Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add." ]
[ "List all the environment variables for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return map of config vars", "Calculate the value of a digital caplet assuming the Black'76 model.\n\n@param forward The forward (spot).\n@param volatility The Black'76 volatility.\n@param periodLength The period length of the underlying forward rate.\n@param discountFactor The discount factor corresponding to the payment date (option maturity + period length).\n@param optionMaturity The option maturity\n@param optionStrike The option strike.\n@return Returns the price of a digital caplet under the Black'76 model", "Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@param value\n@return ISO 8601 value (String)", "Create a request for elevations for multiple locations.\n\n@param req\n@param callback", "Processes all entities in a Wikidata dump using the given entity\nprocessor. By default, the most recent JSON dump will be used. In offline\nmode, only the most recent previously downloaded file is considered.\n\n@param entityDocumentProcessor\nthe object to use for processing entities in this dump", "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", "Use this API to fetch a tmglobal_binding resource .", "Retrieve an instance of the ResourceField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ResourceField instance", "Use this API to clear nspbr6." ]
@ArgumentsChecked @Throws(IllegalNullArgumentException.class) public static int checkInteger(@Nonnull final Number number) { Check.notNull(number, "number"); if (!isInIntegerRange(number)) { throw new IllegalNumberRangeException(number.toString(), INTEGER_MIN, INTEGER_MAX); } return number.intValue(); }
[ "Checks if a given number is in the range of an integer.\n\n@param number\na number which should be in the range of an integer (positive or negative)\n\n@see java.lang.Integer#MIN_VALUE\n@see java.lang.Integer#MAX_VALUE\n\n@return number as an integer (rounding might occur)" ]
[ "Calculates the next snapshot version based on the current release version\n\n@param fromVersion The version to bump to next development version\n@return The next calculated development (snapshot) version", "Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.\nThis uses dnsnsecrec_args which is a way to provide additional arguments while fetching the resources.", "This method extracts data for a single predecessor from an MSPDI file.\n\n@param currTask Current task object\n@param link Predecessor data", "Returns the union of sets s1 and s2.", "Backup the current configuration as part of the patch history.\n\n@throws IOException for any error", "Use this API to fetch linkset_interface_binding resources of given name .", "Retrieve a field from a particular entity using its alias.\n\n@param typeClass the type of entity we are interested in\n@param alias the alias\n@return the field type referred to be the alias, or null if not found", "Apply the remote domain model to the local host controller.\n\n@param bootOperations the result of the remote read-domain-model op\n@return {@code true} if the model was applied successfully, {@code false} otherwise", "Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement" ]
private int getMaxHeight() { int result = 0; for (int i = 0; i < segmentCount; i++) { result = Math.max(result, segmentHeight(i, false)); } return result; }
[ "Scan the segments to find the largest height value present.\n\n@return the largest waveform height anywhere in the preview." ]
[ "Harvest a single value that was returned by a callable statement.\n\n@param obj the object that will receive the value that is harvested.\n@param callable the CallableStatement that contains the value to harvest\n@param fmd the FieldDescriptor that identifies the field where the\nharvested value will be stord.\n@param index the parameter index.\n\n@throws PersistenceBrokerSQLException if a problem occurs.", "Set keyboard done listener to detect when the user click \"DONE\" on his keyboard\n\n@param listener IntlPhoneInputListener", "Set an enterprise duration value.\n\n@param index duration index (1-30)\n@param value duration value", "Adjust submatrices and helper data structures for the input matrix. Must be called\nbefore the decomposition can be computed.\n\n@param orig", "Writes a resource's cost rate tables.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource", "Returns the current revision.", "Join N sets.", "Use this API to update nslimitselector resources.", "Replace full request content.\n\n@param requestContentTemplate\nthe request content template\n@param replacementString\nthe replacement string\n@return the string" ]
private String getClassNameFromPath(String path) { String className = path.replace(".class", ""); // for *nix if (className.startsWith("/")) { className = className.substring(1, className.length()); } className = className.replace("/", "."); // for windows if (className.startsWith("\\")) { className = className.substring(1, className.length()); } className = className.replace("\\", "."); return className; }
[ "Create a classname from a given path\n\n@param path\n@return" ]
[ "Use this API to fetch all the csparameter resources that are configured on netscaler.", "Emit a event object 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(EventObject, Object...)", "Get the collection of the server groups\n\n@return Collection of active server groups", "Generate a Jongo query with provided the parameter.\n\n@param key\n@param value\n@return String", "Adds a perspective camera constructed from the designated\nperspective camera to describe the shadow projection.\nThis type of camera is used for shadows generated by spot lights.\n@param centerCam GVRPerspectiveCamera to derive shadow projection from\n@param coneAngle spot light cone angle\n@return Perspective camera to use for shadow casting\n@see GVRSpotLight", "Get the possible beans for the given element\n\n@param resolvable The resolving criteria\n@return An unmodifiable set of matching beans", "Return the trimmed source line corresponding to the specified AST node\n\n@param node - the Groovy AST node", "Return all tenors for which data exists.\n\n@return The tenors in months.", "Obtain a dbserver client session that can be used to perform some task, call that task with the client,\nthen release the client.\n\n@param targetPlayer the player number whose dbserver we wish to communicate with\n@param task the activity that will be performed with exclusive access to a dbserver connection\n@param description a short description of the task being performed for error reporting if it fails,\nshould be a verb phrase like \"requesting track metadata\"\n@param <T> the type that will be returned by the task to be performed\n\n@return the value returned by the completed task\n\n@throws IOException if there is a problem communicating\n@throws Exception from the underlying {@code task}, if any" ]
public static long count(nitro_service service, String id) throws Exception{ linkset_interface_binding obj = new linkset_interface_binding(); obj.set_id(id); options option = new options(); option.set_count(true); linkset_interface_binding response[] = (linkset_interface_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
[ "Use this API to count linkset_interface_binding resources configued on NetScaler." ]
[ "adds all json extension to an diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException", "Gets a list of AssignmentRows based on the current Assignments\n@return", "Creates a player wrapper for the Android MediaPlayer.", "Creates an operations that targets the valiadating handler.\n\n@param operationToValidate the operation that this handler will validate\n@return the validation operation", "This method maps the task unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param taskFixedMeta Fixed meta data for this task\n@param taskFixedData Fixed data for this task\n@param taskVarData Variable task data\n@return Mapping between task identifiers and block position", "Overloads the left shift operator to provide syntactic sugar for appending to a StringBuilder.\n\n@param self a StringBuilder\n@param value an Object\n@return the original StringBuilder\n@since 1.8.2", "Use this API to fetch appfwwsdl resource of given name .", "Test a given date for being easter sunday.\n\nThe method uses the algorithms sometimes cited as Meeus,Jones, Butcher Gregorian algorithm.\nTaken from http://en.wikipedia.org/wiki/Computus\n\n@param date The date to check.\n@return True, if date is easter sunday.", "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" ]
static void doDifference( Map<String, String> left, Map<String, String> right, Map<String, String> onlyOnLeft, Map<String, String> onlyOnRight, Map<String, String> updated ) { onlyOnRight.clear(); onlyOnRight.putAll(right); for (Map.Entry<String, String> entry : left.entrySet()) { String leftKey = entry.getKey(); String leftValue = entry.getValue(); if (right.containsKey(leftKey)) { String rightValue = onlyOnRight.remove(leftKey); if (!leftValue.equals(rightValue)) { updated.put(leftKey, leftValue); } } else { onlyOnLeft.put(leftKey, leftValue); } } }
[ "calculate the difference of the two maps, so we know what was added, removed & updated\n@param left\n@param right\n@param onlyOnLeft\n@param onlyOnRight\n@param updated" ]
[ "Initializes the upper left component. Does not show the mode switch.", "Was the CDJ playing a track when this update was sent?\n\n@return true if the play flag was set, or, if this seems to be a non-nexus player, if <em>P<sub>1</sub></em>\nhas a value corresponding to a playing state.", "Use this API to fetch the statistics of all cmppolicylabel_stats resources that are configured on netscaler.", "Use this API to add dnsview resources.", "Convenience method dispatches the specified event to the source appender,\nwhich will result in the custom event data being appended to the new file.\n\n@param customLoggingEvent\nThe custom Log4J event to be appended.", "Processes the template for all collection definitions of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Deletes an object from the database.\nIt must be executed in the context of an open transaction.\nIf the object is not persistent, then ObjectNotPersistent is thrown.\nIf the transaction in which this method is executed commits,\nthen the object is removed from the database.\nIf the transaction aborts,\nthen the deletePersistent operation is considered not to have been executed,\nand the target object is again in the database.\n@param\tobject\tThe object to delete.", "Determines the prefix of an accessor method based on an accessor method name.\n\n@param methodName\nan accessor method name\n@return the resulting prefix", "Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed." ]
@Override public List<String> setTargetHostsFromLineByLineText(String sourcePath, HostsSourceType sourceType) throws TargetHostsLoadException { List<String> targetHosts = new ArrayList<String>(); try { String content = getContentFromPath(sourcePath, sourceType); targetHosts = setTargetHostsFromString(content); } catch (IOException e) { throw new TargetHostsLoadException("IEException when reading " + sourcePath, e); } return targetHosts; }
[ "get target hosts from line by line.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the list\n@throws TargetHostsLoadException\nthe target hosts load exception" ]
[ "Transforms root paths to site paths.\n\n@return lazy map from root paths to site paths.\n\n@see CmsRequestContext#removeSiteRoot(String)", "Concatenate all the arrays in the list into a vector.\n\n@param arrays List of arrays.\n@return Vector.", "Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value", "Returns a the list of available version of an artifact\n\n@param gavc String\n@return List<String>", "Converts from partitionId to nodeId. The list of partition IDs,\npartitionIds, is expected to be a \"replicating partition list\", i.e., the\nmapping from partition ID to node ID should be one to one.\n\n@param partitionIds List of partition IDs for which to find the Node ID\nfor the Node that owns the partition.\n@return List of node ids, one for each partition ID in partitionIds\n@throws VoldemortException If multiple partition IDs in partitionIds map\nto the same Node ID.", "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.", "Reads the availability table from the file.\n\n@param resource MPXJ resource instance\n@param periods MSPDI availability periods", "Pause between cluster change in metadata and starting server rebalancing\nwork.", "Computes the dot product of each basis vector against the sample. Can be used as a measure\nfor membership in the training sample set. High values correspond to a better fit.\n\n@param sample Sample of original data.\n@return Higher value indicates it is more likely to be a member of input dataset." ]
public Date getFinish() { Date result = (Date) getCachedValue(AssignmentField.FINISH); if (result == null) { result = getTask().getFinish(); } return result; }
[ "Returns the finish date for this resource assignment.\n\n@return finish date" ]
[ "Read file content to string.\n\n@param filePath\nthe file path\n@return the string\n@throws IOException\nSignals that an I/O exception has occurred.", "Resolves the base directory. If the system property is set that value will be used. Otherwise the path is\nresolved from the home directory.\n\n@param name the system property name\n@param dirName the directory name relative to the base directory\n\n@return the resolved base directory", "Returns an Array with an Objects PK VALUES if convertToSql is true, any\nassociated java-to-sql conversions are applied. If the Object is a Proxy\nor a VirtualProxy NO conversion is necessary.\n\n@param objectOrProxy\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException", "The specified interface must not contain methods, that changes the state of this object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@param settings\nsettings to generate code\n@return generated source code as string in a result wrapper", "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", "Sets top and bottom padding for all cells in the row.\n@param padding new padding for top and bottom, ignored if smaller than 0\n@return this to allow chaining", "Add a new check box.\n@param date the date for the check box\n@param checkState the initial check state.", "creates a shape list containing all child shapes and set it to the\ncurrent shape new shape get added to the shape array\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException", "Gets Widget bounds width\n@return width" ]
public WebSocketContext sendToTagged(String message, String tag, boolean excludeSelf) { return sendToConnections(message, tag, manager.tagRegistry(), excludeSelf); }
[ "Send message to all connections labeled with tag specified.\n\n@param message the message to be sent\n@param tag the string that tag the connections to be sent\n@param excludeSelf specify whether the connection of this context should be send\n@return this context" ]
[ "Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance", "Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table.", "Commit the contents of the given temp file to either the main file, or, if we are not persisting\nto the main file, to the .last file in the configuration history\n@param temp temp file containing the latest configuration. Will not be {@code null}\n@throws ConfigurationPersistenceException", "Remove all non replica clock entries from the list of versioned values\nprovided\n\n@param vals list of versioned values to prune replicas from\n@param keyReplicas list of current replicas for the given key\n@param didPrune flag to mark if we did actually prune something\n@return pruned list", "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", "Remove all references to a groupId\n\n@param groupIdToRemove ID of group", "Generate a placeholder for an unknown type.\n\n@param type expected type\n@param fieldID field ID\n@return placeholder", "Add a plugin path\n\n@param model\n@param add\n@return\n@throws Exception", "Retrieve the jdbc type for the field descriptor that is related\nto this argument." ]
private void putToSessionCache(Identity oid, CacheEntry entry, boolean onlyIfNew) { if(onlyIfNew) { // no synchronization needed, because session cache was used per broker instance if(!sessionCache.containsKey(oid)) sessionCache.put(oid, entry); } else { sessionCache.put(oid, entry); } }
[ "Put object to session cache.\n\n@param oid The {@link org.apache.ojb.broker.Identity} of the object to cache\n@param entry The {@link org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.CacheEntry} of the object\n@param onlyIfNew Flag, if set <em>true</em> only new objects (not already in session cache) be cached." ]
[ "Returns the version document of the given document, if any; returns null otherwise.\n@param document the document to get the version from.\n@return the version of the given document, if any; returns null otherwise.", "List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.", "Helper function to return the minimum size of the index space to be passed to the reduction given the input and\noutput tensors", "Helper method fro providers to fire hotkey event in a separate thread\n\n@param hotKey hotkey to fire", "Returns the length of the message in bytes as it is encoded on the wire.\n\nApple require the message to be of length 255 bytes or less.\n\n@return length of encoded message in bytes", "Start transaction on the underlying connection.", "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.", "Generates the points for an arc based on two bearings from a centre point\nand a radius.\n\n@param center The LatLong point of the center.\n@param startBearing North is 0 degrees, East is 90 degrees, etc.\n@param endBearing North is 0 degrees, East is 90 degrees, etc.\n@param radius In metres\n@return An array of LatLong points in an MVC array representing the arc.\nUsing this method directly you will need to push the centre point onto\nthe array in order to close it, if desired.", "Add a number of days to the supplied date.\n\n@param date start date\n@param days number of days to add\n@return new date" ]
public int[] getDefalutValuesArray() { int[] defaultValues = new int[5]; defaultValues[0] = GLES20.GL_LINEAR_MIPMAP_NEAREST; // MIN FILTER defaultValues[1] = GLES20.GL_LINEAR; // MAG FILTER defaultValues[2] = 1; // ANISO FILTER defaultValues[3] = GLES20.GL_CLAMP_TO_EDGE; // WRAP S defaultValues[4] = GLES20.GL_CLAMP_TO_EDGE; // WRAP T return defaultValues; }
[ "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." ]
[ "This method is called to format a priority.\n\n@param value priority instance\n@return formatted priority value", "Closes the server socket. No new clients are accepted afterwards.", "Perform the entire sort operation", "Starts the HTTP service.\n\n@throws Exception if the service failed to started", "Saves the favorites.\n\n@param favorites the list of favorites to save\n@throws CmsException if something goes wrong", "Stop finding signatures for all active players.", "Process a calendar exception.\n\n@param calendar parent calendar\n@param row calendar exception data", "Tries to load a site specific error page. If\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param errorCode the error code to display\n@return a flag, indicating if the custom error page could be loaded.", "Use this API to add cachecontentgroup." ]
private String generatedBuilderSimpleName(TypeElement type) { String packageName = elements.getPackageOf(type).getQualifiedName().toString(); String originalName = type.getQualifiedName().toString(); checkState(originalName.startsWith(packageName + ".")); String nameWithoutPackage = originalName.substring(packageName.length() + 1); return String.format(BUILDER_SIMPLE_NAME_TEMPLATE, nameWithoutPackage.replaceAll("\\.", "_")); }
[ "Returns the simple name of the builder class that should be generated for the given type.\n\n<p>This is simply the {@link #BUILDER_SIMPLE_NAME_TEMPLATE} with the original type name\nsubstituted in. (If the original type is nested, its enclosing classes will be included,\nseparated with underscores, to ensure uniqueness.)" ]
[ "Detailed request to track additional data about PUT, GET and GET_ALL\n\n@param timeNS The time in nanoseconds that the operation took to complete\n@param numEmptyResponses For GET and GET_ALL, how many keys were no values found\n@param valueBytes Total number of bytes across all versions of values' bytes\n@param keyBytes Total number of bytes in the keys\n@param getAllAggregatedCount Total number of keys returned for getAll calls", "Checks the orderby attribute.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for orderby is invalid (unknown field or ordering)", "Add the steal information to the rebalancer state\n\n@param stealInfo The steal information to add", "Set the replace of the uri and return the new URI.\n\n@param initialUri the starting URI, the URI to update\n@param path the path to set on the baeURI", "Open a new content stream.\n\n@param item the content item\n@return the content stream", "Get the default provider used.\n\n@return the default provider, never {@code null}.", "Get the group URL for the specified group ID\n\n@param groupId\nThe group ID\n@return The group URL\n@throws FlickrException", "Obtains a Discordian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Sets the background color of the scene rendered by this camera.\n\nIf you don't set the background color, the default is an opaque black.\nMeaningful parameter values are from 0 to 1, inclusive: values\n{@literal < 0} are clamped to 0; values {@literal > 1} are clamped to 1." ]
private Collection<? extends ResourceRoot> handleClassPathItems(final DeploymentUnit deploymentUnit) { final Set<ResourceRoot> additionalRoots = new HashSet<ResourceRoot>(); final ArrayDeque<ResourceRoot> toProcess = new ArrayDeque<ResourceRoot>(); final List<ResourceRoot> resourceRoots = DeploymentUtils.allResourceRoots(deploymentUnit); toProcess.addAll(resourceRoots); final Set<ResourceRoot> processed = new HashSet<ResourceRoot>(resourceRoots); while (!toProcess.isEmpty()) { final ResourceRoot root = toProcess.pop(); final List<ResourceRoot> classPathRoots = root.getAttachmentList(Attachments.CLASS_PATH_RESOURCE_ROOTS); for(ResourceRoot cpRoot : classPathRoots) { if(!processed.contains(cpRoot)) { additionalRoots.add(cpRoot); toProcess.add(cpRoot); processed.add(cpRoot); } } } return additionalRoots; }
[ "Loops through all resource roots that have been made available transitively via Class-Path entries, and\nadds them to the list of roots to be processed." ]
[ "Disable certificate verification.\n\n@throws KeyManagementException\nthe key management exception\n@throws NoSuchAlgorithmException\nthe no such algorithm exception", "Use this API to fetch authenticationvserver_authenticationnegotiatepolicy_binding resources of given name .", "This method extracts data for a single calendar from a Phoenix file.\n\n@param calendar calendar data", "Write exceptions into the format used by MSPDI files from\nProject 2007 onwards.\n\n@param calendar parent calendar\n@param exceptions list of exceptions", "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", "copied and altered from TransactionHelper", "Called just before the thread finishes, regardless of status, to take any necessary action on\nthe downloaded file with mDownloadedCacheSize file.\n\n@param forceClean - It will delete downloaded cache, Even streaming is enabled, If user intentionally cancelled.", "Load in a number of database configuration entries from a buffered reader.", "Obtains a local date in Symmetry010 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 Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date" ]
public Where<T, ID> exists(QueryBuilder<?, ?> subQueryBuilder) { // we do this to turn off the automatic addition of the ID column in the select column list subQueryBuilder.enableInnerQuery(); addClause(new Exists(new InternalQueryBuilderWrapper(subQueryBuilder))); return this; }
[ "Add a EXISTS clause with a sub-query inside of parenthesis.\n\n<p>\n<b>NOTE:</b> The sub-query will be prepared at the same time that the outside query is.\n</p>" ]
[ "Sets the replacement var map.\n\n@param replacementVarMap\nthe replacement var map\n@return the parallel task builder", "Set the value for a floating point 4x4 matrix.\n@param key name of uniform to set.\n@see #getFloatVec(String)", "Fancy print without a space added to positive numbers", "Update the given resource in the persistent configuration model based on the values in the given operation.\n\n@param operation the operation\n@param resource the resource that corresponds to the address of {@code operation}\n\n@throws OperationFailedException if {@code operation} is invalid or populating the model otherwise fails", "Stops all transitions.", "Read the header from the Phoenix file.\n\n@param stream input stream\n@return raw header data", "Checks if maintenance mode is enabled for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@return true if maintenance mode is enabled", "Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value", "Use this API to delete sslcipher resources of given names." ]
public ResponseFromManager generateUpdateExecuteTask(ParallelTask task) { // add to map now; as can only pass final ParallelTaskManager.getInstance().addTaskToInProgressMap( task.getTaskId(), task); logger.info("Added task {} to the running inprogress map...", task.getTaskId()); boolean useReplacementVarMap = false; boolean useReplacementVarMapNodeSpecific = false; Map<String, StrStrMap> replacementVarMapNodeSpecific = null; Map<String, String> replacementVarMap = null; ResponseFromManager batchResponseFromManager = null; switch (task.getRequestReplacementType()) { case UNIFORM_VAR_REPLACEMENT: useReplacementVarMap = true; useReplacementVarMapNodeSpecific = false; replacementVarMap = task.getReplacementVarMap(); break; case TARGET_HOST_SPECIFIC_VAR_REPLACEMENT: useReplacementVarMap = false; useReplacementVarMapNodeSpecific = true; replacementVarMapNodeSpecific = task .getReplacementVarMapNodeSpecific(); break; case NO_REPLACEMENT: useReplacementVarMap = false; useReplacementVarMapNodeSpecific = false; break; default: logger.error("error request replacement type. default as no replacement"); }// end switch // generate content in nodedata InternalDataProvider dp = InternalDataProvider.getInstance(); dp.genNodeDataMap(task); VarReplacementProvider.getInstance() .updateRequestWithReplacement(task, useReplacementVarMap, replacementVarMap, useReplacementVarMapNodeSpecific, replacementVarMapNodeSpecific); batchResponseFromManager = sendTaskToExecutionManager(task); removeTaskFromInProgressMap(task.getTaskId()); logger.info( "Removed task {} from the running inprogress map... " + ". This task should be garbage collected if there are no other pointers.", task.getTaskId()); return batchResponseFromManager; }
[ "key function to execute a parallel task.\n\n@param task the parallel task\n@return the batch response from manager" ]
[ "Creates the next permutation in the sequence.\n\n@return An array containing the permutation. The returned array is modified each time this function is called.", "Return the class's name, possibly by stripping the leading path", "Returns the portion of the field name after the last dot, as field names\nmay actually be paths.", "Returns the index descriptor definition of the given name if it exists.\n\n@param name The name of the index\n@return The index descriptor definition or <code>null</code> if there is no such index", "this method mimics EMC behavior", "Creates a binary media type with the given type and subtype\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}", "Reads the availability table from the file.\n\n@param resource MPXJ resource instance\n@param periods MSPDI availability periods", "Use this API to fetch a appflowglobal_binding resource .", "Logs to Info if the debug level is greater than or equal to 1." ]
public static ForwardCurveInterpolation createForwardCurveFromDiscountFactors(String name, double[] times, RandomVariable[] givenDiscountFactors, double paymentOffset) { ForwardCurveInterpolation forwardCurveInterpolation = new ForwardCurveInterpolation(name, paymentOffset, InterpolationEntityForward.FORWARD, null); if(times.length == 0) { throw new IllegalArgumentException("Vector of times must not be empty."); } if(times[0] > 0) { // Add first forward RandomVariable forward = givenDiscountFactors[0].sub(1.0).pow(-1.0).div(times[0]); forwardCurveInterpolation.addForward(null, 0.0, forward, true); } for(int timeIndex=0; timeIndex<times.length-1;timeIndex++) { RandomVariable forward = givenDiscountFactors[timeIndex].div(givenDiscountFactors[timeIndex+1].sub(1.0)).div(times[timeIndex+1] - times[timeIndex]); double fixingTime = times[timeIndex]; boolean isParameter = (fixingTime > 0); forwardCurveInterpolation.addForward(null, fixingTime, forward, isParameter); } return forwardCurveInterpolation; }
[ "Create a forward curve from given times and discount factors.\n\nThe forward curve will have times.length-1 fixing times from times[0] to times[times.length-2]\n<code>\nforward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]);\n</code>\nNote: If time[0] &gt; 0, then the discount factor 1.0 will inserted at time 0.0\n\n@param name The name of this curve.\n@param times A vector of given time points.\n@param givenDiscountFactors A vector of given discount factors (corresponding to the given time points).\n@param paymentOffset The maturity of the underlying index modeled by this curve.\n@return A new ForwardCurve object." ]
[ "Processes an object cache tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the object-cache as name-value pairs 'name=value',\[email protected] name=\"class\" optional=\"false\" description=\"The object cache implementation\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the object cache\"", "Constructs the convex hull of a set of points.\n\n@param points\ninput points\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater then\nthe length of <code>points</code>, or the points appear to be\ncoincident, colinear, or coplanar.", "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", "Creates a method signature.\n\n@param method Method instance\n@return method signature", "Deploys application reading resources from specified InputStream\n\n@param inputStream where resources are read\n@throws IOException", "Undo a prior removal using the supplied undo key.\n\n@param removalKey - The key returned from the call to removeRoleMapping.\n@return true if the undo was successful, false otherwise.", "Returns an array of all declared fields in the given class and all\nsuper-classes.", "very big duct tape", "Use this API to update lbsipparameters." ]
public final void unregisterView(final View view) { mActivity.runOnUiThread(new Runnable() { @Override public void run() { if (null != mRenderableViewGroup && view.getParent() == mRenderableViewGroup) { mRenderableViewGroup.removeView(view); } } }); }
[ "Remove a child view of Android hierarchy view .\n\n@param view View to be removed." ]
[ "Prepares a Jetty server for communicating with consumers.", "Populate the authenticated user profiles in the Shiro subject.\n\n@param profiles the linked hashmap of profiles", "Ensures that the specified fields are present in the given class.\n\n@param classDef The class to copy the fields into\n@param fields The fields to copy\n@throws ConstraintException If there is a conflict between the new fields and fields in the class", "Returns an interval representing the subtraction of the\ngiven interval from this one.\n@param other interval to subtract from this one\n@return result of subtraction", "Print the given values after displaying the provided message.", "Gets the aggregate result count summary. only list the counts for brief\nunderstanding\n\n@return the aggregate result count summary", "Helper method to track storage operations & time via StreamingStats.\n\n@param startNs", "Assembles an avro format string that contains multiple fat client configs\nfrom map of store to properties\n\n@param mapStoreToProps A map of store names to their properties\n@return Avro string that contains multiple store configs", "Fetch the latest versions for cluster metadata" ]
public static base_response update(nitro_service client, rsskeytype resource) throws Exception { rsskeytype updateresource = new rsskeytype(); updateresource.rsstype = resource.rsstype; return updateresource.update_resource(client); }
[ "Use this API to update rsskeytype." ]
[ "Creates an immutable copy that we can cache.", "Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website.", "Gets all the enterprise events that occurred within a specified date range.\n@param api the API connection to use.\n@param after the lower bound on the timestamp of the events returned.\n@param before the upper bound on the timestamp of the events returned.\n@param types an optional list of event types to filter by.\n@return a log of all the events that met the given criteria.", "Extracts a house holder vector from the rows of A and stores it in u\n@param A Complex matrix with householder vectors stored in the upper right triangle\n@param row Row in A\n@param col0 first row in A (implicitly assumed to be r + i0)\n@param col1 last row +1 in A\n@param u Output array storage\n@param offsetU first index in U", "Internal method used to test for the existence of a relationship\nwith a task.\n\n@param task target task\n@param list list of relationships\n@return boolean flag", "Add a range to this LOD group. Specify the scene object that should be displayed in this\nrange. Add the LOG group as a component to the parent scene object. The scene objects\nassociated with each range will automatically be added as children to the parent.\n@param range show the scene object if the camera distance is greater than this value\n@param sceneObject scene object that should be rendered when in this range\n@throws IllegalArgumentException if range is negative or sceneObject null", "Given the lambda value perform an implicit QR step on the matrix.\n\nB^T*B-lambda*I\n\n@param lambda Stepping factor.", "Import CountryList from RAW resource\n\n@param context Context\n@return CountryList", "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" ]
public boolean process( int sideLength, double diag[] , double off[] , double eigenvalues[] ) { if( diag != null ) helper.init(diag,off,sideLength); if( Q == null ) Q = CommonOps_DDRM.identity(helper.N); helper.setQ(Q); this.followingScript = true; this.eigenvalues = eigenvalues; this.fastEigenvalues = false; return _process(); }
[ "Computes the eigenvalue of the provided tridiagonal matrix. Note that only the upper portion\nneeds to be tridiagonal. The bottom diagonal is assumed to be the same as the top.\n\n@param sideLength Number of rows and columns in the input matrix.\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@return true if it succeeds and false if it fails." ]
[ "Overrides the superclass implementation to allow the AttributeDefinition for each field in the\nobject to in turn resolve that field.\n\n{@inheritDoc}", "Assigns the element in the Matrix to the specified value. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@param value The element's new value.", "Retrieves a constant value.\n\n@param type field type\n@param block criteria data block\n@return constant value", "Configure the access permissions required to access this print job.\n\n@param template the containing print template which should have sufficient information to\nconfigure the access.\n@param context the application context", "Use this API to fetch the statistics of all appfwpolicylabel_stats resources that are configured on netscaler.", "running in App Engine", "absolute for advancedJDBCSupport\n@param row", "A regular embedded is an element that it is embedded but it is not a key or a collection.\n\n@param keyColumnNames the column names representing the identifier of the entity\n@param column the column we want to check\n@return {@code true} if the column represent an attribute of a regular embedded element, {@code false} otherwise", "Read a text file into a single string\n\n@param file\nThe file to read\n@return The contents, or null on error." ]
public static base_response clear(nitro_service client) throws Exception { nssimpleacl clearresource = new nssimpleacl(); return clearresource.perform_operation(client,"clear"); }
[ "Use this API to clear nssimpleacl." ]
[ "Creates a sort configuration iff at least one of the parameters is not null and the options list is not empty.\n@param sortParam The request parameter used to send the currently chosen search option.\n@param options The available sort options.\n@param defaultOption The default sort option.\n@return the sort configuration or null, depending on the arguments.", "The smallest granularity of rebalancing where-in we move partitions for a\nsub-set of stores. Finally at the end of the movement, the node is\nremoved out of rebalance state\n\n<br>\n\nAlso any errors + rollback procedures are performed at this level itself.\n\n<pre>\n| Case | hasRO | hasRW | finishedRO | Action |\n| 0 | t | t | t | rollback cluster change + swap |\n| 1 | t | t | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 2 | t | f | t | won't be triggered since hasRW is false |\n| 3 | t | f | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 4 | f | t | t | rollback cluster change |\n| 5 | f | t | f | won't be triggered |\n| 6 | f | f | t | won't be triggered |\n| 7 | f | f | f | won't be triggered |\n</pre>\n\n@param batchId Rebalance batch id\n@param batchRollbackCluster Cluster to rollback to if we have a problem\n@param rebalanceTaskPlanList The list of rebalance partition plans\n@param hasReadOnlyStores Are we rebalancing any read-only stores?\n@param hasReadWriteStores Are we rebalancing any read-write stores?\n@param finishedReadOnlyStores Have we finished rebalancing of read-only\nstores?", "Call the Coverage Task.", "The metadata cache can become huge over time. This simply flushes it periodically.", "Joins the given ints using the given separator into a single string.\n\n@return the joined string or an empty string if the int array is null", "Use this API to fetch all the systemeventhistory resources that are configured on netscaler.\nThis uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources.", "Acquire transaction with a single permit in a thread. Transactions are acquired reentrantly, i.e.\nwith respect to transactions already acquired in the thread.\n\n@return the number of acquired permits, identically equal to 1.", "Capture stdout and route them through Redwood\n@return this", "Add all headers in a header map.\n\n@param headers a map of headers.\n@return the interceptor instance itself." ]
private static void computeBadByteSkipArray(byte[] pattern, int[] badByteArray) { for (int a = 0; a < ALPHABET_SIZE; a++) { badByteArray[a] = pattern.length; } for (int j = 0; j < pattern.length - 1; j++) { badByteArray[pattern[j] - Byte.MIN_VALUE] = pattern.length - j - 1; } }
[ "Fills the Boyer Moore \"bad character array\" for the given pattern" ]
[ "Determine the enum value corresponding to the track source slot found in the packet.\n\n@return the proper value", "Instantiates a new event collector.", "Determine how many forked JVMs to use.", "Calculates the next date, starting from the provided date.\n\n@param date the current date.\n@param interval the number of month to add when moving to the next month.", "Extracts calendar data from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file", "Print the method parameter p", "Finds the preferred provider for the given service. The preferred\nprovider is the last one added to the set of providers.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@return\nThe last provider added for the service if any exists.\nOtherwise, it returns <tt>null</tt>.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>", "Walk project references recursively, building up a list of thrift files they provide, starting\nwith an empty file list.", "Obtains a Symmetry010 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 local date-time, not null\n@throws DateTimeException if unable to create the date-time" ]
public boolean getBooleanProperty(String name, boolean defaultValue) { return PropertyHelper.toBoolean(_properties.getProperty(name), defaultValue); }
[ "Returns the boolean value of the specified property.\n\n@param name The name of the property\n@param defaultValue The value to use if the property is not set or not a boolean\n@return The value" ]
[ "Returns a compact representation of all of the tags the task has.\n\n@param task The task to get tags on.\n@return Request object", "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", "Get http response", "Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs", "Record a prepare operation timeout.\n\n@param failedOperation the prepared operation", "Get the photos for the specified group pool, optionally filtering by taf.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param groupId\nThe group ID\n@param userId\nThe user ID (may be null)\n@param tags\nThe optional tags (may be null)\n@param extras\nSet of extra-attributes to include (may be null)\n@param perPage\nThe number of photos per page (0 to ignore)\n@param page\nThe page offset (0 to ignore)\n@return A Collection of Photo objects\n@throws FlickrException", "Set whether we should retrieve the waveform details in addition to the waveform previews.\n\n@param findDetails if {@code true}, both types of waveform will be retrieved, if {@code false} only previews\nwill be retrieved", "<<<<<< measureUntilFull helper methods", "Retrieves state and metrics information for all channels across the cluster.\n\n@return list of channels across the cluster" ]
public UpdateDescription merge(@Nullable final UpdateDescription otherDescription) { if (otherDescription != null) { for (final Map.Entry<String, BsonValue> entry : this.updatedFields.entrySet()) { if (otherDescription.removedFields.contains(entry.getKey())) { this.updatedFields.remove(entry.getKey()); } } for (final String removedField : this.removedFields) { if (otherDescription.updatedFields.containsKey(removedField)) { this.removedFields.remove(removedField); } } this.removedFields.addAll(otherDescription.removedFields); this.updatedFields.putAll(otherDescription.updatedFields); } return this; }
[ "Unilaterally merge an update description into this update description.\n@param otherDescription the update description to merge into this\n@return this merged update description" ]
[ "FOR internal use. This method was called after the external transaction was completed.\n\n@see javax.transaction.Synchronization", "Check if a module can be promoted in the Grapes server\n\n@param name\n@param version\n@return a boolean which is true only if the module can be promoted\n@throws GrapesCommunicationException", "Use this API to fetch lbmonitor_binding resource of given name .", "Creates a solver for symmetric positive definite matrices.\n\n@return A new solver for symmetric positive definite matrices.", "Use this API to fetch all the systemuser resources that are configured on netscaler.", "Use this API to fetch filtered set of dbdbprofile resources.\nset the filter parameter values in filtervalue object.", "Retrieves the real subject from the underlying RDBMS. Override this\nmethod if the object is to be materialized in a specific way.\n\n@return The real subject of the proxy", "Delete rows that match the prepared statement.", "Removes a design document from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@return {@link DesignDocument}" ]
public static autoscaleaction[] get(nitro_service service) throws Exception{ autoscaleaction obj = new autoscaleaction(); autoscaleaction[] response = (autoscaleaction[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the autoscaleaction resources that are configured on netscaler." ]
[ "Add a given factory to the list of factories at the BEGINNING.\n\n@param factory The factory to be added.\n@return Cascade with amended factory list.", "Mutate the gradient.\n@param amount the amount in the range zero to one", "Create a new server group for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception", "Installs a provider either in the scope or the pool of unbound providers.\n\n@param clazz the class for which to install the provider.\n@param bindingName the name, possibly {@code null}, for which to install the scoped provider.\n@param internalProvider the internal provider to install.\n@param isBound whether or not the provider is bound to the scope or belongs to the pool of unbound providers.\n@param isTestProvider whether or not is a test provider, installed through a Test Module that should override\nexisting providers for the same class-bindingname.\n@param <T> the type of {@code clazz}.\n\nNote to maintainers : we don't use this method directly, both {@link #installBoundProvider(Class, String, InternalProviderImpl, boolean)}\nand {@link #installUnBoundProvider(Class, String, InternalProviderImpl)}\nare a facade of this method and make the calls more clear.", "Validate that the overlay exists. If it doesn't exist, throws an\nexception if not in batch mode or if failInBatch is true. In batch mode,\nwe could be in the case that the overlay doesn't exist yet.", "Add UDFType objects to a PM XML file.\n\n@author kmahan\n@date 2014-09-24\n@author lsong\n@date 2015-7-24", "Use this API to add snmpmanager resources.", "Use this API to fetch the statistics of all service_stats resources that are configured on netscaler.", "Creates a ServiceCall from an observable object and a callback.\n\n@param observable the observable to create from\n@param callback the callback to call when events happen\n@param <T> the type of the response\n@return the created ServiceCall" ]
public void setContentType(String photoId, String contentType) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_SET_CONTENTTYPE); parameters.put("photo_id", photoId); parameters.put("content_type", contentType); Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } }
[ "Set the content type of a photo.\n\nThis method requires authentication with 'write' permission.\n\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_PHOTO\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_SCREENSHOT\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_OTHER\n@param photoId\nThe photo ID\n@param contentType\nThe contentType to set\n@throws FlickrException" ]
[ "Parse representations from a file object response.\n@param jsonObject representations json object in get response for /files/file-id?fields=representations\n@return list of representations", "Given a class node, if this class node implements a trait, then generate all the appropriate\ncode which delegates calls to the trait. It is safe to call this method on a class node which\ndoes not implement a trait.\n@param cNode a class node\n@param unit the source unit", "Generate a results file for each test in each suite.\n@param outputDirectory The target directory for the generated file(s).", "Creates an attachment from a given array of bytes.\nThe bytes will be Base64 encoded.\n@throws java.lang.IllegalArgumentException if mediaType is not binary", "Convert a drawable object into a Bitmap.\n@param drawable Drawable to extract a Bitmap from.\n@return A Bitmap created from the drawable parameter.", "Dump the contents of a row from an MPD file.\n\n@param row row data", "Use this API to update autoscaleaction.", "Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException", "Add a property." ]
public synchronized void delete(String name) { if (isEmpty(name)) { indexedProps.remove(name); } else { synchronized (context) { int scope = context.getAttributesScope(name); if (scope != -1) { context.removeAttribute(name, scope); } } } }
[ "Removes a named property from the object.\n\nIf the property is not found, no action is taken.\n\n@param name the name of the property" ]
[ "Drop down item view\n\n@param position position of item\n@param convertView View of item\n@param parent parent view of item's view\n@return covertView", "Invoke an HTTP GET request on a remote host. You must close the InputStream after you are done with.\n\n@param path The request path\n@param parameters The parameters (collection of Parameter objects)\n@return The Response", "Use this API to fetch appfwprofile_xmlvalidationurl_binding resources of given name .", "Iterates over all the documents, adding each to the given target.\n\n@param target the collection to insert into\n@param <A> the collection type\n@return the target", "Converts SMatrixTriplet_64 into a SMatrixCC_64.\n\n@param src Original matrix which is to be copied. Not modified.\n@param dst Destination. Will be a copy. Modified.\n@param hist Workspace. Should be at least as long as the number of columns. Can be null.", "We have received an update that invalidates the waveform detail for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no waveform preview for the associated player", "running in App Engine", "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", "Retrieve the Charset used to read the file.\n\n@return Charset instance" ]
public int getShort(Integer id, Integer type) { int result = 0; Integer offset = m_meta.getOffset(id, type); if (offset != null) { byte[] value = m_map.get(offset); if (value != null && value.length >= 2) { result = MPPUtility.getShort(value, 0); } } return (result); }
[ "This method retrieves an integer 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 integer data" ]
[ "Check if the path to the property correspond to an association.\n\n@param targetTypeName the name of the entity containing the property\n@param pathWithoutAlias the path to the property WITHOUT aliases\n@return {@code true} if the property is an association or {@code false} otherwise", "returns an Array with an Identities PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values", "Sets the package pattern to match against.", "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", "disables the current active id, enables the new one selected\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@param active true to make client active, false to make client inactive\n@throws Exception exception", "Get a subset of the attributes of the provided class. An attribute is each public field in the class\nor super class.\n\n@param classToInspect the class to inspect\n@param filter a predicate that returns true when a attribute should be kept in resulting\ncollection.", "Load assertion from the provided json or throw exception if not possible.\n\n@param encodedAssertion the assertion as it was encoded in JSON.", "Read exactly buffer.length bytes from the stream into the buffer\n\n@param stream The stream to read from\n@param buffer The buffer to read into", "Handles the response of the SerialAPIGetCapabilities request.\n@param incomingMessage the response message to process." ]
public String printHelp(String commandName) { int maxLength = 0; int width = 80; List<ProcessedOption> opts = getOptions(); for (ProcessedOption o : opts) { if(o.getFormattedLength() > maxLength) maxLength = o.getFormattedLength(); } StringBuilder sb = new StringBuilder(); //first line sb.append("Usage: "); if(commandName == null || commandName.length() == 0) sb.append(name()); else sb.append(commandName); if(opts.size() > 0) sb.append(" [<options>]"); if(argument != null) { if(argument.isTypeAssignableByResourcesOrFile()) sb.append(" <file>"); else sb.append(" <").append(argument.getFieldName()).append(">"); } if(arguments != null) { if(arguments.isTypeAssignableByResourcesOrFile()) sb.append(" [<files>]"); else sb.append(" [<").append(arguments.getFieldName()).append(">]"); } sb.append(Config.getLineSeparator()); //second line sb.append(description()).append(Config.getLineSeparator()); //options and arguments if (opts.size() > 0) sb.append(Config.getLineSeparator()).append("Options:").append(Config.getLineSeparator()); for (ProcessedOption o : opts) sb.append(o.getFormattedOption(2, maxLength+4, width)).append(Config.getLineSeparator()); if(arguments != null) { sb.append(Config.getLineSeparator()).append("Arguments:").append(Config.getLineSeparator()); sb.append(arguments.getFormattedOption(2, maxLength+4, width)).append(Config.getLineSeparator()); } if(argument != null) { sb.append(Config.getLineSeparator()).append("Argument:").append(Config.getLineSeparator()); sb.append(argument.getFormattedOption(2, maxLength+4, width)).append(Config.getLineSeparator()); } return sb.toString(); }
[ "Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc." ]
[ "This is the code that needs to be executed before either eye is drawn.\n\n@return Current time, from {@link GVRTime#getCurrentTime()}", "Tests whether the ClassNode implements the specified method name\n\n@param classNode The ClassNode\n@param methodName The method name\n@param argTypes\n@return True if it implements the method", "Reads the cost rate tables from the file.\n\n@param resource parent resource\n@param rates XML cot rate tables", "Adds a leaf node, which could be a task or a milestone.\n\n@param parentName parent bar name\n@param row row to add\n@param task task to populate with data from the row", "Calculate the arc length by angle and radius\n@param angle\n@return arc length", "Private function to allow looking for the field recursively up the superclasses.\n\n@param clazz\n@return", "Read custom property definitions for tasks.\n\n@param gpTasks GanttProject tasks", "Returns the name of the current member which is the name in the case of a field, or the property name for an\naccessor method.\n\n@return The member name\n@exception XDocletException if an error occurs", "Gets the boxed type of a class\n\n@param type The type\n@return The boxed type" ]
public static dbdbprofile get(nitro_service service, String name) throws Exception{ dbdbprofile obj = new dbdbprofile(); obj.set_name(name); dbdbprofile response = (dbdbprofile) obj.get_resource(service); return response; }
[ "Use this API to fetch dbdbprofile resource of given name ." ]
[ "Retrieves a ProjectReader instance which can read a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectReader instance", "Will spawn a thread for each type in rootEntities, they will all re-join\non endAllSignal when finished.\n\n@param backend\n\n@throws InterruptedException\nif interrupted while waiting for endAllSignal.", "Specifies the angle of the effect.\n\n@param angle the angle of the effect.\n@angle", "Given the alias of the entity and the path to the relationship it will return the alias\nof the component.\n\n@param entityAlias the alias of the entity\n@param propertyPathWithoutAlias the path to the property without the alias\n@return the alias the relationship or null", "Calls the provided closure for a \"page\" of rows from the table represented by this DataSet.\nA page is defined as starting at a 1-based offset, and containing a maximum number of rows.\n\n@param offset the 1-based offset for the first row to be processed\n@param maxRows the maximum number of rows to be processed\n@param closure called for each row with a GroovyResultSet\n@throws SQLException if a database access error occurs\n@see groovy.sql.Sql#eachRow(String, java.util.List, int, int, groovy.lang.Closure)", "Print the common class node's properties", "Returns package name of a class\n\n@param clazz\nthe class\n@return\nthe package name of the class", "Creates a new pagination configuration if at least one of the provided parameters is not null.\nOtherwise returns null.\n@param pageParam The request parameter used to send the current page number.\n@param pageSizes The page sizes for the first pages. The last provided size is the size of all following pages.\n@param pageNavLength The length of the \"Google\"-like page navigation. Should be an odd number.\n@return the pagination configuration, or <code>null</code> if none of the provided parameters is not null.", "helper method to activate or deactivate a specific flag\n\n@param bits\n@param on" ]
public static base_response update(nitro_service client, nsacl6 resource) throws Exception { nsacl6 updateresource = new nsacl6(); updateresource.acl6name = resource.acl6name; updateresource.aclaction = resource.aclaction; updateresource.srcipv6 = resource.srcipv6; updateresource.srcipop = resource.srcipop; updateresource.srcipv6val = resource.srcipv6val; updateresource.srcport = resource.srcport; updateresource.srcportop = resource.srcportop; updateresource.srcportval = resource.srcportval; updateresource.destipv6 = resource.destipv6; updateresource.destipop = resource.destipop; updateresource.destipv6val = resource.destipv6val; updateresource.destport = resource.destport; updateresource.destportop = resource.destportop; updateresource.destportval = resource.destportval; updateresource.srcmac = resource.srcmac; updateresource.protocol = resource.protocol; updateresource.protocolnumber = resource.protocolnumber; updateresource.icmptype = resource.icmptype; updateresource.icmpcode = resource.icmpcode; updateresource.vlan = resource.vlan; updateresource.Interface = resource.Interface; updateresource.priority = resource.priority; updateresource.established = resource.established; return updateresource.update_resource(client); }
[ "Use this API to update nsacl6." ]
[ "This method is called to try to catch any invalid tasks that may have sneaked past all our other checks.\nThis is done by validating the tasks by task ID.", "Send JSON representation of a data object to all connections of a certain user\n\n@param data the data to be sent\n@param username the username\n@return this context", "This function is intended to detect the subset of IOException which are not\nconsidered recoverable, in which case we want to bubble up the exception, instead\nof retrying.\n\n@throws VoldemortException", "Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits", "Use this API to update protocolhttpband.", "Adds a function to the end of the token list\n@param function Function which is to be added\n@return The new Token created around function", "Delete the given file in a separate thread\n\n@param file The file to delete", "Get an array of property ids.\n\nNot all property ids need be returned. Those properties\nwhose ids are not returned are considered non-enumerable.\n\n@return an array of Objects. Each entry in the array is either\na java.lang.String or a java.lang.Number", "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" ]
public static byte[] getBytes(String string, String encoding) { try { return string.getBytes(encoding); } catch(UnsupportedEncodingException e) { throw new IllegalArgumentException(encoding + " is not a known encoding name.", e); } }
[ "Translate the string to bytes using the given encoding\n\n@param string The string to translate\n@param encoding The encoding to use\n@return The bytes that make up the string" ]
[ "Encode a long into a byte array at an offset\n\n@param ba Byte array\n@param offset Offset\n@param v Long value\n@return byte array given in input", "Acquires a write lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait.", "Get the value for a single attribute on an MBean by name.\n@param attributeName the attribute name (can be URL-encoded).\n@return the value as a String.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.", "Get the target file for misc items.\n\n@param item the misc item\n@return the target location", "Add an object into cache by key. The key will be used in conjunction with session id if\nthere is a session instance\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached", "Find out which field in the incoming message contains the payload that is.\ndelivered to the service method.", "Creates a new InternetPrintWriter for given charset encoding.\n\n@param outputStream the wrapped output stream.\n@param charset the charset.\n@return a new InternetPrintWriter.", "Send a waveform preview update announcement to all registered listeners.\n\n@param player the player whose waveform preview has changed\n@param preview the new waveform preview, if any", "Await service container stability ignoring thread interruption.\n\n@param timeout maximum period to wait for service container stability\n@param timeUnit unit in which {@code timeout} is expressed\n\n@throws java.util.concurrent.TimeoutException if service container stability is not reached before the specified timeout" ]
public static BoxStoragePolicyAssignment.Info getAssignmentForTarget(final BoxAPIConnection api, String resolvedForType, String resolvedForID) { QueryStringBuilder builder = new QueryStringBuilder(); builder.appendParam("resolved_for_type", resolvedForType) .appendParam("resolved_for_id", resolvedForID); URL url = STORAGE_POLICY_ASSIGNMENT_URL_TEMPLATE.buildWithQuery(api.getBaseURL(), builder.toString()); BoxAPIRequest request = new BoxAPIRequest(api, url, HttpMethod.GET); BoxJSONResponse response = (BoxJSONResponse) request.send(); BoxStoragePolicyAssignment storagePolicyAssignment = new BoxStoragePolicyAssignment(api, response.getJsonObject().get("entries").asArray().get(0).asObject().get("id").asString()); BoxStoragePolicyAssignment.Info info = storagePolicyAssignment.new Info(response.getJsonObject().get("entries").asArray().get(0).asObject()); return info; }
[ "Returns a BoxStoragePolicyAssignment information.\n@param api the API connection to be used by the resource.\n@param resolvedForType the assigned entity type for the storage policy.\n@param resolvedForID the assigned entity id for the storage policy.\n@return information about this {@link BoxStoragePolicyAssignment}." ]
[ "Encrypts data.\n\n@param plainData {@code initVector || payload || zeros:4}\n@return {@code initVector || E(payload) || I(signature)}", "Set the scrollbar used for vertical scrolling.\n\n@param scrollbar the scrollbar, or null to clear it\n@param width the width of the scrollbar in pixels", "This method log given exception in specified listener", "Converts to credentials for use in Grgit.\n@return {@code null} if both username and password are {@code null},\notherwise returns credentials in Grgit format.", "Gets the SerialMessage as a byte array.\n@return the message", "Resize the mesh to given size for each axis.\n\n@param mesh Mesh to be resized.\n@param xsize Size for x-axis.\n@param ysize Size for y-axis.\n@param zsize Size fof z-axis.", "Print a time value.\n\n@param value time value\n@return time value", "This method reads a four byte integer from the input stream.\n\n@param is the input stream\n@return byte value\n@throws IOException on file read error or EOF", "Set the degrees of rotation. Value will be set to -1, if not available.\n\n@param rotation" ]
public static Tuple2<Double, Double> getRandomGeographicalLocation() { return new Tuple2<>( (double) (RandomHelper.randWithConfiguredSeed().nextInt(999) + 1) / 100, (double) (RandomHelper.randWithConfiguredSeed().nextInt(999) + 1) / 100); }
[ "Get random geographical location\n@return 2-Tuple of ints (latitude, longitude)" ]
[ "Convert a Java date into a Planner time.\n\n0800\n\n@param value Java Date instance\n@return Planner time value", "Use this API to fetch nsacl6 resource of given name .", "Removes a tag from the task. Returns an empty data block.\n\n@param task The task to remove a tag from.\n@return Request object", "Tries to guess the packaging of the archive - whether it's an EAR, WAR, JAR.\nMaybe not needed as we can rely on the suffix?", "Read all task relationships from a GanttProject.\n\n@param gpProject GanttProject project", "Mapping message info.\n\n@param messageInfo the message info\n@return the message info type", "Reads the entity hosting the association from the datastore and applies any property changes from the server\nside.", "Compare an array of bytes with a subsection of a larger array of bytes.\n\n@param lhs small array of bytes\n@param rhs large array of bytes\n@param rhsOffset offset into larger array of bytes\n@return true if a match is found", "Get a compatible constructor\n\n@param type\nClass to look for constructor in\n@param argumentType\nArgument type for constructor\n@return the compatible constructor or null if none found" ]
@Override public final double getDouble(final String key) { Double result = optDouble(key); if (result == null) { throw new ObjectMissingException(this, key); } return result; }
[ "Get a property as a double or throw an exception.\n\n@param key the property name" ]
[ "URLEncode a string\n@param s\n@return", "Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance", "Create the grid feature type.\n\n@param mapContext the map context containing the information about the map the grid will be\nadded to.\n@param geomClass the geometry type", "Returns the coordinates of the vertex points of this hull.\n\n@param coords\nreturns the x, y, z coordinates of each vertex. This length of\nthis array must be at least three times the number of\nvertices.\n@return the number of vertices\n@see QuickHull3D#getVertices()\n@see QuickHull3D#getFaces()", "Converts an image in RGB mode to BINARY mode\n\n@param img image\n@param threshold grays cale threshold\n@return new MarvinImage instance in BINARY mode", "Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value", "Write the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar instance\n@param mpxjCalendar MPXJ calendar instance", "generate a prepared DELETE-Statement for the Class\ndescribed by cld.\n@param cld the ClassDescriptor", "This method is called to format a relation list.\n\n@param value relation list instance\n@return formatted relation list" ]
public static PersistenceBroker createPersistenceBroker(String jcdAlias, String user, String password) throws PBFactoryException { return PersistenceBrokerFactoryFactory.instance(). createPersistenceBroker(jcdAlias, user, password); }
[ "Creates a new broker instance.\n\n@param jcdAlias The jdbc connection descriptor name as defined in the repository\n@param user The user name to be used for connecting to the database\n@param password The password to be used for connecting to the database\n@return The persistence broker\n@see org.apache.ojb.broker.core.PersistenceBrokerFactoryIF#createPersistenceBroker(java.lang.String, java.lang.String, java.lang.String)" ]
[ "Adds the specified serie column to the dataset with custom label expression.\n\n@param column the serie column\n@param labelExpression column the custom label expression", "An extremely simple method for identifying multimedia. This\ncould be improved, but it's good enough for this example.\n\n@param file which could be an image or a video\n@return true if the file can be previewed, false otherwise", "Set a Java class to ignore when printing stack traces\n@param classToIgnoreInTraces The class to ignore.\n@return this", "Accessor method used to retrieve a char representing the\ncontents of an individual field. If the field does not exist in the\nrecord, the default character is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Initialize the version properties map from the gradle.properties file, and the additional properties from the\ngradle.properties file.", "Deletes the metadata on this folder associated with a specified scope and template.\n\n@param templateName the metadata template type name.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").", "Loads treebank data from first argument and prints it.\n\n@param args Array of command-line arguments: specifies a filename", "Runs through the log removing segments until the size of the log is at least\nlogRetentionSize bytes in size\n\n@throws IOException", "initializer to setup JSAdapter prototype in the given scope" ]
public Class<?> getType(String key) { Object val = this.data.get(key); return val == null ? null : val.getClass(); }
[ "Get the current attribute type.\n@param key the entry's key, not null\n@return the current attribute type, or null, if no such attribute exists." ]
[ "Convert from an internal Spring bean definition to a DTO.\n\n@param beanDefinition The internal Spring bean definition.\n@return Returns a DTO representation.", "Use this API to convert sslpkcs12.", "Reads and consumes a number of characters from the underlying reader,\nfilling the byte array provided.\n\n@param holder A byte array which will be filled with bytes read from the underlying reader.\n@throws ProtocolException If a char can't be read into each array element.", "The amount of time to keep an idle client thread alive\n\n@param threadIdleTime", "This method is used to recreate the hierarchical structure of the\nproject file from scratch. The method sorts the list of all tasks,\nthen iterates through it creating the parent-child structure defined\nby the outline level field.", "Process calendar days of the week.\n\n@param calendar project calendar\n@param root calendar data", "Helper method that encapsulates the minimum logic for adding a job to a\nqueue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJson\nthe job serialized as JSON", "Convert a floating point date to a LocalDate.\n\nNote: This method currently performs a rounding to the next day.\nIn a future extension intra-day time offsets may be considered.\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*365.0) days to referenceDate.", "Returns the device push token or null\n\n@param type com.clevertap.android.sdk.PushType (FCM or GCM)\n@return String device token or null\nNOTE: on initial install calling getDevicePushToken may return null, as the device token is\nnot yet available\nImplement CleverTapAPI.DevicePushTokenRefreshListener to get a callback once the token is\navailable" ]
public synchronized void hide() { if (focusedQuad != null) { mDefocusAnimationFactory.create(focusedQuad) .setRequestLayoutOnTargetChange(false) .start().finish(); focusedQuad = null; } Log.d(Log.SUBSYSTEM.WIDGET, TAG, "hide Picker!"); }
[ "It should be called when the picker is hidden" ]
[ "Decodes stream data based on content encoding\n@param contentEncoding\n@param bytes\n@return String representing the stream data", "Get the number of views, comments and favorites on a photostream for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotostreamStats.htm\"", "Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nrequest queue.", "Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Pretty prints a task list of rebalancing tasks.\n\n@param infos list of rebalancing tasks (RebalancePartitionsInfo)\n@return pretty-printed string", "Writes triples to determine the statements with the highest rank.", "This method changes package_path into folder's path\n\n@param path\n, as es.upm.gsi\n@return the new path, es/upm/gsi", "Computes the tree edit distance between trees t1 and t2.\n\n@param t1\n@param t2\n@return tree edit distance between trees t1 and t2", "Assemble the configuration section of the URL." ]
protected TokenList.Token parseBlockNoParentheses(TokenList tokens, Sequence sequence, boolean insideMatrixConstructor) { // search for matrix bracket operations if( !insideMatrixConstructor ) { parseBracketCreateMatrix(tokens, sequence); } // First create sequences from anything involving a colon parseSequencesWithColons(tokens, sequence ); // process operators depending on their priority parseNegOp(tokens, sequence); parseOperationsL(tokens, sequence); parseOperationsLR(new Symbol[]{Symbol.POWER, Symbol.ELEMENT_POWER}, tokens, sequence); parseOperationsLR(new Symbol[]{Symbol.TIMES, Symbol.RDIVIDE, Symbol.LDIVIDE, Symbol.ELEMENT_TIMES, Symbol.ELEMENT_DIVIDE}, tokens, sequence); parseOperationsLR(new Symbol[]{Symbol.PLUS, Symbol.MINUS}, tokens, sequence); // Commas are used in integer sequences. Can be used to force to compiler to treat - as negative not // minus. They can now be removed since they have served their purpose stripCommas(tokens); // now construct rest of the lists and combine them together parseIntegerLists(tokens); parseCombineIntegerLists(tokens); if( !insideMatrixConstructor ) { if (tokens.size() > 1) { System.err.println("Remaining tokens: "+tokens.size); TokenList.Token t = tokens.first; while( t != null ) { System.err.println(" "+t); t = t.next; } throw new RuntimeException("BUG in parser. There should only be a single token left"); } return tokens.first; } else { return null; } }
[ "Parses a code block with no parentheses and no commas. After it is done there should be a single token left,\nwhich is returned." ]
[ "Seeks to the given season within the given year\n\n@param seasonString\n@param yearString", "Inserts the LokenList immediately following the 'before' token", "generate a message for loglevel FATAL\n\n@param pObject the message Object", "For use on a slave HC to get all the server groups used by the host\n\n@param hostResource the host resource\n@return the server configs on this host", "Use this API to fetch the statistics of all appfwprofile_stats resources that are configured on netscaler.", "Map a single ResultSet row to a T instance.\n\n@throws SQLException", "If needed, destroy the remaining conversation contexts after an HTTP session was invalidated within the current request.\n\n@param request", "Returns the constructor of the indirection handler class.\n\n@return The constructor for indirection handlers", "Utility function to get the current text." ]
private void logColumnData(int startIndex, int length) { if (m_log != null) { m_log.println(); m_log.println(FastTrackUtility.hexdump(m_buffer, startIndex, length, true, 16, "")); m_log.println(); m_log.flush(); } }
[ "Log the data for a single column.\n\n@param startIndex offset into buffer\n@param length length" ]
[ "Deletes and publishes resources with ID conflicts.\n\n@param cms the CMS context to use\n@param module the module\n@param conflictingIds the conflicting ids\n@throws CmsException if something goes wrong\n@throws Exception if something goes wrong", "ten less than Cube Q", "Finds a child resource with the given key.\n\n@param key the child resource key\n@return null if no child resource exists with the given name else the child resource", "Set a knot type.\n@param n the knot index\n@param type the type\n@see #getKnotType", "Converts Observable of list to Observable of Inner.\n@param innerList list to be converted.\n@param <InnerT> type of inner.\n@return Observable for list of inner.", "Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments", "binds the Identities Primary key values to the statement", "Set day.\n\n@param d day instance", "Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add." ]
public static ZMatrixRMaj hermitian(int length, double min, double max, Random rand) { ZMatrixRMaj A = new ZMatrixRMaj(length,length); fillHermitian(A, min, max, rand); return A; }
[ "Creates a random Hermitian matrix with elements from min to max value.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix." ]
[ "Ignore some element from the AST\n\n@param element\n@return", "Guess the type of the given dump from its filename.\n\n@param fileName\n@return dump type, defaulting to JSON if no type was found", "Get the collection of configured blogs for the calling user.\n\n@return The Collection of configured blogs", "Classify stdin by documents seperated by 3 blank line\n@param readerWriter\n@return boolean reached end of IO\n@throws IOException", "Returns value as it appeared on the command line with escape sequences\nand system properties not resolved. The variables, though, are resolved\nduring the initial parsing of the command line.\n\n@param parsedLine parsed command line\n@param required whether the argument is required\n@return argument value as it appears on the command line\n@throws CommandFormatException in case the required argument is missing", "Use this API to fetch systemuser resource of given name .", "Use this API to export sslfipskey resources.", "Confirms that both clusters have the same number of total partitions.\n\n@param lhs\n@param rhs", "Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd, while reporting the\nprogress to a ProgressListener.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.\n@param listener a listener for monitoring the download's progress." ]
protected void deleteConflictingResources(CmsObject cms, CmsModule module, Map<CmsUUID, CmsUUID> conflictingIds) throws CmsException, Exception { CmsProject conflictProject = cms.createProject( "Deletion of conflicting resources for " + module.getName(), "Deletion of conflicting resources for " + module.getName(), OpenCms.getDefaultUsers().getGroupAdministrators(), OpenCms.getDefaultUsers().getGroupAdministrators(), CmsProject.PROJECT_TYPE_TEMPORARY); CmsObject deleteCms = OpenCms.initCmsObject(cms); deleteCms.getRequestContext().setCurrentProject(conflictProject); for (CmsUUID vfsId : conflictingIds.values()) { CmsResource toDelete = deleteCms.readResource(vfsId, CmsResourceFilter.ALL); lock(deleteCms, toDelete); deleteCms.deleteResource(toDelete, CmsResource.DELETE_PRESERVE_SIBLINGS); } OpenCms.getPublishManager().publishProject(deleteCms); OpenCms.getPublishManager().waitWhileRunning(); }
[ "Deletes and publishes resources with ID conflicts.\n\n@param cms the CMS context to use\n@param module the module\n@param conflictingIds the conflicting ids\n@throws CmsException if something goes wrong\n@throws Exception if something goes wrong" ]
[ "Writes the body of this request to an HttpURLConnection.\n\n<p>Subclasses overriding this method must remember to close the connection's OutputStream after writing.</p>\n\n@param connection the connection to which the body should be written.\n@param listener an optional listener for monitoring the write progress.\n@throws BoxAPIException if an error occurs while writing to the connection.", "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>", "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", "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.", "Returns the dimension of the type of the current member.\n\n@return The member dimension\n@exception XDocletException if an error occurs\n@see OjbMemberTagsHandler#getMemberType()", "Constraint that ensures that the field has precision and scale settings if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)", "Retrieves the project start date. If an explicit start date has not been\nset, this method calculates the start date by looking for\nthe earliest task start date.\n\n@return project start date", "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", "Use this API to fetch appqoepolicy resource of given name ." ]
@Pure public static <P1, P2, P3> Procedure2<P2, P3> curry(final Procedure3<? super P1, ? super P2, ? super P3> procedure, final P1 argument) { if (procedure == null) throw new NullPointerException("procedure"); return new Procedure2<P2, P3>() { @Override public void apply(P2 p2, P3 p3) { procedure.apply(argument, p2, p3); } }; }
[ "Curries a procedure that takes three arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes two arguments. Never <code>null</code>." ]
[ "Encodes the given URI path with the given encoding.\n@param path the path to be encoded\n@param encoding the character encoding to encode to\n@return the encoded path\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "Attaches the menu drawer to the window.", "Prints one line to the csv file\n\n@param cr data pipe with search results", "Obtains a Coptic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Returns the WDTK datatype IRI for the property datatype as represented by\nthe given JSON datatype string.\n\n@param jsonDatatype\nthe JSON datatype string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known", "Retrieves a specific range of items in this collection.\n@param offset the index of the first item to retrieve.\n@param limit the maximum number of items to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of items.", "Compute the A matrix from the Q and R matrices.\n\n@return The A matrix.", "Creates an element that represents an image drawn at the specified coordinates in the page.\n@param x the X coordinate of the image\n@param y the Y coordinate of the image\n@param width the width coordinate of the image\n@param height the height coordinate of the image\n@param type the image type: <code>\"png\"</code> or <code>\"jpeg\"</code>\n@param resource the image data depending on the specified type\n@return", "Return true if the connection being released is the one that has been saved." ]
public Excerpt typeParameters() { if (getTypeParameters().isEmpty()) { return Excerpts.EMPTY; } else { return Excerpts.add("<%s>", Excerpts.join(", ", getTypeParameters())); } }
[ "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>}" ]
[ "Writes the data collected about classes to a file.", "Create a Count-Query for ReportQueryByCriteria", "This method is called to format an accrue type value.\n\n@param type accrue type\n@return formatted accrue type", "Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance", "Update the object in the database.", "Processes a row of the sites table and stores the site information found\ntherein.\n\n@param siteRow\nstring serialisation of a sites table row as found in the SQL\ndump", "Will scale the image down before processing for\nperformance enhancement and less memory usage\nsacrificing image quality.\n\n@param scaleInSample value greater than 1 will scale the image width/height, so 2 will getFromDiskCache you 1/4\nof the original size and 4 will getFromDiskCache you 1/16 of the original size - this just sets\nthe inSample size in {@link android.graphics.BitmapFactory.Options#inSampleSize } and\nbehaves exactly the same, so keep the value 2^n for least scaling artifacts", "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", "Constraint that ensures that the field has a conversion if the java type requires it. Also checks the conversion class.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If the conversion class is invalid" ]
public void hide() { div.removeFromParent(); if (scrollDisabled) { RootPanel.get().getElement().getStyle().setOverflow(Style.Overflow.AUTO); } if (type == LoaderType.CIRCULAR) { preLoader.removeFromParent(); } else if (type == LoaderType.PROGRESS) { progress.removeFromParent(); } }
[ "Hides the Loader component" ]
[ "Reads a command \"tag\" from the request.", "Clears all scopes. Useful for testing and not getting any leak...", "Get the log if exists or return null\n\n@param topic topic name\n@param partition partition index\n@return a log for the topic or null if not exist", "Determine if a CharSequence can be parsed as an Integer.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isInteger(String)\n@since 1.8.2", "Commit all changes if there are uncommitted changes.\n\n@param msg the commit message.\n@throws GitAPIException", "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.", "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", "Get the filters ExporterServiceFilter and ExportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid.", "Validates a String to be a valid name to be used in MongoDB for a collection name.\n\n@param collectionName" ]
public boolean add(final String member, final double score) { return doWithJedis(new JedisCallable<Boolean>() { @Override public Boolean call(Jedis jedis) { return jedis.zadd(getKey(), score, member) > 0; } }); }
[ "Add an element assigned with its score\n@param member the member to add\n@param score the score to assign\n@return <code>true</code> if the set has been changed" ]
[ "Use this API to expire cachecontentgroup resources.", "Use this API to add appfwjsoncontenttype resources.", "returns a Logger.\n\n@param loggerName the name of the Logger\n@return Logger the returned Logger", "Select item by it's position\n\n@param position int value of item position to select\n@param invokeListeners boolean value for invoking listeners", "Use this API to fetch all the ci resources that are configured on netscaler.", "Returns iterable containing assignments for this single legal hold policy.\nParameters can be used to filter retrieved assignments.\n@param type filter assignments of this type only.\nCan be \"file_version\", \"file\", \"folder\", \"user\" or null if no type filter is necessary.\n@param id filter assignments to this ID only. Can be null if no id filter is necessary.\n@param limit the limit of entries per page. Default limit is 100.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy.", "Retrieve the next page and store the continuation token, the new data, and any IOException that may occur.\n\nNote that it is safe to pass null values to {@link CollectionRequest#query(String, Object)}. Method\n{@link com.asana.Client#request(com.asana.requests.Request)} will not include such options.", "Sobel method to generate bump map from a height map\n\n@param input - A height map\n@return bump map", "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" ]
protected boolean appendWhereStatement(StringBuilder sb, List<ArgumentHolder> argList, WhereOperation operation) throws SQLException { if (where == null) { return operation == WhereOperation.FIRST; } operation.appendBefore(sb); where.appendSql((addTableName ? getTableName() : null), sb, argList); operation.appendAfter(sb); return false; }
[ "Append the WHERE part of the statement to the StringBuilder." ]
[ "Start the operation by instantiating the first job instance in a separate Thread.\n\n@param arguments {@inheritDoc}", "this method is called from the event methods", "Close tracks when the JVM shuts down.\n@return this", "Build a request URL.\n\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException\n@deprecated use {@link #buildSecureUrl(java.lang.String, int, java.lang.String, java.util.Map) }", "Send message to socket's output stream.\n\n@param messageToSend message to send.\n\n@return {@code true} if message was sent successfully, {@code false} otherwise.", "iteration not synchronized", "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 the row, column, and value\n\n@return this", "If the belief its a count of some sort his counting its increased by one.\n\n@param bName\n- the name of the belief count." ]
protected void init(String configString, I_CmsSearchConfiguration baseConfig) throws JSONException { m_configObject = new JSONObject(configString); m_baseConfig = baseConfig; }
[ "Initialization that parses the String to a JSON object.\n@param configString The JSON as string.\n@param baseConfig The optional basic search configuration to overwrite (partly) by the JSON configuration.\n@throws JSONException thrown if parsing fails." ]
[ "Modifies the specified mode and length arrays to combine adjacent modes of the same type, returning the updated index point.", "Zeros an inner rectangle inside the matrix.\n\n@param A Matrix that is to be modified.\n@param row0 Start row.\n@param row1 Stop row+1.\n@param col0 Start column.\n@param col1 Stop column+1.", "Extract a list of time entries.\n\n@param shiftData string representation of time entries\n@return list of time entry rows", "Unregister the mbean with the given name from the platform mbean server\n\n@param name The name of the mbean to unregister", "Answer the counted size\n\n@return int", "Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum", "Gets the task from in progress map.\n\n@param jobId\nthe job id\n@return the task from in progress map", "Write entries into the storage.\nOverriding methods should first delegate to super before adding their own entries.", "Initialize the class if this is being called with Spring." ]
private void deliverMountUpdate(SlotReference slot, boolean mounted) { if (mounted) { logger.info("Reporting media mounted in " + slot); } else { logger.info("Reporting media removed from " + slot); } for (final MountListener listener : getMountListeners()) { try { if (mounted) { listener.mediaMounted(slot); } else { listener.mediaUnmounted(slot); } } catch (Throwable t) { logger.warn("Problem delivering mount update to listener", t); } } if (mounted) { MetadataCache.tryAutoAttaching(slot); } }
[ "Send a mount update announcement to all registered listeners, and see if we can auto-attach a media cache file.\n\n@param slot the slot in which media has been mounted or unmounted\n@param mounted will be {@code true} if there is now media mounted in the specified slot" ]
[ "Return a key to identify the connection descriptor.", "Parse the given file to obtains a Properties object.\n\n@param file\n@return a properties object containing all the properties present in the file.\n@throws InvalidDeclarationFileException", "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.", "Returns a Pair constructed from X and Y. Convenience method; the\ncompiler will disambiguate the classes used for you so that you\ndon't have to write out potentially long class names.", "Returns a new List containing the given objects.", "Sets the actual path for this ID\n\n@param pathId ID of path\n@param path value of path", "High-accuracy Complementary normal distribution function.\n\n@param x Value.\n@return Result.", "Copy the contents of the given byte array to the given OutputStream.\nLeaves the stream open when done.\n@param in the byte array to copy from\n@param out the OutputStream to copy to\n@throws IOException in case of I/O errors", "Writes triples which conect properties with there corresponding rdf\nproperties for statements, simple statements, qualifiers, reference\nattributes and values.\n\n@param document\n@throws RDFHandlerException" ]
private void bubbleUpNodeTable(DAGraph<DataT, NodeT> from, LinkedList<String> path) { if (path.contains(from.rootNode.key())) { path.push(from.rootNode.key()); // For better error message throw new IllegalStateException("Detected circular dependency: " + StringUtils.join(path, " -> ")); } path.push(from.rootNode.key()); for (DAGraph<DataT, NodeT> to : from.parentDAGs) { this.merge(from.nodeTable, to.nodeTable); this.bubbleUpNodeTable(to, path); } path.pop(); }
[ "Propagates node table of given DAG to all of it ancestors." ]
[ "Transform the operation into something the proxy controller understands.\n\n@param identity the server identity\n@return the transformed operation", "Use this API to fetch spilloverpolicy resource of given name .", "Get the text value for the specified element. If the element is null, or the element's body is empty then this method will return null.\n\n@param element\nThe Element\n@return The value String or null", "Returns a new macro resolver that loads message keys from the workplace bundle in the user setting's language.\n@param cms the CmsObject.\n@return a new macro resolver with messages from the workplace bundle in the current users locale.", "Start and configure GreenMail using given properties.\n\n@param properties the properties such as System.getProperties()", "Use this API to update snmpoption.", "Returns the full record for the given webhook.\n\n@param webhook The webhook to get.\n@return Request object", "Recursively update parent task dates.\n\n@param parentTask parent task", "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" ]
public final void error(Object pObject) { getLogger().log(FQCN, Level.ERROR, pObject, null); }
[ "generate a message for loglevel ERROR\n\n@param pObject the message Object" ]
[ "Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.", "Gets the pathClasses.\nA Map containing hints about what Class to be used for what path segment\nIf local instance not set, try parent Criteria's instance. If this is\nthe top-level Criteria, try the m_query's instance\n@return Returns a Map", "Returns the default output for functions without configured JSPs.\n\n@param request the current request\n@return the default HTML output", "Helper method fro providers to fire hotkey event in a separate thread\n\n@param hotKey hotkey to fire", "Use this API to delete nsip6 resources.", "Get the Exif data for the photo.\n\nThe calling user must have permission to view the photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@param secret\nThe secret\n@return A collection of Exif objects\n@throws FlickrException", "Get a loader that lists the Files in the current path,\nand monitors changes.", "Dump an array of bytes in hexadecimal.\n\n@param displayOffset the display offset (left column)\n@param data the byte array of data\n@param offset the offset to start dumping in the byte array\n@param len the length of data to dump\n@return the dump string", "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)" ]
public String getBaselineDurationText() { Object result = getCachedValue(TaskField.BASELINE_DURATION); if (result == null) { result = getCachedValue(TaskField.BASELINE_ESTIMATED_DURATION); } if (!(result instanceof String)) { result = null; } return (String) result; }
[ "Retrieves the text value for the baseline duration.\n\n@return baseline duration text" ]
[ "Use this API to fetch bridgegroup_vlan_binding resources of given name .", "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.", "Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater than\n1/3 the length of <code>coords</code>, or the points appear\nto be coincident, colinear, or coplanar.", "Refresh children using read-resource operation.", "Returns the value of the element with the minimum value\n@param A (Input) Matrix. Not modified.\n@return scalar", "Use this API to flush nssimpleacl.", "Creates a temporary folder using the given prefix to generate its name.\n@param prefix the prefix string to be used in generating the directory's name; may be <i>null</i>\n@return the <code>File</code> to the newly created folder\n@throws IOException", "Closes off all connections in all partitions.", "Update max.\n\n@param n the n\n@param c the c" ]
protected <T> Request doInvoke(ResponseReader responseReader, String methodName, RpcStatsContext statsContext, String requestData, AsyncCallback<T> callback) { RequestBuilder rb = doPrepareRequestBuilderImpl(responseReader, methodName, statsContext, requestData, callback); try { return rb.send(); } catch (RequestException ex) { InvocationException iex = new InvocationException( "Unable to initiate the asynchronous service invocation (" + methodName + ") -- check the network connection", ex); callback.onFailure(iex); } finally { if (statsContext.isStatsAvailable()) { statsContext.stats(statsContext.bytesStat(methodName, requestData.length(), "requestSent")); } } return null; }
[ "Performs a remote service method invocation. This method is called by\ngenerated proxy classes.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a {@link Request} object that can be used to track the request" ]
[ "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", "This method is called on every reference that is in the .class file.\n@param typeReference\n@return", "Executes a HTTP request and parses the JSON response into a Response instance.\n\n@param connection The HTTP request to execute.\n@return Response object of the deserialized JSON response", "this method mimics EMC behavior", "Returns true if required properties for FluoClient are set", "Compute the offset for the item in the layout cache\n@return true if the item fits the container, false otherwise", "Sets the position of a UIObject", "Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return", "Process a beat packet, potentially updating the master tempo and sending our listeners a master\nbeat notification. Does nothing if we are not active." ]
public QueryBuilder<T, ID> orderByRaw(String rawSql) { addOrderBy(new OrderBy(rawSql, (ArgumentHolder[]) null)); return this; }
[ "Add raw SQL \"ORDER BY\" clause to the SQL query statement.\n\n@param rawSql\nThe raw SQL order by clause. This should not include the \"ORDER BY\"." ]
[ "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", "Reads a command \"tag\" from the request.", "Use this API to update ntpserver.", "Flush output streams.", "Get a list of destinations and the values matching templated parameter for the given path.\nReturns an empty list when there are no destinations that are matched.\n\n@param path path to be routed.\n@return List of Destinations matching the given route.", "Use this API to delete appfwjsoncontenttype of given name.", "Pushes the Notification Viewed event to CleverTap.\n\n@param extras The {@link Bundle} object that contains the\nnotification details", "Locate the no arg constructor for the class.", "Try to extract a numeric version from a collection of strings.\n\n@param versionStrings Collection of string properties.\n@return The version string if exists in the collection." ]
public void removeDropPasteWorker(DropPasteWorkerInterface worker) { this.dropPasteWorkerSet.remove(worker); java.util.Iterator it = this.dropPasteWorkerSet.iterator(); int newDefaultActions = 0; while (it.hasNext()) newDefaultActions |= ((DropPasteWorkerInterface)it.next()).getAcceptableActions(defaultDropTarget.getComponent()); defaultDropTarget.setDefaultActions(newDefaultActions); }
[ "Remove a DropPasteWorker from the helper.\n@param worker the worker that should be removed" ]
[ "Get all the attribute values for an MBean by name. The values are HTML escaped.\n@return the {@link Map} of attribute names and values.\n@throws javax.management.AttributeNotFoundException Unable to find the 'attribute'\n@throws InstanceNotFoundException unable to find the specific bean\n@throws ReflectionException unable to interrogate the bean", "Use this API to fetch all the bridgetable resources that are configured on netscaler.", "List all apps for the current user's account.\n@param range The range of apps provided by {@link Range#getNextRange()}\n@return a list of apps", "Set the duration option.\n@param value the duration option to set ({@link EndType} as string).", "Updates the gatewayDirection attributes of all gateways.\n@param def", "Write the standard set of day types.\n\n@param calendars parent collection of calendars", "Function to perform backward activation", "Retrieve the state object associated with the specified interceptor instance and property\nname on this request context.\n\n@param interceptor the interceptor instance\n@param stateName the name key that the state object was stored under\n@param stateType class of the type the stored state should be returned as\n@param <T> the type the stored state should be returned as\n@return the stored state object\n@see #setState(HttpConnectionInterceptor, String, Object)\n@since 2.6.0", "Sets the distance from the origin to the near clipping plane for the\nwhole camera rig.\n\n@param near\nDistance to the near clipping plane." ]
public void addHiDpiImage(String factor, CmsJspImageBean image) { if (m_hiDpiImages == null) { m_hiDpiImages = CmsCollectionsGenericWrapper.createLazyMap(new CmsScaleHiDpiTransformer()); } m_hiDpiImages.put(factor, image); }
[ "adds a CmsJspImageBean as hi-DPI variant to this image\n@param factor the variant multiplier, e.g. \"2x\" (the common retina multiplier)\n@param image the image to be used for this variant" ]
[ "decodes the uriFragment\n\n@param res the resource that contains the feature holder\n@param uriFragment the fragment that should be decoded\n@return the decoded information\n@see LazyURIEncoder#encode(EObject, EReference, INode)", "Formats a resource type.\n\n@param resource MPXJ resource\n@return Primavera resource type", "Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level", "Rename with retry.\n\n@param from\n@param to\n@return <tt>true</tt> if the file was successfully renamed.", "Gets the progress.\n\n@return the progress", "List the slack values for each task.\n\n@param file ProjectFile instance", "Open the event stream\n\n@return true if successfully opened, false if not", "Adds all rows from the TSV file specified, using the provided delimiter and null value.\n\n@param file The file to read the data from.\n@param delimiter A column delimiter.\n@param nullValue Value to be treated as null in the source data.\n@return {@code this}", "Create a string from bytes using the given encoding\n\n@param bytes The bytes to create a string from\n@param encoding The encoding of the string\n@return The created string" ]
public void open(File versionDir) { /* acquire modification lock */ fileModificationLock.writeLock().lock(); try { /* check that the store is currently closed */ if(isOpen) throw new IllegalStateException("Attempt to open already open store."); // Find version directory from symbolic link or max version id if(versionDir == null) { versionDir = ReadOnlyUtils.getCurrentVersion(storeDir); if(versionDir == null) versionDir = new File(storeDir, "version-0"); } // Set the max version id long versionId = ReadOnlyUtils.getVersionId(versionDir); if(versionId == -1) { throw new VoldemortException("Unable to parse id from version directory " + versionDir.getAbsolutePath()); } Utils.mkdirs(versionDir); // Validate symbolic link, and create it if it doesn't already exist Utils.symlink(versionDir.getAbsolutePath(), storeDir.getAbsolutePath() + File.separator + "latest"); this.fileSet = new ChunkedFileSet(versionDir, routingStrategy, nodeId, maxValueBufferAllocationSize); storeVersionManager.syncInternalStateFromFileSystem(false); this.lastSwapped = System.currentTimeMillis(); this.isOpen = true; } catch(IOException e) { logger.error("Error in opening store", e); } finally { fileModificationLock.writeLock().unlock(); } }
[ "Open the store with the version directory specified. If null is specified\nwe open the directory with the maximum version\n\n@param versionDir Version Directory to open. If null, we open the max\nversioned / latest directory" ]
[ "Given a resource field number, this method returns the resource field name.\n\n@param key resource field number\n@return resource field name", "Migrate to Jenkins \"Credentials\" plugin from the old credential implementation", "This produces a canonical string.\n\nRFC 5952 describes canonical representations.\nhttp://en.wikipedia.org/wiki/IPv6_address#Recommended_representation_as_text\nhttp://tools.ietf.org/html/rfc5952", "Returns the ReportModel with given name.", "Creates the parents of nested XML elements if necessary.\n@param xmlContent the XML content that is edited.\n@param xmlPath the path of the (nested) element, for which the parents should be created\n@param l the locale for which the XML content is edited.", "Retrieves the column title for the given locale.\n\n@param locale required locale for the default column title\n@return column title", "Obtains a local date in Julian 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 Julian local date, not null\n@throws DateTimeException if unable to create the date", "Returns all accessible projects of the given organizational unit.\n\nThat is all projects which are owned by the current user or which are\naccessible for the group of the user.<p>\n\n@param cms the opencms context\n@param ouFqn the fully qualified name of the organizational unit to get projects for\n@param includeSubOus if all projects of sub-organizational units should be retrieved too\n\n@return all <code>{@link org.opencms.file.CmsProject}</code> objects in the organizational unit\n\n@throws CmsException if operation was not successful", "Generates a unique signature for an annotated type. Members without\nannotations are omitted to reduce the length of the signature\n\n@param <X>\n@param annotatedType\n@return hash of a signature for a concrete annotated type" ]
public synchronized int get(byte[] dst, int off, int len) { if (available == 0) { return 0; } // limit is last index to read + 1 int limit = idxGet < idxPut ? idxPut : capacity; int count = Math.min(limit - idxGet, len); System.arraycopy(buffer, idxGet, dst, off, count); idxGet += count; if (idxGet == capacity) { // Array end reached, check if we have more int count2 = Math.min(len - count, idxPut); if (count2 > 0) { System.arraycopy(buffer, 0, dst, off + count, count2); idxGet = count2; count += count2; } else { idxGet = 0; } } available -= count; return count; }
[ "Gets as many of the requested bytes as available from this buffer.\n\n@return number of bytes actually got from this buffer (0 if no bytes are available)" ]
[ "Use this API to fetch lbvserver_filterpolicy_binding resources of given name .", "Parse one resource to a shape object and add it to the shapes array\n@param shapes\n@param flatJSON\n@param resourceId\n@throws org.json.JSONException", "Sanity checks the input or declares a new matrix. Return matrix is an identity matrix.", "Sets the indirection handler class.\n\n@param indirectionHandlerClass The class for indirection handlers", "Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0", "This method finds the start of the next working period.\n\n@param cal current Calendar instance", "Samples a batch of indices in the range [0, numExamples) with replacement.", "Add a line symbolizer definition to the rule.\n\n@param styleJson The old style.", "Gets the progress.\n\n@return the progress" ]
private static boolean hasSelfPermissions(Context context, String... permissions) { for (String permission : permissions) { if (checkSelfPermission(context, permission) == PackageManager.PERMISSION_GRANTED) { return true; } } return false; }
[ "Returns true if the context has access to any given permissions." ]
[ "Sets an attribute in the main section of the manifest to a list.\nThe list elements will be joined with a single whitespace character.\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.", "Only sets and gets that are by row and column are used.", "Get the axis along the orientation\n@return", "Counts the number of lines.\n\n@param str the input string\n@return Returns the number of lines terminated by '\\n' in string", "Clones the given reference.\n\n@param refDef The reference descriptor\n@param prefix A prefix for the name\n@return The cloned reference", "A GString variant of the equivalent GString method.\n\n@param self the original GString\n@param condition the closure that must evaluate to true to continue taking elements\n@return a prefix of elements in the GString where each\nelement passed to the given closure evaluates to true\n@since 2.3.7", "Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value", "Await the completion of all currently active operations.\n\n@param timeout the timeout\n@param unit the time unit\n@return {@code } false if the timeout was reached and there were still active operations\n@throws InterruptedException", "Make sure that we have some reasonable defaults available. These would typically be provided by the rulesets\nin the real world." ]
public CollectionRequest<User> findByWorkspace(String workspace) { String path = String.format("/workspaces/%s/users", workspace); return new CollectionRequest<User>(this, User.class, path, "GET"); }
[ "Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object" ]
[ "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", "Get the number of views, comments and favorites on a photostream for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotostreamStats.htm\"", "Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source", "Populate the model with the object's properties.\n\n@param object object whose properties we're displaying\n@param excludedMethods method names to exclude", "crates a StencilSet object and add it to the current diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException", "Utility function that copies a string array except for the first element\n\n@param arr Original array of strings\n@return Copied array of strings", "This method retrieves the calendar hours for the specified day.\nNote that if this is a derived calendar, then this method\nwill refer to the base calendar where no hours are specified\nin the derived calendar.\n\n@param day Day instance\n@return calendar hours", "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", "Returns the corresponding ModuleSpec service name for the given module.\n\n@param identifier The module identifier\n@return The service name of the ModuleSpec service" ]
public static java.sql.Time rollTime(java.util.Date startDate, int period, int amount) { GregorianCalendar gc = new GregorianCalendar(); gc.setTime(startDate); gc.add(period, amount); return new java.sql.Time(gc.getTime().getTime()); }
[ "Roll the java.util.Time forward or backward.\n\n@param startDate - The start date\n@param period Calendar.YEAR etc\n@param amount - Negative to rollbackwards." ]
[ "Retrieves the parent task for a Phoenix activity.\n\n@param activity Phoenix activity\n@return parent task", "Gets the prefix from value.\n\n@param value the value\n@return the prefix from value", "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}", "Create a document that parses the tile's labelFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@param labelStyleInfo\nlabel style info\n@return graphics document\n@throws RenderException\ncannot render", "Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value", "key function. first validate if the ACM has adequate data; then execute\nit after the validation. the new ParallelTask task guareetee to have the\ntargethost meta and command meta not null\n\n@param handler\nthe handler\n@return the parallel task", "commit all envelopes against the current broker", "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.", "Handles the response of the SendData request.\n@param incomingMessage the response message to process." ]
private void addSequence(String sequenceName, HighLowSequence seq) { // lookup the sequence map for calling DB String jcdAlias = getBrokerForClass() .serviceConnectionManager().getConnectionDescriptor().getJcdAlias(); Map mapForDB = (Map) sequencesDBMap.get(jcdAlias); if(mapForDB == null) { mapForDB = new HashMap(); } mapForDB.put(sequenceName, seq); sequencesDBMap.put(jcdAlias, mapForDB); }
[ "Put new sequence object for given sequence name.\n@param sequenceName Name of the sequence.\n@param seq The sequence object to add." ]
[ "Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array.", "Appends to the statement table and all tables joined to it.\n@param alias the table alias\n@param where append conditions for WHERE clause here", "Calculate start dates for a monthly relative recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Attempts to clear the global log context used for embedded servers.", "Get parent digest of an image.\n\n@param digest\n@param host\n@return", "Record a device announcement in the devices map, so we know whe saw it.\n\n@param announcement the announcement to be recorded", "Calculates all dates of the series.\n@return all dates of the series in milliseconds.", "Returns the value of an optional property, if the property is\nset. If it is not set defval is returned.", "Creates a timestamp from the equivalent long value. This conversion\ntakes account of the time zone and any daylight savings time.\n\n@param timestamp timestamp expressed as a long integer\n@return new Date instance" ]
public void finalizeConfig() { assert !configFinalized; try { retrieveEngine(); } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } configFinalized = true; }
[ "This method is used to finalize the configuration\nafter the configuration items have been set." ]
[ "Used to ensure that the general footer label will be at the same Y position as the variables in the band.\n@param band\n@return", "Read task data from a Gantt Designer file.\n\n@param gantt Gantt Designer file", "Use this API to fetch cachepolicylabel_binding resource of given name .", "Term prefix.\n\n@param term\nthe term\n@return the string", "Use this API to fetch appfwpolicy_csvserver_binding resources of given name .", "Run a CLI script from a File.\n\n@param script The script file.", "Sets a listener for user actions within the SearchView.\n\n@param listener the listener object that receives callbacks when the user performs\nactions in the SearchView such as clicking on buttons or typing a query.", "Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern", "Print priority.\n\n@param priority Priority instance\n@return priority value" ]
private JSONArray toJsonStringArray(Collection<? extends Object> collection) { if (null != collection) { JSONArray array = new JSONArray(); for (Object o : collection) { array.put("" + o); } return array; } else { return null; } }
[ "Convert a collection of objects to a JSON array with the string representations of that objects.\n@param collection the collection of objects.\n@return the JSON array with the string representations." ]
[ "Finds properties of datatype string on test.wikidata.org. Since the test\nsite changes all the time, we cannot hardcode a specific property here.\nInstead, we just look through all properties starting from P1 to find the\nfirst few properties of type string that have an English label. These\nproperties are used for testing in this code.\n\n@param connection\n@throws MediaWikiApiErrorException\n@throws IOException", "Examins the structure of A for QR decomposition\n@param A matrix which is to be decomposed\n@return true if the solution is valid or false if the decomposition can't be performed (i.e. requires column pivots)", "Reflection API to find the method corresponding to the default implementation of a trait, given a bridge method.\n@param someMethod a method node\n@return null if it is not a method implemented in a trait. If it is, returns the method from the trait class.", "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", "Close the open stream.\n\nClose the stream if it was opened before", "Get a misc file.\n\n@param root the root\n@param item the misc content item\n@return the misc file", "Core implementation of matchPath. It is isolated so that it can be called\nfrom TokenizedPattern.", "Use this API to clear gslbldnsentries.", "Operators which affect the variables to its left and right" ]
public static Integer convertProfileIdentifier(String profileIdentifier) throws Exception { Integer profileId = -1; if (profileIdentifier == null) { throw new Exception("A profileIdentifier must be specified"); } else { try { profileId = Integer.parseInt(profileIdentifier); } catch (NumberFormatException ne) { // this is OK.. just means it's not a # // try to get it by name instead profileId = ProfileService.getInstance().getIdFromName(profileIdentifier); } } logger.info("Profile id is {}", profileId); return profileId; }
[ "Obtain the profile identifier.\n\n@param profileIdentifier Can be profile ID, or friendly name\n@return\n@throws Exception" ]
[ "Creates a new HTML-formatted label with the given content.\n\n@param html the label content", "Converts the paged list.\n\n@param uList the resource list to convert from\n@return the converted list", "Apply filter to an image.\n\n@param source FastBitmap", "Common mechanism to convert Synchro commentary recorss into notes.\n\n@param rows commentary table rows\n@return note text", "Parse the XML for a collection as returned by getInfo call.\n\n@param collectionElement\n@return", "Returns a new color with a new value of the specified HSL\ncomponent.", "Send a device found announcement to all registered listeners.\n\n@param announcement the message announcing the new device", "Read holidays from the database and create calendar exceptions.", "Renumbers all entity unique IDs." ]
protected synchronized ResourceRoot getSeamIntResourceRoot() throws DeploymentUnitProcessingException { try { if (seamIntResourceRoot == null) { final ModuleLoader moduleLoader = Module.getBootModuleLoader(); Module extModule = moduleLoader.loadModule(EXT_CONTENT_MODULE); URL url = extModule.getExportedResource(SEAM_INT_JAR); if (url == null) throw ServerLogger.ROOT_LOGGER.noSeamIntegrationJarPresent(extModule); File file = new File(url.toURI()); VirtualFile vf = VFS.getChild(file.toURI()); final Closeable mountHandle = VFS.mountZip(file, vf, TempFileProviderService.provider()); Service<Closeable> mountHandleService = new Service<Closeable>() { public void start(StartContext startContext) throws StartException { } public void stop(StopContext stopContext) { VFSUtils.safeClose(mountHandle); } public Closeable getValue() throws IllegalStateException, IllegalArgumentException { return mountHandle; } }; ServiceBuilder<Closeable> builder = serviceTarget.addService(ServiceName.JBOSS.append(SEAM_INT_JAR), mountHandleService); builder.setInitialMode(ServiceController.Mode.ACTIVE).install(); serviceTarget = null; // our cleanup service install work is done MountHandle dummy = MountHandle.create(null); // actual close is done by the MSC service above seamIntResourceRoot = new ResourceRoot(vf, dummy); } return seamIntResourceRoot; } catch (Exception e) { throw new DeploymentUnitProcessingException(e); } }
[ "Lookup Seam integration resource loader.\n@return the Seam integration resource loader\n@throws DeploymentUnitProcessingException for any error" ]
[ "Gets the publisher wrapped by the specofoed FlexiblePublisher.\n@param publisher The FlexiblePublisher wrapping the publisher.\n@param type The type of the publisher wrapped by the FlexiblePublisher.\n@return The publisher object wrapped by the FlexiblePublisher.\nNull is returned if the FlexiblePublisher does not wrap a publisher of the specified type.\n@throws IllegalArgumentException In case publisher is not of type\n{@link org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher}", "Make a list value containing the specified values.", "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", "Stops all streams.", "If credentials are incorrect or not provided for Basic Auth, then Android\nmay throw this exception when an HTTP 401 is received. A separate exception\nis thrown for proxy authentication errors. Checking for this response and\nreturning the proper status.\n@param ex the exception raised from Android\n@return HTTP Status Code", "Determines the constraints relating to a task.\n\n@param row row data\n@param task Task instance", "Runs a queued task, if the queue is not already empty.\n\nNote that this will decrement the request count if there are no queued tasks to be run\n\n@param hasPermit If the caller has already called {@link #beginRequest(boolean force)}", "Reverse Engineers an XPath Expression of a given Node in the DOM.\n\n@param node the given node.\n@return string xpath expression (e.g., \"/html[1]/body[1]/div[3]\").", "Convert gallery name to not found error key.\n@param gallery gallery name for example \"downloadgallery\"\n@return key as string \"ERR_REASON_NO_DOWNLOADGALLERY_0\"" ]
private DiscountCurve createDiscountCurve(String discountCurveName) { DiscountCurve discountCurve = model.getDiscountCurve(discountCurveName); if(discountCurve == null) { discountCurve = DiscountCurveInterpolation.createDiscountCurveFromDiscountFactors(discountCurveName, new double[] { 0.0 }, new double[] { 1.0 }); model = model.addCurves(discountCurve); } return discountCurve; }
[ "Get a discount curve from the model, if not existing create a discount curve.\n\n@param discountCurveName The name of the discount curve to create.\n@return The discount factor curve associated with the given name." ]
[ "Set the role info for this user. If set, this will be used to set the user's authorizations.\n\n@param roles the roles\n@since 1.10.0", "Promote a module in the Grapes server\n\n@param name\n@param version\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Deletes the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name.", "This method retrieves an integer 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 integer data", "Calculates the next date, starting from the provided date.\n\n@param date the current date.\n@param interval the number of month to add when moving to the next month.", "Returns a long between interval\n@param min Minimum value\n@param max Maximum value\n@return long number", "Add the collection of elements to this collection. This will also them to the associated database table.\n\n@return Returns true if any of the items did not already exist in the collection otherwise false.", "Encode a long into a byte array at an offset\n\n@param ba Byte array\n@param offset Offset\n@param v Long value\n@return byte array given in input", "We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException" ]
public void setWeekOfMonth(String weekOfMonthStr) { final WeekOfMonth weekOfMonth = WeekOfMonth.valueOf(weekOfMonthStr); if ((null == m_model.getWeekOfMonth()) || !m_model.getWeekOfMonth().equals(weekOfMonth)) { removeExceptionsOnChange(new Command() { public void execute() { m_model.setWeekOfMonth(weekOfMonth); onValueChange(); } }); } }
[ "Set the week of month.\n@param weekOfMonthStr the week of month to set." ]
[ "Returns real unquoted value for a DisplayValue\n@param key\n@return", "Get the int resource id with specified type definition\n@param context\n@param id String resource id\n@return int resource id", "Drop down item view\n\n@param position position of item\n@param convertView View of item\n@param parent parent view of item's view\n@return covertView", "Binds the Identities Primary key values to the statement.", "Tokenizes the input file and extracts the required data.\n\n@param is input stream\n@throws MPXJException", "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", "Find the index of the first matching element in the list\n@param element the element value to find\n@return the index of the first matching element, or <code>-1</code> if none found", "Use this API to fetch vpnvserver_vpnnexthopserver_binding resources of given name .", "Accessor method used to retrieve a Boolean object 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" ]
public static BoxConfig readFrom(Reader reader) throws IOException { JsonObject config = JsonObject.readFrom(reader); JsonObject settings = (JsonObject) config.get("boxAppSettings"); String clientId = settings.get("clientID").asString(); String clientSecret = settings.get("clientSecret").asString(); JsonObject appAuth = (JsonObject) settings.get("appAuth"); String publicKeyId = appAuth.get("publicKeyID").asString(); String privateKey = appAuth.get("privateKey").asString(); String passphrase = appAuth.get("passphrase").asString(); String enterpriseId = config.get("enterpriseID").asString(); return new BoxConfig(clientId, clientSecret, enterpriseId, publicKeyId, privateKey, passphrase); }
[ "Reads OAuth 2.0 with JWT app configurations from the reader. The file should be in JSON format.\n\n@param reader a reader object which points to a JSON formatted configuration file\n@return a new Instance of BoxConfig\n@throws IOException when unable to access the mapping file's content of the reader" ]
[ "Gets a JsonObject containing any pending changes to this object that can be sent back to the Box API.\n@return a JsonObject containing the pending changes.", "Returns the corresponding ModuleSpec service name for the given module.\n\n@param identifier The module identifier\n@return The service name of the ModuleSpec service", "Cancel all currently active operations.\n\n@return a list of cancelled operations", "Attaches a pre-existing set of hours to the correct\nday within the calendar.\n\n@param hours calendar hours instance", "Seeks to the given day within the current month\n@param dayOfMonth the day of the month to seek to, represented as an integer\nfrom 1 to 31. Must be guaranteed to parse as an Integer. If this day is\nbeyond the last day of the current month, the actual last day of the month\nwill be used.", "Read a text file from assets into a single string\n\n@param context\nA non-null Android Context\n@param asset\nThe asset file to read\n@return The contents or null on error.", "Send a database announcement to all registered listeners.\n\n@param slot the media slot whose database availability has changed\n@param database the database whose relevance has changed\n@param available if {@code} true, the database is newly available, otherwise it is no longer relevant", "Gets the string representation of the path to the current JSON element.\n\n@param key the leaf key", "Use this API to fetch systemsession resource of given name ." ]
private static void reverse(int first, int last, Swapper swapper) { // no more needed since manually inlined while (first < --last) { swapper.swap(first++,last); } }
[ "Reverses a sequence of elements.\n@param array Array containing the sequence\n@param first Beginning of the range\n@param last One past the end of the range\n@exception ArrayIndexOutOfBoundsException If the range\nis invalid." ]
[ "Extract a Class from the given Type.", "Write a resource.\n\n@param record resource instance\n@throws IOException", "Write resource assignment workgroup.\n\n@param record resource assignment workgroup instance\n@throws IOException", "Added in Gerrit 2.11.", "Makes object obj persistent in the underlying persistence system.\nE.G. by INSERT INTO ... or UPDATE ... in an RDBMS.\nThe ObjectModification parameter can be used to determine whether INSERT or update is to be used.\nThis functionality is typically called from transaction managers, that\ntrack which objects have to be stored. If the object is an unmaterialized\nproxy the method return immediately.", "Send post request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws IOException the io exception", "Updates the file metadata.\n\n@param metadata the new metadata values.\n@return the metadata returned from the server.", "Arbitrarily resolve the inconsistency by choosing the first object if\nthere is one.\n\n@param values The list of objects\n@return A single value, if one exists, taken from the input list.", "Plots the trajectory\n@param title Title of the plot\n@param t Trajectory to be plotted" ]
private SortedProperties getLocalization(Locale locale) throws IOException, CmsException { if (null == m_localizations.get(locale)) { switch (m_bundleType) { case PROPERTY: loadLocalizationFromPropertyBundle(locale); break; case XML: loadLocalizationFromXmlBundle(locale); break; case DESCRIPTOR: return null; default: break; } } return m_localizations.get(locale); }
[ "Reads the current properties for a language. If not already done, the properties are read from the respective file.\n@param locale the locale for which the localization should be returned.\n@return the properties.\n@throws IOException thrown if reading the properties from a file fails.\n@throws CmsException thrown if reading the properties from a file fails." ]
[ "Read the set of property files. Keys and Values are automatically validated and converted.\n\n@param resourceLoader\n@return all the properties from the weld.properties file", "Returns the index descriptor definition of the given name if it exists.\n\n@param name The name of the index\n@return The index descriptor definition or <code>null</code> if there is no such index", "A specific, existing task can be deleted by making a DELETE request on the\nURL for that task. Deleted tasks go into the \"trash\" of the user making\nthe delete request. Tasks can be recovered from the trash within a period\nof 30 days; afterward they are completely removed from the system.\n\nReturns an empty data record.\n\n@param task The task to delete.\n@return Request object", "Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.", "Assign arguments to the statement.\n\n@return The statement passed in or null if it had to be closed on error.", "Sets the default pattern values dependent on the provided start date.\n@param startDate the date, the default values are determined with.", "Validate the Combination filter field in Multi configuration jobs", "Returns the next power of 2 after the input value x.\n\n@param x Input value x.\n@return Returns the next power of 2 after the input value x.", "Shut down the input manager.\n\nAfter this call, GearVRf will not be able to access IO devices." ]
public static String[] tokenizeUnquoted(String s) { List tokens = new LinkedList(); int first = 0; while (first < s.length()) { first = skipWhitespace(s, first); int last = scanToken(s, first); if (first < last) { tokens.add(s.substring(first, last)); } first = last; } return (String[])tokens.toArray(new String[tokens.size()]); }
[ "This method tokenizes a string by space characters,\nbut ignores spaces in quoted parts,that are parts in\n'' or \"\". The method does allows the usage of \"\" in ''\nand '' in \"\". The space character between tokens is not\nreturned.\n\n@param s the string to tokenize\n@return the tokens" ]
[ "Optionally specify the variable name to use for the output of this condition", "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.", "Retrieves the overallocated flag.\n\n@return overallocated flag", "Performs the transformation.\n\n@return True if the file was modified.", "Adds a boolean refinement for the next queries.\n\n@param attribute the attribute to refine on.\n@param value the value to refine with.\n@return this {@link Searcher} for chaining.", "returns true if a job was queued within a timeout", "Collect the total times measured by all known named timers of the given\nname. This is useful to add up times that were collected across separate\nthreads.\n\n@param timerName\n@return timer", "Serialize a map of objects to a JSON String.\n\n@param map The map of objects to serialize.\n@param jsonObjectClass The @JsonObject class of the list elements", "Get logs for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return log stream response" ]
@SafeVarargs public static <T> Set<T> of(T... elements) { Preconditions.checkNotNull(elements); return ImmutableSet.<T> builder().addAll(elements).build(); }
[ "Creates a new immutable set that consists of given elements.\n\n@param elements the given elements\n@return a new immutable set that consists of given elements" ]
[ "This method performs a series of permissions checks given a directory and properties file path.\n\n1 - Check whether the parent directory dirPath has proper execute and read permissions\n2 - Check whether properties file path is readable and writable\n\nIf either of the permissions checks fail, update validFilePermissions and filePermissionsProblemPath\nappropriately.", "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", "Creates a new SimpleMatrix with the specified DMatrixRMaj used as its internal matrix. This means\nthat the reference is saved and calls made to the returned SimpleMatrix will modify the passed in DMatrixRMaj.\n\n@param internalMat The internal DMatrixRMaj of the returned SimpleMatrix. Will be modified.", "Returns new instance of OptionalString with given key and value\n@param key key of the returned OptionalString\n@param value wrapped string\n@return given object wrapped in OptionalString with given key", "Retrieve a specific row by index number, creating a blank row if this row does not exist.\n\n@param index index number\n@return MapRow instance", "Creates an attachment from a binary input stream.\nThe content of the stream will be transformed into a Base64 encoded string\n@throws IOException if an I/O error occurs\n@throws java.lang.IllegalArgumentException if mediaType is not binary", "Parses the given Reader for PmdRuleSets.\n\n@return The extracted PmdRuleSet - empty in case of problems, never null.", "If you register a CustomExpression with the name \"customExpName\", then this will create the text needed\nto invoke it in a JRDesignExpression\n\n@param customExpName\n@param usePreviousFieldValues\n@return", "A simple convinience function that decomposes the matrix but automatically checks the input ti make\nsure is not being modified.\n\n@param decomp Decomposition which is being wrapped\n@param M THe matrix being decomposed.\n@param <T> Matrix type.\n@return If the decomposition was successful or not." ]
public static base_responses apply(nitro_service client, nspbr6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nspbr6 applyresources[] = new nspbr6[resources.length]; for (int i=0;i<resources.length;i++){ applyresources[i] = new nspbr6(); } result = perform_operation_bulk_request(client, applyresources,"apply"); } return result; }
[ "Use this API to apply nspbr6 resources." ]
[ "Use this API to save cachecontentgroup.", "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", "Use this API to rename a responderpolicy resource.", "determine the what state a transaction is in by inspecting the primary column", "Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided", "Sets the max.\n\n@param n the new max", "Returns whether this subnet or address has alphabetic digits when printed.\n\nNote that this method does not indicate whether any address contained within this subnet has alphabetic digits,\nonly whether the subnet itself when printed has alphabetic digits.\n\n@return whether the section has alphabetic digits when printed.", "Use this API to update autoscaleaction.", "Gets bounds which are identical for all dimensions.\n\n@param dim The number of dimensions.\n@param l The value of all lower bounds.\n@param u The value of all upper bounds.\n@return The new bounds." ]
public static dnssuffix[] get(nitro_service service) throws Exception{ dnssuffix obj = new dnssuffix(); dnssuffix[] response = (dnssuffix[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the dnssuffix resources that are configured on netscaler." ]
[ "Executes a batch plan.\n\n@param batchId Used as the ID of the batch plan. This allows related\ntasks on client- & server-side to pretty print messages in a\nmanner that debugging can track specific batch plans across the\ncluster.\n@param batchPlan The batch plan...", "in truth we probably only need the types as injected by the metadata binder", "Flush output streams.", "Returns the name of the current member which is the name in the case of a field, or the property name for an\naccessor method.\n\n@return The member name\n@exception XDocletException if an error occurs", "Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.", "Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs", "Sets the left padding for all cells in the row.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining", "Returns the value of the primitive type from the given string value.\n\n@param value the value to parse\n@param cls the primitive type class\n@return the boxed type value or {@code null} if the given class is not a primitive type", "Add a single header key-value pair. If one with the name already exists,\nit gets replaced.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself." ]
protected void loadEntries(final StorageAwareResource resource, final ZipInputStream zipIn) throws IOException { zipIn.getNextEntry(); BufferedInputStream _bufferedInputStream = new BufferedInputStream(zipIn); this.readContents(resource, _bufferedInputStream); zipIn.getNextEntry(); BufferedInputStream _bufferedInputStream_1 = new BufferedInputStream(zipIn); this.readResourceDescription(resource, _bufferedInputStream_1); if (this.storeNodeModel) { zipIn.getNextEntry(); BufferedInputStream _bufferedInputStream_2 = new BufferedInputStream(zipIn); this.readNodeModel(resource, _bufferedInputStream_2); } }
[ "Load entries from the storage.\nOverriding methods should first delegate to super before adding their own entries." ]
[ "Generate attachment extension from mime type\n\n@param type valid mime-type\n@return extension if it's known for specified mime-type, or empty string\notherwise", "Return list of all files in the directory.\n\n@param directory target directory on file system\n@return list of files in the directory or empty list if directory is empty.", "Get the photo or ticket id from the response.\n\n@param async\n@param response\n@return", "Process the hours and exceptions for an individual calendar.\n\n@param calendar project calendar\n@param calendarData hours and exception rows for this calendar", "Get container for principal.\n\n@param cms cmsobject\n@param list of principals\n@param captionID caption id\n@param descID description id\n@param iconID icon id\n@param ouID ou id\n@param icon icon\n@param iconList iconlist\n@return indexedcontainer", "Executes the sequence of operations", "Escape a value to be HTML friendly.\n@param value the Object value.\n@return the HTML-escaped String, or <null> if the value is null.", "Use this API to update vridparam.", "Returns the bill for the month specified.\n\n@param month for which bill to retrieve.\n@param year for which bill to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations." ]
public void invalidate() { synchronized (mMeasuredChildren) { Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "invalidate all [%d]", mMeasuredChildren.size()); mMeasuredChildren.clear(); } }
[ "Invalidate layout setup." ]
[ "Returns the number of consecutive trailing one or zero bits.\nIf network is true, returns the number of consecutive trailing zero bits.\nOtherwise, returns the number of consecutive trailing one bits.\n\n@param network\n@return", "Creates a REST client used to perform Voldemort operations against the\nCoordinator\n\n@param storeName Name of the store to perform the operations on\n@param resolver Custom resolver as specified by the application\n@return", "Unlinks a set of dependencies from this task.\n\n@param task The task to remove dependencies from.\n@return Request object", "This method writes extended attribute data for a resource.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource", "Returns the count of total number of unread inbox messages for the user\n@return int - count of all unread messages", "Method which performs strength checks on password. It returns outcome which can be used by CLI.\n\n@param isAdminitrative - administrative checks are less restrictive. This means that weak password or one which violates restrictions is not indicated as failure.\nAdministrative checks are usually performed by admin changing/setting default password for user.\n@param userName - the name of user for which password is set.\n@param password - password.\n@return", "Abort an active extern transaction associated with the given PB.", "Create a local target.\n\n@param jbossHome the jboss home\n@param moduleRoots the module roots\n@param bundlesRoots the bundle roots\n@return the local target\n@throws IOException", "Common method for creating styles.\n\n@param template the template that the map is part of\n@param styleRef the style ref identifying the style\n@param <T> the source type" ]
private static String wordShapeDan1(String s) { boolean digit = true; boolean upper = true; boolean lower = true; boolean mixed = true; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (!Character.isDigit(c)) { digit = false; } if (!Character.isLowerCase(c)) { lower = false; } if (!Character.isUpperCase(c)) { upper = false; } if ((i == 0 && !Character.isUpperCase(c)) || (i >= 1 && !Character.isLowerCase(c))) { mixed = false; } } if (digit) { return "ALL-DIGITS"; } if (upper) { return "ALL-UPPER"; } if (lower) { return "ALL-LOWER"; } if (mixed) { return "MIXED-CASE"; } return "OTHER"; }
[ "A fairly basic 5-way classifier, that notes digits, and upper\nand lower case, mixed, and non-alphanumeric.\n\n@param s String to find word shape of\n@return Its word shape: a 5 way classification" ]
[ "Added in Gerrit 2.11.", "Initializes the type and validates it", "Use this API to fetch statistics of lbvserver_stats resource of given name .", "Creates a quad consisting of two triangles, with the specified width and\nheight.\n\n@param gvrContext current {@link GVRContext}\n\n@param width\nthe quad's width\n@param height\nthe quad's height\n@return A 2D, rectangular mesh with four vertices and two triangles", "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", "Helper method to add a Java integer value to a message digest.\n\n@param digest the message digest being built\n@param value the integer whose bytes should be included in the digest", "Returns this bar code's pattern, converted into a set of corresponding codewords.\nUseful for bar codes that encode their content as a pattern.\n\n@param size the number of digits in each codeword\n@return this bar code's pattern, converted into a set of corresponding codewords", "Calculates the static drift. Static means, that the drift does not change direction or intensity over time.\n\n@param tracks Tracks which seems to exhibit a local drift\n@return The static drift over all trajectories", "We have received an update that invalidates the beat grid for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no beat grid for the associated player" ]
private void processVirtualHostName(HttpMethod httpMethodProxyRequest, HttpServletRequest httpServletRequest) { String virtualHostName; if (httpMethodProxyRequest.getRequestHeader(STRING_HOST_HEADER_NAME) != null) { virtualHostName = HttpUtilities.removePortFromHostHeaderString(httpMethodProxyRequest.getRequestHeader(STRING_HOST_HEADER_NAME).getValue()); } else { virtualHostName = HttpUtilities.getHostNameFromURL(httpServletRequest.getRequestURL().toString()); } httpMethodProxyRequest.getParams().setVirtualHost(virtualHostName); }
[ "Set virtual host so the server can direct the request. Value is the host header if it is set, otherwise\nuse the hostname from the original request.\n\n@param httpMethodProxyRequest\n@param httpServletRequest" ]
[ "Sets the value to a default.", "Transfer the data from the inputStream to the outputStream. Then close both streams.", "Appends to the statement table and all tables joined to it.\n@param alias the table alias\n@param where append conditions for WHERE clause here", "Run a task periodically, for a set number of times.\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 repetitions\nRepeat count\n@return {@code null} if {@code repetitions < 1}; otherwise, an interface\nthat lets you query the status; cancel; or reschedule the event.", "Was the CDJ playing a track when this update was sent?\n\n@return true if the play flag was set, or, if this seems to be a non-nexus player, if <em>P<sub>1</sub></em>\nhas a value corresponding to a playing state.", "Use this API to fetch tmsessionpolicy_binding resource of given name .", "Removes the supplied marker from the map.\n\n@param marker", "Write the config to the writer.", "Invite a user to an enterprise.\n@param api the API connection to use for the request.\n@param userLogin the login of the user to invite.\n@param enterpriseID the ID of the enterprise to invite the user to.\n@return the invite info." ]
@SuppressWarnings("InsecureCryptoUsage") // Only used in known-weak crypto "legacy" mode. static byte[] aes128Encrypt(StringBuilder message, String key) { try { key = normalizeString(key, 16); rightPadString(message, '{', 16); Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding"); cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key.getBytes(), "AES")); return cipher.doFinal(message.toString().getBytes()); } catch (Exception e) { throw new RuntimeException(e); } }
[ "Encrypt a string with AES-128 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output." ]
[ "Send an error to the client with a message.\n\n@param httpServletResponse the response to send the error to.\n@param message the message to send\n@param code the error code", "Creates a new GridLines instance.\n\n@param data data block\n@param offset offset into data block\n@return new GridLines instance", "Search for the second entry in the second database. Use this method for databases configured with no duplicates.\n\n@param second second key (value for first).\n@return null if no entry found, otherwise the value.", "set the specified object at index\n\n@param object The object to add at the end of the array.", "Adds a new cell to the current grid\n@param cell the td component", "Use this API to fetch wisite_binding resource of given name .", "Send the started notification", "Determines if a token stream contains only numeric tokens\n@param stream\n@return true if all tokens in the given stream can be parsed as an integer", "Add hours to a parent object.\n\n@param parentNode parent node\n@param hours list of ranges" ]
protected void captureCenterEye(GVRRenderTarget renderTarget, boolean isMultiview) { if (mScreenshotCenterCallback == null) { return; } // TODO: when we will use multithreading, create new camera using centercamera as we are adding posteffects into it final GVRCamera centerCamera = mMainScene.getMainCameraRig().getCenterCamera(); final GVRMaterial postEffect = new GVRMaterial(this, GVRMaterial.GVRShaderType.VerticalFlip.ID); centerCamera.addPostEffect(postEffect); GVRRenderTexture posteffectRenderTextureB = null; GVRRenderTexture posteffectRenderTextureA = null; if(isMultiview) { posteffectRenderTextureA = mRenderBundle.getEyeCapturePostEffectRenderTextureA(); posteffectRenderTextureB = mRenderBundle.getEyeCapturePostEffectRenderTextureB(); renderTarget = mRenderBundle.getEyeCaptureRenderTarget(); renderTarget.cullFromCamera(mMainScene, centerCamera ,mRenderBundle.getShaderManager()); renderTarget.beginRendering(centerCamera); } else { posteffectRenderTextureA = mRenderBundle.getPostEffectRenderTextureA(); posteffectRenderTextureB = mRenderBundle.getPostEffectRenderTextureB(); } renderTarget.render(mMainScene,centerCamera, mRenderBundle.getShaderManager(), posteffectRenderTextureA, posteffectRenderTextureB); centerCamera.removePostEffect(postEffect); readRenderResult(renderTarget, EYE.MULTIVIEW, false); if(isMultiview) renderTarget.endRendering(); final Bitmap bitmap = Bitmap.createBitmap(mReadbackBufferWidth, mReadbackBufferHeight, Bitmap.Config.ARGB_8888); mReadbackBuffer.rewind(); bitmap.copyPixelsFromBuffer(mReadbackBuffer); final GVRScreenshotCallback callback = mScreenshotCenterCallback; Threads.spawn(new Runnable() { public void run() { callback.onScreenCaptured(bitmap); } }); mScreenshotCenterCallback = null; }
[ "capture center eye" ]
[ "Returns an array of the names of all atributes of this descriptor.\n\n@return The list of attribute names (will not be <code>null</code>)", "Updates the schema of an existing metadata template.\n\n@param api the API connection to be used\n@param scope the scope of the object\n@param template Unique identifier of the template\n@param fieldOperations the fields that needs to be updated / added in the template\n@return the updated metadata template", "Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.", "Parse parameters from this request using HTTP.\n\n@param req The ServletRequest containing all request parameters.\n@param cms The OpenCms object.\n@return CmsSpellcheckingRequest object that contains parsed parameters.", "Print channels to the left of log messages\n@param width The width (in characters) to print the channels\n@return this", "Group results by the specified field.\n\n@param fieldName by which to group results\n@param isNumber whether field isNumeric.\n@return this for additional parameter setting or to query", "Returns a single sort option configuration as configured via the methods parameter, or null if the parameter does not specify a sort option.\n@param json The JSON sort option configuration.\n@return The sort option configuration, or null if the JSON could not be read.", "Returns the service id with the propertype.\n\n@param serviceReference\n@return long value for the service id", "Read the set of property files. Keys and Values are automatically validated and converted.\n\n@param resourceLoader\n@return all the properties from the weld.properties file" ]
@SuppressWarnings("rawtypes") public static final Map getMap(Locale locale, String key) { ResourceBundle bundle = ResourceBundle.getBundle(LocaleData.class.getName(), locale); return ((Map) bundle.getObject(key)); }
[ "Convenience method for retrieving a Map resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value" ]
[ "Gets the value of the given header field.\n@param fieldName name of the header field.\n@return value of the header.", "Set the DPI value for GeoServer if there are already FORMAT_OPTIONS.", "Gets an overrideID for a class name, method name\n\n@param className name of class\n@param methodName name of method\n@return override ID of method", "Convert an ObjectBank to corresponding collection of data features and\nlabels.\n\n@return A List of pairs, one for each document, where the first element is\nan int[][][] representing the data and the second element is an\nint[] representing the labels.", "Calling this twice will not actually overwrite the gauge\n\n@param collectionSizeGauge", "Scans the jar file and returns the paths that match the includes and excludes.\n\n@return A List of paths\n@throws An IllegalStateException when an I/O error occurs in reading the jar file.", "Moves our current playback position to the specified beat; this will be reflected in any status and beat packets\nthat we are sending. An incoming value less than one will jump us to the first beat.\n\n@param beat the beat that we should pretend to be playing", "Provides a collection of all the nodes in the tree\nusing a depth first traversal.\n\n@return the list of (depth-first) ordered nodes", "Utility method to retrieve the previous working date finish time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of previous work finish" ]
public void setDates(String photoId, Date datePosted, Date dateTaken, String dateTakenGranularity) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_SET_DATES); parameters.put("photo_id", photoId); if (datePosted != null) { parameters.put("date_posted", Long.toString(datePosted.getTime() / 1000)); } if (dateTaken != null) { parameters.put("date_taken", ((DateFormat) DATE_FORMATS.get()).format(dateTaken)); } if (dateTakenGranularity != null) { parameters.put("date_taken_granularity", dateTakenGranularity); } Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } }
[ "Set the dates for the specified photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param datePosted\nThe date the photo was posted or null\n@param dateTaken\nThe date the photo was taken or null\n@param dateTakenGranularity\nThe granularity of the taken date or null\n@throws FlickrException" ]
[ "Creates an attachment from a binary input stream.\nThe content of the stream will be transformed into a Base64 encoded string\n@throws IOException if an I/O error occurs\n@throws java.lang.IllegalArgumentException if mediaType is not binary", "Returns a RowColumn following the current one\n\n@return RowColumn following this one", "Remove any protocol-level headers from the remote server's response that\ndo not apply to the new response we are sending.\n\n@param response", "Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build.\n@throws IOException\n@throws InterruptedException", "Add the given pair to a given map for obtaining a new map.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to consider.\n@param right the entry (key, value) to add into the map.\n@return an immutable map with the content of the map and with the given entry.\n@throws IllegalArgumentException - when the right operand key exists in the left operand.\n@since 2.15", "compares two AST nodes", "Retrieves and validates the content length from the REST request.\n\n@return true if has content length", "Determines the offset code of a forward contract from a schedule. Rounds the average period length to full months.\n\n@param schedule The schedule.\n@return The offset code as String", "Returns an immutable view of a given map." ]
public void stop(int waitMillis) throws InterruptedException { try { if (!isDone()) { setExitStatus(new Event(EventType.STOPPED_BY_USER, String.format("Stopped by user: waiting for %d ms", waitMillis))); } if (!waitForFinish(waitMillis)) { logger.warn("{} Client thread failed to finish in {} millis", name, waitMillis); } } finally { rateTracker.shutdown(); } }
[ "Stops the current connection. No reconnecting will occur. Kills thread + cleanup.\nWaits for the loop to end" ]
[ "Associate the specified value with the specified key in this map.\nIf the map previously contained a mapping for this key, the old\nvalue is replaced and returned.\n\n@param key the key with which the value is to be associated\n@param value the value to be associated with this key\n@return the value previously mapped to the key, or null", "Returns an array specifing the index of each hull vertex with respect to\nthe original input points.\n\n@return vertex indices with respect to the original points", "Adjusts all links in the target folder that point to the source folder\nso that they are kept \"relative\" in the target folder where possible.\n\nIf a link is found from the target folder to the source folder,\nthen the target folder is checked if a target of the same name\nis found also \"relative\" inside the target Folder, and if so,\nthe link is changed to that \"relative\" target. This is mainly used to keep\nrelative links inside a copied folder structure intact.\n\nExample: Image we have folder /folderA/ that contains files\n/folderA/x1 and /folderA/y1. x1 has a link to y1 and y1 to x1.\nNow someone copies /folderA/ to /folderB/. So we end up with\n/folderB/x2 and /folderB/y2. Because of the link mechanism in OpenCms,\nx2 will have a link to y1 and y2 to x1. By using this method,\nthe links from x2 to y1 will be replaced by a link x2 to y2,\nand y2 to x1 with y2 to x2.\n\nLink replacement works for links in XML files as well as relation only\ntype links.\n\n@param sourceFolder the source folder\n@param targetFolder the target folder\n\n@throws CmsException if something goes wrong", "Create an IPv6 mixed address using the given ipv6 segments and using this address for the embedded IPv4 segments\n\n@param segs\n@return", "We have received an update that invalidates the beat grid for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no beat grid for the associated player", "Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference", "Bessel function of order n.\n\n@param n Order.\n@param x Value.\n@return J value.", "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", "Runs a query that returns a single int." ]
public ExcludeByParentBuilder dontClickChildrenOf(String tagName) { checkNotRead(); Preconditions.checkNotNull(tagName); ExcludeByParentBuilder exclude = new ExcludeByParentBuilder( tagName.toUpperCase()); crawlParentsExcluded.add(exclude); return exclude; }
[ "Click no children of the specified parent element.\n\n@param tagName The tag name of which no children should be clicked.\n@return The builder to append more options." ]
[ "A convenience method for creating an immutable sorted set.\n\n@param self a SortedSet\n@return an immutable SortedSet\n@see java.util.Collections#unmodifiableSortedSet(java.util.SortedSet)\n@since 1.0", "Use this API to count dnszone_domain_binding resources configued 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.", "Downloads this version of the file to a given OutputStream while reporting the progress to a ProgressListener.\n@param output the stream to where the file will be written.\n@param listener a listener for monitoring the download's progress.", "We add typeRefs without Nodes on the fly, so we should remove them before relinking.", "Populate a task from a Row instance.\n\n@param row Row instance\n@param task Task instance", "Validates the type", "Configure the HTTP response to switch off caching.\n\n@param response response to configure\n@since 1.9.0", "Adds parameters contained in the annotation into the annotation type reference\n\n@param typeRef\n@param node" ]
private void setAnimationProgress(float progress) { if (isAlphaUsedForScale()) { setColorViewAlpha((int) (progress * MAX_ALPHA)); } else { ViewCompat.setScaleX(mCircleView, progress); ViewCompat.setScaleY(mCircleView, progress); } }
[ "Pre API 11, this does an alpha animation.\n\n@param progress" ]
[ "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", "Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Determines the java.sql.Types constant value from an OJB\nFIELDDESCRIPTOR value.\n\n@param type The FIELDDESCRIPTOR which JDBC type is to be determined.\n\n@return int the int value representing the Type according to\n\n@throws SQLException if the type is not a valid jdbc type.\njava.sql.Types", "Triggers collapse of the parent.", "Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.\n@return a JSON string containing the pending changes.", "Acquires a write lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait.", "Discard the changes.", "Is the user password reset?\n\n@param user User to check\n@return boolean", "Use this API to update nsrpcnode." ]
@Override public void stopTransition() { //call listeners so they can perform their actions first, like modifying this adapter's transitions for (int i = 0, size = mListenerList.size(); i < size; i++) { mListenerList.get(i).onTransitionEnd(this); } for (int i = 0, size = mTransitionList.size(); i < size; i++) { mTransitionList.get(i).stopTransition(); } }
[ "Stops all transitions." ]
[ "Gets the index to use in the search.\n\n@return the index to use in the search", "Checks if a Zip is valid navigating through the entries\n\n@param file File to validate\n@throws IOException I/O Error", "Send a track metadata update announcement to all registered listeners.", "Test a given date for being easter sunday.\n\nThe method uses the algorithms sometimes cited as Meeus,Jones, Butcher Gregorian algorithm.\nTaken from http://en.wikipedia.org/wiki/Computus\n\n@param date The date to check.\n@return True, if date is easter sunday.", "Returns the steps instances associated to CandidateSteps\n\n@param candidateSteps\nthe List of CandidateSteps\n@return The List of steps instances", "Generates a schedule based on some meta data. The schedule generation\nconsiders short periods.\n\n@param referenceDate The date which is used in the schedule to internally convert dates to doubles, i.e., the date where t=0.\n@param startDate The start date of the first period.\n@param frequency The frequency.\n@param maturity The end date of the last period.\n@param daycountConvention The daycount convention.\n@param shortPeriodConvention If short period exists, have it first or last.\n@param dateRollConvention Adjustment to be applied to the all dates.\n@param businessdayCalendar Businessday calendar (holiday calendar) to be used for date roll adjustment.\n@param fixingOffsetDays Number of business days to be added to period start to get the fixing date.\n@param paymentOffsetDays Number of business days to be added to period end to get the payment date.\n@return The corresponding schedule\n@deprecated Will be removed in version 2.3", "Get all Groups\n\n@return\n@throws Exception", "Set the values of a set of knots.\n@param x the knot positions\n@param y the knot colors\n@param types the knot types\n@param offset the first knot to set\n@param count the number of knots", "Attaches the menu drawer to the window." ]
static ReadMasterDomainModelUtil readMasterDomainResourcesForInitialConnect(final Transformers transformers, final Transformers.TransformationInputs transformationInputs, final Transformers.ResourceIgnoredTransformationRegistry ignoredTransformationRegistry, final Resource domainRoot) throws OperationFailedException { Resource transformedResource = transformers.transformRootResource(transformationInputs, domainRoot, ignoredTransformationRegistry); ReadMasterDomainModelUtil util = new ReadMasterDomainModelUtil(); util.describedResources = util.describeAsNodeList(PathAddress.EMPTY_ADDRESS, transformedResource, false); return util; }
[ "Used to read the domain model when a slave host connects to the DC\n\n@param transformers the transformers for the host\n@param transformationInputs parameters for the transformation\n@param ignoredTransformationRegistry registry of resources ignored by the transformation target\n@param domainRoot the root resource for the domain resource tree\n@return a read master domain model util instance" ]
[ "Look for the specified album art in both the hot cache of loaded tracks and the longer-lived LRU cache.\n\n@param artReference uniquely identifies the desired album art\n\n@return the art, if it was found in one of our caches, or {@code null}", "Returns the corresponding ModuleSpec service name for the given module.\n\n@param identifier The module identifier\n@return The service name of the ModuleSpec service", "Remove an active operation.\n\n@param id the operation id\n@return the removed active operation, {@code null} if there was no registered operation", "Use this API to fetch all the systemeventhistory resources that are configured on netscaler.\nThis uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources.", "Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed.", "Performs a HTTP DELETE request.\n\n@return {@link Response}", "Returns the bounding box of the vertices.\n@param corners destination array to get corners of bounding box.\nThe first three entries are the minimum X,Y,Z values\nand the next three are the maximum X,Y,Z.\n@return true if bounds are not empty, false if empty (no vertices)", "Calculates how much of a time range is before or after a\ntarget intersection point.\n\n@param start time range start\n@param end time range end\n@param target target intersection point\n@param after true if time after target required, false for time before\n@return length of time in milliseconds", "A specific, existing project can be deleted by making a DELETE request\non the URL for that project.\n\nReturns an empty data record.\n\n@param project The project to delete.\n@return Request object" ]
private Properties mapToProperties(Map<String, String> map) { Properties p = new Properties(); for (Map.Entry<String,String> entry : map.entrySet()) { p.put(entry.getKey(), entry.getValue()); } return p; }
[ "Legacy conversion.\n@param map\n@return Properties" ]
[ "Helper method that encapsulates the minimum logic for adding jobs to a queue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJsons\na list of jobs serialized as JSON", "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", "Cancel all currently active operations.\n\n@return a list of cancelled operations", "Use this API to add dnsaaaarec.", "Given a RendererViewHolder passed as argument and a position renders the view using the\nRenderer previously stored into the RendererViewHolder.\n\n@param viewHolder with a Renderer class inside.\n@param position to render.", "Use this API to add nssimpleacl.", "Use this API to fetch authenticationvserver_binding resource of given name .", "Sets the debug JPDA remote socket debugging argument.\n\n@param suspend {@code true} to suspend otherwise {@code false}\n@param port the port to listen on\n\n@return the builder", "OR operation which takes the previous clause and the next clause and OR's them together." ]
public static AT_Row createRule(TableRowType type, TableRowStyle style){ Validate.notNull(type); Validate.validState(type!=TableRowType.UNKNOWN); Validate.validState(type!=TableRowType.CONTENT); Validate.notNull(style); Validate.validState(style!=TableRowStyle.UNKNOWN); return new AT_Row(){ @Override public TableRowType getType(){ return type; } @Override public TableRowStyle getStyle(){ return style; } }; }
[ "Creates a new row representing a rule.\n@param type the type for the rule row, must not be null nor {@link TableRowType#CONTENT} nor {@link TableRowType#UNKNOWN}\n@param style the style for the rule row, must not be null nor {@link TableRowStyle#UNKNOWN}\n@return a new row representing a rule\n@throws {@link NullPointerException} if type or style where null\n@throws {@link IllegalStateException} if type or style where unknown or if type was {@link TableRowType#CONTENT}" ]
[ "Set the classpath for loading the driver using the classpath reference.\n\n@param r reference to the classpath", "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", "Get a property as a boolean or throw exception.\n\n@param key the property name", "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", "If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X.", "Remove duplicate Strings from the given array. Also sorts the array, as\nit uses a TreeSet.\n\n@param array the String array\n@return an array without duplicates, in natural sort order", "Write the field to the specified channel.\n\n@param channel the channel to which it should be written\n\n@throws IOException if there is a problem writing to the channel", "Returns whether the values of this division grouping contain the prefix block for the given prefix length\n\n@param prefixLength\n@return", "Ensures that the given collection descriptor has the collection-class property if necessary.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If collection-class is given for an array or if no collection-class is given but required" ]
public static final int getInt(byte[] data, int offset) { int result = 0; int i = offset; for (int shiftBy = 0; shiftBy < 32; shiftBy += 8) { result |= ((data[i] & 0xff)) << shiftBy; ++i; } return result; }
[ "Read a four byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value" ]
[ "Map the EventType.\n\n@param eventType the event type\n@return the event", "Removes the given row.\n\n@param row the row to remove", "Log a message with a throwable at the provided level.", "Create a single node representing an embedded element.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}\n@return the corresponding node;", "Returns a new List containing the given objects.", "This method maps the task unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param taskFixedMeta Fixed meta data for this task\n@param taskFixedData Fixed data for this task\n@param taskVarData Variable task data\n@return Mapping between task identifiers and block position", "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 unmodifiable set containing the given elements.\n\n@param ts the elements from which to create a set\n@param <T> the type of the element in the set\n@return an unmodifiable set containing the given elements or {@code null} in case the given element array is\n{@code null}.", "Utility function that creates directory.\n\n@param dir Directory path\n@return File object of directory." ]
public void send(ProducerPoolData<V> ppd) { if (logger.isDebugEnabled()) { logger.debug("send message: " + ppd); } if (sync) { Message[] messages = new Message[ppd.data.size()]; int index = 0; for (V v : ppd.data) { messages[index] = serializer.toMessage(v); index++; } ByteBufferMessageSet bbms = new ByteBufferMessageSet(config.getCompressionCodec(), messages); ProducerRequest request = new ProducerRequest(ppd.topic, ppd.partition.partId, bbms); SyncProducer producer = syncProducers.get(ppd.partition.brokerId); if (producer == null) { throw new UnavailableProducerException("Producer pool has not been initialized correctly. " + "Sync Producer for broker " + ppd.partition.brokerId + " does not exist in the pool"); } producer.send(request.topic, request.partition, request.messages); } else { AsyncProducer<V> asyncProducer = asyncProducers.get(ppd.partition.brokerId); for (V v : ppd.data) { asyncProducer.send(ppd.topic, v, ppd.partition.partId); } } }
[ "selects either a synchronous or an asynchronous producer, for the\nspecified broker id and calls the send API on the selected producer\nto publish the data to the specified broker partition\n\n@param ppd the producer pool request object" ]
[ "Returns the deployment names with the specified runtime names at the specified deploymentRootAddress.\n\n@param deploymentRootResource\n@param runtimeNames\n@return the deployment names with the specified runtime names at the specified deploymentRootAddress.", "Use this API to fetch dnstxtrec resource of given name .", "Process dump file data from the given input stream. The method can\nrecover from an errors that occurred while processing an input stream,\nwhich is assumed to contain the JSON serialization of a list of JSON\nentities, with each entity serialization in one line. To recover from the\nprevious error, the first line is skipped.\n\n@param inputStream\nthe stream to read from\n@throws IOException\nif there is a problem reading the stream", "Read an int from the byte array starting at the given offset\n\n@param bytes The byte array to read from\n@param offset The offset to start reading at\n@return The int read", "Use this API to fetch Interface resource of given name .", "Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by the specified comparator.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@param comparator\nthe comparator to be used. May be <code>null</code> to indicate that the natural ordering of the\nelements should be used.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List, Comparator)\n@see #sort(Iterable)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List, Comparator)\n@since 2.7", "Checks if the path leads to an embedded property or association.\n\n@param targetTypeName the entity with the property\n@param namesWithoutAlias the path to the property with all the aliases resolved\n@return {@code true} if the property is an embedded, {@code false} otherwise.", "Readable yyyyMMdd int representation of a day, which is also sortable.", "Label accessor provided for JSON serialization only." ]
public BoxFile.Info uploadFile(FileUploadParams uploadParams) { URL uploadURL = UPLOAD_FILE_URL.build(this.getAPI().getBaseUploadURL()); BoxMultipartRequest request = new BoxMultipartRequest(getAPI(), uploadURL); JsonObject fieldJSON = new JsonObject(); JsonObject parentIdJSON = new JsonObject(); parentIdJSON.add("id", getID()); fieldJSON.add("name", uploadParams.getName()); fieldJSON.add("parent", parentIdJSON); if (uploadParams.getCreated() != null) { fieldJSON.add("content_created_at", BoxDateFormat.format(uploadParams.getCreated())); } if (uploadParams.getModified() != null) { fieldJSON.add("content_modified_at", BoxDateFormat.format(uploadParams.getModified())); } if (uploadParams.getSHA1() != null && !uploadParams.getSHA1().isEmpty()) { request.setContentSHA1(uploadParams.getSHA1()); } if (uploadParams.getDescription() != null) { fieldJSON.add("description", uploadParams.getDescription()); } request.putField("attributes", fieldJSON.toString()); if (uploadParams.getSize() > 0) { request.setFile(uploadParams.getContent(), uploadParams.getName(), uploadParams.getSize()); } else if (uploadParams.getContent() != null) { request.setFile(uploadParams.getContent(), uploadParams.getName()); } else { request.setUploadFileCallback(uploadParams.getUploadFileCallback(), uploadParams.getName()); } BoxJSONResponse response; if (uploadParams.getProgressListener() == null) { response = (BoxJSONResponse) request.send(); } else { response = (BoxJSONResponse) request.send(uploadParams.getProgressListener()); } JsonObject collection = JsonObject.readFrom(response.getJSON()); JsonArray entries = collection.get("entries").asArray(); JsonObject fileInfoJSON = entries.get(0).asObject(); String uploadedFileID = fileInfoJSON.get("id").asString(); BoxFile uploadedFile = new BoxFile(getAPI(), uploadedFileID); return uploadedFile.new Info(fileInfoJSON); }
[ "Uploads a new file to this folder with custom upload parameters.\n\n@param uploadParams the custom upload parameters.\n@return the uploaded file's info." ]
[ "Obtains a Symmetry454 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry454 local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Init the licenses cache\n\n@param licenses", "Logs to Info if the debug level is greater than or equal to 1.", "Merge the source skeleton with this one.\nThe result will be that this skeleton has all of its\noriginal bones and all the bones in the new skeleton.\n\n@param newSkel skeleton to merge with this one", "This is more expensive.\n\n@param key key whose presence in this map is to be tested.\n@return <tt>true</tt> if this map contains a mapping for the specified\nkey.", "Utility function to validate if the given store name exists in the store\nname list managed by MetadataStore. This is used by the Admin service for\nvalidation before serving a get-metadata request.\n\n@param name Name of the store to validate\n@return True if the store name exists in the 'storeNames' list. False\notherwise.", "moves to the next row of the underlying ResultSet and returns the\ncorresponding Object materialized from this row.", "Stores the output from a Frontier into the queue, pausing and waiting if the given queue is too large\n\n@param resultsMap map of String and String representing the output of a Frontier's DFS", "Constraint that ensures that the field has a length if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)" ]
public void setBaseCalendar(String val) { set(ResourceField.BASE_CALENDAR, val == null || val.length() == 0 ? "Standard" : val); }
[ "Sets the Base Calendar field indicates which calendar is the base calendar\nfor a resource calendar. The list includes the three built-in calendars,\nas well as any new base calendars you have created in the Change Working\nTime dialog box.\n\n@param val calendar name" ]
[ "Post an artifact to the Grapes server\n\n@param artifact The artifact to post\n@param user The user posting the information\n@param password The user password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Get upload status for the currently authenticated user.\n\nRequires authentication with 'read' permission using the new authentication API.\n\n@return A User object with upload status data fields filled\n@throws FlickrException", "Private helper function that performs some assignability checks for the\nprovided GenericArrayType.", "Possibly coalesces the newest change event to match the user's original intent. For example,\nan unsynchronized insert and update is still an insert.\n\n@param lastUncommittedChangeEvent the last change event known about for a document.\n@param newestChangeEvent the newest change event known about for a document.\n@return the possibly coalesced change event.", "m is more generic than a", "Check if the given color string can be parsed.\n\n@param colorString The color to parse.", "Extracts location result from intent object\n\n@param intent valid intent object\n@return location result.\n@since 1.1.0", "Checks if the provided module is valid and could be stored into the database\n\n@param module the module to test\n@throws WebApplicationException if the data is corrupted", "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" ]
static Date parseDate(String dateString) { try { return DATE_FORMAT.parseDateTime(dateString).toDate(); } catch (IllegalArgumentException e) { return null; } }
[ "Parses the date or returns null if it fails to do so." ]
[ "Get the last non-white Y point\n@param img Image in memory\n@return The trimmed height", "Tells you if the ASTNode is a method node for the given name, arity, and return type.\n@param node\nthe node to inspect\n@param methodNamePattern\nthe expected name of the method\n@param numArguments\nthe expected number of arguments, optional\n@param returnType\nthe expected return type, optional\n@return\ntrue if this node is a MethodNode meeting the parameters. false otherwise", "Finds binding for a type in the given injector and, if not found,\nrecurses to its parent\n\n@param injector\nthe current Injector\n@param type\nthe Class representing the type\n@return A boolean flag, <code>true</code> if binding found", "Used to set the complex value of a matrix element.\n@param row The row of the element.\n@param col The column of the element.\n@param real Real component of assigned value\n@param imaginary Imaginary component of assigned value", "Returns the query string currently in the text field.\n\n@return the query string", "Modify the meta-data for a photoset.\n\n@param photosetId\nThe photoset ID\n@param title\nA new title\n@param description\nA new description (can be null)\n@throws FlickrException", "Returns the raw class of the given type.", "build the Join-Information if a super reference exists\n\n@param left\n@param cld\n@param name", "Use this API to update nsrpcnode resources." ]
public CompositeGeneratorNode indent(final CompositeGeneratorNode parent, final String indentString) { final IndentNode indent = new IndentNode(indentString); List<IGeneratorNode> _children = parent.getChildren(); _children.add(indent); return indent; }
[ "Appends the indentation string at the current position of the parent and adds a new composite node, indicating the same indentation for\nsubsequent lines.\n\n@return an indentation node, using the given indentString, appended as a child on the given parent" ]
[ "Convert a geometry class to a layer type.\n\n@param geometryClass\nJTS geometry class\n@return Geomajas layer type", "Write exceptions in the format used by MSPDI files prior to Project 2007.\n\n@param dayList list of calendar days\n@param exceptions list of exceptions", "This will create a line in the SDEF file for each calendar\nif there are more than 9 calendars, you'll have a big error,\nas USACE numbers them 0-9.\n\n@param records list of ProjectCalendar instances", "Use this API to fetch sslciphersuite resources of given names .", "Builds the Join for columns if they are not found among the existingColumns.\n@param columns the list of columns represented by Criteria.Field to ensure\n@param existingColumns the list of column names (String) that are already appended", "Use this API to fetch filtered set of gslbservice resources.\nset the filter parameter values in filtervalue object.", "Returns all the dependencies of a module\n\n@param module Module\n@return List<Dependency>", "Filter events.\n\n@param events the events\n@return the list of filtered events", "Pauses a given deployment\n\n@param deployment The deployment to pause\n@param listener The listener that will be notified when the pause is complete" ]