query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public static Searcher get(String variant) { final Searcher searcher = instances.get(variant); if (searcher == null) { throw new IllegalStateException(Errors.SEARCHER_GET_BEFORE_CREATE); } return searcher; }
[ "Gets the Searcher for a given variant.\n\n@param variant an identifier to differentiate this Searcher from eventual others.\n@return the corresponding Searcher instance.\n@throws IllegalStateException if no searcher was {@link #create(Searchable) created} before for this {@code variant}." ]
[ "Add a list of enums to the options map\n@param key The key for the options map (ex: \"include[]\")\n@param list A list of enums", "Retrieve the recurrence type.\n\n@param value integer value\n@return RecurrenceType instance", "Acquires a broker instance. If no PBKey is available a runtime exception will be thrown.\n\n@return A broker instance", "Prepares transformation interceptors for a client.\n\n@param clientConfig the client configuration\n@param newClient indicates if it is a new/updated client", "Set the channel. This will return whether the channel could be set successfully or not.\n\n@param newChannel the channel\n@return whether the operation succeeded or not", "Retrieve any task field value lists defined in the MPP file.", "Returns the portion of the field name after the last dot, as field names\nmay actually be paths.", "Use this API to fetch vpnsessionaction resource of given name .", "Updates the template with the specified id.\n\n@param id id of the template to update\n@param options a Map of options to update/add.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations." ]
public static String normalize(final CharSequence self) { final String s = self.toString(); int nx = s.indexOf('\r'); if (nx < 0) { return s; } final int len = s.length(); final StringBuilder sb = new StringBuilder(len); int i = 0; do { sb.append(s, i, nx); sb.append('\n'); if ((i = nx + 1) >= len) break; if (s.charAt(i) == '\n') { // skip the LF in CR LF if (++i >= len) break; } nx = s.indexOf('\r', i); } while (nx > 0); sb.append(s, i, len); return sb.toString(); }
[ "Return a String with linefeeds and carriage returns normalized to linefeeds.\n\n@param self a CharSequence object\n@return the normalized toString() for the CharSequence\n@see #normalize(String)\n@since 1.8.2" ]
[ "Use this API to delete nsacl6 of given name.", "Send an error to the client with an exception.\n\n@param httpServletResponse the http response to send the error to\n@param e the error that occurred", "Returns the total number of elements which are true.\n@return number of elements which are set to true", "set custom request for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise", "Sets the drawable used as the drawer indicator.\n\n@param drawable The drawable used as the drawer indicator.", "Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj", "Checks that a field exists and contains a non-null value.\n@param fieldName the name of the field to check existence/value of.\n@return true if the field exists in the result set and has a non-null value; false otherwise.", "Template method responsible for file compression checks, file creation, and\ndelegation to specific strategy implementations.\n\n@param backupFile\nThe file to be compressed.\n@param properties\nThe appender's configuration.", "Find the node corresponding to an entity.\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" ]
public Set<String> getConfiguredWorkplaceBundles() { CmsADEConfigData configData = internalLookupConfiguration(null, null); return configData.getConfiguredWorkplaceBundles(); }
[ "Returns the names of the bundles configured as workplace bundles in any module configuration.\n@return the names of the bundles configured as workplace bundles in any module configuration." ]
[ "sets the initialization method for this descriptor", "Resolves the package type from the maven project.\n\n@param project the maven project\n\n@return the package type", "Gets the interpolated text of a query from cache. If key does not exist, an exception is thrown.\n\n@param key\nname of the query\n@return the query text", "Build the default transformation description.\n\n@param discardPolicy the discard policy to use\n@param inherited whether the definition is inherited\n@param registry the attribute transformation rules for the resource\n@param discardedOperations the discarded operations\n@return the transformation description", "Mbeans for FETCH_ENTRIES", "Parses an item IRI\n\n@param iri\nthe item IRI like http://www.wikidata.org/entity/Q42\n@throws IllegalArgumentException\nif the IRI is invalid or does not ends with an item id", "Process the scheduling project property from PROJPROP. This table only seems to exist\nin P6 databases, not XER files.\n\n@throws SQLException", "Use this API to fetch wisite_binding resource of given name .", "Returns all the URL that should be inside the classpath. This includes the jar itself if any.\n\n@throws JqmPayloadException" ]
public final void setOrientation(int orientation) { mOrientation = orientation; mOrientationState = getOrientationStateFromParam(mOrientation); invalidate(); if (mOuterAdapter != null) { mOuterAdapter.setOrientation(mOrientation); } }
[ "Sets orientation of loopbar\n\n@param orientation int value of orientation. Must be one of {@link Orientation}" ]
[ "Print a timestamp value.\n\n@param value time value\n@return time value", "Get the diff between any two valid revisions.\n\n@param from revision from\n@param to revision to\n@param pathPattern target path pattern\n@return the map of changes mapped by path\n@throws StorageException if {@code from} or {@code to} does not exist.", "This method returns the actual raw class associated with the specified\ntype.", "Initialize dates panel elements.", "Return SELECT clause for object existence call", "Returns the key value in the given array.\n\n@param keyIndex the index of the scale key", "Update the state of the picker. If it has an owner, the picker\nwill use that object to derive its position and orientation.\nThe \"active\" state of this controller is used to indicate touch.\nThe cursor position is updated after picking.", "Use this API to disable vserver of given name.", "Confirms that both clusters have the same set of zones defined.\n\n@param lhs\n@param rhs" ]
public JSONObject toJSON() { try { return new JSONObject(properties).putOpt("name", getName()); } catch (JSONException e) { e.printStackTrace(); Log.e(TAG, e, "toJSON()"); throw new RuntimeAssertion("NodeEntry.toJSON() failed for '%s'", this); } }
[ "Converts the node to JSON\n@return JSON object" ]
[ "Write the patch.xml\n\n@param rollbackPatch the patch\n@param file the target file\n@throws IOException", "The metadata cache can become huge over time. This simply flushes it periodically.", "Use this API to kill systemsession.", "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", "Gets an iterator to the EJB descriptors for an EJB implementation class\n\n@param beanClass The EJB class\n@return An iterator", "Use this API to add nslimitselector.", "Set new list data set\n@param list new data set", "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.", "Checks to see if the submatrix has its boundaries along inner blocks.\n\n@param blockLength Size of an inner block.\n@param A Submatrix.\n@return If it is block aligned or not." ]
public DbProduct getProduct(final String name) { final DbProduct dbProduct = repositoryHandler.getProduct(name); if(dbProduct == null){ throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND) .entity("Product " + name + " does not exist.").build()); } return dbProduct; }
[ "Returns a product regarding its name\n\n@param name String\n@return DbProduct" ]
[ "Converts the provided javascript object to JSON string.\n\n<p>If the object is a Map instance, it is stringified as key-value pairs, if it is a list, it is stringified as\na list, otherwise the object is merely converted to string using the {@code toString()} method.\n\n@param object the object to stringify.\n\n@return the object as a JSON string", "Processes the template for all column definitions of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"", "Read a list of fixed size blocks using an instance of the supplied reader class.\n\n@param readerClass reader class\n@return list of blocks", "Use this API to update ntpserver.", "Uncheck all items in the list including all sub-items.\n@param list list of CmsTreeItem entries.", "Use this API to fetch autoscaleprofile resource of given name .", "This method is very similar to addMainHandler, except ShellFactory\nwill pass all handlers registered with this method to all this shell's subshells.\n\n@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)\n\n@param handler Object which should be registered as handler.\n@param prefix Prefix that should be prepended to all handler's command names.", "Get the status of the upload session. It contains the number of parts that are processed so far,\nthe total number of parts required for the commit and expiration date and time of the upload session.\n@return the status.", "Send value to node.\n@param nodeId the node Id to send the value to.\n@param endpoint the endpoint to send the value to.\n@param value the value to send" ]
public Group lookupGroup(String url) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_LOOKUP_GROUP); parameters.put("url", url); Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Group group = new Group(); Element payload = response.getPayload(); Element groupnameElement = (Element) payload.getElementsByTagName("groupname").item(0); group.setId(payload.getAttribute("id")); group.setName(((Text) groupnameElement.getFirstChild()).getData()); return group; }
[ "Lookup the group for the specified URL.\n\n@param url\nThe url\n@return The group\n@throws FlickrException" ]
[ "Use this API to fetch appfwpolicy_csvserver_binding resources of given name .", "Provisions a new app user in an enterprise with additional user information using Box Developer Edition.\n@param api the API connection to be used by the created user.\n@param name the name of the user.\n@param params additional user information.\n@return the created user's info.", "This method is called to alert project listeners to the fact that\na resource assignment has been read from a project file.\n\n@param resourceAssignment resourceAssignment instance", "Pick arbitrary wrapping method. No generics should be set.\n@param builder", "Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class", "Access an attribute, hereby using the class name as key.\n\n@param type the type, not {@code null}\n@return the type attribute value, or {@code null}.", "Reads the CSS and JavaScript files from the JAR file and writes them to\nthe output directory.\n@param outputDirectory Where to put the resources.\n@throws IOException If the resources can't be read or written.", "Returns an iterator over the items in the trash.\n@return an iterator over the items in the trash.", "Get the time zone for a specific stock or index.\nFor stocks, the exchange suffix is extracted from the stock symbol to retrieve the time zone.\n\n@param symbol stock symbol in YahooFinance\n@return time zone of the exchange on which this stock is traded" ]
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" ]
[ "Process the given key and value. First validate the value and check if there's no different value for the same key in the same source - invalid and\ndifferent values are treated as a deployment problem.\n\n@param properties\n@param key\n@param value", "Evaluates the body if value for the member tag equals the specified value.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\n@doc.tag type=\"block\"\n@doc.param name=\"tagName\" optional=\"false\" description=\"The tag name.\"\n@doc.param name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\n@doc.param name=\"paramNum\" description=\"The zero-based parameter number. It's used if the user\nused the space-separated format for specifying parameters.\"\n@doc.param name=\"value\" optional=\"false\" description=\"The expected value.\"", "Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return", "gets the count of addresses that this address division grouping may represent\n\nIf this address division grouping is not a subnet block of multiple addresses or has no range of values, then there is only one such address.\n\n@return", "Implements get by delegating to getAll.", "Inserts a Serializable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Serializable object, or null\n@return this bundler instance to chain method calls", "Return the count of all objects found\nfor given class, using the PB-api within\nODMG - this may change in further versions.", "Get the cached ETag for the given host and file\n@param host the host\n@param file the file\n@return the cached ETag or null if there is no ETag in the cache", "Gets the node meta data.\n\n@param key - the meta data key\n@return the node meta data value for this key" ]
@Override @SuppressWarnings("unchecked") public ChronoZonedDateTime<DiscordianDate> zonedDateTime(TemporalAccessor temporal) { return (ChronoZonedDateTime<DiscordianDate>) super.zonedDateTime(temporal); }
[ "Obtains a Discordian zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian zoned date-time, not null\n@throws DateTimeException if unable to create the date-time" ]
[ "set proper expression text invoking the DJCRosstabMeasurePrecalculatedTotalProvider for the cell\n@param auxRows\n@param auxCols\n@param measureExp\n@param djmeasure\n@param crosstabColumn\n@param crosstabRow\n@param meausrePrefix", "Use this API to unset the properties of vridparam resource.\nProperties that need to be unset are specified in args array.", "Calculate the child size along the axis and measure the offset inside the\nlayout container\n@param dataIndex of child in Container\n@return true item fits the container, false - otherwise", "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.", "Checks all data sets in IIM records 1, 2 and 3 for constraint violations.\n\n@return list of constraint violations, empty set if IIM file is valid", "Returns the adapter position of the Parent associated with this ChildViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.", "Method used to update fields with values received from API.\n@param jsonObject JSON-encoded info about File Version object.", "Replaces all characters in the second parameter found in the first\nparameter with the final character.\n@param value the string to replace characters in\n@param chars the characters to replace\n@param replacement the character to insert as replacement", "Returns the instance.\n@return InterceptorFactory" ]
protected void handleParentheses( TokenList tokens, Sequence sequence ) { // have a list to handle embedded parentheses, e.g. (((((a))))) List<TokenList.Token> left = new ArrayList<TokenList.Token>(); // find all of them TokenList.Token t = tokens.first; while( t != null ) { TokenList.Token next = t.next; if( t.getType() == Type.SYMBOL ) { if( t.getSymbol() == Symbol.PAREN_LEFT ) left.add(t); else if( t.getSymbol() == Symbol.PAREN_RIGHT ) { if( left.isEmpty() ) throw new ParseError(") found with no matching ("); TokenList.Token a = left.remove(left.size()-1); // remember the element before so the new one can be inserted afterwards TokenList.Token before = a.previous; TokenList sublist = tokens.extractSubList(a,t); // remove parentheses sublist.remove(sublist.first); sublist.remove(sublist.last); // if its a function before () then the () indicates its an input to a function if( before != null && before.getType() == Type.FUNCTION ) { List<TokenList.Token> inputs = parseParameterCommaBlock(sublist, sequence); if (inputs.isEmpty()) throw new ParseError("Empty function input parameters"); else { createFunction(before, inputs, tokens, sequence); } } else if( before != null && before.getType() == Type.VARIABLE && before.getVariable().getType() == VariableType.MATRIX ) { // if it's a variable then that says it's a sub-matrix TokenList.Token extract = parseSubmatrixToExtract(before,sublist, sequence); // put in the extract operation tokens.insert(before,extract); tokens.remove(before); } else { // if null then it was empty inside TokenList.Token output = parseBlockNoParentheses(sublist,sequence, false); if (output != null) tokens.insert(before, output); } } } t = next; } if( !left.isEmpty()) throw new ParseError("Dangling ( parentheses"); }
[ "Searches for pairs of parentheses and processes blocks inside of them. Embedded parentheses are handled\nwith no problem. On output only a single token should be in tokens.\n@param tokens List of parsed tokens\n@param sequence Sequence of operators" ]
[ "Generate a currency format.\n\n@param position currency symbol position\n@return currency format", "Return overall per token accuracy", "Extract assignment hyperlink data.\n\n@param assignment assignment instance\n@param data hyperlink data", "Returns a name for the principal based upon one of the attributes\nof the main CommonProfile. The attribute name used to query the CommonProfile\nis specified in the constructor.\n\n@return a name for the Principal or null if the attribute is not populated.", "Finds the parent group of the given one and returns it\n\n@param group Group for which the parent is needed\n@return The parent group of the given one. If the given one is the first one, it returns the same group", "Returns if a MongoDB document is a todo item.", "Returns a non-validating XML parser. The parser ignores both DTDs and XSDs.\n\n@return An XML parser in the form of a DocumentBuilder", "Create a standalone target.\n\n@param controllerClient the connected controller client to a standalone instance.\n@return the remote target", "Tests if this partition has hit a threshold and signal to the pool watch thread to create new connections\n@param connectionPartition to test for." ]
protected CmsProject createAndSetModuleImportProject(CmsObject cms, CmsModule module) throws CmsException { CmsProject importProject = cms.createProject( org.opencms.module.Messages.get().getBundle(cms.getRequestContext().getLocale()).key( org.opencms.module.Messages.GUI_IMPORT_MODULE_PROJECT_NAME_1, new Object[] {module.getName()}), org.opencms.module.Messages.get().getBundle(cms.getRequestContext().getLocale()).key( org.opencms.module.Messages.GUI_IMPORT_MODULE_PROJECT_DESC_1, new Object[] {module.getName()}), OpenCms.getDefaultUsers().getGroupAdministrators(), OpenCms.getDefaultUsers().getGroupAdministrators(), CmsProject.PROJECT_TYPE_TEMPORARY); cms.getRequestContext().setCurrentProject(importProject); cms.copyResourceToProject("/"); return importProject; }
[ "Creates the project used to import module resources and sets it on the CmsObject.\n\n@param cms the CmsObject to set the project on\n@param module the module\n@return the created project\n@throws CmsException if something goes wrong" ]
[ "Convert a Java date into a Planner date.\n\n20070222\n\n@param value Java Date instance\n@return Planner date", "Get the filters ExporterServiceFilter and ExportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid.", "get the type erasure signature", "Use this API to fetch aaagroup_vpntrafficpolicy_binding resources of given name .", "Sets the target hosts from json path.\n\n@param jsonPath\nthe json path\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception", "Checks the preconditions for creating a new ParseDateTimeAbstract processor with date format and locale.\n\n@param dateFormat\nthe date format to use\n@param locale\nthe Locale used to parse the date\n@throws NullPointerException\nif dateFormat or locale is null", "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", "Delivers the correct JSON Object for the Stencilset Extensions\n\n@param extensions", "Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the artist menu\n\n@throws Exception if there is a problem obtaining the menu" ]
public String generateDigest(InputStream stream) { MessageDigest digest = null; try { digest = MessageDigest.getInstance(DIGEST_ALGORITHM_SHA1); } catch (NoSuchAlgorithmException ae) { throw new BoxAPIException("Digest algorithm not found", ae); } //Calcuate the digest using the stream. DigestInputStream dis = new DigestInputStream(stream, digest); try { int value = dis.read(); while (value != -1) { value = dis.read(); } } catch (IOException ioe) { throw new BoxAPIException("Reading the stream failed.", ioe); } //Get the calculated digest for the stream byte[] digestBytes = digest.digest(); return Base64.encode(digestBytes); }
[ "Generates the Base64 encoded SHA-1 hash for content available in the stream.\nIt can be used to calculate the hash of a file.\n@param stream the input stream of the file or data.\n@return the Base64 encoded hash string." ]
[ "Sets a configuration option to the specified value.", "Read in lines and execute them.\n\n@param reader the reader from which to get the groovy source to exec\n@param out the outputstream to use\n@throws java.io.IOException if something goes wrong", "Convert Collection to Set\n@param collection Collection\n@return Set", "Use this API to fetch all the linkset resources that are configured on netscaler.", "append normal text\n\n@param text normal text\n@return SimplifySpanBuild", "Retrieves state and metrics information for individual client connection.\n\n@param name connection name\n@return connection information", "For the given service name return list of endpoint references currently\nregistered at the service locator server endpoints.\n\n@param serviceName\nthe name of the service for which to get the endpoints, must\nnot be <code>null</code>\n@return EndpointReferenceListType encapsulate list of endpoint references\nor <code>null</code>", "Returns a matrix full of ones", "prefix the this class fk columns with the indirection table" ]
public static final PolylineOptions buildOpenArc(LatLong center, LatLong start, LatLong end) { MVCArray res = buildArcPoints(center, start, end); return new PolylineOptions().path(res); }
[ "Builds the path for an open arc based on a PolylineOptions.\n\n@param center\n@param start\n@param end\n@return PolylineOptions with the paths element populated." ]
[ "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 the encoding of the file.\nEncoding is read from the content-encoding property and defaults to the systems default encoding.\nSince properties can change without rewriting content, the actual encoding can differ.\n\n@param cms {@link CmsObject} used to read properties of the given file.\n@param file the file for which the encoding is requested\n@return the file's encoding according to the content-encoding property, or the system's default encoding as default.", "Creates an operation to list the deployments.\n\n@return the operation", "This method retrieves a String of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return string containing required data", "This procedure sets permissions to the given file to not allow everybody to read it.\n\nOnly when underlying OS allows the change.\n\n@param file File to set permissions", "Gets the addresses of the child resources under the given resource.\n\n@param context the operation context\n@param registry registry entry representing the resource\n@param resource the current resource\n@param validChildType a single child type to which the results should be limited. If {@code null} the result\nshould include all child types\n@return map where the keys are the child types and the values are a set of child names associated with a type", "Returns the full record for a single attachment.\n\n@param attachment Globally unique identifier for the attachment.\n@return Request object", "Creates a simple, annotation defined Web Bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return A Web Bean", "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" ]
public Date getStartTime(Date date) { Date result = m_startTimeCache.get(date); if (result == null) { ProjectCalendarDateRanges ranges = getRanges(date, null, null); if (ranges == null) { result = getParentFile().getProjectProperties().getDefaultStartTime(); } else { result = ranges.getRange(0).getStart(); } result = DateHelper.getCanonicalTime(result); m_startTimeCache.put(new Date(date.getTime()), result); } return result; }
[ "Retrieves the time at which work starts on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return start time, or null for non-working day" ]
[ "Return all scripts of a given type\n\n@param type integer value of type\n@return Array of scripts of the given type", "Split string content into list\n@param content String content\n@return list", "Calculate a cache key.\n@param sql to use\n@param columnIndexes to use\n@return cache key to use.", "Extracts the last revision id from the JSON response returned\nby the API after an edit\n\n@param response\nthe response as returned by Mediawiki\n@return\nthe new revision id of the edited entity\n@throws JsonMappingException", "Return the most appropriate log type. This should _never_ return null.", "Handling out responce.\n\n@param message\nthe message\n@throws Fault\nthe fault", "Change the value that is returned by this generator.\n@param value The new value to return.", "Set the featureModel.\n\n@param featureModel\nfeature model\n@throws LayerException\nproblem setting the feature model\n@since 1.8.0", "Update the project properties from the project summary task.\n\n@param task project summary task" ]
public void setKnots(int[] x, int[] y, byte[] types, int offset, int count) { numKnots = count; xKnots = new int[numKnots]; yKnots = new int[numKnots]; knotTypes = new byte[numKnots]; System.arraycopy(x, offset, xKnots, 0, numKnots); System.arraycopy(y, offset, yKnots, 0, numKnots); System.arraycopy(types, offset, knotTypes, 0, numKnots); sortKnots(); rebuildGradient(); }
[ "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" ]
[ "Remove a custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object", "Extract data for a single task.\n\n@param parent task parent\n@param row Synchro task data", "The way calendars are stored in an MPP14 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects", "Use this API to add vpnsessionaction.", "Visit all child nodes but not this one.\n\n@param visitor The visitor to use.", "Takes a list of Strings and combines them into a single comma-separated\nString.\n@param strings The Strings to combine.\n@return The combined, comma-separated, String.", "Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available", "Return all methods for a list of groupIds\n\n@param groupIds array of group IDs\n@param filters array of filters to apply to method selection\n@return collection of Methods found\n@throws Exception exception", "Init after constructor" ]
public static base_responses add(nitro_service client, sslcipher resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { sslcipher addresources[] = new sslcipher[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new sslcipher(); addresources[i].ciphergroupname = resources[i].ciphergroupname; addresources[i].ciphgrpalias = resources[i].ciphgrpalias; } result = add_bulk_request(client, addresources); } return result; }
[ "Use this API to add sslcipher resources." ]
[ "Merge the given maps.\n\n<p>\nThe replied map is a view on the given two maps.\nIf a key exists in the two maps, the replied value is the value of the right operand.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n<p>\nThe replied map is unmodifiable.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@since 2.15", "For internal use! This method creates real new PB instances", "Queues up a callback to be removed and invoked on the next change event.", "Handles retrieval of primitive char type.\n\n@param field required field\n@param defaultValue default value if field is missing\n@return char value", "Remove a license from an artifact\n\n@param gavc String The artifact GAVC\n@param licenseId String The license id to be removed.", "Sets the baseline start text value.\n\n@param baselineNumber baseline number\n@param value baseline start text value", "Iterates over all tokens in current member tag with the name tagName and evaluates the body for every token.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\n@doc.tag type=\"block\"\n@doc.param name=\"tagName\" optional=\"false\" description=\"The tag name.\"\n@doc.param name=\"delimiter\" description=\"delimiter for the StringTokenizer. consult javadoc for\njava.util.StringTokenizer default is ','\"\n@doc.param name=\"skip\" description=\"how many tokens to skip on start\"", "Returns the List value of the field.\n\n@return the List value of the field. It returns a reference of the value if the type is <code>LIST</code>, if\nthe type is <code>LIST_MAP</code> it returns a copy of the value.\n@throws IllegalArgumentException if the value cannot be converted to List.", "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 static List<ContentRepositoryElement> listFiles(final Path rootPath, Path tempDir, final ContentFilter filter) throws IOException { List<ContentRepositoryElement> result = new ArrayList<>(); if (Files.exists(rootPath)) { if(isArchive(rootPath)) { return listZipContent(rootPath, filter); } Files.walkFileTree(rootPath, new FileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { return FileVisitResult.CONTINUE; } @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { if (filter.acceptFile(rootPath, file)) { result.add(ContentRepositoryElement.createFile(formatPath(rootPath.relativize(file)), Files.size(file))); } return FileVisitResult.CONTINUE; } @Override public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException { return FileVisitResult.CONTINUE; } @Override public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { if (filter.acceptDirectory(rootPath, dir)) { String directoryPath = formatDirectoryPath(rootPath.relativize(dir)); if(! "/".equals(directoryPath)) { result.add(ContentRepositoryElement.createFolder(directoryPath)); } } return FileVisitResult.CONTINUE; } private String formatDirectoryPath(Path path) { return formatPath(path) + '/'; } private String formatPath(Path path) { return path.toString().replace(File.separatorChar, '/'); } }); } else { Path file = getFile(rootPath); if(isArchive(file)) { Path relativePath = file.relativize(rootPath); Path target = createTempDirectory(tempDir, "unarchive"); unzip(file, target); return listFiles(target.resolve(relativePath), tempDir, filter); } else { throw new FileNotFoundException(rootPath.toString()); } } return result; }
[ "List files in a path according to the specified filter.\n@param rootPath the path from which we are listing the files.\n@param filter the filter to be applied.\n@return the list of files / directory.\n@throws IOException" ]
[ "Switches from a dense to sparse matrix", "Retrieves the calendar used for this resource assignment.\n\n@return ProjectCalendar instance", "Will prompt a user the \"Add to Homescreen\" feature\n\n@param callback A callback function after the method has been executed.", "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", "removes all timed out lock entries from the persistent storage.\nThe timeout value can be set in the OJB properties file.", "Retrieve the index of the table entry valid for the supplied date.\n\n@param date required date\n@return cost rate table entry index", "This is a convenience method used to add a calendar called\n\"Standard\" to the project, and populate it with a default working week\nand default working hours.\n\n@return a new default calendar", "Adapt the size of the tiles so that we have the same amount of tiles as we would have had with maxWidth\nand maxHeight, but with the smallest tiles as possible.", "Extracts a house holder vector from the column of A and stores it in u\n@param A Complex matrix with householder vectors stored in the lower left triangle\n@param row0 first row in A (implicitly assumed to be r + i0)\n@param row1 last row + 1 in A\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U" ]
public BoxStoragePolicy.Info getInfo(String... fields) { QueryStringBuilder builder = new QueryStringBuilder(); if (fields.length > 0) { builder.appendParam("fields", fields); } URL url = STORAGE_POLICY_WITH_ID_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), builder.toString(), this.getID()); BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); return new Info(response.getJSON()); }
[ "Gets information for a Box Storage Policy with optional fields.\n\n@param fields the fields to retrieve.\n@return info about this item containing only the specified fields, including storage policy." ]
[ "Registers the transformers for JBoss EAP 7.0.0.\n\n@param subsystemRegistration contains data about the subsystem registration", "Sets the path of the edited file in the corresponding display.\n@param editedFilePath path of the edited file to set.", "Creates, writes and loads a new keystore and CA root certificate.", "Merge two maps of configuration properties. If the original contains a mapping for the same key, the new mapping is ignored.\n\n@param original\n@param toMerge", "Given a parameter, builds a new parameter for which the known generics placeholders are resolved.\n@param genericFromReceiver resolved generics from the receiver of the message\n@param placeholdersFromContext, resolved generics from the method context\n@param methodParameter the method parameter for which we want to resolve generic types\n@param paramType the (unresolved) type of the method parameter\n@return a new parameter with the same name and type as the original one, but with resolved generic types", "Deletes an individual alias\n\n@param alias\nthe alias to delete", "Get a list of tags for the specified photo.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param photoId\nThe photo ID\n@return The collection of Tag objects", "Get the list of store names from a list of store definitions\n\n@param list\n@param ignoreViews\n@return list of store names", "Can be overridden if you want to replace or supplement the debug handling for responses.\n\n@param responseCode\n@param inputStream" ]
public MapBounds getRotatedBoundsAdjustedForPreciseRotatedMapSize() { Rectangle2D.Double paintAreaPrecise = getRotatedMapSizePrecise(); Rectangle paintArea = new Rectangle(MapfishMapContext.rectangleDoubleToDimension(paintAreaPrecise)); return getRotatedBounds(paintAreaPrecise, paintArea); }
[ "Return the map bounds rotated with the set rotation. The bounds are adapted to rounding changes of the\nsize of the set paint area.\n\n@return Rotated bounds." ]
[ "Update the Target Filter of the ImporterService.\nApply the induce modifications on the links of the ImporterService\n\n@param serviceReference", "Creates an operation to deploy existing deployment content to the runtime.\n\n@param deployment the deployment to deploy\n\n@return the deploy operation", "Read the leaf tasks for an individual WBS node.\n\n@param parent parent task\n@param id first task ID", "Transforms root paths to site paths.\n\n@return lazy map from root paths to site paths.\n\n@see CmsRequestContext#removeSiteRoot(String)", "Gets the filename from a path or URL.\n@param path or url.\n@return the file name.", "This function uses a proxy which is capable of transforming typed invocations into proper HTTP calls\nwhich will be understood by RESTful services. This works for subresources as well. Interfaces and\nconcrete classes can be proxified, in the latter case a CGLIB runtime dependency is needed. CXF JAX-RS\nproxies can be configured the same way as HTTP-centric WebClients and response status and headers can\nalso be checked. HTTP response errors can be converted into typed exceptions.", "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", "Creates an instance of a NewSimpleBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewSimpleBean instance", "Use this API to fetch all the cacheselector resources that are configured on netscaler." ]
protected void layoutGroupSubreports(DJGroup columnsGroup, JRDesignGroup jgroup) { log.debug("Starting subreport layout..."); JRDesignBand footerBand = (JRDesignBand) ((JRDesignSection)jgroup.getGroupFooterSection()).getBandsList().get(0); JRDesignBand headerBand = (JRDesignBand) ((JRDesignSection)jgroup.getGroupHeaderSection()).getBandsList().get(0); layOutSubReportInBand(columnsGroup, headerBand, DJConstants.HEADER); layOutSubReportInBand(columnsGroup, footerBand, DJConstants.FOOTER); }
[ "If there is a SubReport on a Group, we do the layout here\n@param columnsGroup\n@param jgroup" ]
[ "Set the mesh to be tested against.\n\n@param mesh\nThe {@link GVRMesh} that the picking ray will test against.", "Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields.", "Generates a download id for the request and adds the download request to the download request queue for the dispatchers pool to act on immediately.\n\n@param request\n@return downloadId", "Adds a clause that checks whether ANY set bits in a bitmask are present\nin a numeric expression.\n\n@param expr\nSQL numeric expression to check.\n@param bits\nInteger containing the bits for which to check.", "Given a field node, checks if we are calling a private field from an inner class.", "Write a priority field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Obtain the master partition for a given key\n\n@param key\n@return master partition id", "This is a convenience method provided to allow a day to be set\nas working or non-working, by using the day number to\nidentify the required day.\n\n@param day required day\n@param working flag indicating if the day is a working day", "Read project data from a database.\n\n@return ProjectFile instance\n@throws MPXJException" ]
final public Boolean checkPositionType(String type) { if (tokenPosition == null) { return false; } else { return tokenPosition.checkType(type); } }
[ "Check position type.\n\n@param type the type\n@return the boolean" ]
[ "Split a module Id to get the module version\n@param moduleId\n@return String", "helper extracts the cursor data from the db object", "Adds a path to the request response table with the specified values\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param pathId ID of path\n@throws Exception exception", "Process class properties.\n\n@param writer output stream\n@param methodSet set of methods processed\n@param aClass class being processed\n@throws IntrospectionException\n@throws XMLStreamException", "Returns a list of bindings where provided queue is the destination.\n\n@param vhost vhost of the exchange\n@param queue destination queue name\n@return list of bindings", "Generates an artifact regarding the parameters.\n\n<P> <b>WARNING:</b> The parameters grId/arId/version should be filled!!! Only classifier and type are not mandatory.\n\n@param groupId String\n@param artifactId String\n@param version String\n@param classifier String\n@param type String\n@param extension String\n@return Artifact", "Load all string recognize.", "Create a new instance for the specified host and encryption key.\n\n@see #create(String)", "Sets all elements in this matrix to their absolute values. Note\nthat this operation is in-place.\n@see MatrixFunctions#abs(DoubleMatrix)\n@return this matrix" ]
public OTMConnection acquireConnection(PBKey pbKey) { TransactionFactory txFactory = getTransactionFactory(); return txFactory.acquireConnection(pbKey); }
[ "Obtain an OTMConnection for the given persistence broker key" ]
[ "Use this API to fetch wisite_binding resources of given names .", "Create a TableAlias for path or userAlias\n@param aTable\n@param aPath\n@param aUserAlias\n@return TableAlias", "Generate random velocities for every particle. The direction is obtained by assuming\nthe position of a particle as a vector. This normalised vector is scaled by\nthe speed range.\n\n@return", "Gets the file from which boot operations should be parsed.\n@return the file. Will not be {@code null}", "URL-Decodes a given string using ISO-8859-1. No UnsupportedEncodingException to handle as it is dealt with in\nthis method.", "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.", "Read data for a single table and store it.\n\n@param is input stream\n@param table table header", "Format a date that is parseable from JavaScript, according to ISO-8601.\n\n@param date the date to format to a JSON string\n@return a formatted date in the form of a string", "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" ]
public static void validateUserStoreNamesOnNode(AdminClient adminClient, Integer nodeId, List<String> storeNames) { List<StoreDefinition> storeDefList = adminClient.metadataMgmtOps.getRemoteStoreDefList(nodeId) .getValue(); Map<String, Boolean> existingStoreNames = new HashMap<String, Boolean>(); for(StoreDefinition storeDef: storeDefList) { existingStoreNames.put(storeDef.getName(), true); } for(String storeName: storeNames) { if(!Boolean.TRUE.equals(existingStoreNames.get(storeName))) { Utils.croak("Store " + storeName + " does not exist!"); } } }
[ "Utility function that checks if store names are valid on a node.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch stores from\n@param storeNames Store names to check" ]
[ "Given a storedefinition, constructs the xml string to be sent out in\nresponse to a \"schemata\" fetch request\n\n@param storeDefinition\n@return serialized store definition", "Launch Application Setting to grant permission.", "List the addons already added to an app.\n@param appName new of the app\n@return a list of add-ons", "Generates a HashMap used to store expanded state for items in the list\non configuration change or whenever onResume is called.\n\n@return A HashMap containing the expanded state of all parents", "Navigate to this address in the given model node.\n\n@param model the model node\n@param create {@code true} to create the last part of the node if it does not exist\n@return the submodel\n@throws NoSuchElementException if the model contains no such element\n\n@deprecated manipulating a deep DMR node tree via PathAddress is no longer how the management layer works\ninternally, so this method has become legacy cruft. Management operation handlers\nshould obtain a {@link org.jboss.as.controller.registry.Resource Resource} from the\n{@link org.jboss.as.controller.OperationContext#readResource(PathAddress) OperationContext}\nand use the {@code Resource} API to access child resources", "Copy the specified bytes into a new array\n\n@param array The array to copy from\n@param from The index in the array to begin copying from\n@param to The least index not copied\n@return A new byte[] containing the copied bytes", "Use this API to fetch nsacl6 resources of given names .", "set custom request for the default profile's default client\n\n@param pathName friendly name of path\n@param customData custom response/request data\n@return true if success, false otherwise", "Sets the category display options that affect how the category selection dialog is shown.\n\n@param displayCategoriesByRepository if true, the categories are shown separated by repository.\n@param displayCategorySelectionCollapsed if true, the selection dialog opens showing only the top-level categories\n(or the various repositories) in collapsed state." ]
private String formatDuration(Object value) { String result = null; if (value instanceof Duration) { Duration duration = (Duration) value; result = m_formats.getDurationDecimalFormat().format(duration.getDuration()) + formatTimeUnit(duration.getUnits()); } return result; }
[ "This method is called to format a duration.\n\n@param value duration value\n@return formatted duration value" ]
[ "Creates an endpoint reference by duplicating the endpoint reference of a given server.\n@param server\n@param address\n@param props\n@return", "detect if WS Addressing feature already enabled.\n\n@param provider the interceptor provider\n@param bus the bus\n@return true, if successful", "Add a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param newHash the new hash of the added content\n@return the builder", "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", "Processes the template for all index descriptors of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"", "Test for equality.\n@param obj1 the first object\n@param obj2 the second object\n@return true if both are null or the two objects are equal", "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", "Export modules and check them in. Assumes the log stream already open.\n@return exit code of the commit-script.", "Processes one item document. This is often the main workhorse that\ngathers the data you are interested in. You can modify this code as you\nwish." ]
public static base_response unset(nitro_service client, Interface resource, String[] args) throws Exception{ Interface unsetresource = new Interface(); unsetresource.id = resource.id; return unsetresource.unset_resource(client,args); }
[ "Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array." ]
[ "Clones the given collection.\n\n@param collDef The collection descriptor\n@param prefix A prefix for the name\n@return The cloned collection", "Quick and dirty XML text escape.\n\n@param sb working string buffer\n@param text input text\n@return escaped text", "Allocates a new next buffer and pending fetch.", "Log a fatal message.", "Pushes a basic event.\n\n@param eventName The name of the event", "Uncheck all items in the list including all sub-items.\n@param list list of CmsTreeItem entries.", "Reads the next \"word from the request, comprising all characters up to the next SPACE.\nCharacters are tested by the supplied CharacterValidator, and an exception is thrown\nif invalid characters are encountered.", "Adds an individual alias. It will be merged with the current\nlist of aliases, or added as a label if there is no label for\nthis item in this language yet.\n\n@param alias\nthe alias to add", "Interfaces, enums, annotations, and abstract classes cannot be\ninstantiated.\n\n@param actionClass\nclass to check\n@return returns true if the class cannot be instantiated or should be\nignored" ]
private MBeanServer getServerForName(String name) { try { MBeanServer mbeanServer = null; final ObjectName objectNameQuery = new ObjectName(name + ":type=Service,*"); for (final MBeanServer server : MBeanServerFactory.findMBeanServer(null)) { if (server.queryNames(objectNameQuery, null).size() > 0) { mbeanServer = server; // we found it, bail out break; } } return mbeanServer; } catch (Exception e) { } return null; }
[ "Returns an MBeanServer with the specified name\n\n@param name\n@return" ]
[ "This method writes resource data to a Planner file.", "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", "Creates a new Box Developer Edition connection with App User token.\n@param userId the user ID to use for an App User.\n@param clientId the client ID to use when exchanging the JWT assertion for an access token.\n@param clientSecret the client secret to use when exchanging the JWT assertion for an access token.\n@param encryptionPref the encryption preferences for signing the JWT.\n@param accessTokenCache the cache for storing access token information (to minimize fetching new tokens)\n@return a new instance of BoxAPIConnection.", "End building the prepared script\n@param config the configuration for the script to build\n@return the new {@link LuaPreparedScript} instance", "determine the what state a transaction is in by inspecting the primary column", "Assigns a retention policy to all items with a given metadata template, optionally matching on fields.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param templateID the ID of the metadata template to assign the policy to.\n@param filter optional fields to match against in the metadata template.\n@return info about the created assignment.", "set custom request for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise", "Remove a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@return the builder", "Adds all pairs from 'fromMap' to 'toMap' excluding once that matching the pattern" ]
private ProjectFile handleDirectory(File directory) throws Exception { ProjectFile result = handleDatabaseInDirectory(directory); if (result == null) { result = handleFileInDirectory(directory); } return result; }
[ "We have a directory. Determine if this contains a multi-file database we understand, if so\nprocess it. If it does not contain a database, test each file within the directory\nstructure to determine if it contains a file whose format we understand.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null" ]
[ "Make all elements of a String array upper case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements upper case", "Allocate a timestamp", "Defines how messages should be logged. This method can be modified to\nrestrict the logging messages that are shown on the console or to change\ntheir formatting. See the documentation of Log4J for details on how to do\nthis.", "Processes the template for all extents of the current class.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"", "Add component processing time to given map\n@param mapComponentTimes\n@param component", "Print channels to the left of log messages\n@param width The width (in characters) to print the channels\n@return this", "Formats the supplied value using the specified DateTimeFormat.\n\n@return \"\" if the value is null", "Parse an extended attribute boolean value.\n\n@param value string representation\n@return boolean value", "Hides the original Java-style method name using an attribute\nwhich should be respected by Visual Studio, the creates a new\nwrapper method using a .Net style method name.\n\nNote that this does not work for VB as it is case insensitive. Even\nthough Visual Studio won't show you the Java-style method name,\nthe VB compiler sees both and thinks they are the same... which\ncauses it to fail.\n\n@param writer output stream\n@param aClass class being processed\n@param methodSet set of methods which have been processed.\n@throws XMLStreamException" ]
public void drawImage(Image img, Rectangle rect, Rectangle clipRect, float opacity) { try { template.saveState(); // opacity PdfGState state = new PdfGState(); state.setFillOpacity(opacity); state.setBlendMode(PdfGState.BM_NORMAL); template.setGState(state); // clipping code if (clipRect != null) { template.rectangle(clipRect.getLeft() + origX, clipRect.getBottom() + origY, clipRect.getWidth(), clipRect.getHeight()); template.clip(); template.newPath(); } template.addImage(img, rect.getWidth(), 0, 0, rect.getHeight(), origX + rect.getLeft(), origY + rect.getBottom()); } catch (DocumentException e) { log.warn("could not draw image", e); } finally { template.restoreState(); } }
[ "Draws the specified image with the first rectangle's bounds, clipping with the second one.\n\n@param img image\n@param rect rectangle\n@param clipRect clipping bounds\n@param opacity opacity of the image (1 = opaque, 0= transparent)" ]
[ "Process data for an individual calendar.\n\n@param row calendar data", "Returns a flag, indicating if search should be performed using a wildcard if the empty query is given.\n@return A flag, indicating if search should be performed using a wildcard if the empty query is given.", "Returns an array of all endpoints\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param filters filters to apply to endpoints\n@return Collection of endpoints\n@throws Exception exception", "Create a new instance of a single input function from an operator character\n@param op Which operation\n@param input Input variable\n@return Resulting operation", "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", "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", "Use this API to fetch nd6ravariables resource of given name .", "This method reads a two byte integer from the input stream.\n\n@param is the input stream\n@return integer value\n@throws IOException on file read error or EOF", "Creates a curator built using Application's zookeeper connection string. Root path will start\nat Fluo application chroot." ]
public int setPageCount(final int num) { int diff = num - getCheckableCount(); if (diff > 0) { addIndicatorChildren(diff); } else if (diff < 0) { removeIndicatorChildren(-diff); } if (mCurrentPage >=num ) { mCurrentPage = 0; } setCurrentPage(mCurrentPage); return diff; }
[ "Sets number of pages. If the index of currently selected page is bigger than the total number\nof pages, first page will be selected instead.\n@return difference between the previous number of pages and new one. Negative value is\nreturned if new number of pages is less then it was before." ]
[ "Get all backup data\n\n@param model\n@return\n@throws Exception", "Sends a normal HTTP response containing the serialization information in\na XML format", "Send a request that expects a single message as its response, then read and return that response.\n\n@param requestType identifies what kind of request to send\n@param responseType identifies the type of response we expect, or {@code null} if we’ll accept anything\n@param arguments The argument fields to send in the request\n\n@return the response from the player\n\n@throws IOException if there is a communication problem, or if the response does not have the same transaction\nID as the request.", "Finds an ancestor of a specific type, if possible.\n\n<p>Example: (New York city target, {@link Type#COUNTRY}) returns (US country target)", "On complete.\nSave response headers when needed.\n\n@param response\nthe response\n@return the response on single request", "Opens file for editing.\n\n@param currentChangeListId The current change list id to open the file for editing at\n@param filePath The filePath which contains the file we need to edit\n@throws IOException Thrown in case of perforce communication errors\n@throws InterruptedException", "Gets a SerialMessage with the BASIC GET command\n@return the serial message", "Get the last non-white Y point\n@param img Image in memory\n@return The trimmed height", "Unescape and unquote the path. Ready for translation." ]
public static boolean isListLiteralWithOnlyConstantValues(Expression expression) { if (expression instanceof ListExpression) { List<Expression> expressions = ((ListExpression) expression).getExpressions(); for (Expression e : expressions) { if (!isConstantOrConstantLiteral(e)) { return false; } } return true; } return false; }
[ "Returns true if a List literal that contains only entries that are constants.\n@param expression - any expression" ]
[ "converts the file URIs with an absent authority to one with an empty", "Calculate start dates for a yearly relative recurrence.\n\n@param calendar current date\n@param dates array of start dates", "Account for key being fetched.\n\n@param key", "Sets the distance from the origin to the far clipping plane for the\nwhole camera rig.\n\n@param far\nDistance to the far clipping plane.", "Add the given, single header value under the given name.\n@param headerName the header name\n@param headerValue the header value\n@throws UnsupportedOperationException if adding headers is not supported\n@see #put(String, List)\n@see #set(String, String)", "Returns all the retention policies.\n@param api the API connection to be used by the resource.\n@param fields the fields to retrieve.\n@return an iterable with all the retention policies.", "Use this API to unset the properties of nslimitselector resource.\nProperties that need to be unset are specified in args array.", "Gets the value of the resourceRequestCriterion property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the resourceRequestCriterion property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetResourceRequestCriterion().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ResourceRequestType.ResourceRequestCriterion }", "Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions." ]
public void set( T a ) { if( a.getType() == getType() ) mat.set(a.getMatrix()); else { setMatrix(a.mat.copy()); } }
[ "Sets the elements in this matrix to be equal to the elements in the passed in matrix.\nBoth matrix must have the same dimension.\n\n@param a The matrix whose value this matrix is being set to." ]
[ "Use this API to delete sslcertkey.", "Reads a single resource from a ConceptDraw PROJECT file.\n\n@param resource ConceptDraw PROJECT resource", "Load a system library from a stream. Copies the library to a temp file\nand loads from there.\n\n@param libname name of the library (just used in constructing the library name)\n@param is InputStream pointing to the library", "Gets the path used for the results of XSLT Transforms.", "Extracts a duration from a JAXBElement instance.\n\n@param duration duration expressed in hours\n@return duration instance", "Return the numeric distance value in degrees.\n\n@return the degrees", "Use this API to enable clusterinstance resources of given names.", "Pop the record number from the front of the list, and parse it to ensure that\nit is a valid integer.\n\n@param list MPX record", "Use this API to Import application." ]
public FieldDescriptorDef getField(String name) { FieldDescriptorDef fieldDef = null; for (Iterator it = _fields.iterator(); it.hasNext(); ) { fieldDef = (FieldDescriptorDef)it.next(); if (fieldDef.getName().equals(name)) { return fieldDef; } } return null; }
[ "Returns the field definition with the specified name.\n\n@param name The name of the desired field\n@return The field definition or <code>null</code> if there is no such field" ]
[ "Print a booking type.\n\n@param value BookingType instance\n@return booking type value", "Queries a Search Index and returns ungrouped results. In case the query\nused grouping, an empty list is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the search query as a {@code List<T> }", "Use this API to fetch appfwlearningsettings resource of given name .", "Computes an MD4 hash for the password.\n\n@param password the password for which to compute the hash\n@throws NoSuchAlgorithmException\n@throws InvalidKeyException\n\n@return the password hash", "This method is called to format a currency value.\n\n@param value numeric value\n@return currency value", "Create a new GP entry in the database. No commit performed.", "bootstrap method for method calls with \"this\" as receiver\n@deprecated since Groovy 2.1.0", "Use this API to fetch all the cacheselector resources that are configured on netscaler.", "Creates a ServiceCall from an observable object.\n\n@param observable the observable to create from\n@param <T> the type of the response\n@return the created ServiceCall" ]
public int compare(final Version other) throws IncomparableException{ // Cannot compare branch versions and others if(!isBranch().equals(other.isBranch())){ throw new IncomparableException(); } // Compare digits final int minDigitSize = getDigitsSize() < other.getDigitsSize()? getDigitsSize(): other.getDigitsSize(); for(int i = 0; i < minDigitSize ; i++){ if(!getDigit(i).equals(other.getDigit(i))){ return getDigit(i).compareTo(other.getDigit(i)); } } // If not the same number of digits and the first digits are equals, the longest is the newer if(!getDigitsSize().equals(other.getDigitsSize())){ return getDigitsSize() > other.getDigitsSize()? 1: -1; } if(isBranch() && !getBranchId().equals(other.getBranchId())){ return getBranchId().compareTo(other.getBranchId()); } // if the digits are the same, a snapshot is newer than a release if(isSnapshot() && other.isRelease()){ return 1; } if(isRelease() && other.isSnapshot()){ return -1; } // if both versions are releases, compare the releaseID if(isRelease() && other.isRelease()){ return getReleaseId().compareTo(other.getReleaseId()); } return 0; }
[ "Compare two versions\n\n@param other\n@return an integer: 0 if equals, -1 if older, 1 if newer\n@throws IncomparableException is thrown when two versions are not coparable" ]
[ "If the deployment has a module attached it will ask the module to load the ServiceActivator services.\n\n@param phaseContext the deployment unit context", "Generate a weighted score based on position for matches of URI parts.\nThe matches are weighted in descending order from left to right.\nExact match is weighted higher than group match, and group match is weighted higher than wildcard match.\n\n@param requestUriParts the parts of request URI\n@param destUriParts the parts of destination URI\n@return weighted score", "Cancel request and workers.", "Execute the physical query and initialize the various entities and collections\n\n@param session the session\n@param qp the query parameters\n@param ogmLoadingContext the loading context\n@param returnProxies when {@code true}, get an existing proxy for each collection element (if there is one)\n@return the result of the query", "Scans the given token global token stream for a list of sub-token\nstreams representing those portions of the global stream that\nmay contain date time information\n\n@param stream\n@return", "Reads the entity hosting the association from the datastore and applies any property changes from the server\nside.", "Copy the specified bytes into a new array\n\n@param array The array to copy from\n@param from The index in the array to begin copying from\n@param to The least index not copied\n@return A new byte[] containing the copied bytes", "Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@param fHeight What to multiply the height by. value < 1 scales down, and value > one scales up\n@return A scaled image", "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" ]
public static tmtrafficpolicy_tmglobal_binding[] get(nitro_service service, String name) throws Exception{ tmtrafficpolicy_tmglobal_binding obj = new tmtrafficpolicy_tmglobal_binding(); obj.set_name(name); tmtrafficpolicy_tmglobal_binding response[] = (tmtrafficpolicy_tmglobal_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch tmtrafficpolicy_tmglobal_binding resources of given name ." ]
[ "Sets the target hosts from json path.\n\n@param jsonPath\nthe json path\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception", "Find all the node representing the entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@return an iterator over the nodes representing an entity", "Use this API to fetch dnssuffix resource of given name .", "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", "Read exceptions for a calendar.\n\n@param table calendar exception data\n@param calendar calendar\n@param exceptionID first exception ID", "Remove the set of partitions from the node provided\n\n@param node The node from which we're removing the partitions\n@param donatedPartitions The list of partitions to remove\n@return The new node without the partitions", "Set the face to be culled\n\n@param cullFace\n{@code GVRCullFaceEnum.Back} Tells Graphics API to discard\nback faces, {@code GVRCullFaceEnum.Front} Tells Graphics API\nto discard front faces, {@code GVRCullFaceEnum.None} Tells\nGraphics API to not discard any face\n@param passIndex\nThe rendering pass to set cull face state", "Get a property as an int or throw an exception.\n\n@param key the property name", "Send a sync command to all registered listeners.\n\n@param command the byte which identifies the type of sync command we received" ]
public static ipset_nsip6_binding[] get(nitro_service service, String name) throws Exception{ ipset_nsip6_binding obj = new ipset_nsip6_binding(); obj.set_name(name); ipset_nsip6_binding response[] = (ipset_nsip6_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch ipset_nsip6_binding resources of given name ." ]
[ "Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts.", "Convert a Identification to a By used in WebDriver Drivers.\n\n@return the correct By specification of the current Identification.", "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", "Appends a String to the string representation of this number.\n\n@param value a Number\n@param right a String\n@return a String\n@since 1.0", "Use this API to fetch all the dnssuffix resources that are configured on netscaler.", "Removes an audio source from the audio manager.\n@param audioSource audio source to remove", "Clones the given field.\n\n@param fieldDef The field descriptor\n@param prefix A prefix for the name\n@return The cloned field", "Create a FreeMarkerOperation with the provided furnace instance template path, and varNames.\n\nThe variables in varNames will be provided to the template, and a new ReportModel will be created with these variables attached.", "List files in a path according to the specified filter.\n@param rootPath the path from which we are listing the files.\n@param filter the filter to be applied.\n@return the list of files / directory.\n@throws IOException" ]
private final boolean matchChildBlock(int bufferIndex) { // // Match the pattern we see at the start of the child block // int index = 0; for (byte b : CHILD_BLOCK_PATTERN) { if (b != m_buffer[bufferIndex + index]) { return false; } ++index; } // // The first step will produce false positives. To handle this, we should find // the name of the block next, and check to ensure that the length // of the name makes sense. // int nameLength = FastTrackUtility.getInt(m_buffer, bufferIndex + index); // System.out.println("Name length: " + nameLength); // // if (nameLength > 0 && nameLength < 100) // { // String name = new String(m_buffer, bufferIndex+index+4, nameLength, CharsetHelper.UTF16LE); // System.out.println("Name: " + name); // } return nameLength > 0 && nameLength < 100; }
[ "Locate a child block by byte pattern and validate by\nchecking the length of the string we are expecting\nto follow the pattern.\n\n@param bufferIndex start index\n@return true if a child block starts at this point" ]
[ "Appends formatted text to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>", "Create an instance from the given config.\n\n@param param Grid param from the request.", "Retrieve a Double from an input stream.\n\n@param is input stream\n@return Double instance", "Create a Count-Query for ReportQueryByCriteria", "given the groupId, returns the groupName\n\n@param groupId ID of group\n@return name of group", "This method is designed to be called from the diverse subclasses", "Producers returned from this method are not validated. Internal use only.", "Count the number of non-zero elements in V", "Method to get the file writer required for the .story files\n\n@param scenarioName\n@param aux_package_path\n@param dest_dir\n@return The file writer that generates the .story files for each test\n@throws BeastException" ]
public static boolean isLong(CharSequence self) { try { Long.valueOf(self.toString().trim()); return true; } catch (NumberFormatException nfe) { return false; } }
[ "Determine if a CharSequence can be parsed as a Long.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isLong(String)\n@since 1.8.2" ]
[ "Dump the buffer contents to a file\n@param file\n@throws IOException", "Given a directory, determine if it contains a multi-file database whose format\nwe can process.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null", "Convenience method dispatches this object to the source appender, which\nwill result in the custom message being appended to the new file.\n\n@param message\nThe custom logging message to be appended.", "Init the licenses cache\n\n@param licenses", "Parses the dictionary from an InputStream.\n\n@param client The SolrClient instance object.\n@param lang The language of the dictionary.\n@param is The InputStream object.\n@param documents List to put the assembled SolrInputObjects into.\n@param closeStream boolean flag that determines whether to close the inputstream\nor not.", "Conditionally read a nested table based in the value of a boolean flag which precedes the table data.\n\n@param readerClass reader class\n@return table rows or empty list if table not present", "Performs the actual spell check query using Solr.\n\n@param request the spell check request\n\n@return Results of the Solr spell check of type SpellCheckResponse or null if something goes wrong.", "Creates a solver for symmetric positive definite matrices.\n\n@return A new solver for symmetric positive definite matrices.", "Send get request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws URISyntaxException the uri syntax exception\n@throws IOException the io exception" ]
public Date toDate(String dateString) { Date date = null; DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); try { date = df.parse(dateString); } catch (ParseException ex) { System.out.println(ex.fillInStackTrace()); } return date; }
[ "Takes a String and converts it to a Date\n\n@param dateString the date\n@return Date denoted by dateString" ]
[ "Add the final assignment of the property to the partial value object's source code.", "Use this API to disable clusterinstance of given name.", "Returns an integer array that contains the current values for all the\ntexture parameters.\n\n@return an integer array that contains the current values for all the\ntexture parameters.", "Reads outline code custom field values and populates container.", "Set the minimum date limit.", "Returns a list of metadata property paths.\n@return the list of metdata property paths.", "Save the current file as the given type.\n\n@param file target file\n@param type file type", "Set the horizontal and vertical alignment for the image when image gets cropped by resizing.\n\n@param valign Vertical alignment.\n@param halign Horizontal alignment.\n@throws IllegalStateException if image has not been marked for resize.", "Encodes the given URI user info with the given encoding.\n@param userInfo the user info to be encoded\n@param encoding the character encoding to encode to\n@return the encoded user info\n@throws UnsupportedEncodingException when the given encoding parameter is not supported" ]
public String getUrl(){ final StringBuilder sb = new StringBuilder(); sb.append("http://"); sb.append(getHttpConfiguration().getBindHost().get()); sb.append(":"); sb.append(getHttpConfiguration().getPort()); return sb.toString(); }
[ "Returns the complete Grapes root URL\n\n@return String" ]
[ "Delivers the correct JSON Object for properties\n\n@param properties\n@throws org.json.JSONException", "Handles the response of the SerialAPIGetCapabilities request.\n@param incomingMessage the response message to process.", "If an error is thrown while loading zone data, the exception is logged\nto system error and null is returned for this and all future requests.\n\n@param id the id to load\n@return the loaded zone", "Iterates over the elements of an iterable collection of items, starting from\na specified startIndex, and returns the index values of the items that match\nthe condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return a list of numbers corresponding to the index values of all matched objects\n@since 1.5.2", "Expands all parents in a range of indices in the list of parents.\n\n@param startParentPosition The index at which to to start expanding parents\n@param parentCount The number of parents to expand", "Emit an enum event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(Enum, Object...)", "Loads the leap second rules from a URL, often in a jar file.\n\n@param url the jar file to load, not null\n@throws Exception if an error occurs", "Retrieves the text value for the baseline duration.\n\n@return baseline duration text", "Gets the final transform of the bone.\n\n@return the 4x4 matrix representing the final transform of the\nbone during animation, which comprises bind pose and skeletal\ntransform at the current time of the animation." ]
public static Cluster createUpdatedCluster(Cluster currentCluster, int stealerNodeId, List<Integer> donatedPartitions) { Cluster updatedCluster = Cluster.cloneCluster(currentCluster); // Go over every donated partition one by one for(int donatedPartition: donatedPartitions) { // Gets the donor Node that owns this donated partition Node donorNode = updatedCluster.getNodeForPartitionId(donatedPartition); Node stealerNode = updatedCluster.getNodeById(stealerNodeId); if(donorNode == stealerNode) { // Moving to the same location = No-op continue; } // Update the list of partitions for this node donorNode = removePartitionFromNode(donorNode, donatedPartition); stealerNode = addPartitionToNode(stealerNode, donatedPartition); // Sort the nodes updatedCluster = updateCluster(updatedCluster, Lists.newArrayList(donorNode, stealerNode)); } return updatedCluster; }
[ "Updates the existing cluster such that we remove partitions mentioned\nfrom the stealer node and add them to the donor node\n\n@param currentCluster Existing cluster metadata. Both stealer and donor\nnode should already exist in this metadata\n@param stealerNodeId Id of node for which we are stealing the partitions\n@param donatedPartitions List of partitions we are moving\n@return Updated cluster metadata" ]
[ "Use this API to fetch a appfwglobal_auditsyslogpolicy_binding resources.", "Use this API to delete clusterinstance resources.", "Read custom property definitions for resources.\n\n@param gpResources GanttProject resources", "Write objects to data store, but don't release the locks.\nI don't know what we should do if we are in a checkpoint and\nwe need to abort.", "The method determines if the type can be resolved and if not, will try to guess the qualified name using the information from the imports.", "Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for", "state chain management ops below", "Sets ID field value.\n\n@param val value", "Tests an observer method to see if it is transactional.\n\n@param observer The observer method\n@return true if the observer method is annotated as transactional" ]
public void addSite(String siteKey) { ValueMap gv = new ValueMap(siteKey); if (!this.valueMaps.contains(gv)) { this.valueMaps.add(gv); } }
[ "Registers a new site for specific data collection. If null is used as a\nsite key, then all data is collected.\n\n@param siteKey\nthe site to collect geo data for" ]
[ "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", "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.", "Obtain the profile identifier.\n\n@param profileIdentifier Can be profile ID, or friendly name\n@return\n@throws Exception", "Given a BSON document, remove any forbidden fields and return the document. If no changes are\nmade, the original document reference is returned. If changes are made, a cloned copy of the\ndocument with the changes will be returned.\n\n@param document the document from which to remove forbidden fields\n\n@return a BsonDocument without any forbidden fields.", "Used when setting the \"visible\" field in the response. See the \"List Conversations\" docs for details\n@param filters Filter strings to be applied to the visibility of conversations\n@return this to continue building options", "Returns the input to parse including the whitespace left to the cursor position since\nit may be relevant to the list of proposals for whitespace sensitive languages.", "Removes file from your assembly.\n\n@param name field name of the file to remove.", "Replaces sequences of whitespaces with tabs within a line.\n\n@param self A line to unexpand\n@param tabStop The number of spaces a tab represents\n@return an unexpanded String\n@since 1.8.2", "Returns an array of all the singular values in A sorted in ascending order\n\n@param A Matrix. Not modified.\n@return singular values" ]
public static AppDescriptor deserializeFrom(byte[] bytes) { try { ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); return (AppDescriptor) ois.readObject(); } catch (IOException e) { throw E.ioException(e); } catch (ClassNotFoundException e) { throw E.unexpected(e); } }
[ "Deserialize an `AppDescriptor` from byte array\n\n@param bytes\nthe byte array\n@return\nan `AppDescriptor` instance" ]
[ "Updates the indices in the index buffer from a Java char array.\nAll of the entries of the input char array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if char array is wrong size", "Painter the tile, by building a URL where the image can be found.\n\n@param tile\nMust be an instance of {@link InternalTile}, and must have a non-null {@link RasterUrlBuilder}.\n@return Returns a {@link InternalTile}.", "Decides what are the preferred credentials to use for resolving the repo keys of the server\n\n@return Preferred credentials for repo resolving. Never null.", "Reset the combination generator.", "Get the active operation.\n\n@param id the active operation id\n@return the active operation, {@code null} if if there is no registered operation", "Handle content length.\n\n@param event\nthe event", "Check, if the current user has permissions on the document's resource.\n@param cms the context\n@param doc the solr document (from the search result)\n@param filter the resource filter to use for checking permissions\n@return <code>true</code> iff the resource mirrored by the search result can be read by the current user.", "Add a resource assignment which has been populated elsewhere.\n\n@param assignment resource assignment", "Apply clipping to the features in a tile. The tile and its features should already be in map space.\n\n@param tile\ntile to put features in\n@param scale\nscale\n@param panOrigin\nWhen panning on the client, only this parameter changes. So we need to be aware of it as we calculate\nthe maxScreenEnvelope.\n@throws GeomajasException oops" ]
public PeriodicEvent runEvery(Runnable task, float delay, float period, int repetitions) { if (repetitions < 1) { return null; } else if (repetitions == 1) { // Better to burn a handful of CPU cycles than to churn memory by // creating a new callback return runAfter(task, delay); } else { return runEvery(task, delay, period, new RunFor(repetitions)); } }
[ "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." ]
[ "Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error", "Returns the next index of the argument by decrementing 1 from the possibly parsed number\n\n@param description this String will be searched from the start for a number\n@param defaultIndex this will be returned if the match does not succeed\n@return the parsed index or the defaultIndex", "Return the map bounds rotated with the set rotation. The bounds are adapted to rounding changes of the\nsize of the paint area.\n\n@param paintAreaPrecise The exact size of the paint area.\n@param paintArea The rounded size of the paint area.\n@return Rotated bounds.", "Use this API to add dospolicy.", "Modies the matrix to make sure that at least one element in each column has a value", "Delivers the correct JSON Object for the Bounds\n\n@param bounds\n@throws org.json.JSONException", "Sets the position of the currency symbol.\n\n@param posn currency symbol position.", "Returns the ports of the server.\n\n@return the {@link Map} which contains the pairs of local {@link InetSocketAddress} and\n{@link ServerPort} is the server is started. {@link Optional#empty()} otherwise.", "Obtains a local date in Discordian 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 Discordian local date, not null\n@throws DateTimeException if unable to create the date" ]
@Override public void setJobQueue(int jobId, Queue queue) { JqmClientFactory.getClient().setJobQueue(jobId, queue); }
[ "No need to expose. Client side work." ]
[ "Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception", "Copy a path recursively.\n@param source a Path pointing to a file or a directory that must exist\n@param target a Path pointing to a directory where the contents will be copied.\n@param overwrite overwrite existing files - if set to false fails if the target file already exists.\n@throws IOException", "Start with specifying the artifactId", "generate a prepared UPDATE-Statement for the Class\ndescribed by cld\n@param cld the ClassDescriptor", "Use this API to fetch all the nsspparams resources that are configured on netscaler.", "Process stop.\n\n@param endpoint the endpoint\n@param eventType the event type", "Loops over cluster and repeatedly tries to break up contiguous runs of\npartitions. After each phase of breaking up contiguous partitions, random\npartitions are selected to move between zones to balance the number of\npartitions in each zone. The second phase may re-introduce contiguous\npartition runs in another zone. Therefore, this overall process is\nrepeated multiple times.\n\n@param nextCandidateCluster\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return updated cluster", "This method determines whether the cost rate table should be written.\nA default cost rate table should not be written to the file.\n\n@param entry cost rate table entry\n@param from from date\n@return boolean flag", "Use this API to unlink sslcertkey resources." ]
public static ModelNode createRemoveOperation(final ModelNode address, final boolean recursive) { final ModelNode op = createRemoveOperation(address); op.get(RECURSIVE).set(recursive); return op; }
[ "Creates a remove operation.\n\n@param address the address for the operation\n@param recursive {@code true} if the remove should be recursive, otherwise {@code false}\n\n@return the operation" ]
[ "Returns the compact project records for all projects in the team.\n\n@param team The team to find projects in.\n@return Request object", "Inserts a Serializable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Serializable object, or null\n@return this bundler instance to chain method calls", "Get the configuration for a TMS layer by retrieving and parsing it's XML description file. The parsing is done\nusing JaxB.\n@param layer the tms layer to get capabilities for.\n@return Returns the description as a Java configuration object.\n@throws TmsLayerException\nIn case something went wrong trying to find or parse the XML description file.", "marks the message as read", "Get the status of the upload session. It contains the number of parts that are processed so far,\nthe total number of parts required for the commit and expiration date and time of the upload session.\n@return the status.", "Adds an additional site link to the constructed document.\n\n@param title\nthe title of the linked page\n@param siteKey\nidentifier of the site, e.g., \"enwiki\"\n@param badges\none or more badges", "We will always try to gather as many results as possible and never throw an exception.\n\nTODO: Make MemberResponse hold an exception that we can populate if something bad happens so we always\nget to return something for a member in order to indicate a failure. Getting the result when there\nis an error should throw an exception.\n\n@param execSvc\n@param members\n@param callable\n@param maxWaitTime - a value of 0 indicates forever\n@param unit\n@return", "Record a content loader for a given patch id.\n\n@param patchID the patch id\n@param contentLoader the content loader", "Print all relations for a given's class's tag\n@param tagname the tag containing the given relation\n@param from the source class\n@param edgetype the dot edge specification" ]
protected boolean isItemAccepted(byte[] key) { boolean entryAccepted = false; if (!fetchOrphaned) { if (isKeyNeeded(key)) { entryAccepted = true; } } else { if (!StoreRoutingPlan.checkKeyBelongsToNode(key, nodeId, initialCluster, storeDef)) { entryAccepted = true; } } return entryAccepted; }
[ "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." ]
[ "Convert the value to requested quoting convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param value The value to convert.\n@param key The key of the value.\n@param toConvention The convention to convert to.\n@param toDisplacement The displacement to be used, if converting to log normal implied volatility.\n@param fromConvention The current convention of the value.\n@param fromDisplacement The current displacement.\n@param model The model for context.\n\n@return The converted value.", "Transforms each character from this reader by passing it to the given\nclosure. The Closure should return each transformed character, which\nwill be passed to the Writer. The reader and writer will be both be\nclosed before this method returns.\n\n@param self a Reader object\n@param writer a Writer to receive the transformed characters\n@param closure a closure that performs the required transformation\n@throws IOException if an IOException occurs.\n@since 1.5.0", "Detects if the current browser is a BlackBerry Touch\ndevice, such as the Storm, Torch, and Bold Touch. Excludes the Playbook.\n@return detection of a Blackberry touchscreen device", "Rethrows platform specific OperationCanceledExceptions and unwraps OperationCanceledErrors. Does nothing for any other type of Throwable.", "Determines if the queue identified by the given key can be used as a delayed queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key already is a delayed queue or is not currently used, false otherwise", "This function wires up a SSL Listener with the cyber villians root CA and cert with the correct CNAME for the request\n\n@param host\n@param listener", "Watches specified IDs in a collection.\n@param ids the ids to watch.\n@return the stream of change events.", "This is the main entry point used to convert the internal representation\nof timephased baseline work into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param work timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range", "Gets the URL of the route with given name.\n@param routeName to return its URL\n@return URL backed by the route with given name." ]
public static int[] randomPermutation(int size) { Random r = new Random(); int[] result = new int[size]; for (int j = 0; j < size; j++) { result[j] = j; } for (int j = size - 1; j > 0; j--) { int k = r.nextInt(j); int temp = result[j]; result[j] = result[k]; result[k] = temp; } return result; }
[ "Create a random permutation of the numbers 0, ..., size - 1.\n\nsee Algorithm P, D.E. Knuth: The Art of Computer Programming, Vol. 2, p. 145" ]
[ "Returns the last node that appears to be part of the prefix. This will be used to determine the current model\nobject that'll be the most special context instance in the proposal provider.", "Use this API to convert sslpkcs8.", "Utility function that creates directory.\n\n@param dir Directory path\n@return File object of directory.", "Sets the right padding for all cells in the table.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining", "Update the default time unit for work based on data read from the file.\n\n@param column column data", "Compares two annotated types and returns true if they are the same", "Resolve Java control character sequences to the actual character value.\nOptionally handle unicode escape sequences, too.", "Answer the SQL-Clause for a BetweenCriteria\n\n@param alias\n@param pathInfo\n@param c BetweenCriteria\n@param buf", "Adds one or several attributes to facet on for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining." ]
private void clearQueues(final Context context) { synchronized (eventLock) { DBAdapter adapter = loadDBAdapter(context); DBAdapter.Table tableName = DBAdapter.Table.EVENTS; adapter.removeEvents(tableName); tableName = DBAdapter.Table.PROFILE_EVENTS; adapter.removeEvents(tableName); clearUserContext(context); } }
[ "Only call async" ]
[ "Starts asynchronous check. Result will be delivered to the listener on the main thread.\n\n@param context\n@param appId application id from the oculus dashboard\n@param listener listener to invoke when the result is available\n@throws IllegalStateException in case the platform sdk cannot be initialized\n@throws IllegalArgumentException if listener is null", "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.", "Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream\nproperly.\n\n@param out target archive.\n@param source file to be added.\n@param fileSize size of the file (which is known in most cases).\n@throws IOException in case of any issues with underlying store.", "Reads outline code custom field values and populates container.", "Returns true if the class node represents a the class node for the Class class\nand if the parametrized type is a neither a placeholder or a wildcard. For example,\nthe class node Class&lt;Foo&gt; where Foo is a class would return true, but the class\nnode for Class&lt;?&gt; would return false.\n@param classNode a class node to be tested\n@return true if it is the class node for Class and its generic type is a real class", "Used for initialization of the underlying map provider.\n\n@param fragmentManager required for initialization", "Demonstrates obtaining the request history data from a test run", "Constructs a reference of the given type to the given\nreferent. The reference is registered with the queue\nfor later purging.\n\n@param type HARD, SOFT or WEAK\n@param referent the object to refer to\n@param hash the hash code of the <I>key</I> of the mapping;\nthis number might be different from referent.hashCode() if\nthe referent represents a value and not a key", "Creates an IBlur instance for the given algorithm enum\n\n@param algorithm\n@param contextWrapper\n@return" ]
@Nonnull public BufferedImage createBufferedImage(final int imageWidth, final int imageHeight) { return new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_4BYTE_ABGR); }
[ "Create a buffered image with the correct image bands etc... for the tiles being loaded.\n\n@param imageWidth width of the image to create\n@param imageHeight height of the image to create." ]
[ "Add the line to the content\n\n@param bufferedFileReader The file reader\n@param content The content of the file\n@param line The current read line\n@throws IOException", "Read a text file into a single string\n\n@param file\nThe file to read\n@return The contents, or null on error.", "Append the data of another lattice to this lattice. If the other lattice follows a different quoting convention, it is automatically converted.\nHowever, this method does not check, whether the two lattices are aligned in terms of reference date, curve names and meta schedules.\nIf the two lattices have shared data points, the data from this lattice will be overwritten.\n\n@param other The lattice containing the data to be appended.\n@param model The model to use for context, in case the other lattice follows a different convention.\n\n@return The lattice with the combined swaption entries.", "Executes a method on the server asynchronously", "Randomly generates matrix with the specified number of matrix elements filled with values from min to max.\n\n@param numRows Number of rows\n@param numCols Number of columns\n@param nz_total Total number of non-zero elements in the matrix\n@param min Minimum value\n@param max maximum value\n@param rand Random number generated\n@return Randomly generated matrix", "Reads input data from a JSON file in the output directory.", "Sets the initial pivot ordering and compute the F-norm squared for each column", "Populate a file creation record.\n\n@param record MPX record\n@param properties project properties", "Remove a child view of Android hierarchy view .\n\n@param view View to be removed." ]
public static <T> T splitEachLine(CharSequence self, Pattern pattern, @ClosureParams(value=FromString.class,options="List<String>") Closure<T> closure) throws IOException { final List<String> list = readLines(self); T result = null; for (String line : list) { List vals = Arrays.asList(pattern.split(line)); result = closure.call(vals); } return result; }
[ "Iterates through the given CharSequence line by line, splitting each line using\nthe given separator Pattern. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param pattern the regular expression Pattern for the delimiter\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@since 1.8.2" ]
[ "copy all fields from the \"from\" object to the \"to\" object.\n\n@param from source object\n@param to from's clone\n@param fields fields to be populated\n@param accessible 'true' if all 'fields' have been made accessible during\ntraversal", "Returns the current transaction for the calling thread.\n\n@throws org.odmg.TransactionNotInProgressException\n{@link org.odmg.TransactionNotInProgressException} if no transaction was found.", "Create a new service activator for the domain server communication services.\n\n@param endpointConfig the endpoint configuration\n@param managementURI the management connection URI\n@param serverName the server name\n@param serverProcessName the server process name\n@param authKey the authentication key\n@param managementSubsystemEndpoint whether to use the mgmt subsystem endpoint or not\n@return the service activator", "generate a message for loglevel FATAL\n\n@param pObject the message Object", "The local event will decide the next state of the document in question.\n\n@param <T> the type of class represented by the document in the change event.\n@return the local full document which may be null.", "Marks a given list of statements for insertion into the current document.\nInserted statements can have an id if they should update an existing\nstatement, or use an empty string as id if they should be added. The\nmethod removes duplicates and avoids unnecessary modifications by\nchecking the current content of the given document before marking\nstatements for being written.\n\n@param currentDocument\nthe document with the current statements\n@param addStatements\nthe list of new statements to be added", "Checks to see if the specified off diagonal element is zero using a relative metric.", "Configures a RequestBuilder to send an RPC request.\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 RequestBuilder object that is ready to have its\n{@link RequestBuilder#send()} method invoked.", "Fills the Boyer Moore \"bad character array\" for the given pattern" ]
public boolean isAlive(Connection conn) { try { return con != null ? !con.isClosed() : false; } catch (SQLException e) { log.error("IsAlive check failed, running connection was invalid!!", e); return false; } }
[ "Check if underlying connection was alive." ]
[ "Computes the cross product of v1 and v2 and places the result in this\nvector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector", "Use this API to fetch clusterinstance_binding resource of given name .", "Use this API to fetch statistics of appfwpolicy_stats resource of given name .", "Get all views from the list content\n@return list of views currently visible", "Use this API to delete locationfile.", "Only return tools with a name matching this partial string\n@param searchTerm Tool name to search for\n@return This object to allow adding more options", "Get the element as a boolean.\n\n@param i the index of the element to access", "Get a File path list from configuration.\n\n@param name the name of the property\n@param props the set of configuration properties\n\n@return the CanonicalFile form for the given name.", "Try to build an default PBKey for convenience PB create method.\n\n@return PBKey or <code>null</code> if default key was not declared in\nmetadata" ]
public static FullTypeSignature getTypeSignature(String typeSignatureString, boolean useInternalFormFullyQualifiedName) { String key; if (!useInternalFormFullyQualifiedName) { key = typeSignatureString.replace('.', '/') .replace('$', '.'); } else { key = typeSignatureString; } // we always use the internal form as a key for cache FullTypeSignature typeSignature = typeSignatureCache .get(key); if (typeSignature == null) { ClassFileTypeSignatureParser typeSignatureParser = new ClassFileTypeSignatureParser( typeSignatureString); typeSignatureParser.setUseInternalFormFullyQualifiedName(useInternalFormFullyQualifiedName); typeSignature = typeSignatureParser.parseTypeSignature(); typeSignatureCache.put(typeSignatureString, typeSignature); } return typeSignature; }
[ "get TypeSignature given the signature\n\n@param typeSignature\n@param useInternalFormFullyQualifiedName\nif true, fqn in parameterizedTypeSignature must be in the form\n'java/lang/Thread'. If false fqn must be of the form\n'java.lang.Thread'\n@return" ]
[ "Get a random sample of k out of n elements.\n\nSee Algorithm S, D. E. Knuth, The Art of Computer Programming, Vol. 2, p.142.", "Initializes the mode switcher.\n@param current the current edit mode", "why isn't this functionality in enum?", "find all accessibility object and set active true for enable talk back.", "Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is\nunique. Will create a transaction on the given entity manager.", "Fall-back for types that are not handled by a subclasse's dispatch method.", "Gets the proper modulus operation.\n\n@param x Integer.\n@param m Modulo.\n@return Modulus.", "Creates a new Box Developer Edition connection with App User token.\n@param userId the user ID to use for an App User.\n@param clientId the client ID to use when exchanging the JWT assertion for an access token.\n@param clientSecret the client secret to use when exchanging the JWT assertion for an access token.\n@param encryptionPref the encryption preferences for signing the JWT.\n@param accessTokenCache the cache for storing access token information (to minimize fetching new tokens)\n@return a new instance of BoxAPIConnection.", "Returns the arguments as a list in their command line form.\n\n@return the arguments for the command line" ]
private static void processResourceFilter(ProjectFile project, Filter filter) { for (Resource resource : project.getResources()) { if (filter.evaluate(resource, null)) { System.out.println(resource.getID() + "," + resource.getUniqueID() + "," + resource.getName()); } } }
[ "Apply a filter to the list of all resources, and show the results.\n\n@param project project file\n@param filter filter" ]
[ "Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0", "Use this API to count sslcertkey_crldistribution_binding resources configued on NetScaler.", "Unpause the server, allowing it to resume normal operations", "Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs.", "Populate a file creation record.\n\n@param record MPX record\n@param properties project properties", "Converts a submatrix into an extract matrix operation.\n@param variableTarget The variable in which the submatrix is extracted from", "Use this API to fetch all the ipset resources that are configured on netscaler.", "Set the permissions for the photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param permissions\nThe permissions object\n@throws FlickrException", "disables the responses for a given pathname and user id\n\n@param model\n@param path_id\n@param clientUUID\n@return\n@throws Exception" ]
public BeatGrid requestBeatGridFrom(final DataReference track) { for (BeatGrid cached : hotCache.values()) { if (cached.dataReference.equals(track)) { // Found a hot cue hit, use it. return cached; } } return requestBeatGridInternal(track, false); }
[ "Ask the specified player for the beat grid of the track in the specified slot with the specified rekordbox ID,\nfirst checking if we have a cache we can use instead.\n\n@param track uniquely identifies the track whose beat grid is desired\n\n@return the beat grid, if any" ]
[ "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.", "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", "Given a list of store definitions, find out and return a map of similar\nstore definitions + count of them\n\n@param storeDefs All store definitions\n@return Map of a unique store definition + counts", "Use this API to fetch authorizationpolicylabel_binding resource of given name .", "Generates a toString method using concatenation or a StringBuilder.", "Create and return a SelectIterator for the class using the default mapped query for all statement.", "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", "Compute pose of skeleton at the given time from the animation channels.\n@param timeInSec animation time in seconds.", "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" ]
public HttpConnection setRequestBody(final String input) { try { final byte[] inputBytes = input.getBytes("UTF-8"); return setRequestBody(inputBytes); } catch (UnsupportedEncodingException e) { // This should never happen as every implementation of the java platform is required // to support UTF-8. throw new RuntimeException(e); } }
[ "Set the String of request body data to be sent to the server.\n\n@param input String of request body data to be sent to the server\n@return an {@link HttpConnection} for method chaining" ]
[ "Use this API to fetch all the dnstxtrec resources that are configured on netscaler.\nThis uses dnstxtrec_args which is a way to provide additional arguments while fetching the resources.", "remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.\n\nThe operation is performed in two steps - first all the files are moved to a backup folder, and afterwards backup folder is removed.\nIf an error occurs in the first step of the operation, all files are restored and the operation ends with status {@code false}.\nIf an error occurs in the second step, the operation ends with status {@code false}, but the files are not rolled back.\n\n@throws IOException if an error occurred", "Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data", "Generate a call to the delegate object.", "Removes the specified type from the frame.", "Lift a Java Func3 to a Scala Function3\n\n@param f the function to lift\n\n@returns the Scala function", "Given a GanttProject priority value, turn this into an MPXJ Priority instance.\n\n@param gpPriority GanttProject priority\n@return Priority instance", "We will always try to gather as many results as possible and never throw an exception.\n\nTODO: Make MemberResponse hold an exception that we can populate if something bad happens so we always\nget to return something for a member in order to indicate a failure. Getting the result when there\nis an error should throw an exception.\n\n@param execSvc\n@param members\n@param callable\n@param maxWaitTime - a value of 0 indicates forever\n@param unit\n@return", "Use this API to fetch auditnslogpolicy_authenticationvserver_binding resources of given name ." ]
public void processClass(String template, Properties attributes) throws XDocletException { if (!_model.hasClass(getCurrentClass().getQualifiedName())) { // we only want to output the log message once LogHelper.debug(true, OjbTagsHandler.class, "processClass", "Type "+getCurrentClass().getQualifiedName()); } ClassDescriptorDef classDef = ensureClassDef(getCurrentClass()); String attrName; for (Enumeration attrNames = attributes.propertyNames(); attrNames.hasMoreElements(); ) { attrName = (String)attrNames.nextElement(); classDef.setProperty(attrName, attributes.getProperty(attrName)); } _curClassDef = classDef; generate(template); _curClassDef = null; }
[ "Sets the current class definition derived from the current class, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"\n@doc.param name=\"accept-locks\" optional=\"true\" description=\"The accept locks setting\" values=\"true,false\"\n@doc.param name=\"attributes\" optional=\"true\" description=\"Attributes of the class as name-value pairs 'name=value',\nseparated by commas\"\n@doc.param name=\"determine-extents\" optional=\"true\" description=\"Whether to determine\npersistent direct sub types automatically\" values=\"true,false\"\n@doc.param name=\"documentation\" optional=\"true\" description=\"Documentation on the class\"\n@doc.param name=\"factory-method\" optional=\"true\" description=\"Specifies a no-argument factory method that is\nused to create instances (not yet implemented !)\"\n@doc.param name=\"factory-class\" optional=\"true\" description=\"Specifies a factory class to be used for creating\nobjects of this class\"\n@doc.param name=\"factory-method\" optional=\"true\" description=\"Specifies a static no-argument method in the factory class\"\n@doc.param name=\"generate-repository-info\" optional=\"true\" description=\"Whether repository data should be\ngenerated for the class\" values=\"true,false\"\n@doc.param name=\"generate-table-info\" optional=\"true\" description=\"Whether table data should be\ngenerated for the class\" values=\"true,false\"\n@doc.param name=\"include-inherited\" optional=\"true\" description=\"Whether to include\nfields/references/collections of supertypes\" values=\"true,false\"\n@doc.param name=\"initialization-method\" optional=\"true\" description=\"Specifies a no-argument instance method that is\ncalled right after an instance has been read from the database\"\n@doc.param name=\"isolation-level\" optional=\"true\" description=\"The isolation level setting\"\n@doc.param name=\"proxy\" optional=\"true\" description=\"The proxy setting for this class\"\n@doc.param name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects of\nobjects of this class to prefetch in collections\"\n@doc.param name=\"refresh\" optional=\"true\" description=\"Can be set to force OJB to refresh instances when\nloaded from the cache\" values=\"true,false\"\n@doc.param name=\"row-reader\" optional=\"true\" description=\"The row reader for the class\"\n@doc.param name=\"schema\" optional=\"true\" description=\"The schema for the type\"\n@doc.param name=\"table\" optional=\"true\" description=\"The table for the class\"\n@doc.param name=\"table-documentation\" optional=\"true\" description=\"Documentation on the table\"" ]
[ "This method is called to alert project listeners to the fact that\na resource assignment has been read from a project file.\n\n@param resourceAssignment resourceAssignment instance", "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.", "Write an error response.\n\n@param channel the channel\n@param header the request\n@param error the error\n@throws IOException", "Finds all providers for the given service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@return\nThe ordered set of providers for the service if any exists.\nOtherwise, it returns an empty list.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>", "Fill the buffer of the specified range with a given value\n@param offset\n@param length\n@param value", "Add a BETWEEN clause so the column must be between the low and high parameters.", "Subtract a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the subtract of specified complex number with a scalar value.", "Removes all pending broadcasts\n\n@param sessionIds to remove broadcast for (or null for all sessions)", "This may cost twice what it would in the original Map.\n\n@param key key whose associated value is to be returned.\n@return the value to which this map maps the specified key, or\n<tt>null</tt> if the map contains no mapping for this key." ]
public Indexes listIndexes() { URI uri = new DatabaseURIHelper(db.getDBUri()).path("_index").build(); return client.couchDbClient.get(uri, Indexes.class); }
[ "List the indexes in the database. The returned object allows for listing indexes by type.\n\n@return indexes object with methods for getting indexes of a particular type" ]
[ "Checks if the dependency server is available\n\n@return true if the server is reachable, false otherwise", "Remove any overrides for an endpoint on the default profile, client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise", "Removes metadata related to rebalancing.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeIds Node ids to clear metadata after rebalancing", "Determine the generic value type of the given Map field.\n@param mapField the map field to introspect\n@param nestingLevel the nesting level of the target type\n(typically 1; e.g. in case of a List of Lists, 1 would indicate the\nnested List, whereas 2 would indicate the element of the nested List)\n@return the generic type, or {@code null} if none", "Inject external stylesheets.", "Gets JmsDestinationType from java class name\n\nReturns null for unrecognized class", "Gets Widget bounds height\n@return height", "Creates a new form session to edit the file with the given name using the given form configuration.\n\n@param configPath the site path of the form configuration\n@param fileName the name (not path) of the XML content to edit\n@return the id of the newly created form session\n\n@throws CmsUgcException if something goes wrong", "this method is not intended to be called by clients\n@since 2.12" ]
public static String extractFromResourceId(String id, String identifier) { if (id == null || identifier == null) { return id; } Pattern pattern = Pattern.compile(identifier + "/[-\\w._]+"); Matcher matcher = pattern.matcher(id); if (matcher.find()) { return matcher.group().split("/")[1]; } else { return null; } }
[ "Extract information from a resource ID string with the resource type\nas the identifier.\n\n@param id the resource ID\n@param identifier the identifier to match, e.g. \"resourceGroups\", \"storageAccounts\"\n@return the information extracted from the identifier" ]
[ "Use this API to disable Interface of given name.", "Hides the Loader component", "Returns the sentence as a string with a space between words.\nDesigned to work robustly, even if the elements stored in the\n'Sentence' are not of type Label.\n\nThis one uses the default separators for any word type that uses\nseparators, such as TaggedWord.\n\n@param justValue If <code>true</code> and the elements are of type\n<code>Label</code>, return just the\n<code>value()</code> of the <code>Label</code> of each word;\notherwise,\ncall the <code>toString()</code> method on each item.\n@return The sentence in String form", "compares two snippet", "Finds an ancestor of a specific type, if possible.\n\n<p>Example: (New York city target, {@link Type#COUNTRY}) returns (US country target)", "Use this API to delete route6 of given name.", "Map Synchro constraints to MPXJ constraints.\n\n@param task task\n@param row Synchro constraint data", "Sorts the fields.", "Get replication document state for a given replication document ID.\n\n@param docId The replication document ID\n@return Replication document for {@code docId}" ]
public void setValue(T value) { try { lock.writeLock().lock(); this.value = value; } finally { lock.writeLock().unlock(); } }
[ "Change the value that is returned by this generator.\n@param value The new value to return." ]
[ "Converts the provided javascript object to JSON string.\n\n<p>If the object is a Map instance, it is stringified as key-value pairs, if it is a list, it is stringified as\na list, otherwise the object is merely converted to string using the {@code toString()} method.\n\n@param object the object to stringify.\n\n@return the object as a JSON string", "Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved parameter type of the method return type, or {@code null}\nif not resolvable or if the single argument is of type {@link WildcardType}.", "Unlock all files opened for writing.", "Adds the given value to the list of values that should still be\nserialized. The given RDF resource will be used as a subject.\n\n@param value\nthe value to be serialized\n@param resource\nthe RDF resource that is used as a subject for serialization", "Saves the current translations from the container to the respective localization.", "changes the color of the image - more red and less blue\n\n@return new pixel array", "Processes the template for the object cache of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"", "Gets information about this user.\n@param fields the optional fields to retrieve.\n@return info about this user.", "Writes and reads the XOP attachment using a CXF JAX-RS WebClient.\nNote that WebClient is created with the help of JAXRSClientFactoryBean.\nJAXRSClientFactoryBean can be used when neither of the WebClient factory\nmethods is appropriate. For example, in this case, an \"mtom-enabled\"\nproperty is set on the factory bean first.\n\n\n@throws Exception" ]
public void resetQuotaAndRecoverEnforcement() { for(Integer nodeId: nodeIds) { boolean quotaEnforcement = mapNodeToQuotaEnforcingEnabled.get(nodeId); adminClient.metadataMgmtOps.updateRemoteMetadata(Arrays.asList(nodeId), MetadataStore.QUOTA_ENFORCEMENT_ENABLED_KEY, Boolean.toString(quotaEnforcement)); } for(String storeName: storeNames) { adminClient.quotaMgmtOps.rebalanceQuota(storeName); } }
[ "After cluster management operations, i.e. reset quota and recover quota\nenforcement settings" ]
[ "Lift a Java Func3 to a Scala Function3\n\n@param f the function to lift\n\n@returns the Scala function", "Parses a code block with no parentheses and no commas. After it is done there should be a single token left,\nwhich is returned.", "Read tasks representing the WBS.", "Adds and returns a document with a new version to the given document.\n\n@param document the document to attach a new version to.\n@param newVersion the version to attach to the document\n@return a document with a new version to the given document.", "Retrieve the currently cached value for the given document.", "Refresh this context with the specified configuration locations.\n\n@param configLocations\nlist of configuration resources (see implementation for specifics)\n@throws GeomajasException\nindicates a problem with the new location files (see cause)", "Use this API to unset the properties of gslbservice resources.\nProperties that need to be unset are specified in args array.", "characters callback.", "a small static helper to set the image from the imageHolder nullSave to the imageView\n\n@param imageHolder\n@param imageView\n@param tag used to identify imageViews and define different placeholders\n@return true if an image was set" ]
@Around("@annotation(retryableAnnotation)") public Object call(final ProceedingJoinPoint pjp, Retryable retryableAnnotation) throws Throwable { final int maxTries = retryableAnnotation.maxTries(); final int retryDelayMillies = retryableAnnotation.retryDelayMillis(); final Class<? extends Throwable>[] retryOn = retryableAnnotation.retryOn(); final boolean doubleDelay = retryableAnnotation.doubleDelay(); final boolean throwCauseException = retryableAnnotation.throwCauseException(); if (logger.isDebugEnabled()) { logger.debug("Have @Retryable method wrapping call on method {} of target object {}", new Object[] { pjp.getSignature().getName(), pjp.getTarget() }); } ServiceRetrier serviceRetrier = new ServiceRetrier(retryDelayMillies, maxTries, doubleDelay, throwCauseException, retryOn); return serviceRetrier.invoke( new Callable<Object>() { public Object call() throws Exception { try { return pjp.proceed(); } catch (Exception e) { throw e; } catch (Error e) { throw e; } catch (Throwable t) { throw new RuntimeException(t); } } } ); }
[ "Runs a method call with retries.\n@param pjp a {@link ProceedingJoinPoint} representing an annotated\nmethod call.\n@param retryableAnnotation the {@link org.fishwife.jrugged.aspects.Retryable}\nannotation that wrapped the method.\n@throws Throwable if the method invocation itself throws one during execution.\n@return The return value from the method call." ]
[ "Creates a resource ID from information of a generic resource.\n\n@param subscriptionId the subscription UUID\n@param resourceGroupName the resource group name\n@param resourceProviderNamespace the resource provider namespace\n@param resourceType the type of the resource or nested resource\n@param resourceName name of the resource or nested resource\n@param parentResourcePath parent resource's relative path to the provider,\nif the resource is a generic resource\n@return the resource ID string", "Transforms a config file with an XSLT transform.\n\n@param name file name of the config file\n@param transform file name of the XSLT file\n\n@throws Exception if something goes wrong", "Print a task type.\n\n@param value TaskType instance\n@return task type value", "Use this API to delete route6.", "exposed only for tests", "Choose from three numbers based on version.", "gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeClassCacheEntry(String)\n@see #setClassCacheEntry(Class)\n@see #clearCache()", "Returns the URL to the property file that contains CRS definitions.\n\n@return The URL to the epsg file containing custom EPSG codes", "Delete rows that match the prepared statement." ]
public static boolean isValidFqcn(String str) { if (isNullOrEmpty(str)) { return false; } final String[] parts = str.split("\\."); if (parts.length < 2) { return false; } for (String part : parts) { if (!isValidJavaIdentifier(part)) { return false; } } return true; }
[ "Returns true if the string is a valid Java full qualified class name.\n\n@param str the string to be examined\n@return true if str is a valid Java Fqcn" ]
[ "Returns the zip entry for a file in the archive.\n@param filename the file name\n@return the zip entry for the file with the provided name\n@throws ZipException thrown if the file is not in the zip archive", "Set a proxy for REST-requests.\n\n@param proxyHost\n@param proxyPort", "Starts the named animation.\n@see GVRAvatar#stop(String)\n@see GVRAnimationEngine#start(GVRAnimation)", "Set an enterprise date value.\n\n@param index date index (1-30)\n@param value date value", "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", "Applies the &gt; operator to each element in A. Results are stored in a boolean matrix.\n\n@param A Input matrx\n@param value value each element is compared against\n@param output (Optional) Storage for results. Can be null. Is reshaped.\n@return Boolean matrix with results", "adds all json extension to an diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException", "Utility function to find the first index of a value in a\nListBox.", "Position the child inside the layout based on the offset and axis-s factors\n@param dataIndex data index" ]
private void resetCalendar() { _calendar = getCalendar(); if (_defaultTimeZone != null) { _calendar.setTimeZone(_defaultTimeZone); } _currentYear = _calendar.get(Calendar.YEAR); }
[ "Resets the calendar" ]
[ "Reset the combination generator.", "Use this API to fetch servicegroupbindings resource of given name .", "Helper method to track storage operations & time via StreamingStats.\n\n@param startNs", "Gets the first group of a regex\n@param pattern Pattern\n@param str String to find\n@return the matching group", "Remove the set of partitions from the node provided\n\n@param node The node from which we're removing the partitions\n@param donatedPartitions The list of partitions to remove\n@return The new node without the partitions", "Checks if template mapper is configured in modules.\n\n@return true if the template mapper is configured in modules", "multi-field string", "PUT and POST are identical calls except for the header specifying the method", "Returns the configured mappings of the current field.\n\n@return the configured mappings of the current field" ]
public static void removeZeros( DMatrixSparseCSC input , DMatrixSparseCSC output , double tol ) { ImplCommonOps_DSCC.removeZeros(input,output,tol); }
[ "Copies all elements from input into output which are &gt; tol.\n@param input (Input) input matrix. Not modified.\n@param output (Output) Output matrix. Modified and shaped to match input.\n@param tol Tolerance for defining zero" ]
[ "Read the domain controller data from an S3 file.\n\n@param directoryName the name of the directory in the bucket that contains the S3 file\n@return the domain controller data", "Create a TableAlias for path or userAlias\n@param aTable\n@param aPath\n@param aUserAlias\n@return TableAlias", "Extract data for a single calendar.\n\n@param row calendar data", "Create a text message that will be stored in the database. Must be called inside a transaction.", "Use this API to fetch all the policydataset resources that are configured on netscaler.", "Converts a vector from sample space into eigen space.\n\n@param sampleData Sample space data.\n@return Eigen space projection.", "Calculate the finish variance.\n\n@return finish variance", "Use this API to delete gslbsite of given name.", "Creates a Bytes object by copying the data of the given ByteBuffer.\n\n@param bb Data will be read from this ByteBuffer in such a way that its position is not\nchanged." ]
private static CmsUUID toUuid(String uuid) { if ("null".equals(uuid) || CmsStringUtil.isEmpty(uuid)) { return null; } return new CmsUUID(uuid); }
[ "Converts string to UUID and returns it, or null if the conversion is not possible.\n\n@param uuid the potential UUID string\n@return the UUID, or null if conversion is not possible" ]
[ "Register capabilities associated with this resource.\n\n<p>Classes that overrides this method <em>MUST</em> call {@code super.registerCapabilities(resourceRegistration)}.</p>\n\n@param resourceRegistration a {@link ManagementResourceRegistration} created from this definition", "Retrieves the work variance.\n\n@return work variance", "Returns a resource wrapper created from the input.\n\nThe wrapped result of {@link #convertRawResource(CmsObject, Object)} is returned.\n\n@param cms the current OpenCms user context\n@param input the input to create a resource from\n\n@return a resource wrapper created from the given Object\n\n@throws CmsException in case of errors accessing the OpenCms VFS for reading the resource", "Updates the given integer belief\nadding the given integer\nnewBelief = previousBelief + givenValue\n\n@param String - the belief name\n@param the value to add", "Get the authentication for a specific token.\n\n@param token token\n@return authentication if any", "Redirect standard streams so that the output can be passed to listeners.", "Login the user and redirect back to original URL. If no\noriginal URL found then redirect to `defaultLandingUrl`.\n\n@param userIdentifier\nthe user identifier, could be either userId or username\n@param defaultLandingUrl\nthe URL to be redirected if original URL not found", "Change the color of the center which indicates the new color.\n\n@param color int of the color.", "Returns a compact representation of all of the stories on the task.\n\n@param task The task containing the stories to get.\n@return Request object" ]
public static BoxItem.Info getSharedItem(BoxAPIConnection api, String sharedLink, String password) { BoxAPIConnection newAPI = new SharedLinkAPIConnection(api, sharedLink, password); URL url = SHARED_ITEM_URL_TEMPLATE.build(newAPI.getBaseURL()); BoxAPIRequest request = new BoxAPIRequest(newAPI, url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject json = JsonObject.readFrom(response.getJSON()); return (BoxItem.Info) BoxResource.parseInfo(newAPI, json); }
[ "Gets an item that was shared with a password-protected shared link.\n@param api the API connection to be used by the shared item.\n@param sharedLink the shared link to the item.\n@param password the password for the shared link.\n@return info about the shared item." ]
[ "Parse work units.\n\n@param value work units value\n@return TimeUnit instance", "Put features in a tile. This will assure all features are only added in one tile. When a feature's unique tile\nis different from this one a link is added in the tile.\n\n@param tile\ntile to put features in\n@param maxTileExtent\nthe maximum tile extent\n@throws GeomajasException oops", "Saves the project file displayed in this panel.\n\n@param file target file\n@param type file type", "Constructs a Google APIs HTTP client with the associated credentials.", "Add a console pipeline to the Redwood handler tree,\nprinting to stdout.\nCalling this multiple times will result in messages being printed\nmultiple times.\n@return this", "Very basic implementation of an inner join between two result sets.\n\n@param leftRows left result set\n@param leftColumn left foreign key column\n@param rightTable right table name\n@param rightRows right result set\n@param rightColumn right primary key column\n@return joined result set", "Finds all nWise combinations of a set of variables, each with a given domain of values\n\n@param nWise the number of variables in each combination\n@param coVariables the varisbles\n@param variableDomains the domains\n@return all nWise combinations of the set of variables", "Use this API to update csparameter.", "Checks if the DPI value is already set for GeoServer." ]
public <OD> Where<T, ID> idEq(Dao<OD, ?> dataDao, OD data) throws SQLException { if (idColumnName == null) { throw new SQLException("Object has no id column specified"); } addClause(new SimpleComparison(idColumnName, idFieldType, dataDao.extractId(data), SimpleComparison.EQUAL_TO_OPERATION)); return this; }
[ "Add a clause where the ID is from an existing object." ]
[ "Use this API to fetch all the pqbinding resources that are configured on netscaler.\nThis uses pqbinding_args which is a way to provide additional arguments while fetching the resources.", "Dumps a texture coordinate set of a mesh to stdout.\n\n@param mesh the mesh\n@param coords the coordinates", "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", "Set HTTP headers to allow caching for the given number of seconds.\n\n@param response where to set the caching settings\n@param seconds number of seconds into the future that the response should be cacheable for", "Read flow id from message.\n\n@param message the message\n@return the FlowId as string", "Used to get the complex value of a matrix element.\n@param row The row of the element.\n@param col The column of the element.\n@param output Storage for the value", "Find a Constructor on the given type that matches the given arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a Constructor from the given type that matches the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments", "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.", "Should only called on a column that is being set to null.\n\nReturns the most outer embeddable containing {@code column} that is entirely null.\nReturn null otherwise i.e. not embeddable.\n\nThe implementation lazily compute the embeddable state and caches it.\nThe idea behind the lazy computation is that only some columns will be set to null\nand only in some situations.\nThe idea behind caching is that an embeddable contains several columns, no need to recompute its state." ]
@SuppressForbidden("legitimate sysstreams.") private static void redirectStreams(final Serializer serializer, final boolean flushFrequently) { final PrintStream origSysOut = System.out; final PrintStream origSysErr = System.err; // Set warnings stream to System.err. warnings = System.err; AccessController.doPrivileged(new PrivilegedAction<Void>() { @SuppressForbidden("legitimate PrintStream with default charset.") @Override public Void run() { System.setOut(new PrintStream(new BufferedOutputStream(new ChunkedStream() { @Override public void write(byte[] b, int off, int len) throws IOException { if (multiplexStdStreams) { origSysOut.write(b, off, len); } serializer.serialize(new AppendStdOutEvent(b, off, len)); if (flushFrequently) serializer.flush(); } }))); System.setErr(new PrintStream(new BufferedOutputStream(new ChunkedStream() { @Override public void write(byte[] b, int off, int len) throws IOException { if (multiplexStdStreams) { origSysErr.write(b, off, len); } serializer.serialize(new AppendStdErrEvent(b, off, len)); if (flushFrequently) serializer.flush(); } }))); return null; } }); }
[ "Redirect standard streams so that the output can be passed to listeners." ]
[ "Returns a the list of available version of an artifact\n\n@param gavc String\n@return List<String>", "Establish a new master tempo, and if it is a change from the existing one, report it to the listeners.\n\n@param newTempo the newly reported master tempo.", "Curries a procedure that takes five 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 four arguments. Never <code>null</code>.", "Groups all of the metadata cache files that are candidates for auto-attachment to player slots into lists\nthat are keyed by the playlist ID used to create the cache file. Files that cache all tracks have a playlist\nID of 0.\n\n@return a map from playlist ID to the caches holding tracks from that playlist", "This filter changes the amount of color in each of the three channels.\n\n@param r The amount of redness in the picture. Can range from -100 to 100 in percentage.\n@param g The amount of greenness in the picture. Can range from -100 to 100 in percentage.\n@param b The amount of blueness in the picture. Can range from -100 to 100 in percentage.\n@throws IllegalArgumentException if {@code r}, {@code g}, or {@code b} are outside of bounds.", "Set value for given object field.\n\n@param object object to be updated\n@param field field name\n@param value field value\n\n@throws NoSuchMethodException if property writer is not available\n@throws InvocationTargetException if property writer throws an exception\n@throws IllegalAccessException if property writer is inaccessible", "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", "Returns a BSON version document representing a new version with a new instance ID, and\nversion counter of zero.\n@return a BsonDocument representing a synchronization version", "Checks the foreignkeys of all references in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid" ]
private void refreshMetadataCache(final Queue<WindupMetadataSystem> metadataSystemCache, final DecompilerSettings settings) { metadataSystemCache.clear(); for (int i = 0; i < this.getNumberOfThreads(); i++) { metadataSystemCache.add(new NoRetryMetadataSystem(settings.getTypeLoader())); } }
[ "The metadata cache can become huge over time. This simply flushes it periodically." ]
[ "Deletes the VFS XML bundle file.\n@throws CmsException thrown if the delete operation fails.", "read the prefetchInLimit from Config based on OJB.properties", "Retrieve a child that matches the given absolute path, starting from the current node.\n\n@param nodePath The path from the object root to the requested child node.\n@return The requested child node or <code>null</code>.", "Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the highest to the lowest score.\nDescending lexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements", "returns a dynamic Proxy that implements all interfaces of the\nclass described by this ClassDescriptor.\n\n@return Class the dynamically created proxy class", "Prepare the filter for the transiton at a given time.\nThe default implementation sets the given filter property, but you could override this method to make other changes.\n@param transition the transition time in the range 0 - 1", "END ODO CHANGES", "Set the buttons span text.", "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" ]
public T addFile(final String name, final List<String> path, final byte[] newHash, final boolean isDirectory) { return addFile(name, path, newHash, isDirectory, null); }
[ "Add a misc file.\n\n@param name the file name\n@param path the relative path\n@param newHash the new hash of the added content\n@param isDirectory whether the file is a directory or not\n@return the builder" ]
[ "Get a fallback handler.\n\n@param header the protocol header\n@return the fallback handler", "Refresh children using read-resource operation.", "Adds service locator properties to an endpoint reference.\n@param epr\n@param props", "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", "Use this API to diff nsconfig.", "Converts Observable of page to Observable of Inner.\n@param <InnerT> type of inner.\n@param innerPage Page to be converted.\n@return Observable for list of inner.", "Clear tmpData in subtree rooted in this node.", "Returns the rendered element content for all the given containers.\n\n@param element the element to render\n@param containers the containers the element appears in\n\n@return a map from container names to rendered page contents", "Get the bone index for the given scene object.\n\n@param bone GVRSceneObject bone to search for\n@return bone index or -1 for root bone.\n@see #getParentBoneIndex" ]
public void save() throws CmsException { if (hasChanges()) { switch (m_bundleType) { case PROPERTY: saveLocalization(); saveToPropertyVfsBundle(); break; case XML: saveLocalization(); saveToXmlVfsBundle(); break; case DESCRIPTOR: break; default: throw new IllegalArgumentException(); } if (null != m_descFile) { saveToBundleDescriptor(); } resetChanges(); } }
[ "Saves the messages for all languages that were opened in the editor.\n\n@throws CmsException thrown if saving fails." ]
[ "Use this context as prototype for a new mutable builder. The new builder is\npre-populated with the current settings of this context instance.", "Starts the named animation.\n@see GVRAvatar#stop(String)\n@see GVRAnimationEngine#start(GVRAnimation)", "Attribute name and value are not escaped or modified in any way.\n\n@param name\n@param value\n@return self", "Creates a curator built using the given zookeeper connection string and timeout", "Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects", "Exports a single queue to an XML file.", "Return the max bounds of the layer as envelope.\n\n@param layer the layer to get envelope from\n@return Envelope the envelope", "Update max min.\n\n@param n the n\n@param c the c", "This will check to see if certain configuration values exist from the ConfigurationService\nIf not then it redirects to the configuration screen" ]
public void setAllowBlank(boolean allowBlank) { this.allowBlank = allowBlank; // Setup the allow blank validation if (!allowBlank) { if (blankValidator == null) { blankValidator = createBlankValidator(); } setupBlurValidation(); addValidator(blankValidator); } else { removeValidator(blankValidator); } }
[ "Enable or disable the default blank validator." ]
[ "XER files can contain multiple projects when there are cross-project dependencies.\nAs the UniversalProjectReader is designed just to read a single project, we need\nto select one project from those available in the XER file.\nThe original project selected for export by the user will have its \"export flag\"\nset to true. We'll return the first project we find where the export flag is\nset to true, otherwise we'll just return the first project we find in the file.\n\n@param stream schedule data\n@return ProjectFile instance", "Cancel request and workers.", "Finish service initialization.\n\n@throws GeomajasException oops", "Get all categories\nGet all tags marked as categories\n@return ApiResponse&lt;TagsEnvelope&gt;\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "private multi-value handlers and helpers", "Decide which donor node to steal from. This is a policy implementation.\nI.e., in the future, additional policies could be considered. At that\ntime, this method should be overridden in a sub-class, or a policy object\nought to implement this algorithm.\n\nCurrent policy:\n\n1) If possible, a stealer node that is the zone n-ary in the finalCluster\nsteals from the zone n-ary in the currentCluster in the same zone.\n\n2) If there are no partition-stores to steal in the same zone (i.e., this\nis the \"zone expansion\" use case), then a differnt policy must be used.\nThe stealer node that is the zone n-ary in the finalCluster determines\nwhich pre-existing zone in the currentCluster hosts the primary partition\nid for the partition-store. The stealer then steals the zone n-ary from\nthat pre-existing zone.\n\nThis policy avoids unnecessary cross-zone moves and distributes the load\nof cross-zone moves approximately-uniformly across pre-existing zones.\n\nOther policies to consider:\n\n- For zone expansion, steal all partition-stores from one specific\npre-existing zone.\n\n- Replace heuristic to approximately uniformly distribute load among\nexisting zones to something more concrete (i.e. track steals from each\npre-existing zone and forcibly balance them).\n\n- Select a single donor for all replicas in a new zone. This will require\ndonor-based rebalancing to be run (at least for this specific part of the\nplan). This would reduce the number of donor-side scans of data. (But\nstill send replication factor copies over the WAN.) This would require\napparatus in the RebalanceController to work.\n\n- Set up some sort of chain-replication in which a single stealer in the\nnew zone steals some replica from a pre-exising zone, and then other\nn-aries in the new zone steal from the single cross-zone stealer in the\nzone. This would require apparatus in the RebalanceController to work.\n\n@param currentSRP\n@param finalSRP\n@param stealerZoneId\n@param stealerNodeId\n@param stealerPartitionId\n@return the node id of the donor for this partition Id.", "Utility method to convert an array of bytes into a long. Byte ordered is\nassumed to be big-endian.\n@param bytes The data to read from.\n@param offset The position to start reading the 8-byte long from.\n@return The 64-bit integer represented by the eight bytes.\n@since 1.1", "Signal that all threads have run to completion, and the multithreaded\nenvironment is over.\n@param check The name of the thread group passed to startThreads()", "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}" ]
public static base_response unset(nitro_service client, sslcertkey resource, String[] args) throws Exception{ sslcertkey unsetresource = new sslcertkey(); unsetresource.certkey = resource.certkey; return unsetresource.unset_resource(client,args); }
[ "Use this API to unset the properties of sslcertkey resource.\nProperties that need to be unset are specified in args array." ]
[ "Returns the list of people who have favorited a given photo.\n\nThis method does not require authentication.\n\n@param photoId\n@param perPage\n@param page\n@return List of {@link com.flickr4java.flickr.people.User}", "Helper method to get a list of node ids.\n\n@param nodeList", "Retrieve a value from the map, ensuring that a key exists in the map\nwith the specified name.\n\n@param name column name\n@return column value", "Use this API to fetch sslvserver_sslcipher_binding resources of given name .", "Creates a field map for tasks.\n\n@param props props data", "Returns the bounding sphere of the vertices.\n@param sphere destination array to get bounding sphere.\nThe first entry is the radius, the next\nthree are the center.\n@return radius of bounding sphere or 0.0 if no vertices", "Map the EventType.\n\n@param eventType the event type\n@return the event", "Adds main report query.\n\n@param text\n@param language use constants from {@link DJConstants}\n@return", "Print currency.\n\n@param value currency value\n@return currency value" ]
public void addExportedPackages(Set<String> packages) { String s = (String) getMainAttributes().get(EXPORT_PACKAGE); Wrapper<Boolean> modified = Wrapper.wrap(this.modified); String result = mergeIntoCommaSeparatedList(s, packages, modified, lineDelimiter); this.modified = modified.get(); getMainAttributes().put(EXPORT_PACKAGE, result); }
[ "adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported" ]
[ "Add a line symbolizer definition to the rule.\n\n@param styleJson The old style.", "Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return table rows", "We have reason to believe we might have enough information to calculate a signature for the track loaded on a\nplayer. Verify that, and if so, perform the computation and record and report the new signature.", "Sets the provided square matrix to be a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param A The matrix that is to be modified. Must be square. Modified.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.", "Operates on one dimension at a time.", "Get the beat grids available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the beat grids associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the BeatGridFinder is not running", "Pass a model object and return a SoyMapData if a model object happens\nto be a SoyMapData.\n\nAn implementation will also check if a passed in object is a Map and return\na SoyMapData wrapping that map", "Removes all commas from the token list", "Extracts a house holder vector from the column of A and stores it in u\n@param A Complex matrix with householder vectors stored in the lower left triangle\n@param row0 first row in A (implicitly assumed to be r + i0)\n@param row1 last row + 1 in A\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U" ]
public static QRDecomposition<DoubleMatrix> qr(DoubleMatrix A) { int minmn = min(A.rows, A.columns); DoubleMatrix result = A.dup(); DoubleMatrix tau = new DoubleMatrix(minmn); SimpleBlas.geqrf(result, tau); DoubleMatrix R = new DoubleMatrix(A.rows, A.columns); for (int i = 0; i < A.rows; i++) { for (int j = i; j < A.columns; j++) { R.put(i, j, result.get(i, j)); } } DoubleMatrix Q = DoubleMatrix.eye(A.rows); SimpleBlas.ormqr('L', 'N', result, tau, Q); return new QRDecomposition<DoubleMatrix>(Q, R); }
[ "QR decomposition.\n\nDecomposes (m,n) matrix A into a (m,m) matrix Q and an (m,n) matrix R such that\nQ is orthogonal, R is upper triangular and Q * R = A\n\nNote that if A has more rows than columns, then the lower rows of R will contain\nonly zeros, such that the corresponding later columns of Q do not enter the computation\nat all. For some reason, LAPACK does not properly normalize those columns.\n\n@param A matrix\n@return QR decomposition" ]
[ "those could be incorporated with above, but that would blurry everything.", "Use this API to unset the properties of protocolhttpband resource.\nProperties that need to be unset are specified in args array.", "Maps a transportId to its corresponding TransportType.\n@param transportId\n@return", "Overrides the superclass implementation to allow the AttributeDefinition for each field in the\nobject to in turn resolve that field.\n\n{@inheritDoc}", "Special multiplication that takes in account the zeros and one in Y, which\nis the matrix that stores the householder vectors.", "Start check of execution time\n@param extra", "Returns the corresponding module resolved service name for the given module.\n\nThe module resolved service is basically a latch that prevents the module from being loaded\nuntil all the transitive dependencies that it depends upon have have their module spec services\ncome up.\n\n@param identifier The module identifier\n@return The service name of the ModuleSpec service", "Remove the trailing line end from an RTF block.\n\n@param text source text\n@param formalRTF true if this is a real RTF block\n@return text with line end stripped", "Creates a Bytes object by copying the data of a subsequence of the given byte array\n\n@param data Byte data\n@param offset Starting offset in byte array (inclusive)\n@param length Number of bytes to include" ]
@Override public DecompilationResult decompileClassFile(Path rootDir, Path classFilePath, Path outputDir) throws DecompilationException { Checks.checkDirectoryToBeRead(rootDir.toFile(), "Classes root dir"); File classFile = classFilePath.toFile(); Checks.checkFileToBeRead(classFile, "Class file"); Checks.checkDirectoryToBeFilled(outputDir.toFile(), "Output directory"); log.info("Decompiling .class '" + classFilePath + "' to '" + outputDir + "' from: '" + rootDir + "'"); String name = classFilePath.normalize().toAbsolutePath().toString().substring(rootDir.toAbsolutePath().toString().length() + 1); final String typeName = StringUtils.removeEnd(name, ".class");// .replace('/', '.'); DecompilationResult result = new DecompilationResult(); try { DecompilerSettings settings = getDefaultSettings(outputDir.toFile()); this.procyonConf.setDecompilerSettings(settings); // TODO: This is horrible mess. final ITypeLoader typeLoader = new CompositeTypeLoader(new WindupClasspathTypeLoader(rootDir.toString()), new ClasspathTypeLoader()); WindupMetadataSystem metadataSystem = new WindupMetadataSystem(typeLoader); File outputFile = this.decompileType(settings, metadataSystem, typeName); result.addDecompiled(Collections.singletonList(classFilePath.toString()), outputFile.getAbsolutePath()); } catch (Throwable e) { DecompilationFailure failure = new DecompilationFailure("Error during decompilation of " + classFilePath.toString() + ":\n " + e.getMessage(), Collections.singletonList(name), e); log.severe(failure.getMessage()); result.addFailure(failure); } return result; }
[ "Decompiles the given .class file and creates the specified output source file.\n\n@param classFilePath the .class file to be decompiled.\n@param outputDir The directory where decompiled .java files will be placed." ]
[ "Checks if the specified longitude is correct.\n\n@param name the name of the longitude field\n@param longitude the value of the longitude field\n@return the longitude", "Returns the associated SQL WHERE statement.", "The transform method for this DataTransformer\n@param cr a reference to DataPipe from which to read the current map", "Use this API to add snmpmanager resources.", "Process schedule options from SCHEDOPTIONS. This table only seems to exist\nin XER files, not P6 databases.", "Populate a sorted list of custom fields to ensure that these fields\nare written to the file in a consistent order.", "Generates a vector clock with the provided values\n\n@param serverIds servers in the clock\n@param clockValue value of the clock for each server entry\n@param timestamp ts value to be set for the clock\n@return", "Retrieve a UUID from an input stream.\n\n@param is input stream\n@return UUID instance", "Extract a Class from the given Type." ]
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public static synchronized void register(android.app.Application application) { if (application == null) { Logger.i("Application instance is null/system API is too old"); return; } if (registered) { Logger.v("Lifecycle callbacks have already been registered"); return; } registered = true; application.registerActivityLifecycleCallbacks( new android.app.Application.ActivityLifecycleCallbacks() { @Override public void onActivityCreated(Activity activity, Bundle bundle) { CleverTapAPI.onActivityCreated(activity); } @Override public void onActivityStarted(Activity activity) {} @Override public void onActivityResumed(Activity activity) { CleverTapAPI.onActivityResumed(activity); } @Override public void onActivityPaused(Activity activity) { CleverTapAPI.onActivityPaused(); } @Override public void onActivityStopped(Activity activity) {} @Override public void onActivitySaveInstanceState(Activity activity, Bundle bundle) {} @Override public void onActivityDestroyed(Activity activity) {} } ); Logger.i("Activity Lifecycle Callback successfully registered"); }
[ "Enables lifecycle callbacks for Android devices\n@param application App's Application object" ]
[ "Retrieve all Collection attributes of a given instance\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs", "obtains the internal JDO lifecycle state of the input StatemanagerInternal.\nThis Method is helpful to display persistent objects internal state.\n@param sm the StateManager to be inspected\n@return the LifeCycleState of a StateManager instance", "Not implemented.\n@param point1 Point1\n@param point2 Point2\n@return Throws an exception.", "Ensure that the given connection is established.\n\n@param jedis\na connection to Redis\n@return true if the supplied connection was already connected", "Execute the operation.\n\n@param listener the transactional operation listener\n@param client the transactional protocol client\n@param identity the server identity\n@param operation the operation\n@param transformer the operation result transformer\n@return whether the operation was executed", "Read all of the fields information from the configuration file.", "Checks if is single position prefix.\n\n@param fieldInfo\nthe field info\n@param prefix\nthe prefix\n@return true, if is single position prefix\n@throws IOException\nSignals that an I/O exception has occurred.", "Returns iterable with all non-deleted file version legal holds for this legal hold policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing file version legal holds info.", "Fetch a value from the Hashmap .\n\n@param firstKey\nfirst key\n@param secondKey\nsecond key\n@return the element or null." ]
public void readData(BufferedReader in) throws IOException { String line, value; // skip old variables if still present lexOptions.readData(in); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); try { tlpParams = (TreebankLangParserParams) Class.forName(value).newInstance(); } catch (Exception e) { IOException ioe = new IOException("Problem instantiating parserParams: " + line); ioe.initCause(e); throw ioe; } line = in.readLine(); // ensure backwards compatibility if (line.matches("^forceCNF.*")) { value = line.substring(line.indexOf(' ') + 1); forceCNF = Boolean.parseBoolean(value); line = in.readLine(); } value = line.substring(line.indexOf(' ') + 1); doPCFG = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); doDep = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); freeDependencies = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); directional = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); genStop = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); distance = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); coarseDistance = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); dcTags = Boolean.parseBoolean(value); line = in.readLine(); if ( ! line.matches("^nPrune.*")) { throw new RuntimeException("Expected nPrune, found: " + line); } value = line.substring(line.indexOf(' ') + 1); nodePrune = Boolean.parseBoolean(value); line = in.readLine(); // get rid of last line if (line.length() != 0) { throw new RuntimeException("Expected blank line, found: " + line); } }
[ "Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data" ]
[ "gets the bytes, sharing the cached array and does not clone it", "Formats a date or a time range according to the local conventions.\n\nYou should ensure that start/end are in the same timezone; formatDateRange()\ndoesn't handle start/end in different timezones well.\n\nSee {@link android.text.format.DateUtils#formatDateRange} for full docs.\n\n@param context the context is required only if the time is shown\n@param start the start time\n@param end the end time\n@param flags a bit mask of options\n@return a string containing the formatted date/time range", "Use this API to Import sslfipskey resources.", "Internal initialization.\n@throws ParserConfigurationException", "Utility function that copies a string array and add another string to\nfirst\n\n@param arr Original array of strings\n@param add\n@return Copied array of strings", "Parses operations where the input comes from variables to its left only. Hard coded to only look\nfor transpose for now\n\n@param tokens List of all the tokens\n@param sequence List of operation sequence", "Read activities.", "Resolve the given class if it is a primitive class,\nreturning the corresponding primitive wrapper type instead.\n@param clazz the class to check\n@return the original class, or a primitive wrapper for the original primitive type", "Returns the shared prefix of these columns. Null otherwise.\n\n@param associationKeyColumns the columns sharing a prefix\n@return the shared prefix of these columns. {@code null} otherwise." ]
private String getActivityID(Task task) { String result = null; if (m_activityIDField != null) { Object value = task.getCachedValue(m_activityIDField); if (value != null) { result = value.toString(); } } return result; }
[ "Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value" ]
[ "Executes the API action \"wbsetaliases\" for the given parameters.\n\n@param id\nthe id of the entity to be edited; if used, the site and title\nparameters must be null\n@param site\nwhen selecting an entity by title, the site key for the title,\ne.g., \"enwiki\"; if used, title must also be given but id must\nbe null\n@param title\nstring used to select an entity by title; if used, site must\nalso be given but id must be null\n@param newEntity\nused for creating a new entity of a given type; the value\nindicates the intended entity type; possible values include\n\"item\" and \"property\"; if used, the parameters id, site, and\ntitle must be null\n@param language\nthe language code for the label\n@param add\nthe values of the aliases to add. They will be merged with the\nexisting aliases. This parameter cannot be used in conjunction\nwith \"set\".\n@param remove\nthe values of the aliases to remove. Other aliases will be retained.\nThis parameter cannot be used in conjunction with \"set\".\n@param set\nthe values of the aliases to set. This will erase any existing\naliases in this language and replace them by the given list.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException", "Reads timephased assignment data.\n\n@param calendar current calendar\n@param assignment assignment data\n@param type flag indicating if this is planned or complete work\n@return list of timephased resource assignment instances", "Renders the given FreeMarker template to given directory, using given variables.", "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.", "Deletes the device pin.", "This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar. The\ncalendar used is the \"Standard\" calendar. If this calendar does not exist,\nand exception will be thrown.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object\n@throws MPXJException normally when no Standard calendar is available\n@deprecated use calendar.getDuration(startDate, endDate)", "given the groupId, and 2 string arrays, adds the name-responses pair to the table_override\n\n@param groupId ID of group\n@param methodName name of method\n@param className name of class\n@throws Exception exception", "Use this API to add ipset.", "This is the probability density function for the Gaussian\ndistribution." ]
synchronized int read(byte[] data) { this.header = getHeaderParser().setData(data).parseHeader(); if (data != null) { setData(header, data); } return status; }
[ "Reads GIF image from byte array.\n\n@param data containing GIF file.\n@return read status code (0 = no errors)." ]
[ "Gen error response.\n\n@param t\nthe t\n@return the response on single request", "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", "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.", "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.", "Reads a markdown link ID.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link ID.", "Show multiple channels. All other channels will be unaffected.\n@param channels The channels to show", "Construct new root step. Used for inspect problems with Allure lifecycle\n\n@return new root step marked as broken", "Use this API to Import appfwsignatures.", "Retrieves a vertex attribute as an integer buffer.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>int</i>\n@see #setIntArray(String, int[])\n@see #getIntVec(String)" ]
private void processStages() { // Locate the next step to execute. ModelNode primaryResponse = null; Step step; do { step = steps.get(currentStage).pollFirst(); if (step == null) { if (currentStage == Stage.MODEL && addModelValidationSteps()) { continue; } // No steps remain in this stage; give subclasses a chance to check status // and approve moving to the next stage if (!tryStageCompleted(currentStage)) { // Can't continue resultAction = ResultAction.ROLLBACK; executeResultHandlerPhase(null); return; } // Proceed to the next stage if (currentStage.hasNext()) { currentStage = currentStage.next(); if (currentStage == Stage.VERIFY) { // a change was made to the runtime. Thus, we must wait // for stability before resuming in to verify. try { awaitServiceContainerStability(); } catch (InterruptedException e) { cancelled = true; handleContainerStabilityFailure(primaryResponse, e); executeResultHandlerPhase(null); return; } catch (TimeoutException te) { // The service container is in an unknown state; but we don't require restart // because rollback may allow the container to stabilize. We force require-restart // in the rollback handling if the container cannot stabilize (see OperationContextImpl.releaseStepLocks) //processState.setRestartRequired(); // don't use our restartRequired() method as this is not reversible in rollback handleContainerStabilityFailure(primaryResponse, te); executeResultHandlerPhase(null); return; } } } } else { // The response to the first step is what goes to the outside caller if (primaryResponse == null) { primaryResponse = step.response; } // Execute the step, but make sure we always finalize any steps Throwable toThrow = null; // Whether to return after try/finally boolean exit = false; try { CapabilityRegistry.RuntimeStatus stepStatus = getStepExecutionStatus(step); if (stepStatus == RuntimeCapabilityRegistry.RuntimeStatus.NORMAL) { executeStep(step); } else { String header = stepStatus == RuntimeCapabilityRegistry.RuntimeStatus.RESTART_REQUIRED ? OPERATION_REQUIRES_RESTART : OPERATION_REQUIRES_RELOAD; step.response.get(RESPONSE_HEADERS, header).set(true); } } catch (RuntimeException | Error re) { resultAction = ResultAction.ROLLBACK; toThrow = re; } finally { // See if executeStep put us in a state where we shouldn't do any more if (toThrow != null || !canContinueProcessing()) { // We're done. executeResultHandlerPhase(toThrow); exit = true; // we're on the return path } } if (exit) { return; } } } while (currentStage != Stage.DONE); assert primaryResponse != null; // else ModelControllerImpl executed an op with no steps // All steps ran and canContinueProcessing returned true for the last one, so... executeDoneStage(primaryResponse); }
[ "Perform the work of processing the various OperationContext.Stage queues, and then the DONE stage." ]
[ "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", "Add a text symbolizer definition to the rule.\n\n@param styleJson The old style.", "Print a a basic type t", "Harvest any values that may have been returned during the execution\nof a procedure.\n\n@param proc the procedure descriptor that provides info about the procedure\nthat was invoked.\n@param obj the object that was persisted\n@param stmt the statement that was used to persist the object.\n\n@throws PersistenceBrokerSQLException if a problem occurs.", "Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.", "As already described, but if separator is not null, then objects\nsuch as TaggedWord\n\n@param separator The string used to separate Word and Tag\nin TaggedWord, etc", "Returns a PreparedStatementCreator that returns a count of the rows that\nthis creator would return.\n\n@param dialect\nDatabase dialect.", "Set the attributes of a feature.\n\n@param feature the feature\n@param attributes the attributes\n@throws LayerException oops", "Populate a resource assignment workgroup instance.\n\n@param record MPX record\n@param workgroup workgroup instance\n@throws MPXJException" ]
private static void logVersionWarnings(String label1, String version1, String label2, String version2) { if (version1 == null) { if (version2 != null) { warning(null, "Unknown version", " for {}, version for {} is '{}'", new Object[] { label1, label2, version2 }); } } else { if (version2 == null) { warning(null, "Unknown version", " for {}, version for {} is '{}'", new Object[] { label2, label1, version1 }); } else if (!version1.equals(version2)) { warning(null, "Mismatched versions", ": {} is '{}', while {} is '{}'", new Object[] { label1, version1, label2, version2 }); } } }
[ "Log error information" ]
[ "Try to reconnect to a started server.", "Use this API to reset appfwlearningdata.", "Writes a list of UDF types.\n\n@author lsong\n@param type parent entity type\n@param mpxj parent entity\n@return list of UDFAssignmentType instances", "Find and unmarshal all test suite files in given directories.\n\n@throws IOException if any occurs.\n@see #unmarshal(File)", "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", "Transform the operation into something the proxy controller understands.\n\n@param identity the server identity\n@return the transformed operation", "Notifies that an existing header item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.", "Throws an exception or logs a message\n\n@param message The message for the exception or the log message. Must be internationalized", "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" ]
public static void executeCommand(String[] args) throws IOException { OptionParser parser = getParser(); // declare parameters String url = null; // parse command-line input OptionSet options = parser.parse(args); if(options.has(AdminParserUtils.OPT_HELP)) { printHelp(System.out); return; } // check required options and/or conflicting options AdminParserUtils.checkRequired(options, AdminParserUtils.OPT_URL); // load parameters url = (String) options.valueOf(AdminParserUtils.OPT_URL); // execute command AdminClient adminClient = AdminToolUtils.getAdminClient(url); doMetaCheckVersion(adminClient); }
[ "Parses command-line and verifies metadata versions on all the cluster\nnodes\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException" ]
[ "Checks whether the folder exists for fileName, and creates it if necessary.\n\n@param fileName folder name.\n@throws IOException an IO exception.", "return a generic Statement for the given ClassDescriptor", "Return a new File object based on the baseDir and the segments.\n\nThis method does not perform any operation on the file system.", "Read the version number.\n\n@param is input stream", "Returns whether the given host matches this one. For hosts to match, they must represent the same addresses or have the same host names.\nHosts are not resolved when matching. Also, hosts must have the same port and service. They must have the same masks if they are host names.\nEven if two hosts are invalid, they match if they have the same invalid string.\n\n@param host\n@return", "Creates the row key of the given association row; columns present in the given association key will be obtained\nfrom there, all other columns from the given native association row.", "This method extracts byte arrays from the embedded object data\nand converts them into RTFEmbeddedObject instances, which\nit then adds to the supplied list.\n\n@param offset offset into the RTF document\n@param text RTF document\n@param objects destination for RTFEmbeddedObject instances\n@return new offset into the RTF document", "Formats a resource type.\n\n@param resource MPXJ resource\n@return Primavera resource type", "Get a scalar value for the DOM diversity using the Robust Tree Edit Distance\n\n@param dom1\n@param dom2\n@return" ]
public static DMatrixSparseCSC triangle( boolean upper , int N , double minFill , double maxFill , Random rand ) { int nz = (int)(((N-1)*(N-1)/2)*(rand.nextDouble()*(maxFill-minFill)+minFill))+N; if( upper ) { return triangleUpper(N,0,nz,-1,1,rand); } else { return triangleLower(N,0,nz,-1,1,rand); } }
[ "Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Random matrix" ]
[ "Port forward missing module changes for each layer.\n\n@param patch the current patch\n@param context the patch context\n@throws PatchingException\n@throws IOException\n@throws XMLStreamException", "Use this API to fetch appfwprofile_csrftag_binding resources of given name .", "Writes the timephased data for a resource assignment.\n\n@param mpx MPXJ assignment\n@param xml MSDPI assignment", "Returns a matrix full of ones", "Use this API to fetch the statistics of all systemmemory_stats resources that are configured on netscaler.", "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.", "Creates a color item that represents a color field fond for a track.\n\n@param colorId the key of the color as found in the database\n@param label the corresponding color label as found in the database (or sent in the dbserver message)\n\n@return the color metadata field", "Returns script view\n\n@param model\n@return\n@throws Exception", "Write a single resource.\n\n@param mpxj Resource instance" ]
void countNonZeroInR( int[] parent ) { TriangularSolver_DSCC.postorder(parent,n,post,gwork); columnCounts.process(A,parent,post,countsR); nz_in_R = 0; for (int k = 0; k < n; k++) { nz_in_R += countsR[k]; } if( nz_in_R < 0) throw new RuntimeException("Too many elements. Numerical overflow in R counts"); }
[ "Count the number of non-zero elements in R" ]
[ "Sets the specified short attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Tells it to process the submatrix at the next split. Should be called after the\ncurrent submatrix has been processed.", "Grab random holiday from the equivalence class that falls between the two dates\n\n@param earliest the earliest date parameter as defined in the model\n@param latest the latest date parameter as defined in the model\n@return a holiday that falls between the dates", "Calculate UserInfo strings.", "Set OAuth 1 authentication credentials for the replication target\n\n@param consumerSecret client secret\n@param consumerKey client identifier\n@param tokenSecret OAuth server token secret\n@param token OAuth server issued token\n@return this Replication instance to set more options or trigger the replication", "Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception", "Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus", "associate the batched Children with their owner object loop over children", "Perform the module promotion\n\n@param moduleId String" ]
private Set<T> findMatching(R resolvable) { Set<T> result = new HashSet<T>(); for (T bean : getAllBeans(resolvable)) { if (matches(resolvable, bean)) { result.add(bean); } } return result; }
[ "Gets the matching beans for binding criteria from a list of beans\n\n@param resolvable the resolvable\n@return A set of filtered beans" ]
[ "Get a loader that lists the Files in the current path,\nand monitors changes.", "Parses links for XMLContents etc.\n\n@param cms the CMS context to use\n@throws CmsException if something goes wrong", "Sets the submatrix of W up give Y is already configured and if it is being cached or not.", "The derivative of the objective function. You may override this method\nif you like to implement your own derivative.\n\n@param parameters Input value. The parameter vector.\n@param derivatives Output value, where derivatives[i][j] is d(value(j)) / d(parameters(i)\n@throws SolverException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Create a clone of the Renderer. This method is the base of the prototype mechanism implemented\nto avoid create new objects from RendererBuilder. Pay an special attention implementing clone\nmethod in Renderer subtypes.\n\n@return a copy of the current renderer.", "Special multiplication that takes in account the zeros and one in Y, which\nis the matrix that stores the householder vectors.", "Provides a RunAs client login context", "Adds version information.", "Adds multiple observers using unique integer prefixes for each.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}" ]
@Nullable public T getItem(final int position) { if (position < 0 || position >= mObjects.size()) { return null; } return mObjects.get(position); }
[ "Returns the item at the specified position.\n\n@param position index of the item to return\n@return the item at the specified position or {@code null} when not found" ]
[ "Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream\nproperly.\n\n@param out target archive.\n@param source file to be added.\n@param fileSize size of the file (which is known in most cases).\n@throws IOException in case of any issues with underlying store.", "Use this API to fetch tmtrafficpolicy_lbvserver_binding resources of given name .", "Parse duration time units.\n\nNote that we don't differentiate between confirmed and unconfirmed\ndurations. Unrecognised duration types are default the supplied default value.\n\n@param value BigInteger value\n@param defaultValue if value is null, use this value as the result\n@return Duration units", "at this point definition below is not really needed as it is the same as for 1.1, but it is here as place holder when subsystem parser evolves.", "A method for determining from and to information when using this IntRange to index an aggregate object of the specified size.\nNormally only used internally within Groovy but useful if adding range indexing support for your own aggregates.\n\n@param size the size of the aggregate being indexed\n@return the calculated range information (with 1 added to the to value, ready for providing to subList", "Inserts the LokenList immediately following the 'before' token", "Checks to see if all the diagonal elements in the matrix are positive.\n\n@param a A matrix. Not modified.\n@return true if all the diagonal elements are positive, false otherwise.", "Searches for commas in the set of tokens. Used for inputs to functions.\n\nIgnore comma's which are inside a [ ] block\n\n@return List of output tokens between the commas", "Returns the Set of entities recognized by this Classifier.\n\n@return The Set of entities recognized by this Classifier." ]
public static final Double getPercentage(byte[] data, int offset) { int value = MPPUtility.getShort(data, offset); Double result = null; if (value >= 0 && value <= 100) { result = NumberHelper.getDouble(value); } return result; }
[ "Utility method to read a percentage value.\n\n@param data data block\n@param offset offset into data block\n@return percentage value" ]
[ "This method extracts project properties from a GanttProject file.\n\n@param ganttProject GanttProject file", "Gets the info for a running build\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param buildId the unique identifier of the build", "Check from another ConcurrentGroupServerUpdatePolicy whose plans are meant to\nexecute once this policy's plans are successfully completed.\n\n@return <code>true</code> if the successor can proceed", "Gets the Jaccard distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Jaccard distance between x and y.", "Returns the modules paths used on the command line.\n\n@return the paths separated by the {@link File#pathSeparator path separator}", "Checks to see if an Oracle Server exists.\n\n@param curator It is the responsibility of the caller to ensure the curator is started\n@return boolean if the server exists in zookeeper", "Parse a list of String into a list of Integer.\nIf one element can not be parsed, the behavior depends on the value of failOnException.\n@param strList can't be null\n@param failOnException if an element can not be parsed should we return null or add a null element to the list.\n@return list of all String parsed as Integer or null if failOnException", "Gets value of this function at the current point, computed on the given batch of examples.\n@param batch A set of indices indicating the examples over which the gradient should be computed.\n@return The value of the function at the point.", "crates a StencilSet object and add it to the current diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException" ]
public final void cancelOld( final long starttimeThreshold, final long checkTimeThreshold, final String message) { final CriteriaBuilder builder = getSession().getCriteriaBuilder(); final CriteriaUpdate<PrintJobStatusExtImpl> update = builder.createCriteriaUpdate(PrintJobStatusExtImpl.class); final Root<PrintJobStatusExtImpl> root = update.from(PrintJobStatusExtImpl.class); update.where(builder.and( builder.equal(root.get("status"), PrintJobStatus.Status.WAITING), builder.or( builder.lessThan(root.get("entry").get("startTime"), starttimeThreshold), builder.and(builder.isNotNull(root.get("lastCheckTime")), builder.lessThan(root.get("lastCheckTime"), checkTimeThreshold)) ) )); update.set(root.get("status"), PrintJobStatus.Status.CANCELLED); update.set(root.get("error"), message); getSession().createQuery(update).executeUpdate(); }
[ "Cancel old waiting jobs.\n\n@param starttimeThreshold threshold for start time\n@param checkTimeThreshold threshold for last check time\n@param message the error message" ]
[ "Parses a tag formatted as defined by the HTTP standard.\n\n@param httpTag The HTTP tag string; if it starts with 'W/' the tag will be\nmarked as weak and the data following the 'W/' used as the tag;\notherwise it should be surrounded with quotes (e.g.,\n\"sometag\").\n\n@return A new tag instance.\n\n@see <a\nhref=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11\">HTTP\nEntity Tags</a>", "Use this API to enable the feature on Netscaler.\n@param feature feature to be enabled.\n@return status of the operation performed.\n@throws Exception Nitro exception.", "Return a list of segments where each segment is either the content of a line in the given text or a line-break\naccording to the configured delimiter. Existing line-breaks in the text will be replaced by this's\ninstances delimiter.\n\n@param text\nthe to-be-splitted text. May be <code>null</code>.\n@return a list of segments. Is never <code>null</code>.", "Indicates if the type is a simple Web Bean\n\n@param clazz The type to inspect\n@return True if simple Web Bean, false otherwise", "Process events in the order as they were received.\n\n<p/>\n\nThe overall time to process the events must be within the bounds of the\ntimeout or an {@link InsufficientOperationalNodesException} will be\nthrown.", "Add a '&gt;=' clause so the column must be greater-than or equals-to the value.", "Use this API to disable clusterinstance resources of given names.", "Computes the final list of versions to be stored, on top of what is\ncurrently being stored. Final list is valuesInStorage modified in place\n\n\n@param valuesInStorage list of versions currently in storage\n@param multiPutValues list of new versions being written to storage\n@return list of versions from multiPutVals that were rejected as obsolete", "Sorts the fields." ]
public static boolean isPostJDK5(String bytecodeVersion) { return JDK5.equals(bytecodeVersion) || JDK6.equals(bytecodeVersion) || JDK7.equals(bytecodeVersion) || JDK8.equals(bytecodeVersion); }
[ "Checks if the specified bytecode version string represents a JDK 1.5+ compatible\nbytecode version.\n@param bytecodeVersion the bytecode version string (1.4, 1.5, 1.6, 1.7 or 1.8)\n@return true if the bytecode version is JDK 1.5+" ]
[ "Returns the corresponding ModuleLoadService service name for the given module.\n\n@param identifier The module identifier\n@return The service name of the ModuleLoadService service", "Generates a download id for the request and adds the download request to the download request queue for the dispatchers pool to act on immediately.\n\n@param request\n@return downloadId", "Runs a Story with the given configuration and steps, applying the given\nmeta filter.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.", "Prepares a Jetty server for communicating with consumers.", "any possible bean invocations from other ADV observers", "This is a convenience method used to add a calendar called\n\"Standard\" to the project, and populate it with a default working week\nand default working hours.\n\n@return a new default calendar", "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", "Increases the maximum size of the data array so that it can store sparse data up to 'length'. The class\nparameter nz_length is not modified by this function call.\n\n@param arrayLength Desired maximum length of sparse data\n@param preserveValue If true the old values will be copied into the new arrays. If false that step will be skipped.", "Determines if this connection's access token has expired and needs to be refreshed.\n@return true if the access token needs to be refreshed; otherwise false." ]
public void refresh(String[] configLocations) throws GeomajasException { try { setConfigLocations(configLocations); refresh(); } catch (Exception e) { throw new GeomajasException(e, ExceptionCode.REFRESH_CONFIGURATION_FAILED); } }
[ "Refresh this context with the specified configuration locations.\n\n@param configLocations\nlist of configuration resources (see implementation for specifics)\n@throws GeomajasException\nindicates a problem with the new location files (see cause)" ]
[ "Finds the null space of A\n@param A (Input) Matrix. Modified\n@param numSingularValues Number of singular values\n@param nullspace Storage for null-space\n@return true if successful or false if it failed", "Hashes a path, if the path points to a directory then hashes the contents recursively.\n@param messageDigest the digest used to hash.\n@param path the file/directory we want to hash.\n@return the resulting hash.\n@throws IOException", "Process the scheduling project property from PROJPROP. This table only seems to exist\nin P6 databases, not XER files.\n\n@throws SQLException", "Obtains a local date in Coptic calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Coptic era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Coptic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code CopticEra}", "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", "returns position of xpath element which match the expression xpath in the String dom.\n\n@param dom the Document to search in\n@param xpath the xpath query\n@return position of xpath element, if fails returns -1", "The user making this call must be a member of the team in order to add others.\nThe user to add must exist in the same organization as the team in order to be added.\nThe user to add can be referenced by their globally unique user ID or their email address.\nReturns the full user record for the added user.\n\n@param team Globally unique identifier for the team.\n@return Request object", "Sets the specified range of elements in the specified array to the specified value.\n\n@param from the index of the first element (inclusive) to be filled with the specified value.\n@param to the index of the last element (inclusive) to be filled with the specified value.\n@param val the value to be stored in the specified elements of the receiver.", "Set default values for annotations.\nInitial annotation take precedence over the default annotation when both annotation types are present\n\n@param defaultAnnotations default value for annotations" ]
public void setConnectTimeout(int connectTimeout) { this.client = this.client.newBuilder() .connectTimeout(connectTimeout, TimeUnit.MILLISECONDS) .build(); }
[ "Sets the underlying connect timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#connectTimeout(long, TimeUnit)" ]
[ "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", "Returns the base path for a given configuration file.\n\nE.g. the result for the input '/sites/default/.container-config' will be '/sites/default'.<p>\n\n@param rootPath the root path of the configuration file\n\n@return the base path for the configuration file", "Returns a string representation of map of chunk id to number of chunks\n\n@return String of map of chunk id to number of chunks", "Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction\nagain.\n\n@since 2.4\n@noreference", "Initializes the default scope type", "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", "Extract the outline level from a task's WBS attribute.\n\n@param task Task instance\n@return outline level", "Update list of sorted services by copying it from the array and making it unmodifiable.", "Get a writer implementation to push data into Canvas.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param <T> A writer implementation\n@return A writer implementation class" ]
protected String statusMsg(final String queue, final Job job) throws IOException { final WorkerStatus status = new WorkerStatus(); status.setRunAt(new Date()); status.setQueue(queue); status.setPayload(job); return ObjectMapperFactory.get().writeValueAsString(status); }
[ "Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus" ]
[ "Adds an ORDER BY item with a direction indicator.\n\n@param name\nName of the column by which to sort.\n@param ascending\nIf true, specifies the direction \"asc\", otherwise, specifies\nthe direction \"desc\".", "Calculates the column width according to its type.\n@param _property the property.\n@return the column width.", "Convert the integer representation of a duration value and duration units\ninto an MPXJ Duration instance.\n\n@param properties project properties, used for duration units conversion\n@param durationValue integer duration value\n@param unitsValue integer units value\n@return Duration instance", "Returns the number of vertex indices for a single face.\n\n@param face the face\n@return the number of indices", "Get a scalar value for the DOM diversity using the Robust Tree Edit Distance\n\n@param dom1\n@param dom2\n@return", "What is something came in between when we last checked and when this method is called", "Returns a resource wrapper created from the input.\n\nThe wrapped result of {@link #convertRawResource(CmsObject, Object)} is returned.\n\n@param cms the current OpenCms user context\n@param input the input to create a resource from\n\n@return a resource wrapper created from the given Object\n\n@throws CmsException in case of errors accessing the OpenCms VFS for reading the resource", "Performs backward pass of Batch Normalization layer. Returns x gradient,\nbnScale gradient and bnBias gradient", "Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected" ]
public static dospolicy get(nitro_service service, String name) throws Exception{ dospolicy obj = new dospolicy(); obj.set_name(name); dospolicy response = (dospolicy) obj.get_resource(service); return response; }
[ "Use this API to fetch dospolicy resource of given name ." ]
[ "Creates an encryptor for queryable text strings that uses standard password-based encryption. Uses a shared, or\nconstant 16 byte initialization vector so encrypting the same data results in the same encryption result. This is\ndone to allow encrypted data to be queried against. Encrypted text is hex-encoded.\n\n@param password the password used to generate the encryptor's secret key; should not be shared\n@param salt a hex-encoded, random, site-global salt value to use to generate the secret key", "Description accessor provided for JSON serialization only.", "Creates a Span that covers an exact row. String parameters will be encoded as UTF-8", "Adds the given entity to the inverse associations it manages.", "Use this API to count dnszone_domain_binding resources configued on NetScaler.", "Only call with the read lock held", "Checks if a given number is in the range of a byte.\n\n@param number\na number which should be in the range of a byte (positive or negative)\n\n@see java.lang.Byte#MIN_VALUE\n@see java.lang.Byte#MAX_VALUE\n\n@return number as a byte (rounding might occur)", "This method searches in the Component Management Service, so given an\nagent name returns its IExternalAccess\n\n@param agent_name\nThe name of the agent in the platform\n@return The IComponentIdentifier of the agent in the platform", "Apply the necessary rotation to the transform so that it is in front of\nthe camera.\n\n@param transform The transform to modify." ]
private boolean moreDates(Calendar calendar, List<Date> dates) { boolean result; if (m_finishDate == null) { int occurrences = NumberHelper.getInt(m_occurrences); if (occurrences < 1) { occurrences = 1; } result = dates.size() < occurrences; } else { result = calendar.getTimeInMillis() <= m_finishDate.getTime(); } return result; }
[ "Determines if we need to calculate more dates.\nIf we do not have a finish date, this method falls back on using the\noccurrences attribute. If we have a finish date, we'll use that instead.\nWe're assuming that the recurring data has one or other of those values.\n\n@param calendar current date\n@param dates dates generated so far\n@return true if we should calculate another date" ]
[ "Internal method that finds the matching enum for a configured field that has the name argument.\n\n@return The matching enum value or null if blank enum name.\n@throws IllegalArgumentException\nIf the enum name is not known.", "Checks if the last argument matches the vararg type.\n@param params\n@param args\n@return -1 if no match, 0 if the last argument is exactly the vararg type and 1 if of an assignable type", "Use this API to login into Netscaler.\n@param username Username\n@param password Password for the Netscaler.\n@param timeout timeout for netscaler session.Default is 1800secs\n@return status of the operation performed.\n@throws Exception nitro exception is thrown.", "Build the key for the TableAlias based on the path and the hints\n@param aPath\n@param hintClasses\n@return the key for the TableAlias", "This configuration requires that all your tasks you submit to the system implement\nthe Groupable interface. By default, it will round robin tasks from each group\n\nTasks will be tracked internally in the system by randomly generated UUIDs\n\n@return", "Parse a boolean.\n\n@param value boolean\n@return Boolean value", "Convert a collection of objects to a JSON array with the string representations of that objects.\n@param collection the collection of objects.\n@return the JSON array with the string representations.", "Use this API to fetch authenticationlocalpolicy_authenticationvserver_binding resources of given name .", "Extract resource type from a resource ID string.\n@param id the resource ID string\n@return the resource type" ]
public void putAll(Map<KEY, VALUE> mapDataToPut) { int targetSize = maxSize - mapDataToPut.size(); if (maxSize > 0 && values.size() > targetSize) { evictToTargetSize(targetSize); } Set<Entry<KEY, VALUE>> entries = mapDataToPut.entrySet(); for (Entry<KEY, VALUE> entry : entries) { put(entry.getKey(), entry.getValue()); } }
[ "Stores all entries contained in the given map in the cache." ]
[ "Use this API to fetch lbvserver_cachepolicy_binding resources of given name .", "Get an integer property override value.\n@param name the {@link CircuitBreaker} name.\n@param key the property override key.\n@return the property override value, or null if it is not found.", "Remove a notification message. Recursive until all pending removals have been completed.", "Use this API to fetch the statistics of all appfwpolicylabel_stats resources that are configured on netscaler.", "Return the filesystem path needed to mount the NFS filesystem associated with a particular media slot.\n\n@param slot the slot whose filesystem is desired\n\n@return the path to use in the NFS mount request to access the files mounted in that slot\n\n@throws IllegalArgumentException if it is a slot that we don't know how to handle", "Gets axis dimension\n@param axis Axis. It might be either {@link Layout.Axis#X X} or\n{@link Layout.Axis#Y Y} or {@link Layout.Axis#Z Z}\n@return axis dimension", "This is an assertion method that can be used by a thread to confirm that\nthe thread isn't already holding lock for an object, before acquiring a\nlock\n\n@param object\nobject to test for lock\n@param name\ntag associated with the lock", "Apply the matching client UUID for the request\n\n@param httpServletRequest\n@param history", "Write the auxiliary RDF data for encoding the given value.\n\n@param value\nthe value to write\n@param resource\nthe (subject) URI to use to represent this value in RDF\n@throws RDFHandlerException" ]
private int getPrototypeIndex(Renderer renderer) { int index = 0; for (Renderer prototype : prototypes) { if (prototype.getClass().equals(renderer.getClass())) { break; } index++; } return index; }
[ "Return the index associated to the Renderer.\n\n@param renderer used to search in the prototypes collection.\n@return the prototype index associated to the renderer passed as argument." ]
[ "Checks the available space and sets max-height to the details field-set.", "Return the version string of this instance of finmath-lib.\n\n@return The version string of this instance of finmath-lib.", "Template method for verification of lazy initialisation.", "Finds an Object of the specified type.\n\n@param <T> Object type.\n@param classType The class of type T.\n@param id The document _id field.\n@param rev The document _rev field.\n@return An object of type T.\n@throws NoDocumentException If the document is not found in the database.", "Creates an observer\n\n@param method The observer method abstraction\n@param declaringBean The declaring bean\n@param manager The Bean manager\n@return An observer implementation built from the method abstraction", "Overloads the left shift operator to provide an easy way to append multiple\nobjects as string representations to a String.\n\n@param self a String\n@param value an Object\n@return a StringBuffer built from this string\n@since 1.0", "Build a compact representation of the ModelNode.\n@param node The model\n@return A single line containing the multi lines ModelNode.toString() content.", "Method to build Integration flow for IMAP Idle configuration.\n@param urlName Mail source URL.\n@return Integration Flow object IMAP IDLE.", "Translate the given byte array into a string of 1s and 0s\n\n@param bytes The bytes to translate\n@return The string" ]
public Pair<int[][][][], int[][]> documentsToDataAndLabels(Collection<List<IN>> documents) { // first index is the number of the document // second index is position in the document also the index of the // clique/factor table // third index is the number of elements in the clique/window these features // are for (starting with last element) // fourth index is position of the feature in the array that holds them // element in data[i][j][k][m] is the index of the mth feature occurring in // position k of the jth clique of the ith document // int[][][][] data = new int[documentsSize][][][]; List<int[][][]> data = new ArrayList<int[][][]>(); // first index is the number of the document // second index is the position in the document // element in labels[i][j] is the index of the correct label (if it exists) // at position j in document i // int[][] labels = new int[documentsSize][]; List<int[]> labels = new ArrayList<int[]>(); int numDatums = 0; for (List<IN> doc : documents) { Pair<int[][][], int[]> docPair = documentToDataAndLabels(doc); data.add(docPair.first()); labels.add(docPair.second()); numDatums += doc.size(); } System.err.println("numClasses: " + classIndex.size() + ' ' + classIndex); System.err.println("numDocuments: " + data.size()); System.err.println("numDatums: " + numDatums); System.err.println("numFeatures: " + featureIndex.size()); printFeatures(); int[][][][] dataA = new int[0][][][]; int[][] labelsA = new int[0][]; return new Pair<int[][][][], int[][]>(data.toArray(dataA), labels.toArray(labelsA)); }
[ "Convert an ObjectBank to arrays of data features and labels.\n\n@return A Pair, where the first element is an int[][][][] representing the\ndata and the second element is an int[][] representing the labels." ]
[ "Replace known tags in the current data values with actual values as appropriate\n\n@param cr a reference to DataPipe from which to read the current map", "Creates a Profile object from a SQL resultset\n\n@param result resultset containing the profile\n@return Profile\n@throws Exception exception", "Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>", "Use this API to fetch all the inatparam resources that are configured on netscaler.", "Validates the data for correct annotation", "Destroys the context", "Returns the right string representation of the effort level based on given number of points.", "Returns the name of the bone.\n\n@return the name", "Use this API to fetch all the aaaparameter resources that are configured on netscaler." ]
public static dospolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ dospolicy obj = new dospolicy(); options option = new options(); option.set_filter(filter); dospolicy[] response = (dospolicy[]) obj.getfiltered(service, option); return response; }
[ "Use this API to fetch filtered set of dospolicy resources.\nset the filter parameter values in filtervalue object." ]
[ "Return the next word of the string, in other words it stops when a space is encountered.", "returns the XmlCapable id associated with the literal.\nOJB maintains a RepositoryTags table that provides\na mapping from xml-tags to XmlCapable ids.\n\n@param literal the literal to lookup\n@return the int value representing the XmlCapable\n\n@throws MetadataException if no literal was found in tags mapping", "The only difference between version 1.5 and 1.6 of the schema were to make is possible to define discovery options, this\nresulted in the host and port attributes becoming optional -this method also indicates if discovery options are required\nwhere the host and port were not supplied.\n\n@param allowDiscoveryOptions i.e. are host and port potentially optional?\n@return true if discovery options are required, i.e. no host and port set and the admin policy requires a config.", "Gets the property and casts to the appropriate type\n\n@param <T>\n@param key The property name\n@param type The property type\n@return The value of the property", "Gets a Map of attributes from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attributes as a {@link HashMap}, or null if it was not found.", "Execute the transactional flow - catch only specified exceptions\n\n@param input Initial data input\n@param classes Exception types to catch\n@return Try that represents either success (with result) or failure (with errors)", "Escape text to ensure valid JSON.\n\n@param value value\n@return escaped value", "Return whether or not the data object has a default value passed for this field of this type.", "Build and return a foreign collection based on the field settings that matches the id argument. This can return\nnull in certain circumstances.\n\n@param parent\nThe parent object that we will set on each item in the collection.\n@param id\nThe id of the foreign object we will look for. This can be null if we are creating an empty\ncollection." ]
public AT_Row setPaddingLeft(int paddingLeft) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingLeft(paddingLeft); } } return this; }
[ "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" ]
[ "Manual check because introducing a capability can't be done without a full refactoring.\nThis has to go as soon as the management interfaces are redesigned.\n@param context the OperationContext\n@param otherManagementEndpoint : the address to check that may provide an exposed jboss-remoting endpoint.\n@throws OperationFailedException in case we can't remove the management resource.", "Specifies the object id associated with a user assigned managed service identity\nresource that should be used to retrieve the access token.\n\n@param objectId Object ID of the identity to use when authenticating to Azure AD.\n@return MSICredentials", "Accessor method to retrieve an accrue type instance.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Transforms user name and icon size into the rfs image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path", "Write flow id to message.\n\n@param message the message\n@param flowId the flow id", "Gets or creates the a resource for the sub-deployment on the parent deployments resource.\n\n@param deploymentName the name of the deployment\n@param parent the parent deployment used to find the parent resource\n\n@return the already registered resource or a newly created resource", "Use this API to fetch csvserver_cachepolicy_binding resources of given name .", "Write the given number of bytes out to the array\n\n@param bytes The array to write to\n@param value The value to write from\n@param offset the offset into the array\n@param numBytes The number of bytes to write", "Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the highest to the lowest score.\nDescending lexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements" ]