query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public static String getDumpFilePostfix(DumpContentType dumpContentType) { if (WmfDumpFile.POSTFIXES.containsKey(dumpContentType)) { return WmfDumpFile.POSTFIXES.get(dumpContentType); } else { throw new IllegalArgumentException("Unsupported dump type " + dumpContentType); } }
[ "Returns the ending used by the Wikimedia-provided dumpfile names of the\ngiven type.\n\n@param dumpContentType\nthe type of dump\n@return postfix of the dumpfile name\n@throws IllegalArgumentException\nif the given dump file type is not known" ]
[ "Returns the raw class of the given 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.", "Clear tmpData in subtree rooted in this node.", "Reads a line from the input stream, where a line is terminated by \\r, \\n, or \\r\\n\n@param trim whether to trim trailing \\r and \\ns", "Compress a directory into a zip file\n\n@param dir Directory\n@param zipFile ZIP file to create\n@throws IOException I/O Error", "Remove a server mapping from current profile by ID\n\n@param serverMappingId server mapping ID\n@return Collection of updated ServerRedirects", "Checks to see if the matrix is symmetric to within tolerance.\n\n@param A Matrix being tested. Not modified.\n@param tol Tolerance that defines how similar two values must be to be considered identical\n@return true if symmetric or false if not", "Use this API to fetch vlan_interface_binding resources of given name .", "Removes all elems in the given Collection that aren't accepted by the given Filter." ]
public static Field getField(Class clazz, String fieldName) { try { return clazz.getField(fieldName); } catch (Exception ignored) {} return null; }
[ "Determines the field via reflection look-up.\n\n@param clazz The java class to search in\n@param fieldName The field's name\n@return The field object or <code>null</code> if no matching field was found" ]
[ "Prepares transformation interceptors for a client.\n\n@param clientConfig the client configuration\n@param newClient indicates if it is a new/updated client", "Registers all custom Externalizer implementations that Hibernate OGM needs into a running\nInfinispan CacheManager configuration.\nThis is only safe to do when Caches from this CacheManager haven't been started yet,\nor the ones already started do not contain any data needing these.\n\n@see ExternalizerIds\n@param globalCfg the Serialization section of a GlobalConfiguration builder", "Returns the text color for the JSONObject of Link provided\n@param jsonObject of Link\n@return String", "Write the configuration to a buffered writer.", "Use this API to apply nspbr6.", "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", "Construct a new simple attachment key.\n\n@param valueClass the value class\n@param <T> the attachment type\n@return the new instance", "Changes the vertex buffer associated with this mesh.\n@param vbuf new vertex buffer to use\n@see #setVertices(float[])\n@see #getVertexBuffer()\n@see #getVertices()", "Copy new grayscale data to the GPU texture. This one is also safe even\nin a non-GL thread. An updateGPU request on a non-GL thread will\nbe forwarded to the GL thread and be executed before main rendering happens.\n\nBe aware that updating a texture will affect any and all\n{@linkplain GVRMaterial materials} and/or post effects that use the texture!\n@param width width of grayscale image\n@param height height of grayscale image\n@param grayscaleData A byte array containing grayscale data\n\n@since 1.6.3" ]
void recordPreparedOperation(final TransactionalProtocolClient.PreparedOperation<ServerTaskExecutor.ServerOperation> preparedOperation) { recordPreparedTask(new ServerTaskExecutor.ServerPreparedResponse(preparedOperation)); }
[ "Record a prepare operation.\n\n@param preparedOperation the prepared operation" ]
[ "Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start", "Get a subset of the attributes of the provided class. An attribute is each public field in the class\nor super class.\n\n@param classToInspect the class to inspect\n@param filter a predicate that returns true when a attribute should be kept in resulting\ncollection.", "Use this API to update responderparam.", "When using a map rotation, there might be tiles that are outside the rotated map area. To avoid to load\nthese tiles, this method checks if a tile is really required to draw the map.", "Get the Roman Numeral of the current value\n@return", "Try to obtain the value that is cached for the given key in the given resource.\nIf no value is cached, the provider is used to compute it and store it afterwards.\n@param resource the resource. If it is <code>null</code>, the provider will be used to compute the value.\n@param key the cache key. May not be <code>null</code>.\n@param provider the strategy to compute the value if necessary. May not be <code>null</code>.", "Creates typed parser\n@param contentType class of parsed object\n@param <T> type of parsed object\n@return parser of objects of given type", "Inserts the currently contained data objects into the database.\n\n@param platform The (connected) database platform for inserting data\n@param model The database model\n@param batchSize The batch size; use 1 for not using batch mode", "Convert an integer to a RelationType instance.\n\n@param type integer value\n@return RelationType instance" ]
private static Predicate join(final String joinWord, final List<Predicate> preds) { return new Predicate() { public void init(AbstractSqlCreator creator) { for (Predicate p : preds) { p.init(creator); } } public String toSql() { StringBuilder sb = new StringBuilder() .append("("); boolean first = true; for (Predicate p : preds) { if (!first) { sb.append(" ").append(joinWord).append(" "); } sb.append(p.toSql()); first = false; } return sb.append(")").toString(); } }; }
[ "Factory for 'and' and 'or' predicates." ]
[ "Use this API to fetch tmtrafficaction resource of given name .", "Converts days of the week into a bit field.\n\n@param data recurring data\n@return bit field", "Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise", "Print a timestamp value.\n\n@param value time value\n@return time value", "Calculates the middle point between two points and multiplies its coordinates with the given\nsmoothness _Mulitplier.\n@param _P1 First point\n@param _P2 Second point\n@param _Result Resulting point\n@param _Multiplier Smoothness multiplier", "Adds the offset.\n\n@param start the start\n@param end the end", "Creates a new RDF serializer based on the current configuration of this\nobject.\n\n@return the newly created RDF serializer\n@throws IOException\nif there were problems opening the output files", "Internal used method which start the real store work.", "Get interfaces implemented by clazz\n\n@param clazz\n@return" ]
private File[] getFilesFromProperty(final String name, final Properties props) { String sep = WildFlySecurityManager.getPropertyPrivileged("path.separator", null); String value = props.getProperty(name, null); if (value != null) { final String[] paths = value.split(Pattern.quote(sep)); final int len = paths.length; final File[] files = new File[len]; for (int i = 0; i < len; i++) { files[i] = new File(paths[i]); } return files; } return NO_FILES; }
[ "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." ]
[ "Specify the output format of the image.\n\n@see ImageFormat", "Add a \"post-run\" dependent task item for this task item.\n\n@param dependent the \"post-run\" dependent task item.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group", "Notifies all registered BufferChangeLogger instances of a change.\n\n@param newData the buffer that contains the new data being added\n@param numChars the number of valid characters in the buffer", "Add another store destination to an existing streaming session\n\n\n@param store the name of the store to stream to", "set custom response 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", "Build the crosstab. Throws LayoutException if anything is wrong\n@return", "Returns a configured transformer to write XML.\n\n@return the XML configured transformer\n@throws SpinXmlElementException if no new transformer can be created", "This method takes an array of data and uses this to populate the\nfield map.\n\n@param defaultData field map default data", "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" ]
public static authenticationradiuspolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationradiuspolicy_vpnvserver_binding obj = new authenticationradiuspolicy_vpnvserver_binding(); obj.set_name(name); authenticationradiuspolicy_vpnvserver_binding response[] = (authenticationradiuspolicy_vpnvserver_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch authenticationradiuspolicy_vpnvserver_binding resources of given name ." ]
[ "Convert an Image into a TYPE_INT_ARGB BufferedImage. If the image is already of this type, the original image is returned unchanged.\n@param image the image to convert\n@return the converted image", "Merge another AbstractTransition's states into this object, such that the other AbstractTransition\ncan be discarded.\n\n@param another\n@return true if the merge is successful.", "Retrieve the result produced by a task with the given id in the group.\n\nThis method can be used to retrieve the result of invocation of both dependency\nand \"post-run\" dependent tasks. If task with the given id does not exists then\nIllegalArgumentException exception will be thrown.\n\n@param taskId the task item id\n@return the task result, null will be returned if task has not yet been invoked", "Apply content type to response with result provided.\n\nIf `result` is an error then it might not apply content type as requested:\n* If request is not ajax request, then use `text/html`\n* If request is ajax request then apply requested content type only when `json` or `xml` is requested\n* otherwise use `text/html`\n\n@param result\nthe result used to check if it is error result\n@return this `ActionContext`.", "Make sure the result index points to the next available key in the scan result, if exists.", "A modified version of abs that always returns a non-negative value.\nMath.abs returns Integer.MIN_VALUE if a == Integer.MIN_VALUE and this\nmethod returns Integer.MAX_VALUE in that case.", "Adds each of the specified followers to the task, if they are not already\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to add followers to.\n@return Request object", "Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available", "Returns the value stored for the given key at the point of call.\n@param key a non null key\n@return the value stored in the map for the given key" ]
private HiveShellContainer createHiveServerContainer(final List<? extends Script> scripts, final Object testCase, TemporaryFolder baseDir) throws IOException { HiveServerContext context = new StandaloneHiveServerContext(baseDir, config); final HiveServerContainer hiveTestHarness = new HiveServerContainer(context); HiveShellBuilder hiveShellBuilder = new HiveShellBuilder(); hiveShellBuilder.setCommandShellEmulation(config.getCommandShellEmulator()); HiveShellField shellSetter = loadScriptUnderTest(testCase, hiveShellBuilder); if (scripts != null) { hiveShellBuilder.overrideScriptsUnderTest(scripts); } hiveShellBuilder.setHiveServerContainer(hiveTestHarness); loadAnnotatedResources(testCase, hiveShellBuilder); loadAnnotatedProperties(testCase, hiveShellBuilder); loadAnnotatedSetupScripts(testCase, hiveShellBuilder); // Build shell final HiveShellContainer shell = hiveShellBuilder.buildShell(); // Set shell shellSetter.setShell(shell); if (shellSetter.isAutoStart()) { shell.start(); } return shell; }
[ "Traverses the test case annotations. Will inject a HiveShell in the test case that envelopes the HiveServer." ]
[ "Update artifact download url of an artifact\n\n@param gavc String\n@param downLoadUrl String", "package for testing purpose", "Populates a resource availability table.\n\n@param table resource availability table\n@param data file data", "Finds edges based to a specific object reference descriptor and\nadds them to the edge map.\n@param vertex the object envelope vertex holding the object reference\n@param rds the object reference descriptor", "Returns the yield value such that the sum of cash flows of the bond discounted with the yield curve\ncoincides with a given price.\n\n@param bondPrice The target price as double.\n@param model The model under which the product is valued.\n@return The optimal yield value.", "Convert MPX day index to Day instance.\n\n@param day day index\n@return Day instance", "Sets Idle max age.\n\nThe time, for a connection to remain unused before it is closed off. Do not use aggressive values here!\n@param idleMaxAge time after which a connection is closed off\n@param timeUnit idleMaxAge time granularity.", "Use this API to delete systementitydata.", "Return all option names that not already have a value\nand is enabled" ]
private CostRateTableEntry getCostRateTableEntry(Date date) { CostRateTableEntry result; CostRateTable table = getCostRateTable(); if (table == null) { Resource resource = getResource(); result = new CostRateTableEntry(resource.getStandardRate(), TimeUnit.HOURS, resource.getOvertimeRate(), TimeUnit.HOURS, resource.getCostPerUse(), null); } else { if (table.size() == 1) { result = table.get(0); } else { result = table.getEntryByDate(date); } } return result; }
[ "Retrieves the cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry" ]
[ "returns an Array with an Objects NON-PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values", "Add columns to be returned by the SELECT query. If no columns are selected then all columns are returned by\ndefault. For classes with id columns, the id column is added to the select list automagically. This can be called\nmultiple times to add more columns to select.\n\n<p>\n<b>WARNING:</b> If you specify any columns to return, then any foreign-collection fields will be returned as null\n<i>unless</i> their {@link ForeignCollectionField#columnName()} is also in the list.\n</p>", "Get the minutes difference", "Update artifact provider\n\n@param gavc String\n@param provider String", "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 }", "Determine which math transform to use when creating the coordinate of the label.\n\n@param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined.", "Create a standalone target.\n\n@param controllerClient the connected controller client to a standalone instance.\n@return the remote target", "The way calendars are stored in an MPP8 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", "judge if an point in the area or not\n\n@param point\n@param area\n@param offsetRatio\n@return" ]
public LatLong getDestinationPoint(double bearing, double distance) { double brng = Math.toRadians(bearing); double lat1 = latToRadians(); double lon1 = longToRadians(); double lat2 = Math.asin(Math.sin(lat1) * Math.cos(distance / EarthRadiusMeters) + Math.cos(lat1) * Math.sin(distance / EarthRadiusMeters) * Math.cos(brng)); double lon2 = lon1 + Math.atan2(Math.sin(brng) * Math.sin(distance / EarthRadiusMeters) * Math.cos(lat1), Math.cos(distance / EarthRadiusMeters) - Math.sin(lat1) * Math.sin(lat2)); return new LatLong(Math.toDegrees(lat2), Math.toDegrees(lon2)); }
[ "Calculates the LatLong position of the end point of a line the specified\ndistance from this LatLong, along the provided bearing, where North is 0,\nEast is 90 etc.\n\n@param bearing The bearing, in degrees, with North as 0, East as 90 etc.\n@param distance The distance in metres.\n@return A new LatLong indicating the end point." ]
[ "Returns a string that represents a valid Solr query range.\n\n@param from Lower bound of the query range.\n@param to Upper bound of the query range.\n@return String that represents a Solr query range.", "Encode a path in a manner suitable for a GET request\n@param in The path to encode, eg \"a/document\"\n@return The encoded path eg \"a%2Fdocument\"", "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", "Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by applying a key function to each element which yields a comparable criteria.\n\n@param iterable\nthe elements to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return a sorted list as a shallow copy of the given iterable.\n@see #sort(Iterable)\n@see #sort(Iterable, Comparator)\n@see ListExtensions#sortInplaceBy(List, org.eclipse.xtext.xbase.lib.Functions.Function1)", "this class loader interface can be used by other plugins to lookup\nresources from the bundles. A temporary class loader interface is set\nduring other configuration loading as well\n\n@return ClassLoaderInterface (BundleClassLoaderInterface)", "Adds another condition for an element within this annotation.", "Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate", "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.", "Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started." ]
public List<CmsFavoriteEntry> loadFavorites() throws CmsException { List<CmsFavoriteEntry> result = new ArrayList<>(); try { CmsUser user = readUser(); String data = (String)user.getAdditionalInfo(ADDINFO_KEY); if (CmsStringUtil.isEmptyOrWhitespaceOnly(data)) { return new ArrayList<>(); } JSONObject json = new JSONObject(data); JSONArray array = json.getJSONArray(BASE_KEY); for (int i = 0; i < array.length(); i++) { JSONObject fav = array.getJSONObject(i); try { CmsFavoriteEntry entry = new CmsFavoriteEntry(fav); if (validate(entry)) { result.add(entry); } } catch (Exception e) { LOG.warn(e.getLocalizedMessage(), e); } } } catch (JSONException e) { LOG.error(e.getLocalizedMessage(), e); } return result; }
[ "Loads the favorite list.\n\n@return the list of favorites\n\n@throws CmsException if something goes wrong" ]
[ "delete topic never used\n\n@param topic topic name\n@param password password\n@return number of partitions deleted\n@throws IOException if an I/O error", "Returns all scripts\n\n@param model\n@param type - optional to specify type of script to return\n@return\n@throws Exception", "Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.", "Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list", "Creates a simple deployment description.\n\n@param name the name for the deployment\n@param serverGroups the server groups\n\n@return the deployment description", "Utility method to retrieve the previous working date finish time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of previous work finish", "Use this API to fetch aaagroup_vpnsessionpolicy_binding resources of given name .", "Gets the current user.\n@param api the API connection of the current user.\n@return the current user.", "Use this API to add onlinkipv6prefix." ]
@SuppressWarnings("unchecked") @Nonnull public final java.util.Optional<Style> getStyle(final String styleName) { final String styleRef = this.styles.get(styleName); Optional<Style> style; if (styleRef != null) { style = (Optional<Style>) this.styleParser .loadStyle(getConfiguration(), this.httpRequestFactory, styleRef); } else { style = Optional.empty(); } return or(style, this.configuration.getStyle(styleName)); }
[ "Look for a style in the named styles provided in the configuration.\n\n@param styleName the name of the style to look for." ]
[ "Executes a API query action to get a new token.\nThe method only executes the action, without doing any\nchecks first. If errors occur, they are logged and null is returned.\n\n@param tokenType The kind of token to retrieve like \"csrf\" or \"login\"\n@return newly retrieved token or null if no token was retrieved", "Read a four byte integer from the data.\n\n@param offset current offset into data block\n@param data data block\n@return int value", "called when we are completed finished with using the TcpChannelHub", "if any item in toCheck is present in collection\n@param <T>\n@param collection\n@param toCheck\n@return", "JSObject will return the String \"undefined\" at certain times, so we\nneed to make sure we're not getting a value that looks valid, but isn't.\n\n@param val The value from Javascript to be checked.\n@return Either null or the value passed in.", "In-place scaling of a row in A\n\n@param alpha scale factor\n@param A matrix\n@param row which row in A", "Adds a submodule to the module.\n\n<P>\nINFO: If the module is promoted, all added submodule will be promoted.\n\n@param submodule Module", "Registers an event handler in the repository shared between Javascript\nand Java.\n\n@param h Event handler to be registered.\n@return Callback key that Javascript will use to find this handler.", "Creates a new DMatrixRMaj around the provided data. The data must encode\na row-major matrix. Any modification to the returned matrix will modify the\nprovided data.\n\n@param numRows Number of rows in the matrix.\n@param numCols Number of columns in the matrix.\n@param data Data that is being wrapped. Referenced Saved.\n@return A matrix which references the provided data internally." ]
public static appfwprofile_denyurl_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_denyurl_binding obj = new appfwprofile_denyurl_binding(); obj.set_name(name); appfwprofile_denyurl_binding response[] = (appfwprofile_denyurl_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch appfwprofile_denyurl_binding resources of given name ." ]
[ "Adds a constructor for the proxy for each constructor declared by the base\nbean type.\n\n@param proxyClassType the Javassist class for the proxy\n@param initialValueBytecode", "Returns list of files matches specified regex in specified directories\n\n@param regex to match file names\n@param directories to find\n@return list of files matches specified regex in specified directories", "Creates the adapter for the target database.", "Convert Collection to Set\n@param collection Collection\n@return Set", "Return the list of module dependencies\n\n@param moduleName\n@param moduleVersion\n@param fullRecursive\n@param corporate\n@param thirdParty\n@return List<Dependency>\n@throws GrapesCommunicationException", "Sets the top padding character for all cells in the row.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining", "Drops a driver from the DriverManager's list.", "Determine which field the Activity ID has been mapped to.\n\n@param map field map\n@return field", "End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance" ]
private void handleMultiInstanceReportResponse(SerialMessage serialMessage, int offset) { logger.trace("Process Multi-instance Report"); int commandClassCode = serialMessage.getMessagePayloadByte(offset); int instances = serialMessage.getMessagePayloadByte(offset + 1); if (instances == 0) { setInstances(1); } else { CommandClass commandClass = CommandClass.getCommandClass(commandClassCode); if (commandClass == null) { logger.error(String.format("Unsupported command class 0x%02x", commandClassCode)); return; } logger.debug(String.format("Node %d Requested Command Class = %s (0x%02x)", this.getNode().getNodeId(), commandClass.getLabel() , commandClassCode)); ZWaveCommandClass zwaveCommandClass = this.getNode().getCommandClass(commandClass); if (zwaveCommandClass == null) { logger.error(String.format("Unsupported command class %s (0x%02x)", commandClass.getLabel(), commandClassCode)); return; } zwaveCommandClass.setInstances(instances); logger.debug(String.format("Node %d Instances = %d, number of instances set.", this.getNode().getNodeId(), instances)); } for (ZWaveCommandClass zwaveCommandClass : this.getNode().getCommandClasses()) if (zwaveCommandClass.getInstances() == 0) // still waiting for an instance report of another command class. return; // advance node stage. this.getNode().advanceNodeStage(); }
[ "Handles Multi Instance Report message. Handles Report on\nthe number of instances for the command class.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing." ]
[ "Use this API to fetch authenticationtacacspolicy_authenticationvserver_binding resources of given name .", "get the type erasure signature", "This method only overrides properties that are specific from Cube like await strategy or before stop events.\n\n@param overrideDockerCompositions\nthat contains information to override.", "This method retrieves a byte array 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 byte array containing required data", "Find the user by their email address.\n\nThis method does not require authentication.\n\n@param email\nThe email address\n@return The User\n@throws FlickrException", "Send a metadata cache update announcement to all registered listeners.\n\n@param slot the media slot whose cache status has changed\n@param cache the cache which has been attached, or, if {@code null}, the previous cache has been detached", "Trade the request token for an access token, this is step three of authorization.\n@param oAuthRequestToken\nthis is the token returned by the {@link AuthInterface#getRequestToken} call.\n@param verifier", "Parses and adds dictionaries to the Solr index.\n\n@param cms the OpenCms object.\n\n@throws CmsRoleViolationException in case the user does not have the required role ROOT_ADMIN", "Edit the co-ordinates that the user shows in\n\n@param photoId\n@param userId\n@param bounds\n@throws FlickrException" ]
public GVRRenderData setDrawMode(int drawMode) { if (drawMode != GL_POINTS && drawMode != GL_LINES && drawMode != GL_LINE_STRIP && drawMode != GL_LINE_LOOP && drawMode != GL_TRIANGLES && drawMode != GL_TRIANGLE_STRIP && drawMode != GL_TRIANGLE_FAN) { throw new IllegalArgumentException( "drawMode must be one of GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_LINE_LOOP, GL_TRIANGLES, GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP."); } NativeRenderData.setDrawMode(getNative(), drawMode); return this; }
[ "Set the draw mode for this mesh. Default is GL_TRIANGLES.\n\n@param drawMode" ]
[ "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", "Make sure the result index points to the next available key in the scan result, if exists.", "Given the key, figures out which partition on the local node hosts the key.\n\n@param key\n@return", "A package of the specified class will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClass\n@return self", "Get the refresh frequency of this scene object.\n\n@return The refresh frequency of this TextViewSceneObject.", "Read a long int from an input stream.\n\n@param is input stream\n@return long value", "Merge the source skeleton with this one.\nThe result will be that this skeleton has all of its\noriginal bones and all the bones in the new skeleton.\n\n@param newSkel skeleton to merge with this one", "Use this API to fetch wisite_accessmethod_binding resources of given name .", "Convert a Throwable into a list containing all of its causes.\n@param t The throwable for which the causes are to be returned.\n@return A (possibly empty) list of {@link Throwable}s." ]
private static Set<String> excludedMethods(String... methodNames) { Set<String> set = new HashSet<String>(MpxjTreeNode.DEFAULT_EXCLUDED_METHODS); set.addAll(Arrays.asList(methodNames)); return set; }
[ "Generates a set of excluded method names.\n\n@param methodNames method names\n@return set of method names" ]
[ "Reads a color value represented by three bytes, for R, G, and B\ncomponents, plus a flag byte indicating if this is an automatic color.\nReturns null if the color type is \"Automatic\".\n\n@param data byte array of data\n@param offset offset into array\n@return new Color instance", "This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will not block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementation used to write the\nrequest and read the response\n@param operationName Simple string representing the type of request\n\n@return Data returned by the individual requests", "Performs backward pass of Batch Normalization layer. Returns x gradient,\nbnScale gradient and bnBias gradient", "Calculates the delta of a digital option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The delta of the digital option", "Use this API to update dbdbprofile.", "Utility method to read a percentage value.\n\n@param data data block\n@param offset offset into data block\n@return percentage value", "Logic for timestamp\n@param time Epoch date of creation\n@return String timestamp", "Convert this object to a json array.", "Mark unfinished test cases as interrupted for each unfinished test suite, then write\ntest suite result\n@see #createFakeTestcaseWithWarning(ru.yandex.qatools.allure.model.TestSuiteResult)\n@see #markTestcaseAsInterruptedIfNotFinishedYet(ru.yandex.qatools.allure.model.TestCaseResult)" ]
public static void checkStringNotNullOrEmpty(String parameterName, String value) { if (TextUtils.isEmpty(value)) { throw Exceptions.IllegalArgument("Current input string %s is %s.", parameterName, value == null ? "null" : "empty"); } }
[ "Check that the parameter string is not null or empty\n\n@param value\nString value to be checked.\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@throws IllegalArgumentException\nIf the key is null or empty." ]
[ "Returns an iterator that will only offer leaf trace regions. If the nested regions have gaps, these will be\nfilled with parent data. If this region is a leaf, a singleton iterator will be returned.\n\n@return an unmodifiable iterator for all leafs. Never <code>null</code>.", "Throws an IllegalArgumentException when the given value is null.\n@param value the value to assert if not null\n@param name the name of the argument\n@param <T> The generic type of the value to assert if not null\n@return the value", "look for zero after country code, and remove if present", "Add the option specifying if the categories should be displayed collapsed\nwhen the dialog opens.\n\n@see org.opencms.ui.actions.I_CmsADEAction#getParams()", "Use this API to fetch vpnvserver_cachepolicy_binding resources of given name .", "Use this API to add onlinkipv6prefix.", "Queries the running container and attempts to lookup the information from the running container.\n\n@param client the client used to execute the management operation\n\n@return the container description\n\n@throws IOException if an error occurs while executing the management operation\n@throws OperationExecutionException if the operation used to query the container fails", "read CustomInfo list from table.\n\n@param eventId the event id\n@return the map", "Use this API to fetch sslvserver_sslcertkey_binding resources of given name ." ]
public static String padLeft(String str, int totalChars, char ch) { if (str == null) { str = "null"; } StringBuilder sb = new StringBuilder(); for (int i = 0, num = totalChars - str.length(); i < num; i++) { sb.append(ch); } sb.append(str); return sb.toString(); }
[ "Pads the given String to the left with the given character to ensure that\nit's at least totalChars long." ]
[ "This method is used to recreate the hierarchical structure of the\nproject file from scratch. The method sorts the list of all tasks,\nthen iterates through it creating the parent-child structure defined\nby the outline level field.", "Search down all extent classes and return max of all found\nPK values.", "Prepares all files added for tus uploads.\n\n@param assemblyUrl the assembly url affiliated with the tus upload.\n@throws IOException when there's a failure with file retrieval.\n@throws ProtocolException when there's a failure with tus upload.", "Print a date time value.\n\n@param value date time value\n@return string representation", "Returns a human-readable string representation of a reference to a\nprecision that is used for a time value.\n\n@param precision\nthe numeric precision\n@return a string representation of the precision", "Internal method used to retrieve a byte array from one\nor more embedded data blocks. Consecutive data blocks may\nneed to be concatenated by this method in order to retrieve\nthe complete set of data.\n\n@param blocks list of data blocks\n@param length expected length of the data\n@return byte array", "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.", "Start the actual migration. Take the version of the database, get all required migrations and execute them or do\nnothing if the DB is already up to date.\n\nAt the end the underlying database instance is closed.\n\n@throws MigrationException if a migration fails", "Set a new Cursor position if active and enabled.\n\n@param x x value of the position\n@param y y value of the position\n@param z z value of the position" ]
protected String sourceLine(ASTNode node) { return sourceCode.getLines().get(AstUtil.findFirstNonAnnotationLine(node, sourceCode) - 1); }
[ "Return the raw source line corresponding to the specified AST node\n\n@param node - the Groovy AST node" ]
[ "Returns an entry with the given proposal and prefix, or null if the proposal is not valid.\nIf it is valid, the initializer function is applied to it.", "Write an integer field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Removes all currently assigned labels for this Datum then adds all\nof the given Labels.", "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", "Finds an entity given its primary key.\n\n@throws RowNotFoundException\nIf no such object was found.\n@throws TooManyRowsException\nIf more that one object was returned for the given ID.", "Sets the set of property filters based on the given string.\n\n@param filters\ncomma-separates list of property ids, or \"-\" to filter all\nstatements", "Returns an unmodifiable view of the specified multi-value map.\n\n@param map the map for which an unmodifiable view is to be returned.\n@return an unmodifiable view of the specified multi-value map.", "Adds a rule row to the table with a given style.\n@param style the rule style, must not be null nor {@link TableRowStyle#UNKNOWN}\n@throws {@link NullPointerException} if style was null\n@throws {@link IllegalArgumentException} if style was {@link TableRowStyle#UNKNOWN}", "Use this API to update onlinkipv6prefix." ]
@Override public double get( int row , int col ) { if( col < 0 || col >= numCols || row < 0 || row >= numRows ) { throw new IllegalArgumentException("Specified element is out of bounds: "+row+" "+col); } return data[ row * numCols + col ]; }
[ "Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@return The value of the element." ]
[ "Write each predecessor for a task.\n\n@param record Task instance", "Main render algorithm based on render the video thumbnail, render the title, render the marker\nand the label.", "Determine which math transform to use when creating the coordinate of the label.\n\n@param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined.", "Use this API to fetch all the gslbldnsentries resources that are configured on netscaler.", "Remove specified override id from enabled overrides for path\n\n@param overrideId ID of override to remove\n@param pathId ID of path containing override\n@param ordinal index to the instance of the enabled override\n@param clientUUID UUID of client", "Returns the single abstract method of a class node, if it is a SAM type, or null otherwise.\n@param type a type for which to search for a single abstract method\n@return the method node if type is a SAM type, null otherwise", "Retrieve list of task extended attributes.\n\n@return list of extended attributes", "Gets a color formatted as an integer with ARGB ordering.\n\n@param json {@link JSONObject} to get the color from\n@param elementName Name of the color element\n@return An ARGB formatted integer\n@throws JSONException", "Checks if the query should be executed using the debug mode where the security restrictions do not apply.\n@param cms the current context.\n@param query the query to execute.\n@return a flag, indicating, if the query should be performed in debug mode." ]
public IExternalAccess getAgentsExternalAccess(String agent_name) { return cmsService.getExternalAccess(getAgentID(agent_name)).get( new ThreadSuspendable()); }
[ "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" ]
[ "Clears the internal used cache for object materialization.", "Returns the dot product of this vector and v1.\n\n@param v1\nright-hand vector\n@return dot product", "Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction", "Initializes the persistence strategy to be used when accessing the datastore. In particular, all the required\ncaches will be configured and initialized.\n\n@param cacheMappingType the {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType} to be used\n@param entityTypes meta-data of all the entity types registered with the current session factory\n@param associationTypes meta-data of all the association types registered with the current session factory\n@param idSourceTypes meta-data of all the id source types registered with the current session factory\n@param namespaces from the database currently in use", "Assign a new value to this field.\n@param numStrings - number of strings\n@param newValues - the new strings", "Resolves an idl jar for the artifact.\n@return Returns idl artifact\n@throws MojoExecutionException is idl jar is not present for the artifact.", "Get the present keys of all entries with a given type, checking hereby if assignable.\n\n@param type The attribute type, not null.\n@return all present keys of attributes being assignable to the type, never null.", "Use this API to update route6 resources.", "Converts this address to a prefix length\n\n@return the prefix of the indicated IP type represented by this address or null if this address is valid but cannot be represented by a network prefix length\n@throws AddressStringException if the address is invalid" ]
@Override public final boolean has(final String key) { String result = this.obj.optString(key, null); return result != null; }
[ "Check if the object has a property with the key.\n\n@param key key to check for." ]
[ "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.", "Add the given headers to the given HTTP request.\n@param httpRequest the request to add the headers to\n@param headers the headers to add", "Clear history for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client", "Use this API to count sslvserver_sslciphersuite_binding resources configued on NetScaler.", "Support the range subscript operator for GString\n\n@param text a GString\n@param range a Range\n@return the String of characters corresponding to the provided range\n@since 2.3.7", "Retrieves the class object for the class with the given name.\n\n@param name The class name\n@return The class object\n@throws ClassNotFoundException If the class is not on the classpath (the exception message contains the class name)", "Reads a single record from the table.\n\n@param buffer record data\n@param table parent table", "Convert custom info.\n\n@param customInfo the custom info map\n@return the custom info type", "Write a duration field to the JSON file.\n\n@param fieldName field name\n@param value field value" ]
public JavadocLink javadocMethodLink(String memberName, Type... types) { return new JavadocLink("%s#%s(%s)", getQualifiedName(), memberName, (Excerpt) code -> { String separator = ""; for (Type type : types) { code.add("%s%s", separator, type.getQualifiedName()); separator = ", "; } }); }
[ "Returns a source excerpt of a JavaDoc link to a method on this type." ]
[ "Adds a new floating point variable. If one already has the same name it is written over.\n@param value Value of the number\n@param name Name in code", "Specifies the angle of the effect.\n\n@param angle the angle of the effect.\n@angle", "Set a colspan in a group of columns. First add the cols to the report\n\n@param colNumber the index of the col\n@param colQuantity the number of cols how i will take\n@param colspanTitle colspan title\n@return a Dynamic Report Builder\n@throws ColumnBuilderException When the index of the cols is out of\nbounds.", "if any item in toCheck is present in collection\n@param <T>\n@param collection\n@param toCheck\n@return", "Use this API to update tmtrafficaction resources.", "Returns the current download state for a download request.\n\n@param downloadId\n@return", "Parses the result and returns the failure description.\n\n@param result the result of executing an operation\n\n@return the failure description if defined, otherwise a new undefined model node\n\n@throws IllegalArgumentException if the outcome of the operation was successful", "Convert weekly recurrence days into a bit field.\n\n@param task recurring task\n@return bit field as a string", "Performs a HTTP GET request.\n\n@return Class type of object T (i.e. {@link Response}" ]
public static void createEphemeralPath(ZkClient zkClient, String path, String data) { try { zkClient.createEphemeral(path, Utils.getBytes(data)); } catch (ZkNoNodeException e) { createParentPath(zkClient, path); zkClient.createEphemeral(path, Utils.getBytes(data)); } }
[ "Create an ephemeral node with the given path and data. Create parents if necessary.\n@param zkClient client of zookeeper\n@param path node path of zookeeper\n@param data node data" ]
[ "Updates the terms and statements of the item document identified by the\ngiven item id. The updates are computed with respect to the current data\nfound online, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in a given language are kept distinct.\n\n@param itemIdValue\nid of the document to be updated\n@param addLabels\nlabels to be set on the item. They will overwrite existing values\nin the same language.\n@param addDescriptions\ndescription to be set on the item. They will overwrite existing values\nin the same language.\n@param addAliases\naliases to be added. Existing aliases will be kept.\n@param deleteAliases\naliases to be deleted.\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection", "low-level Graph API operations", "Extracts a numeric id from a string, which can be either a Wikidata\nentity URI or a short entity or property id.\n\n@param idString\n@param isUri\n@return numeric id, or 0 if there was an error", "Inserts a column name, value pair into the SQL.\n\n@param column\nName of the table column.\n@param value\nValue to substitute in. InsertBuilder does *no* interpretation\nof this. If you want a string constant inserted, you must\nprovide the single quotes and escape the internal quotes. It\nis more common to use a question mark or a token in the style\nof {@link ParameterizedPreparedStatementCreator}, e.g. \":foo\".", "Upgrade the lock on the given object to the given lock mode. The call has\nno effect if the object's current lock is already at or above that level of\nlock mode.\n\n@param obj object to acquire a lock on.\n@param lockMode lock mode to acquire. The lock modes\nare <code>READ</code> , <code>UPGRADE</code> , and <code>WRITE</code> .\n\n@exception LockNotGrantedException Description of Exception", "Creates a new block box from the given element with the given parent. No style is assigned to the resulting box.\n@param parent The parent box in the tree of boxes.\n@param n The element that this box belongs to.\n@param replaced When set to <code>true</code>, a replaced block box will be created. Otherwise, a normal non-replaced block will be created.\n@return The new block box.", "Write the text to the Path, using the specified encoding.\n\n@param self a Path\n@param text the text to write to the Path\n@param charset the charset used\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0", "2-D Integer array to double array.\n\n@param array Integer array.\n@return Double array.", "Serialize a map of objects to a JSON String.\n\n@param map The map of objects to serialize.\n@param jsonObjectClass The @JsonObject class of the list elements" ]
public void logAttributeWarning(PathAddress address, Set<String> attributes) { logAttributeWarning(address, null, null, attributes); }
[ "Log a warning for the resource at the provided address and the given attributes. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attributes attributes we are warning about" ]
[ "Read the optional row header and UUID.\n\n@param stream input stream\n@param map row map", "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.", "Finds for the given project.\n\n@param name project name\n@return given project or an empty {@code Optional} if project does not exist\n@throws IllegalArgumentException", "Return a set of all the Declaration matching the DeclarationFilter of the.\nLinker.\n\n@return a set of all the Declaration matching the DeclarationFilter of the\nLinker.", "Instantiate Service Locator client. After successful instantiation\nestablish a connection to the Service Locator server. This method will be\ncalled if property locatorClient is null. For this purpose was defined\nadditional properties to instantiate ServiceLocatorImpl.\n\n@throws InterruptedException\n@throws ServiceLocatorException", "Reads an argument of type \"nstring\" from the request.", "IS NULL predicate\n@param value the value for which to check\n@return a {@link LuaCondition} instance", "Generates new individual particle radius based on min and max radius setting.\n\n@return new particle radius", "Use this API to create ssldhparam." ]
public BoxCollaborationWhitelistExemptTarget.Info getInfo() { URL url = COLLABORATION_WHITELIST_EXEMPT_TARGET_ENTRY_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID()); BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, HttpMethod.GET); BoxJSONResponse response = (BoxJSONResponse) request.send(); return new Info(JsonObject.readFrom(response.getJSON())); }
[ "Retrieves information for a collaboration whitelist for a given whitelist ID.\n\n@return information about this {@link BoxCollaborationWhitelistExemptTarget}." ]
[ "Constraint that ensures that the field has a column property. If none is specified, then\nthe name of the field is used.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)", "Creates a new subtask and adds it to the parent task. Returns the full record\nfor the newly created subtask.\n\n@param task The task to add a subtask to.\n@return Request object", "Utility function to zip the content of an entire folder, but not the folder itself.\n@param folder\n@param fileName optional\n@return success or not", "Stops the processing and prints the final time.", "Return true if the two connections seem to one one connection under the covers.", "Use this API to clear Interface.", "Set the payload to the fileModel of the given instance even though the variable is not directly of it's type. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing it.", "Get the property name of a method name. For example the property name of\nsetSomeValue would be someValue. Names not beginning with set or get are\nnot changed.\n\n@param name The name to process\n@return The property name", "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>." ]
public static String changeFirstLetterToCapital(String word) { char[] letras = word.toCharArray(); char a = letras[0]; letras[0] = Character.toUpperCase(a); return new String(letras); }
[ "Method used to write the name of the scenarios\n\n@param word\n@return the same word starting with capital letter" ]
[ "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", "Write flow id to message.\n\n@param message the message\n@param flowId the flow id", "Converts from partitionId to nodeId. The list of partition IDs,\npartitionIds, is expected to be a \"replicating partition list\", i.e., the\nmapping from partition ID to node ID should be one to one.\n\n@param partitionIds List of partition IDs for which to find the Node ID\nfor the Node that owns the partition.\n@return List of node ids, one for each partition ID in partitionIds\n@throws VoldemortException If multiple partition IDs in partitionIds map\nto the same Node ID.", "Logic for timestamp\n@param time Epoch date of creation\n@return String timestamp", "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.", "Calculate the value of a caplet assuming the Black'76 model.\n\n@param forward The forward (spot).\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity\n@param optionStrike The option strike.\n@param periodLength The period length of the underlying forward rate.\n@param discountFactor The discount factor corresponding to the payment date (option maturity + period length).\n@return Returns the value of a caplet under the Black'76 model", "Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach.", "add converter at given index. The index can be changed during conversion\nif canReorder is true\n\n@param index\n@param converter", "touch event without ripple support" ]
public Jar setMapAttribute(String name, Map<String, ?> values) { return setAttribute(name, join(values)); }
[ "Sets an attribute in the main section of the manifest to a map.\nThe map entries will be joined with a single whitespace character, and each key-value pair will be joined with a '='.\n\n@param name the attribute's name\n@param values the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods." ]
[ "Add precedence -10 because we need that ContainerRegistry is available in the Arquillian scope.", "Returns the foreignkey to the specified table.\n\n@param name The name of the foreignkey\n@param tableName The name of the referenced table\n@return The foreignkey def or <code>null</code> if it does not exist", "Get the type created by selecting only a subset of properties from this\ntype. The type must be a map for this to work\n\n@param properties The properties to select\n@return The new type definition", "Use this API to fetch aaauser_intranetip_binding resources of given name .", "Use this API to fetch appfwhtmlerrorpage resource of given name .", "Adds the specified class to the internal class graph along with its\nrelations and dependencies, eventually inferring them, according to the\nOptions specified for this matcher\n@param cd", "Disply available use cases.", "Operations to do after all subthreads finished their work on index\n\n@param backend", "Parses the resource String id and get back the int res id\n@param context\n@param id String resource id\n@return int resource id" ]
private void writeInterfaceCriteria(final XMLExtendedStreamWriter writer, final ModelNode subModel, final boolean nested) throws XMLStreamException { for (final Property property : subModel.asPropertyList()) { if (property.getValue().isDefined()) { writeInterfaceCriteria(writer, property, nested); } } }
[ "Write the criteria elements, extracting the information of the sub-model.\n\n@param writer the xml stream writer\n@param subModel the interface model\n@param nested whether it the criteria elements are nested as part of <not /> or <any />\n@throws XMLStreamException" ]
[ "Retrieve the default mapping between MPXJ task fields and Primavera wbs field names.\n\n@return mapping", "Creates a metadata cache archive file of all tracks in the specified slot on the specified player. Any\nprevious contents of the specified file will be replaced.\n\n@param slot the slot in which the media to be cached can be found\n@param playlistId the id of playlist to be cached, or 0 of all tracks should be cached\n@param cache the file into which the metadata cache should be written\n\n@throws Exception if there is a problem communicating with the player or writing the cache file.", "Use this API to fetch statistics of nspbr6_stats resource of given name .", "Creates the string mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param position\nthe position\n@throws IOException\nSignals that an I/O exception has occurred.", "Decrements the client's use count, and makes it eligible for closing if it is no longer in use.\n\n@param client the dbserver connection client which is no longer being used for a task", "Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque", "Puts strings inside quotes and numerics are left as they are.\n@param str\n@return", "High-accuracy Complementary normal distribution function.\n\n@param x Value.\n@return Result.", "Gets the default configuration for Freemarker within Windup." ]
public EndpointOverride getPath(int pathId, String clientUUID, String[] filters) throws Exception { EndpointOverride endpoint = null; PreparedStatement statement = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { String queryString = this.getPathSelectString(); queryString += " AND " + Constants.DB_TABLE_PATH + "." + Constants.GENERIC_ID + "=" + pathId + ";"; statement = sqlConnection.prepareStatement(queryString); statement.setString(1, clientUUID); results = statement.executeQuery(); if (results.next()) { endpoint = this.getEndpointOverrideFromResultSet(results); endpoint.setFilters(filters); } } catch (Exception e) { e.printStackTrace(); } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (statement != null) { statement.close(); } } catch (Exception e) { } } return endpoint; }
[ "Returns information for a specific path id\n\n@param pathId ID of path\n@param clientUUID client UUID\n@param filters filters to set on endpoint\n@return EndpointOverride\n@throws Exception exception" ]
[ "updates the groupname in the table given the id\n\n@param newGroupName new group name\n@param id ID of group", "Rename an existing app.\n@param appName Existing app name. See {@link #listApps()} for names that can be used.\n@param newName New name to give the existing app.\n@return the new name of the object", "MOVED INSIDE ExpressionUtils\n\nprotected JRDesignExpression getExpressionForConditionalStyle(ConditionalStyle condition, String columExpression) {\nString fieldsMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentFields()\";\nString parametersMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentParams()\";\nString variablesMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentVariables()\";\n\nString evalMethodParams = fieldsMap +\", \" + variablesMap + \", \" + parametersMap + \", \" + columExpression;\n\nString text = \"((\"+ConditionStyleExpression.class.getName()+\")$P{\" + JRParameter.REPORT_PARAMETERS_MAP + \"}.get(\\\"\"+condition.getName()+\"\\\")).\"+CustomExpression.EVAL_METHOD_NAME+\"(\"+evalMethodParams+\")\";\nJRDesignExpression expression = new JRDesignExpression();\nexpression.setValueClass(Boolean.class);\nexpression.setText(text);\nreturn expression;\n}", "Call the constructor for the given class, inferring the correct types for\nthe arguments. This could be confusing if there are multiple constructors\nwith the same number of arguments and the values themselves don't\ndisambiguate.\n\n@param klass The class to construct\n@param args The arguments\n@return The constructed value", "Log a trace message.", "Unlock all files opened for writing.", "Create an MD5 hash of a string.\n\n@param input Input string.\n@return Hash of input.\n@throws IllegalArgumentException if {@code input} is blank.", "Use this API to fetch tmsessionpolicy_binding resource of given name .", "Unregister the mbean with the given name from the platform mbean server\n\n@param name The name of the mbean to unregister" ]
public void forAllClassDefinitions(String template, Properties attributes) throws XDocletException { for (Iterator it = _model.getClasses(); it.hasNext(); ) { _curClassDef = (ClassDescriptorDef)it.next(); generate(template); } _curClassDef = null; LogHelper.debug(true, OjbTagsHandler.class, "forAllClassDefinitions", "Processed "+_model.getNumClasses()+" types"); }
[ "Processes the template for all class definitions.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"" ]
[ "Write a string attribute.\n\n@param name attribute name\n@param value attribute value", "Extract assignment hyperlink data.\n\n@param assignment assignment instance\n@param data hyperlink data", "Maps the text representation of column data to Java types.\n\n@param table table name\n@param column column name\n@param data text representation of column data\n@param type column data type\n@param epochDateFormat true if date is represented as an offset from an epoch\n@return Java representation of column data\n@throws MPXJException", "Return a new File object based on the baseDir and the segments.\n\nThis method does not perform any operation on the file system.", "Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader.", "submit the adminClient after usage is completed.\nBehavior is undefined, if checkin is called with objects not retrieved\nfrom checkout.\n\n@param client AdminClient retrieved from checkout", "Find the path to use .\nUses java annotations first and if not found, uses kubernetes annotations on the service object.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved path of '/' as a fallback.", "Check that an array only contains null elements.\n@param values, can't be null\n@return", "This implementation will probably be slower than the metadata\nobject copy, but this was easier to implement.\n@see org.apache.ojb.otm.copy.ObjectCopyStrategy#copy(Object)" ]
public static vrid6[] get(nitro_service service) throws Exception{ vrid6 obj = new vrid6(); vrid6[] response = (vrid6[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the vrid6 resources that are configured on netscaler." ]
[ "Determine whether the calling thread is the GL thread.\n\n@return {@code True} if called from the GL thread, {@code false} if\ncalled from another thread.", "Given OGC PropertyIsLike Filter information, construct an SQL-compatible 'like' pattern.\n\nSQL % --> match any number of characters _ --> match a single character\n\nNOTE; the SQL command is 'string LIKE pattern [ESCAPE escape-character]' We could re-define the escape character,\nbut I'm not doing to do that in this code since some databases will not handle this case.\n\nMethod: 1.\n\nExamples: ( escape ='!', multi='*', single='.' ) broadway* -> 'broadway%' broad_ay -> 'broad_ay' broadway ->\n'broadway'\n\nbroadway!* -> 'broadway*' (* has no significance and is escaped) can't -> 'can''t' ( ' escaped for SQL\ncompliance)\n\n\nNOTE: we also handle \"'\" characters as special because they are end-of-string characters. SQL will convert ' to\n'' (double single quote).\n\nNOTE: we don't handle \"'\" as a 'special' character because it would be too confusing to have a special char as\nanother special char. Using this will throw an error (IllegalArgumentException).\n\n@param escape escape character\n@param multi ?????\n@param single ?????\n@param pattern pattern to match\n@return SQL like sub-expression\n@throws IllegalArgumentException oops", "Examins the structure of A for QR decomposition\n@param A matrix which is to be decomposed\n@return true if the solution is valid or false if the decomposition can't be performed (i.e. requires column pivots)", "Returns the type of the current member which is the type in the case of a field, the return type for a getter\nmethod, or the type of the parameter for a setter method.\n\n@return The member type\n@exception XDocletException if an error occurs", "Removes obsolete elements from names and shared elements.\n\n@param names Shared element names.\n@param sharedElements Shared elements.\n@param elementsToRemove The elements that should be removed.", "Get all parameter keys.\n@return a set of parameter keys", "Add a row to the table if it does not already exist\n\n@param cells String...", "Adds a symbol to the end of the token list\n@param symbol Symbol which is to be added\n@return The new Token created around symbol", "Returns the class hierarchy of the given type, from bottom to top, starting with the given class itself.\nInterfaces are not included.\n\n@param clazz the class of interest\n@return the class hierarchy of the given class" ]
Renderer copy() { Renderer copy = null; try { copy = (Renderer) this.clone(); } catch (CloneNotSupportedException e) { Log.e("Renderer", "All your renderers should be clonables."); } return copy; }
[ "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." ]
[ "If credentials are incorrect or not provided for Basic Auth, then Android\nmay throw this exception when an HTTP 401 is received. A separate exception\nis thrown for proxy authentication errors. Checking for this response and\nreturning the proper status.\n@param ex the exception raised from Android\n@return HTTP Status Code", "Creates a spin wrapper for a data input of a given data format.\n\n@param input the input to wrap\n@param format the data format of the input\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')", "Utility function to find the first index of a value in a\nListBox.", "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", "Computes the d and H parameters.\n\nd = J'*(f(x)-y) <--- that's also the gradient\nH = J'*J", "Returns true if the input is a vector\n@param a A matrix or vector\n@return true if it's a vector. Column or row.", "Find the next match of the pattern on the tree\n\n@return whether there is a match somewhere in the tree", "First looks for zeros and then performs the implicit single step in the QR Algorithm.", "Request a scoped transactional token.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@return a BoxAPIConnection which can be used to perform transactional requests." ]
public Iterable<BoxFileVersionLegalHold.Info> getFileVersionHolds(int limit, String ... fields) { QueryStringBuilder queryString = new QueryStringBuilder().appendParam("policy_id", this.getID()); if (fields.length > 0) { queryString.appendParam("fields", fields); } URL url = LIST_OF_FILE_VERSION_HOLDS_URL_TEMPLATE.buildWithQuery(getAPI().getBaseURL(), queryString.toString()); return new BoxResourceIterable<BoxFileVersionLegalHold.Info>(getAPI(), url, limit) { @Override protected BoxFileVersionLegalHold.Info factory(JsonObject jsonObject) { BoxFileVersionLegalHold assignment = new BoxFileVersionLegalHold(getAPI(), jsonObject.get("id").asString()); return assignment.new Info(jsonObject); } }; }
[ "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." ]
[ "low-level Graph API operations", "Append a Handler to every parent of the given class\n@param parent The class of the parents to add the child to\n@param child The Handler to add.", "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", "See if a simple sequence can be used to extract the array. A simple extent is a continuous block from\na min to max index\n\n@return true if it is a simple range or false if not", "Initialize an instance of Widget Lib. It has to be done before any usage of library.\nThe application needs to hold onto the returned WidgetLib reference for as long as the\nlibrary is going to be used.\n@param gvrContext A valid {@link GVRContext} instance\n@param customPropertiesAsset An optional asset JSON file containing custom and overridden\nproperties for the application\n@return Instance of Widget library\n@throws InterruptedException\n@throws JSONException\n@throws NoSuchMethodException", "LRN cross-channel backward computation. Double parameters cast to tensor data type", "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", "Provides the results of a QR decomposition. These will be modified by adding or removing\nrows from the original 'A' matrix.\n\n@param Q The Q matrix which is to be modified. Is modified later and reference saved.\n@param R The R matrix which is to be modified. Is modified later and reference saved.", "Returns the URL of the class file where the given class has been loaded from.\n\n@throws IllegalArgumentException\nif failed to determine.\n@since 2.24" ]
public static String pennPOSToWordnetPOS(String s) { if (s.matches("NN|NNP|NNS|NNPS")) { return "noun"; } if (s.matches("VB|VBD|VBG|VBN|VBZ|VBP|MD")) { return "verb"; } if (s.matches("JJ|JJR|JJS|CD")) { return "adjective"; } if (s.matches("RB|RBR|RBS|RP|WRB")) { return "adverb"; } return null; }
[ "Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag." ]
[ "Calculates Tangent value of the complex number.\n\n@param z1 A ComplexNumber instance.\n@return Returns new ComplexNumber instance containing the Tangent value of the specified complex number.", "Tries to load a site specific error page. If\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param errorCode the error code to display\n@return a flag, indicating if the custom error page could be loaded.", "Waits until all pending operations are complete and closes this repository.\n\n@param failureCauseSupplier the {@link Supplier} that creates a new {@link CentralDogmaException}\nwhich will be used to fail the operations issued after this method is called", "Performs the BFS and gives the results to a distributor to distribute\n\n@param distributor the distributor", "Deletes the disabled marker file in the directory of the specified version.\n\n@param version to enable\n@throws PersistenceFailureException if the marker file could not be deleted (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).", "Modify the tranform's current rotation in quaternion terms, around a\npivot other than the origin.\n\n@param w\n'W' component of the quaternion.\n@param x\n'X' component of the quaternion.\n@param y\n'Y' component of the quaternion.\n@param z\n'Z' component of the quaternion.\n@param pivotX\n'X' component of the pivot's location.\n@param pivotY\n'Y' component of the pivot's location.\n@param pivotZ\n'Z' component of the pivot's location.", "The Maven3Builder class is looking for the PATH+JDK environment variable due to legacy code.\nIn The pipeline flow we need to convert the JAVA_HOME to PATH+JDK in order to reuse the code.", "Creates a new block box from the given element with the given parent. No style is assigned to the resulting box.\n@param parent The parent box in the tree of boxes.\n@param n The element that this box belongs to.\n@param replaced When set to <code>true</code>, a replaced block box will be created. Otherwise, a normal non-replaced block will be created.\n@return The new block box.", "creates option map for remoting connections\n@param resolver\n@param model\n@param defaults\n@return\n@throws OperationFailedException\n@deprecated configuring xnio worker options is no longer supported and should be replaced for referencing IO subsystem" ]
public static policydataset[] get(nitro_service service) throws Exception{ policydataset obj = new policydataset(); policydataset[] response = (policydataset[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the policydataset resources that are configured on netscaler." ]
[ "Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code\nbottom} or {@code right} are less than one or less than {@code top} or {@code left},\nrespectively.", "Given a field node, checks if we are calling a private field from an inner class.", "returns a sorted array of nested classes and interfaces", "Returns the default output for functions without configured JSPs.\n\n@param request the current request\n@return the default HTML output", "Write the document object to a file.\n\n@param document the document object.\n@param filePathname the path name of the file to be written to.\n@param method the output method: for instance html, xml, text\n@param indent amount of indentation. -1 to use the default.\n@throws TransformerException if an exception occurs.\n@throws IOException if an IO exception occurs.", "A safe wrapper to destroy the given resource request.", "Gets the type to use for the Vaadin table column corresponding to the c-th column in this result.\n\n@param c the column index\n@return the class to use for the c-th Vaadin table column", "Retrieve the routing type value from the REST request.\n\"X_VOLD_ROUTING_TYPE_CODE\" is the routing type header.\n\nBy default, the routing code is set to NORMAL\n\nTODO REST-Server 1. Change the header name to a better name. 2. Assumes\nthat integer is passed in the header", "Do synchronization of the given J2EE ODMG Transaction" ]
public void addColumn(String columnName, boolean searchable, boolean orderable, String searchValue) { this.columns.add(new Column(columnName, "", searchable, orderable, new Search(searchValue, false))); }
[ "Add a new column\n\n@param columnName the name of the column\n@param searchable whether the column is searchable or not\n@param orderable whether the column is orderable or not\n@param searchValue if any, the search value to apply" ]
[ "Boyer Moore scan that proceeds forwards from the end of the file looking for the first LOCSIG", "Move the SQL value to the next one for version processing.", "Checks if the date is a holiday\n\n@param dateString the date\n@return true if it is a holiday, false otherwise", "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", "Adds the correct load instruction based on the type descriptor\n\n@param code the bytecode to add the instruction to\n@param type the type of the variable\n@param variable the variable number", "Add the operation to add the local host definition.", "Initializes context size.\n\n@param rectangle rectangle", "Get a list of referrers from a given domain to a collection.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionReferrers.html\"", "Adds the position range.\n\n@param start the start\n@param end the end" ]
private void destroySession() { currentSessionId = 0; setAppLaunchPushed(false); getConfigLogger().verbose(getAccountId(),"Session destroyed; Session ID is now 0"); clearSource(); clearMedium(); clearCampaign(); clearWzrkParams(); }
[ "Destroys the current session" ]
[ "Wrap connection with a proxy.\n@param target connection handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a connection.", "Returns the vertex with given ID framed into given interface.", "Loads the properties file using the classloader provided. Creating a string from the properties\n\"user.agent.name\" and \"user.agent.version\".\n@param loader The class loader to use to load the resource.\n@param filename The name of the file to load.\n@return A string that represents the first part of the UA string eg java-cloudant/2.6.1", "Convert an Object to a Time.", "Setting the type of Checkbox.", "This method takes the textual version of an accrue type name\nand populates the class instance appropriately. Note that unrecognised\nvalues are treated as \"Prorated\".\n\n@param type text version of the accrue type\n@param locale target locale\n@return AccrueType class instance", "Updates the image information.", "Method used to extract data from the block of properties and\ninsert the key value pair into a map.\n\n@param data block of property data\n@param previousItemOffset previous offset\n@param previousItemKey item key\n@param itemOffset current item offset", "Set the attributes for the associated object.\n\n@param attributes attributes for associated objects\n@deprecated replaced by {@link #setAllAttributes(Map)} after introduction of nested associations" ]
public ThumborUrlBuilder crop(int top, int left, int bottom, int right) { if (top < 0) { throw new IllegalArgumentException("Top must be greater or equal to zero."); } if (left < 0) { throw new IllegalArgumentException("Left must be greater or equal to zero."); } if (bottom < 1 || bottom <= top) { throw new IllegalArgumentException("Bottom must be greater than zero and top."); } if (right < 1 || right <= left) { throw new IllegalArgumentException("Right must be greater than zero and left."); } hasCrop = true; cropTop = top; cropLeft = left; cropBottom = bottom; cropRight = right; return this; }
[ "Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code\nbottom} or {@code right} are less than one or less than {@code top} or {@code left},\nrespectively." ]
[ "Loads the SPI backing bean.\n\n@return the instance of MonetaryFormatsSingletonSpi to be used by this singleton.", "Put a value if and only if the map has not changed since the given snapshot was taken. If the put fails,\nit is the caller's responsibility to retry.\n\n@param instance the instance with the map field\n@param key the key\n@param value the value\n@param snapshot the map snapshot\n@return {@code false} if the snapshot is out of date and we could not update, {@code true} if the put succeeded", "Update the list of buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param buildpacks the new list of buildpack names or URLs.", "A static method that provides an easy way to create a list of a\ncertain parametric type.\nThis static constructor works better with generics.\n\n@param list The list to pad\n@param padding The padding element (may be null)\n@return The padded list", "Increases the internal array's length by the specified amount. Previous values are preserved.\nThe length value is not modified since this does not change the 'meaning' of the array, just\nincreases the amount of data which can be stored in it.\n\nthis.data = new data_type[ data.length + amount ]\n\n\n@param amount Number of elements added to the internal array's length", "Returns a converter instance for the given annotation.\n\n@param annotation the annotation\n@return a converter instance or {@code null} if the given annotation is no option annotation", "Get the context for a photo in the group pool.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@param groupId\nThe group ID\n@return The PhotoContext\n@throws FlickrException", "Retrieves the class object for the class with the given name.\n\n@param name The class name\n@return The class object\n@throws ClassNotFoundException If the class is not on the classpath (the exception message contains the class name)", "Set the default size of the texture buffers. You can call this to reduce the buffer size\nof views with anti-aliasing issue.\n\nThe max value to the buffer size should be the Math.max(width, height) of attached view.\n\n@param size buffer size. Value > 0 and <= Math.max(width, height)." ]
public static String replaceParameters(final InputStream stream) { String content = IOUtil.asStringPreservingNewLines(stream); return resolvePlaceholders(content); }
[ "Method that takes an inputstream, read it preserving the end lines, and subtitute using commons-lang-3 calls\nthe variables, first searching as system properties vars and then in environment var list.\nIn case of missing the property is replaced by white space.\n@param stream\n@return" ]
[ "Copies entries in the source map to target map.\n\n@param source source map\n@param target target map", "Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object.", "The third method to write caseManager. Its task is to write the call to\nthe story to be run.\n\n@param caseManager\nthe file where the test must be written\n@param storyName\nthe name of the story\n@param test_path\nthe path where the story can be found\n@param user\nthe user requesting the story\n@param feature\nthe feature requested by the user\n@param benefit\nthe benefit provided by the feature\n@throws BeastException", "Dumps an animation channel to stdout.\n\n@param nodeAnim the channel", "Demonstrates how to add an override to an existing path", "Adds the specified type to this frame, and returns a new object that implements this type.", "Remove an write lock.", "Get minimum gray value in the image.\n\n@param fastBitmap Image to be processed.\n@param startX Initial X axis coordinate.\n@param startY Initial Y axis coordinate.\n@param width Width.\n@param height Height.\n@return Minimum gray.", "Initialize the random generator with a seed." ]
@Override public final String getString(final String key) { String result = optString(key); if (result == null) { throw new ObjectMissingException(this, key); } return result; }
[ "Get a property as a string or throw an exception.\n\n@param key the property name" ]
[ "Generate Allure report data from directories with allure report results.\n\n@param args a list of directory paths. First (args.length - 1) arguments -\nresults directories, last argument - the folder to generated data", "OR operation which takes 2 arguments and OR's them together.\n\n<p>\n<b>NOTE:</b> There is no guarantee of the order of the clauses that are generated in the final query.\n</p>\n<p>\n<b>NOTE:</b> I can't remove the generics code warning that can be associated with this method. You can instead\nuse the {@link #or(int)} method.\n</p>", "Specify a specific index to run the query against\n\n@param designDocument set the design document to use\n@param indexName set the index name to use\n@return this to set additional options", "Deletes the device pin.", "Iterates over the contents of an object or collection, and checks whether a\npredicate is valid for at least one element.\n\n@param self the object over which we iterate\n@param closure the closure predicate used for matching\n@return true if any iteration for the object matches the closure predicate\n@since 1.0", "Converts a list of dates to a Json array with the long representation of the dates as strings.\n@param individualDates the list to convert.\n@return Json array with long values of dates as string", "Mark new or deleted reference elements\n@param broker", "Processes the template for all column pairs of the current foreignkey.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Ensure that the nodeList is either null or empty.\n\n@param nodeList the nodeList to ensure to be either null or empty\n@param expression the expression was used to fine the nodeList\n@throws SpinXPathException if the nodeList is either null or empty" ]
public static int cudnnGetRNNDataDescriptor( cudnnRNNDataDescriptor RNNDataDesc, int[] dataType, int[] layout, int[] maxSeqLength, int[] batchSize, int[] vectorSize, int arrayLengthRequested, int[] seqLengthArray, Pointer paddingFill) { return checkResult(cudnnGetRNNDataDescriptorNative(RNNDataDesc, dataType, layout, maxSeqLength, batchSize, vectorSize, arrayLengthRequested, seqLengthArray, paddingFill)); }
[ "symbol for filling padding position in output" ]
[ "Get the geo interface.\n\n@return Access class to the flickr.photos.geo methods.", "Creates a collection from the given stream, casting each object to the\nprovided listener class. The returned collection must not necessarily be\nmutable.\n\n@param <T> Type of the listeners in the given list.\n@param listenerClass The class of the objects in the provided list.\n@param listeners The stream to obtain the listeners for the resulting\ncollection from.\n@param sizeHint Expected size of the input stream.\n@return A typed copy of the list.", "Reads entries from transforms.xml.\n\n@param file the XML file\n@return the transform entries read from the file\n\n@throws Exception if something goes wrong", "Prepare a parallel HTTP POST Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder", "Use this API to fetch all the aaaparameter resources that are configured on netscaler.", "Take a string and make it an iterable ContentStream", "Start a print.\n\n@param jobId the job ID\n@param specJson the client json request.\n@param out the stream to write to.", "Gets the boxed type of a class\n\n@param type The type\n@return The boxed type", "Gets an element of the matrix.\n\n@param row\nthe row\n@param col\nthe column\n@return the element at the given position" ]
public long number(ImapRequestLineReader request) throws ProtocolException { String digits = consumeWord(request, new DigitCharValidator()); return Long.parseLong(digits); }
[ "Reads an argument of type \"number\" from the request." ]
[ "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", "Release the broker instance.", "Extracts the value of this bit flag from the supplied byte array\nand sets the value in the supplied container.\n\n@param container container\n@param data byte array", "Convert JsonString to Object of Clazz\n\n@param json\n@param clazz\n@return Object of Clazz", "Check if a given string is a template path or template content\n\nIf the string contains anyone the following characters then we assume it\nis content, otherwise it is path:\n\n* space characters\n* non numeric-alphabetic characters except:\n** dot \".\"\n** dollar: \"$\"\n\n@param string\nthe string to be tested\n@return `true` if the string literal is template content or `false` otherwise", "Finish service initialization.\n\n@throws GeomajasException oops", "Returns first enum constant found..\n\n@param styleName Space-separated list of styles\n@param enumClass Type of enum\n@param defaultValue Default value of no match was found\n@return First enum constant found or default value", "The number of bytes required to hold the given number\n\n@param number The number being checked.\n@return The required number of bytes (must be 8 or less)", "Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object." ]
public static dnstxtrec[] get(nitro_service service, String domain[]) throws Exception{ if (domain !=null && domain.length>0) { dnstxtrec response[] = new dnstxtrec[domain.length]; dnstxtrec obj[] = new dnstxtrec[domain.length]; for (int i=0;i<domain.length;i++) { obj[i] = new dnstxtrec(); obj[i].set_domain(domain[i]); response[i] = (dnstxtrec) obj[i].get_resource(service); } return response; } return null; }
[ "Use this API to fetch dnstxtrec resources of given names ." ]
[ "Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default.", "Returns the corresponding mac section, or null if this address section does not correspond to a mac section.\nIf this address section has a prefix length it is ignored.\n\n@param extended\n@return", "Obtain newline-delimited headers from method\n\n@param method HttpMethod to scan\n@return newline-delimited headers", "Called recursively to renumber child task IDs.\n\n@param parentTask parent task instance\n@param currentID current task ID\n@return updated current task ID", "Get the time zone for a specific exchange suffix\n\n@param suffix suffix for the exchange in YahooFinance\n@return time zone of the exchange", "Use this API to fetch dnsview resource of given name .", "Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException", "Given a list of typedDependencies, returns true if the node \"node\" is the\ngovernor of a conj relation with a dependent which is not a preposition\n\n@param node\nA node in this GrammaticalStructure\n@param list\nA list of typedDependencies\n@return true If node is the governor of a conj relation in the list with\nthe dep not being a preposition", "Return the most appropriate log type. This should _never_ return null." ]
public static Identifiers convertProfileAndPathIdentifier(String profileIdentifier, String pathIdentifier) throws Exception { Identifiers id = new Identifiers(); Integer profileId = null; try { profileId = ControllerUtils.convertProfileIdentifier(profileIdentifier); } catch (Exception e) { // this is OK for this since it isn't always needed } Integer pathId = convertPathIdentifier(pathIdentifier, profileId); id.setProfileId(profileId); id.setPathId(pathId); return id; }
[ "Obtain the IDs of profile and path as Identifiers\n\n@param profileIdentifier actual ID or friendly name of profile\n@param pathIdentifier actual ID or friendly name of path\n@return\n@throws Exception" ]
[ "Removes the duplicate node list.\n\n@param list\nthe list\n@return the int", "Produces a new ConditionalCounter.\n\n@return a new ConditionalCounter, where order of indices is reversed", "converts a java.net.URI to a decoded string", "Use this API to reset appfwlearningdata.", "Indicate whether the given URI matches this template.\n@param uri the URI to match to\n@return {@code true} if it matches; {@code false} otherwise", "Create a new server group for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception", "Process the response by reporting proper log and feeding failure\ndetectors\n\n@param response\n@param pipeline", "Sets the last operation response.\n\n@param response the last operation response.", "Handles Multi Instance Encapsulation message. Decapsulates\nan Application Command message and handles it using the right\ninstance.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing." ]
private void executeBatch(int batchId, final RebalanceBatchPlan batchPlan) { final Cluster batchCurrentCluster = batchPlan.getCurrentCluster(); final List<StoreDefinition> batchCurrentStoreDefs = batchPlan.getCurrentStoreDefs(); final Cluster batchFinalCluster = batchPlan.getFinalCluster(); final List<StoreDefinition> batchFinalStoreDefs = batchPlan.getFinalStoreDefs(); try { final List<RebalanceTaskInfo> rebalanceTaskInfoList = batchPlan.getBatchPlan(); if(rebalanceTaskInfoList.isEmpty()) { RebalanceUtils.printBatchLog(batchId, logger, "Skipping batch " + batchId + " since it is empty."); // Even though there is no rebalancing work to do, cluster // metadata must be updated so that the server is aware of the // new cluster xml. adminClient.rebalanceOps.rebalanceStateChange(batchCurrentCluster, batchFinalCluster, batchCurrentStoreDefs, batchFinalStoreDefs, rebalanceTaskInfoList, false, true, false, false, true); return; } RebalanceUtils.printBatchLog(batchId, logger, "Starting batch " + batchId + "."); // Split the store definitions List<StoreDefinition> readOnlyStoreDefs = StoreDefinitionUtils.filterStores(batchFinalStoreDefs, true); List<StoreDefinition> readWriteStoreDefs = StoreDefinitionUtils.filterStores(batchFinalStoreDefs, false); boolean hasReadOnlyStores = readOnlyStoreDefs != null && readOnlyStoreDefs.size() > 0; boolean hasReadWriteStores = readWriteStoreDefs != null && readWriteStoreDefs.size() > 0; // STEP 1 - Cluster state change boolean finishedReadOnlyPhase = false; List<RebalanceTaskInfo> filteredRebalancePartitionPlanList = RebalanceUtils.filterTaskPlanWithStores(rebalanceTaskInfoList, readOnlyStoreDefs); rebalanceStateChange(batchId, batchCurrentCluster, batchCurrentStoreDefs, batchFinalCluster, batchFinalStoreDefs, filteredRebalancePartitionPlanList, hasReadOnlyStores, hasReadWriteStores, finishedReadOnlyPhase); // STEP 2 - Move RO data if(hasReadOnlyStores) { RebalanceBatchPlanProgressBar progressBar = batchPlan.getProgressBar(batchId); executeSubBatch(batchId, progressBar, batchCurrentCluster, batchCurrentStoreDefs, filteredRebalancePartitionPlanList, hasReadOnlyStores, hasReadWriteStores, finishedReadOnlyPhase); } // STEP 3 - Cluster change state finishedReadOnlyPhase = true; filteredRebalancePartitionPlanList = RebalanceUtils.filterTaskPlanWithStores(rebalanceTaskInfoList, readWriteStoreDefs); rebalanceStateChange(batchId, batchCurrentCluster, batchCurrentStoreDefs, batchFinalCluster, batchFinalStoreDefs, filteredRebalancePartitionPlanList, hasReadOnlyStores, hasReadWriteStores, finishedReadOnlyPhase); // STEP 4 - Move RW data if(hasReadWriteStores) { proxyPause(); RebalanceBatchPlanProgressBar progressBar = batchPlan.getProgressBar(batchId); executeSubBatch(batchId, progressBar, batchCurrentCluster, batchCurrentStoreDefs, filteredRebalancePartitionPlanList, hasReadOnlyStores, hasReadWriteStores, finishedReadOnlyPhase); } RebalanceUtils.printBatchLog(batchId, logger, "Successfully terminated batch " + batchId + "."); } catch(Exception e) { RebalanceUtils.printErrorLog(batchId, logger, "Error in batch " + batchId + " - " + e.getMessage(), e); throw new VoldemortException("Rebalance failed on batch " + batchId, e); } }
[ "Executes a batch plan.\n\n@param batchId Used as the ID of the batch plan. This allows related\ntasks on client- & server-side to pretty print messages in a\nmanner that debugging can track specific batch plans across the\ncluster.\n@param batchPlan The batch plan..." ]
[ "Returns true if the specified name is NOT allowed. It isn't allowed if it matches a built in operator\nor if it contains a restricted character.", "Command-line version of the classifier. See the class\ncomments for examples of use, and SeqClassifierFlags\nfor more information on supported flags.", "Adds a submodule to the module.\n\n<P>\nINFO: If the module is promoted, all added submodule will be promoted.\n\n@param submodule Module", "Search for a publisher of the given type in a project and return it, or null if it is not found.\n\n@return The publisher", "Use this API to fetch aaagroup_vpntrafficpolicy_binding resources of given name .", "Attempts to insert a colon so that a value without a colon can\nbe parsed.", "We have obtained a waveform preview for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this waveform preview\n@param preview the waveform preview which we retrieved", "Triggers expansion of the parent.", "Return a copy of the result as a String.\n\n<p>The default version of this method copies the result into a temporary byte array and then\ntries to decode it using the configured encoding.\n\n@return string version of the result.\n@throws IOException if the data cannot be produced or could not be decoded to a String." ]
public boolean setCustomResponse(String pathName, String customResponse) throws Exception { // figure out the new ordinal int nextOrdinal = this.getNextOrdinalForMethodId(-1, pathName); // add override this.addMethodToResponseOverride(pathName, "-1"); // set argument return this.setMethodArguments(pathName, "-1", nextOrdinal, customResponse); }
[ "Set a custom response for this path\n\n@param pathName name of path\n@param customResponse value of custom response\n@return true if success, false otherwise\n@throws Exception exception" ]
[ "This is more expensive.\n\n@param key key whose presence in this map is to be tested.\n@return <tt>true</tt> if this map contains a mapping for the specified\nkey.", "Returns requested content types or default content type if none found.\n\n@return Requested content types or default content type if none found.", "a small static helper to set a multi state drawable on a view\n\n@param icon\n@param iconColor\n@param selectedIcon\n@param selectedIconColor\n@param tinted\n@param imageView", "Convert an object to a collection.\n\n@param mapper the object mapper\n@param source the source object\n@param targetCollectionType the target collection type\n@param targetElementType the target collection element type\n@return collection", "Invoked when an action occurs.", "Save an HTTP response to a file\n@param response the response to save\n@param destFile the destination file\n@throws IOException if the response could not be downloaded", "Checks a returned Javascript value where we expect a boolean but could\nget null.\n\n@param val The value from Javascript to be checked.\n@param def The default return value, which can be null.\n@return The actual value, or if null, returns false.", "Verify store definitions are congruent with cluster definition.\n\n@param cluster\n@param storeDefs", "Utility function to set the current value in a ListBox.\n\n@return returns true if the option corresponding to the value\nwas successfully selected in the ListBox" ]
public void addAll(@NonNull final Collection<T> collection) { final int length = collection.size(); if (length == 0) { return; } synchronized (mLock) { final int position = getItemCount(); mObjects.addAll(collection); notifyItemRangeInserted(position, length); } }
[ "Adds the specified list of objects at the end of the array.\n\n@param collection The objects to add at the end of the array." ]
[ "Sets the path of the edited file in the corresponding display.\n@param editedFilePath path of the edited file to set.", "Use this API to fetch auditsyslogpolicy_aaauser_binding resources of given name .", "Lift a Java Func4 to a Scala Function4\n\n@param f the function to lift\n\n@returns the Scala function", "Invite a user to an enterprise.\n@param api the API connection to use for the request.\n@param userLogin the login of the user to invite.\n@param enterpriseID the ID of the enterprise to invite the user to.\n@return the invite info.", "Set some initial values.", "Get the int resource id with specified type definition\n@param context\n@param id String resource id\n@return int resource id", "Initialize dates panel elements.", "Generates the path to an output file for a given source URL. Creates\nall necessary parent directories for the destination file.\n@param src the source\n@return the path to the output file", "Helper method to send message on outputStream and account for network\ntime stats.\n\n@param outputStream\n@param message\n@throws IOException" ]
public static <E extends Style.HasCssName, F extends Enum<? extends Style.HasCssName>> void addUniqueEnumStyleName(final UIObject uiObject, final Class<F> enumClass, final E style) { removeEnumStyleNames(uiObject, enumClass); addEnumStyleName(uiObject, style); }
[ "Convenience method for first removing all enum style constants and then adding the single one.\n\n@see #removeEnumStyleNames(UIObject, Class)\n@see #addEnumStyleName(UIObject, Style.HasCssName)" ]
[ "Clear the mask for a new selection", "Write the table configuration to a buffered writer.", "This is the profiles page. this is the 'regular' page when the url is typed in", "Reads a line from the input stream, where a line is terminated by \\r, \\n, or \\r\\n\n@param trim whether to trim trailing \\r and \\ns", "Reverses all the TransitionControllers managed by this TransitionManager", "A document that is paused no longer has remote updates applied to it.\nAny local updates to this document cause it to be thawed. An example of pausing a document\nis when a conflict is being resolved for that document and the handler throws an exception.\n\n@param isPaused whether or not this config is frozen", "adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported", "return a HashMap with all properties, name as key, value as value\n@return the properties", "add a single Object to the Collection. This method is used during reading Collection elements\nfrom the database. Thus it is is save to cast anObject to the underlying element type of the\ncollection." ]
protected AbstractColumn buildExpressionColumn() { ExpressionColumn column = new ExpressionColumn(); populateCommonAttributes(column); populateExpressionAttributes(column); column.setExpression(customExpression); column.setExpressionToGroupBy(customExpressionToGroupBy); column.setExpressionForCalculation(customExpressionForCalculation); return column; }
[ "For creating expression columns\n@return" ]
[ "Retrieve the version number", "Entry point with no system exit", "Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declared in the\ninterface.\n@param args an array of objects containing the values of the arguments\npassed in the method invocation on the proxy instance. If a\nparameter type is a primitive type, the type of the array\nelement is a wrapper class.\n@return the resulting value of the method invocation.\n@throws Throwable if the method invocation fails.", "page breaks should be near the bottom of the band, this method used while adding subreports\nwhich has the \"start on new page\" option.\n@param band", "Accessor method used to retrieve a Boolean object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "This method decodes a byte array with the given encryption code\nusing XOR encryption.\n\n@param data Source data\n@param encryptionCode Encryption code", "Use this API to fetch a responderglobal_responderpolicy_binding resources.", "Converts an object to an instance of the target type.\n\n@param mapper the object mapper\n@param source the source to convert\n@param targetType the target class type\n@return target instance\n@see SquigglyUtils#objectify(ObjectMapper, Object, Class)", "Calculates the column width according to its type.\n@param _property the property.\n@return the column width." ]
@VisibleForTesting public static void runMain(final String[] args) throws Exception { final CliHelpDefinition helpCli = new CliHelpDefinition(); try { Args.parse(helpCli, args); if (helpCli.help) { printUsage(0); return; } } catch (IllegalArgumentException invalidOption) { // Ignore because it is probably one of the non-help options. } final CliDefinition cli = new CliDefinition(); try { List<String> unusedArguments = Args.parse(cli, args); if (!unusedArguments.isEmpty()) { System.out.println("\n\nThe following arguments are not recognized: " + unusedArguments); printUsage(1); return; } } catch (IllegalArgumentException invalidOption) { System.out.println("\n\n" + invalidOption.getMessage()); printUsage(1); return; } configureLogs(cli.verbose); AbstractXmlApplicationContext context = new ClassPathXmlApplicationContext(DEFAULT_SPRING_CONTEXT); if (cli.springConfig != null) { context = new ClassPathXmlApplicationContext(DEFAULT_SPRING_CONTEXT, cli.springConfig); } try { context.getBean(Main.class).run(cli); } finally { context.close(); } }
[ "Runs the print.\n\n@param args the cli arguments\n@throws Exception" ]
[ "Updates the database. Never call this during normal operations, upgrade is a user-controlled operation.", "Converts a date series configuration to a date series bean.\n@return the date series bean.", "Use this API to delete nssimpleacl.", "Request a database sends a list of UUIDs.\n\n@param count The count of UUIDs.", "Starts the one and only job instance in a separate Thread. Should be called exactly one time before\nthe operation is stopped.\n\n@param arguments {@inheritDoc}", "Use this API to add sslcertkey resources.", "Use this API to fetch appfwsignatures resource of given name .", "Uploads a new file to this folder with custom upload parameters.\n\n@param uploadParams the custom upload parameters.\n@return the uploaded file's info.", "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" ]
private TestSuiteModel buildModel(AggregatedSuiteResultEvent e) throws IOException { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.ROOT); TestSuiteModel suite = new TestSuiteModel(); suite.hostname = "nohost.nodomain"; suite.name = e.getDescription().getDisplayName(); suite.properties = buildModel(e.getSlave().getSystemProperties()); suite.time = e.getExecutionTime() / 1000.0; suite.timestamp = df.format(new Date(e.getStartTimestamp())); suite.testcases = buildModel(e.getTests()); suite.tests = suite.testcases.size(); if (mavenExtensions) { suite.skipped = 0; } // Suite-level failures and errors are simulated as test cases. for (FailureMirror m : e.getFailures()) { TestCaseModel model = new TestCaseModel(); model.classname = "junit.framework.TestSuite"; // empirical ANT output. model.name = applyFilters(m.getDescription().getClassName()); model.time = 0; if (m.isAssertionViolation()) { model.failures.add(buildModel(m)); } else { model.errors.add(buildModel(m)); } suite.testcases.add(model); } // Calculate test numbers that match limited view (no ignored tests, // faked suite-level errors). for (TestCaseModel tc : suite.testcases) { suite.errors += tc.errors.size(); suite.failures += tc.failures.size(); if (mavenExtensions && tc.skipped != null) { suite.skipped += 1; } } StringWriter sysout = new StringWriter(); StringWriter syserr = new StringWriter(); if (outputStreams) { e.getSlave().decodeStreams(e.getEventStream(), sysout, syserr); } suite.sysout = sysout.toString(); suite.syserr = syserr.toString(); return suite; }
[ "Build data model for serialization." ]
[ "Add all headers in a header map.\n\n@param headers a map of headers.\n@return the interceptor instance itself.", "Processes the template if the current object on the specified level has a non-empty name.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"", "Ensures that every path starts and ends with a slash character.\n\n@param scriptPath the scriptPath that needs to be normalized\n@return a path with leading and trailing slash", "digest message with MD5\n\n@param source message\n@return 32 bit MD5 value (lower case)", "Resolves line alpha based on distance comparing to max distance.\nWhere alpha is close to 0 for maxDistance, and close to 1 to 0 distance.\n\n@param distance line length\n@param maxDistance max line length\n@return line alpha", "we only use the registrationList map if the object is not a proxy. During the\nreference locking, we will materialize objects and they will enter the registered for\nlock map.", "Constraint that ensures that the field has a column property. If none is specified, then\nthe name of the field is used.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)", "Computes the d and H parameters.\n\nd = J'*(f(x)-y) <--- that's also the gradient\nH = J'*J", "Return true if the DeclarationExpression represents a 'final' variable declaration.\n\nNOTE: THIS IS A WORKAROUND.\n\nThere does not seem to be an easy way to determine whether the 'final' modifier has been\nspecified for a variable declaration. Return true if the 'final' is present before the variable name." ]
protected void checkObserverMethods() { Collection<EnhancedAnnotatedMethod<?, ? super T>> observerMethods = BeanMethods.getObserverMethods(this.getEnhancedAnnotated()); Collection<EnhancedAnnotatedMethod<?, ? super T>> asyncObserverMethods = BeanMethods.getAsyncObserverMethods(this.getEnhancedAnnotated()); checkObserverMethods(observerMethods); checkObserverMethods(asyncObserverMethods); }
[ "If there are any observer methods, they must be static or business\nmethods." ]
[ "Helper method to synchronously invoke a callback\n\n@param call", "Throws one RendererException if the content parent or layoutInflater are null.", "This method retrieves the UID for a calendar associated with a task.\n\n@param mpx MPX Task instance\n@return calendar UID", "To sql pattern.\n\n@param attribute the attribute\n@return the string", "Specialized version of readValue just for reading map keys, because the StdDeserializer methods like\n_parseIntPrimitive blow up when the current JsonToken is FIELD_NAME", "Prints the plan to a file.\n\n@param outputDirName\n@param plan", "Performs an inline lower Cholesky decomposition on an inner row-major matrix. Only\nthe lower triangular portion of the matrix is read or written to.\n\n@param T Array containing an inner row-major matrix. Modified.\n@param indexT First index of the inner row-major matrix.\n@param n Number of rows and columns of the matrix.\n@return If the decomposition succeeded.", "Use this API to fetch dnsnsecrec resource of given name .", "Wrap CallableStatement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a Callablestatement." ]
public static gslbrunningconfig get(nitro_service service) throws Exception{ gslbrunningconfig obj = new gslbrunningconfig(); gslbrunningconfig[] response = (gslbrunningconfig[])obj.get_resources(service); return response[0]; }
[ "Use this API to fetch all the gslbrunningconfig resources that are configured on netscaler." ]
[ "Start the chain of execution running.\n\n@throws IllegalStateException\nif the chain of execution has already been started.", "A map of the header key value pairs. Keys are strings and values are either list of strings or a\nstring.\n\n@param headers the header map", "Within a single zone, swaps one random partition on one random node with\nanother random partition on different random node.\n\n@param nextCandidateCluster\n@param zoneId Zone ID within which to shuffle partitions\n@return updated cluster", "Registers the parameter for the value formatter for the given variable and puts\nit's implementation in the parameters map.\n@param djVariable\n@param variableName", "Ping route Ping the ESI routers\n\n@return ApiResponse&lt;String&gt;\n@throws ApiException\nIf fail to call the API, e.g. server error or cannot\ndeserialize the response body", "initializer to setup JSAdapter prototype in the given scope", "Use this API to fetch systemuser resource of given name .", "Makes an RPC call using the client. Logs how long it took and any exceptions.\n\nNOTE: The request could be an InputStream too, but the http client will need to\nfind its length, which will require buffering it anyways.\n\n@throws DatastoreException if the RPC fails.", "Sets all Fluo properties to their default in the given configuration. NOTE - some properties do\nnot have defaults and will not be set." ]
protected long getUniqueLong(FieldDescriptor field) throws SequenceManagerException { long result; // lookup sequence name String sequenceName = calculateSequenceName(field); try { result = buildNextSequence(field.getClassDescriptor(), sequenceName); } catch (Throwable e) { // maybe the sequence was not created try { log.info("Create DB sequence key '"+sequenceName+"'"); createSequence(field.getClassDescriptor(), sequenceName); } catch (Exception e1) { throw new SequenceManagerException( SystemUtils.LINE_SEPARATOR + "Could not grab next id, failed with " + SystemUtils.LINE_SEPARATOR + e.getMessage() + SystemUtils.LINE_SEPARATOR + "Creation of new sequence failed with " + SystemUtils.LINE_SEPARATOR + e1.getMessage() + SystemUtils.LINE_SEPARATOR , e1); } try { result = buildNextSequence(field.getClassDescriptor(), sequenceName); } catch (Throwable e1) { throw new SequenceManagerException("Could not grab next id, sequence seems to exist", e); } } return result; }
[ "returns a unique long value for class clazz and field fieldName.\nthe returned number is unique accross all tables in the extent of clazz." ]
[ "Convert custom info.\n\n@param customInfo the custom info map\n@return the custom info type", "Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClasses\n@return self", "Adds the complex number with a scalar value.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the add of specified complex number with scalar value.", "Pretty-print the object.", "Reset the pool of resources for a specific destination. Idle resources\nwill be destroyed. Checked out resources that are subsequently checked in\nwill be destroyed. Newly created resources can be checked in to\nreestablish resources for the specific destination.", "Gets the bytes for the highest address in the range represented by this address.\n\n@return", "Accessor method used to retrieve a char representing the\ncontents of an individual field. If the field does not exist in the\nrecord, the default character is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Get a property as a json array or default.\n\n@param key the property name\n@param defaultValue default", "Used for initialization of the underlying map provider.\n\n@param fragmentManager required for initialization" ]
private void processWorkingHours(ProjectCalendar mpxjCalendar, Sequence uniqueID, Day day, List<OverriddenDayType> typeList) { if (isWorkingDay(mpxjCalendar, day)) { ProjectCalendarHours mpxjHours = mpxjCalendar.getCalendarHours(day); if (mpxjHours != null) { OverriddenDayType odt = m_factory.createOverriddenDayType(); typeList.add(odt); odt.setId(getIntegerString(uniqueID.next())); List<Interval> intervalList = odt.getInterval(); for (DateRange mpxjRange : mpxjHours) { Date rangeStart = mpxjRange.getStart(); Date rangeEnd = mpxjRange.getEnd(); if (rangeStart != null && rangeEnd != null) { Interval interval = m_factory.createInterval(); intervalList.add(interval); interval.setStart(getTimeString(rangeStart)); interval.setEnd(getTimeString(rangeEnd)); } } } } }
[ "Process the standard working hours for a given day.\n\n@param mpxjCalendar MPXJ Calendar instance\n@param uniqueID unique ID sequence generation\n@param day Day instance\n@param typeList Planner list of days" ]
[ "Create an import declaration and delegates its registration for an upper class.", "Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color", "Determine the target type for the generic return type of the given method,\nwhere formal type variables are declared on the given class.\n@param method the method to introspect\n@param clazz the class to resolve type variables against\n@return the corresponding generic parameter or return type\n@see #resolveReturnTypeForGenericMethod", "Mark new or deleted reference elements\n@param broker", "Retrieve all References\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.", "given the groupName, it returns the groupId\n\n@param groupName name of group\n@return ID of group", "Returns the URL of the class file where the given class has been loaded from.\n\n@throws IllegalArgumentException\nif failed to determine.\n@since 2.24", "Return the array of field objects pulled from the data object.", "When set to true, all items in layout will be considered having the size of the largest child. If false, all items are\nmeasured normally. Disabled by default.\n@param enable true to measure children using the size of the largest child, false - otherwise." ]
public ArrayList<Double> segmentBaselineCost(ProjectFile file, List<TimephasedCost> cost, TimescaleUnits rangeUnits, ArrayList<DateRange> dateList) { return segmentCost(file.getBaselineCalendar(), cost, rangeUnits, dateList); }
[ "This is the main entry point used to convert the internal representation\nof timephased baseline cost into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range" ]
[ "Use this API to fetch the statistics of all systemmemory_stats resources that are configured on netscaler.", "Create an MD5 hash of a string.\n\n@param input Input string.\n@return Hash of input.\n@throws IllegalArgumentException if {@code input} is blank.", "Default settings set type loader to ClasspathTypeLoader if not set before.", "Get upload status for the currently authenticated user.\n\nRequires authentication with 'read' permission using the new authentication API.\n\n@return A User object with upload status data fields filled\n@throws FlickrException", "dispatch to gravity state", "Hardcode a copy method as being valid. This should be used to tell Mutability Detector about\na method which copies a collection, and when the copy can be wrapped in an immutable wrapper\nwe can consider the assignment immutable. Useful for allowing Mutability Detector to correctly\nwork with other collections frameworks such as Google Guava. Reflection is used to obtain the\nmethod's descriptor and to verify the method's existence.\n\n@param fieldType - the type of the field to which the result of the copy is assigned\n@param fullyQualifiedMethodName - the fully qualified method name\n@param argType - the type of the argument passed to the copy method\n\n@throws MutabilityAnalysisException - if the specified class or method does not exist\n@throws IllegalArgumentException - if any of the arguments are null", "do delete given object. Should be used by all intern classes to delete\nobjects.", "This continuously tries to reconnect in a separate thread and will only stop if the connection was established\nsuccessfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters\nand callback will get updated.\n\n@param reconnectUri the updated connection uri\n@param authKey the updated authentication key\n@param callback the current callback", "Given a list of keys and a number of splits find the keys to split on.\n\n@param keys the list of keys.\n@param numSplits the number of splits." ]
public void delete(String photoId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_DELETE); parameters.put("photo_id", photoId); // Note: This method requires an HTTP POST request. Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } // This method has no specific response - It returns an empty // sucess response if it completes without error. }
[ "Delete a photo from flickr.\n\nThis method requires authentication with 'delete' permission.\n\n@param photoId\n@throws FlickrException" ]
[ "Sets the HTML entity translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining", "Does the server support log downloads?\n\n@param cliGuiCtx The context.\n@return <code>true</code> if the server supports log downloads,\n<code>false</code> otherwise.", "Print the lead string followed by centered formatted string. The whole\nlength of the line is 80 chars.\n\nExample:\n\n```java\nprintCenterWithLead(\" *\", \"Hello %s\", \"World\");\n```\n\nwill print something like\n\n```\n* Hello World\n```\n\nNote the above is just a demo, the exact number of whitespace might not be correct.\n\n\n@param lead\nthe lead string\n@param format\nThe string format pattern\n@param args\nThe string format arguments", "Return the next word of the string, in other words it stops when a space is encountered.", "Triggers a replication request.", "Shows error dialog, manually supplying details instead of getting them from an exception stack trace.\n\n@param message the error message\n@param details the details", "Set the value of a field using its alias.\n\n@param alias field alias\n@param value field value", "Expands all tabs into spaces. Assumes the CharSequence represents a single line of text.\n\n@param self A line to expand\n@param tabStop The number of spaces a tab represents\n@return The expanded toString() of this CharSequence\n@see #expandLine(String, int)\n@since 1.8.2", "Calculate the arc length by angle and radius\n@param angle\n@return arc length" ]
public FieldLocation getFieldLocation(FieldType type) { FieldLocation result = null; FieldItem item = m_map.get(type); if (item != null) { result = item.getFieldLocation(); } return result; }
[ "Retrieve the field location for a specific field.\n\n@param type field type\n@return field location" ]
[ "Use this API to fetch statistics of appfwpolicylabel_stats resource of given name .", "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", "This method writes project properties to a Planner file.", "Update list of sorted services by copying it from the array and making it unmodifiable.", "Set the url for the shape file.\n\n@param url shape file url\n@throws LayerException file cannot be accessed\n@since 1.7.1", "This method retrieves a byte array containing the data at the\ngiven offset in the block. If no data is found at the given offset\nthis method returns null.\n\n@param offset offset of required data\n@return byte array containing required data", "Check the model for expression values.\n\n@param model the model\n@return the attribute containing an expression", "Adds special accessors for private constants so that inner classes can retrieve them.", "Get the value of a Annotation in a class declaration.\n@param classType\n@param annotationType\n@param attributeName\n@return the value of the annotation as String or null if something goes wrong" ]
protected synchronized void handleCompleted() { latch.countDown(); for (final ShutdownListener listener : listeners) { listener.handleCompleted(); } listeners.clear(); }
[ "Notify all shutdown listeners that the shutdown completed." ]
[ "Use this API to fetch all the onlinkipv6prefix resources that are configured on netscaler.", "Returns a new color that has the hue adjusted by the specified\namount.", "Parse a duration in minutes form a number of hours.\n\n@param value String representation\n@return Integer instance", "Applies the mask to this address and then compares values with the given address\n\n@param mask\n@param other\n@return", "Use this API to add sslcertkey.", "checks if the triangle is not re-entrant", "Use this API to fetch all the sslcipher resources that are configured on netscaler.", "prefix the this class fk columns with the indirection table", "Set a callback to handle any exceptions in the chain of execution.\n\n@param callback\nInstance of {@link ErrorCallback}.\n@return Reference to the {@code ExecutionChain}\n@throws IllegalStateException\nif the chain of execution has already been {@link #execute()\nstarted}." ]
protected void mergeSameWork(LinkedList<TimephasedWork> list) { LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>(); TimephasedWork previousAssignment = null; for (TimephasedWork assignment : list) { if (previousAssignment == null) { assignment.setAmountPerDay(assignment.getTotalAmount()); result.add(assignment); } else { Duration previousAssignmentWork = previousAssignment.getAmountPerDay(); Duration assignmentWork = assignment.getTotalAmount(); if (NumberHelper.equals(previousAssignmentWork.getDuration(), assignmentWork.getDuration(), 0.01)) { Date assignmentStart = previousAssignment.getStart(); Date assignmentFinish = assignment.getFinish(); double total = previousAssignment.getTotalAmount().getDuration(); total += assignmentWork.getDuration(); Duration totalWork = Duration.getInstance(total, TimeUnit.MINUTES); TimephasedWork merged = new TimephasedWork(); merged.setStart(assignmentStart); merged.setFinish(assignmentFinish); merged.setAmountPerDay(assignmentWork); merged.setTotalAmount(totalWork); result.removeLast(); assignment = merged; } else { assignment.setAmountPerDay(assignment.getTotalAmount()); } result.add(assignment); } previousAssignment = assignment; } list.clear(); list.addAll(result); }
[ "Merges individual days together into time spans where the\nsame work is undertaken each day.\n\n@param list assignment data" ]
[ "Returns the default table name for this class which is the unqualified class name.\n\n@return The default table name", "Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard", "If credentials are incorrect or not provided for Basic Auth, then Android\nmay throw this exception when an HTTP 401 is received. A separate exception\nis thrown for proxy authentication errors. Checking for this response and\nreturning the proper status.\n@param ex the exception raised from Android\n@return HTTP Status Code", "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", "With this impl, it only returns the same credentials once. Otherwise it's possible that a loop will occur.\nWhen server returns status code 401, the HTTP client provides the same credentials forever.\nSince we create a new HTTP client for every request, we can handle it this way.", "Gathers the pk fields from the hierarchy of the given class, and copies them into the class.\n\n@param classDef The root of the hierarchy\n@throws ConstraintException If there is a conflict between the pk fields", "Finds an entity given its primary key.\n\n@throws RowNotFoundException\nIf no such object was found.\n@throws TooManyRowsException\nIf more that one object was returned for the given ID.", "Load a properties file from a file path\n\n@param gradlePropertiesFilePath The file path where the gradle.properties is located.\n@return The loaded properties.\n@throws IOException In case an error occurs while reading the properties file, this exception is thrown.", "Add a listener to be invoked when the checked button changes in this group.\n@param listener\n@param <T>\n@return" ]
public static base_response unset(nitro_service client, nslimitselector resource, String[] args) throws Exception{ nslimitselector unsetresource = new nslimitselector(); unsetresource.selectorname = resource.selectorname; return unsetresource.unset_resource(client,args); }
[ "Use this API to unset the properties of nslimitselector resource.\nProperties that need to be unset are specified in args array." ]
[ "Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message.", "Loads the script from a text string.\n@param scriptText text string containing script to execute.\n@param language language (\"js\" or \"lua\")", "Somewhat ad-hoc list of only greek letters that bio people use, partly\nto avoid false positives on short ones.\n@param s String to check for Greek\n@return true iff there is a greek lette embedded somewhere in the String", "Take screenshot of the current window.\n\n@param target The target type/format of the Screenshot\n@return Screenshot of current window, in the requested format", "This method extracts calendar data from a Phoenix file.\n\n@param phoenixProject Root node of the Phoenix file", "Given counters of true positives, false positives, and false\nnegatives, prints out precision, recall, and f1 for each key.", "Notifies that multiple footer items are removed.\n\n@param positionStart the position.\n@param itemCount the item count.", "Provisions a new app user in an enterprise 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@return the created user's info.", "Serializes Number value and writes it into specified buffer." ]
public void login(Object userIdentifier) { session().put(config().sessionKeyUsername(), userIdentifier); app().eventBus().trigger(new LoginEvent(userIdentifier.toString())); }
[ "Update the context session to mark a user logged in\n\n@param userIdentifier\nthe user identifier, could be either userId or username" ]
[ "Check the version to assure it is allowed.\n\n@param pluginName plugin name which needs the dependency\n@param dependency dependency which needs to be verified\n@param requestedVersion requested/minimum version\n@param availableVersion available version\n@return version check problem or empty string when all is fine", "Sets the baseline start text value.\n\n@param baselineNumber baseline number\n@param value baseline start text value", "Configures the player whose current track waveforms and status will automatically be reflected. Whenever a new\ntrack is loaded on that player, the waveform and metadata will be updated, and the current playback position and\nstate of the player will be reflected by the component.\n\n@param player the player number to monitor, or zero if monitoring should stop", "Shuts down the server. Active connections are not affected.", "Transform the operation into something the proxy controller understands.\n\n@param identity the server identity\n@return the transformed operation", "Retrieves the text value for the baseline duration.\n\n@return baseline duration text", "create a consumer\n\n@param zookeeperConfig connect config of zookeeper; ex: 127.0.0.1:2181/jafka\n@param topic the topic to be watched\n@param groupId grouping the consumer clients\n@param listener message listener\n@return the real consumer", "used for encoding url path segment", "Returns the active logged in user." ]
public String urlEncode(String s) { if (s == null || s.isEmpty()) { return s; } return URL.encodeQueryString(s); }
[ "URLEncode a string\n@param s\n@return" ]
[ "Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager", "Curries a procedure that takes one argument.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a procedure that takes no arguments. Never <code>null</code>.", "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.", "Add a cause to the backtrace.\n\n@param cause\nthe cause\n@param bTrace\nthe backtrace list", "Write a set of fields from a field container to a JSON file.\n@param objectName name of the object, or null if no name required\n@param container field container\n@param fields fields to write", "Total count of partition-stores moved in this task.\n\n@return number of partition stores moved in this task.", "Get the nearest scale.\n\n@param zoomLevels the list of Zoom Levels.\n@param tolerance the tolerance to use when considering if two values are equal. For example if\n12.0 == 12.001. The tolerance is a percentage.\n@param zoomLevelSnapStrategy the strategy to use for snapping to the nearest zoom level.\n@param geodetic snap to geodetic scales.\n@param paintArea the paint area of the map.\n@param dpi the DPI.", "Adds a license to an artifact if the license exist into the database\n\n@param gavc String\n@param licenseId String", "Goes through all the RO Stores in the plan and swaps it\n\n@param swappedStoreNames Names of stores already swapped\n@param useSwappedStoreNames Swap only the previously swapped stores (\nHappens during error )" ]
private static Document objectForInsert(Tuple tuple, Document dbObject) { MongoDBTupleSnapshot snapshot = (MongoDBTupleSnapshot) tuple.getSnapshot(); for ( TupleOperation operation : tuple.getOperations() ) { String column = operation.getColumn(); if ( notInIdField( snapshot, column ) ) { switch ( operation.getType() ) { case PUT: MongoHelpers.setValue( dbObject, column, operation.getValue() ); break; case PUT_NULL: case REMOVE: MongoHelpers.resetValue( dbObject, column ); break; } } } return dbObject; }
[ "Creates a Document that can be passed to the MongoDB batch insert function" ]
[ "Translates the Fluo row, column, and value set into the persistent format that is stored in\nAccumulo.\n\n<p>\nThe objects returned by this method are reused each time its called. So each time this is\ncalled it invalidates what was returned by previous calls to this method.\n\n@return A an array of Accumulo key values in correct sorted order.", "Exact conversion of displaced lognormal ATM volatiltiy to normal ATM volatility.\n\n@param forward The forward\n@param displacement The displacement (considering a displaced lognormal model, otherwise 0.\n@param maturity The maturity\n@param lognormalVolatiltiy The (implied) lognormal volatility.\n@return The (implied) normal volatility.\n@see <a href=\"http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2687742\">Dimitroff, Fries, Lichtner and Rodi: Lognormal vs Normal Volatilities and Sensitivities in Practice</a>", "Return the raw source line corresponding to the specified AST node\n\n@param node - the Groovy AST node", "Put new sequence object for given sequence name.\n@param sequenceName Name of the sequence.\n@param seq The sequence object to add.", "As part of checking whether a metadata cache can be auto-mounted for a particular media slot, this method\nlooks up the track at the specified offset within the player's track list, and returns its rekordbox ID.\n\n@param slot the slot being considered for auto-attaching a metadata cache\n@param client the connection to the database server on the player holding that slot\n@param offset an index into the list of all tracks present in the slot\n\n@throws IOException if there is a problem communicating with the player", "Checks if a key already exists.\n@param newKey the key to check for.\n@return <code>true</code> if the key already exists, <code>false</code> otherwise.", "Used to populate Map with given annotations\n\n@param annotations initial value for annotations", "Lift a Java Func4 to a Scala Function4\n\n@param f the function to lift\n\n@returns the Scala function", "Get the replication partitions list for the given partition.\n\n@param index Partition id for which we are generating the preference list\n@return The List of partitionId where this partition is replicated." ]
public void parseAndAddDictionaries(CmsObject cms) throws CmsRoleViolationException { OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT_ADMIN); CmsSpellcheckDictionaryIndexer.parseAndAddZippedDictionaries(m_solrClient, cms); CmsSpellcheckDictionaryIndexer.parseAndAddDictionaries(m_solrClient, cms); }
[ "Parses and adds dictionaries to the Solr index.\n\n@param cms the OpenCms object.\n\n@throws CmsRoleViolationException in case the user does not have the required role ROOT_ADMIN" ]
[ "Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string.", "Get the column name from the indirection table.\n@param mnAlias\n@param path", "Get the first controller of a specified type\n@param type controller type to search for\n@return controller found or null if no controllers of the given type", "Read the calendar data from a Gantt Designer file.\n\n@param gantt Gantt Designer file.", "Gets the first row for a query\n\n@param query query to execute\n@return result or NULL", "Log a warning for the resource at the provided address and a single attribute. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attribute attribute we are warning about", "Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception", "Set the repeat count of an override at ordinal index\n\n@param pathName Path name\n@param methodName Fully qualified method name\n@param ordinal 1-based index of the override within the overrides of type methodName\n@param repeatCount new repeat count to set\n@return true if success, false otherwise", "Sets the top and bottom frame margin.\n@param frameTop margin\n@param frameBottom margin\n@return this to allow chaining" ]
public List<String> getModuleVersions(final String name, final FiltersHolder filters) { final List<String> versions = repositoryHandler.getModuleVersions(name, filters); if (versions.isEmpty()) { throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND) .entity("Module " + name + " does not exist.").build()); } return versions; }
[ "Returns the available module names regarding the filters\n\n@param name String\n@param filters FiltersHolder\n@return List<String>" ]
[ "Returns the ViewGroup used as a parent for the content view.\n\n@return The content view's parent.", "Sets the bottom padding character for all cells in the table.\n@param paddingBottomChar new padding character, ignored if null\n@return this to allow chaining", "Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error", "Parse priority.\n\n\n@param priority priority value\n@return Priority instance", "Add a dependency to this node.\n\n@param node the dependency to add.", "Gets the time warp.\n\n@return the time warp", "Build all children.\n\n@return the child descriptions", "Performs an efficient update of each columns' norm", "Set the time and value of the key at the given index\n@param keyIndex 0 based index of key\n@param time key time in seconds\n@param values key values" ]
@Override public boolean commit() { final CoreRemoteMongoCollection<DocumentT> collection = getCollection(); final List<WriteModel<DocumentT>> writeModels = getBulkWriteModels(); // define success as any one operation succeeding for now boolean success = true; for (final WriteModel<DocumentT> write : writeModels) { if (write instanceof ReplaceOneModel) { final ReplaceOneModel<DocumentT> replaceModel = ((ReplaceOneModel) write); final RemoteUpdateResult result = collection.updateOne(replaceModel.getFilter(), (Bson) replaceModel.getReplacement()); success = success && (result != null && result.getModifiedCount() == result.getMatchedCount()); } else if (write instanceof UpdateOneModel) { final UpdateOneModel<DocumentT> updateModel = ((UpdateOneModel) write); final RemoteUpdateResult result = collection.updateOne(updateModel.getFilter(), updateModel.getUpdate()); success = success && (result != null && result.getModifiedCount() == result.getMatchedCount()); } else if (write instanceof UpdateManyModel) { final UpdateManyModel<DocumentT> updateModel = ((UpdateManyModel) write); final RemoteUpdateResult result = collection.updateMany(updateModel.getFilter(), updateModel.getUpdate()); success = success && (result != null && result.getModifiedCount() == result.getMatchedCount()); } } return success; }
[ "Commits the writes to the remote collection." ]
[ "helper method to set the TranslucentStatusFlag\n\n@param on", "Confirm that all nodes shared between clusters host exact same partition\nIDs and that nodes only in the super set cluster have no partition IDs.\n\n@param subsetCluster\n@param supersetCluster", "Returns the key for the best matching local-specific property version.\n\n@param propertiesMap the \"raw\" property map\n@param key the name of the property to search for\n@param locale the locale to search for\n\n@return the key for the best matching local-specific property version.", "Add new control at the end of control bar with specified touch listener.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param properties JSON control specific properties\n@param listener touch listener", "Returns a usage String based on the defined command and options.\nUseful when printing \"help\" info etc.", "Enables or disables sound.\nWhen sound is disabled, nothing is played but the\naudio sources remain intact.\n@param flag true to enable sound, false to disable.", "Print the class's constructors m", "Prepare all tasks.\n\n@param entry the patch entry\n@param context the patch context\n@param tasks a list for prepared tasks\n@param conflicts a list for conflicting content items\n@throws PatchingException", "Tries to load the custom error page at the given rootPath.\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param rootPath the VFS root path to the error page resource\n@return a flag, indicating if the error page could be loaded" ]
protected ValueContainer[] getNonKeyValues(PersistenceBroker broker, ClassDescriptor cld, Object obj) throws PersistenceBrokerException { return broker.serviceBrokerHelper().getNonKeyRwValues(cld, obj); }
[ "returns an Array with an Objects NON-PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values" ]
[ "Write a size prefixed string where the size is stored as a 2 byte\nshort\n\n@param buffer The buffer to write to\n@param s The string to write", "Tests if this enumeration contains more elements.\n@return <code>true</code> if and only if this enumeration object\ncontains at least one more element to provide;\n<code>false</code> otherwise.", "Get a property as a string or throw an exception.\n\n@param key the property name", "Decomposes and overwrites the input matrix.\n\n@param A Semi-Positive Definite (SPD) system matrix. Modified. Reference saved.\n@return If the matrix can be decomposed. Will always return false of not SPD.", "Adds OPT_P | OPT_PARTITION option to OptionParser, with multiple\narguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Delete a server group by id\n\n@param id server group ID", "Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.", "Deletes a vertex from this list.", "Specifies the angle of the effect.\n\n@param angle the angle of the effect.\n@angle" ]
public static List<String> getNodeListFromStringLineSeperateOrSpaceSeperate( String listStr, boolean removeDuplicate) { List<String> nodes = new ArrayList<String>(); for (String token : listStr.split("[\\r?\\n| +]+")) { // 20131025: fix if fqdn has space in the end. if (token != null && !token.trim().isEmpty()) { nodes.add(token.trim()); } } if (removeDuplicate) { removeDuplicateNodeList(nodes); } logger.info("Target hosts size : " + nodes.size()); return nodes; }
[ "Gets the node list from string line seperate or space seperate.\n\n@param listStr\nthe list str\n@param removeDuplicate\nthe remove duplicate\n@return the node list from string line seperate or space seperate" ]
[ "Command-line version of the classifier. See the class\ncomments for examples of use, and SeqClassifierFlags\nfor more information on supported flags.", "Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null.", "Checks, if all values necessary for a specific pattern are valid.\n@return a flag, indicating if all values required for the pattern are valid.", "Gets a static resource from a plugin\n\n@param pluginName - Name of the plugin(defined in the plugin manifest)\n@param fileName - Filename to fetch\n@return byte array of the resource\n@throws Exception exception", "Loads a classifier from the file specified. If the file's name ends in .gz,\nuses a GZIPInputStream, else uses a regular FileInputStream. This method\ncloses the File when done.\n\n@param file\nLoads a classifier from this file.\n@param props\nProperties in this object will be used to overwrite those\nspecified in the serialized classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data", "Returns timezone offset from a session instance. The offset is\nin minutes to UTC time\n\n@param session\nthe session instance\n@return the offset to UTC time in minutes", "Extracts the version id from a string\n\n@param versionDir The string\n@return Returns the version id of the directory, else -1", "Add a Renderer instance as prototype.\n\n@param renderer to use as prototype.\n@return the current RendererBuilder instance.", "Helper method that encapsulates the minimum logic for adding a job to a\nqueue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJson\nthe job serialized as JSON" ]
public void beforeCompletion() { // avoid redundant calls if(beforeCompletionCall) return; log.info("Method beforeCompletion was called"); int status = Status.STATUS_UNKNOWN; try { JTATxManager mgr = (JTATxManager) getImplementation().getTxManager(); status = mgr.getJTATransaction().getStatus(); // ensure proper work, check all possible status // normally only check for 'STATUS_MARKED_ROLLBACK' is necessary if(status == Status.STATUS_MARKED_ROLLBACK || status == Status.STATUS_ROLLEDBACK || status == Status.STATUS_ROLLING_BACK || status == Status.STATUS_UNKNOWN || status == Status.STATUS_NO_TRANSACTION) { log.error("Synchronization#beforeCompletion: Can't prepare for commit, because tx status was " + TxUtil.getStatusString(status) + ". Do internal cleanup only."); } else { if(log.isDebugEnabled()) { log.debug("Synchronization#beforeCompletion: Prepare for commit"); } // write objects to database prepareCommit(); } } catch(Exception e) { log.error("Synchronization#beforeCompletion: Error while prepare for commit", e); if(e instanceof LockNotGrantedException) { throw (LockNotGrantedException) e; } else if(e instanceof TransactionAbortedException) { throw (TransactionAbortedException) e; } else if(e instanceof ODMGRuntimeException) { throw (ODMGRuntimeException) e; } else { throw new ODMGRuntimeException("Method beforeCompletion() fails, status of JTA-tx was " + TxUtil.getStatusString(status) + ", message: " + e.getMessage()); } } finally { beforeCompletionCall = true; setInExternTransaction(false); internalCleanup(); } }
[ "FOR internal use. This method was called before the external transaction was completed.\n\nThis method was called by the JTA-TxManager before the JTA-tx prepare call. Within this method\nwe prepare odmg for commit and pass all modified persistent objects to DB and release/close the used\nconnection. We have to close the connection in this method, because the TxManager does prepare for commit\nafter this method and all used DataSource-connections have to be closed before.\n\n@see javax.transaction.Synchronization" ]
[ "Returns any events for the given resource ID since the last sync token\n\n@param resource Globally unique identifier for the resource.\n@param sync Sync token provided by a previous call to the events API\n@return Request object", "Adds an additional statement to the constructed document.\n\n@param statement\nthe additional statement\n@return builder object to continue construction", "Sets the ssh priv key relative path.\nNote that must be relative path for now.\nThis default to no need of passphrase for the private key.\nWill also auto set the login type to key based.\n\n@param privKeyRelativePath\nthe priv key relative path\n@return the parallel task builder", "Build resolution context in which message will be discovered and built\n@param components resolution components, used to identify message bundle\n@param messageParams message parameters will be substituted in message and used in pattern matching\n@since 3.1\n@return immutable resolution context instance for given parameters", "Parses command-line and gets metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "Asynchronous call that begins execution of the task\nand returns immediately.", "Tells you if the date part of a datetime is in a certain time range.", "Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.", "Escape a value to be HTML friendly.\n@param value the Object value.\n@return the HTML-escaped String, or <null> if the value is null." ]
public void addColumnPair(String localColumn, String remoteColumn) { if (!_localColumns.contains(localColumn)) { _localColumns.add(localColumn); } if (!_remoteColumns.contains(remoteColumn)) { _remoteColumns.add(remoteColumn); } }
[ "Adds a column pair to this foreignkey.\n\n@param localColumn The column in the local table\n@param remoteColumn The column in the remote table" ]
[ "Was the CDJ playing a track when this update was sent?\n\n@return true if the play flag was set, or, if this seems to be a non-nexus player, if <em>P<sub>1</sub></em>\nhas a value corresponding to a playing state.", "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", "Return true if the values of the two vectors are equal when cast as ints.\n\n@param a first vector to compare\n@param b second vector to compare\n@return true if the values of the two vectors are equal when cast as ints", "Use this API to fetch appfwwsdl resource of given name .", "Support the range subscript operator for GString\n\n@param text a GString\n@param range a Range\n@return the String of characters corresponding to the provided range\n@since 2.3.7", "Blocks until the server has started successfully or an exception is\nthrown.\n\n@throws VoldemortException if a problem occurs during start-up wrapping\nthe original exception.", "Use this API to fetch all the nd6ravariables resources that are configured on netscaler.", "Obtains a British Cutover zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Sets currency symbol.\n\n@param symbol currency symbol" ]
private void readVersion(InputStream is) throws IOException { BytesReadInputStream bytesReadStream = new BytesReadInputStream(is); String version = DatatypeConverter.getString(bytesReadStream); m_offset += bytesReadStream.getBytesRead(); SynchroLogger.log("VERSION", version); String[] versionArray = version.split("\\."); m_majorVersion = Integer.parseInt(versionArray[0]); }
[ "Read the version number.\n\n@param is input stream" ]
[ "Runs through the log removing segments until the size of the log is at least\nlogRetentionSize bytes in size\n\n@throws IOException", "Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to process.", "Gets a list of any comments on this file.\n\n@return a list of comments on this file.", "Maps an integer field ID to a field type.\n\n@param field field ID\n@return field type", "Returns the next object in the table.\n\n@throws IllegalStateException\nIf there was a problem extracting the object from SQL.", "Is the user password reset?\n\n@param user User to check\n@return boolean", "Add utility routes the router\n\n@param router", "Creates a method signature.\n\n@param method Method instance\n@return method signature", "This method log given exception in specified listener" ]
public boolean checkXpathStartsWithXpathEventableCondition(Document dom, EventableCondition eventableCondition, String xpath) throws XPathExpressionException { if (eventableCondition == null || Strings .isNullOrEmpty(eventableCondition.getInXPath())) { throw new CrawljaxException("Eventable has no XPath condition"); } List<String> expressions = XPathHelper.getXpathForXPathExpressions(dom, eventableCondition.getInXPath()); return checkXPathUnderXPaths(xpath, expressions); }
[ "Checks whether an XPath expression starts with an XPath eventable condition.\n\n@param dom The DOM String.\n@param eventableCondition The eventable condition.\n@param xpath The XPath.\n@return boolean whether xpath starts with xpath location of eventable condition xpath\ncondition\n@throws XPathExpressionException\n@throws CrawljaxException when eventableCondition is null or its inXPath has not been set" ]
[ "Register the DAO with the cache. This will allow folks to build a DAO externally and then register so it can be\nused internally as necessary.\n\n<p>\n<b>NOTE:</b> By default this registers the DAO to be associated with the class that it uses. If you need to\nregister multiple dao's that use different {@link DatabaseTableConfig}s then you should use\n{@link #registerDaoWithTableConfig(ConnectionSource, Dao)}.\n</p>\n\n<p>\n<b>NOTE:</b> You should maybe use the {@link DatabaseTable#daoClass()} and have the DaoManager construct the DAO\nif possible.\n</p>", "Update a note.\n\n@param note\nThe Note to update\n@throws FlickrException", "Check if a given string is a valid java package or class name.\n\nThis method use the technique documented in\n[this SO question](https://stackoverflow.com/questions/13557195/how-to-check-if-string-is-a-valid-class-identifier)\nwith the following extensions:\n\n* if the string does not contain `.` then assume it is not a valid package or class name\n\n@param s\nthe string to be checked\n@return\n`true` if `s` is a valid java package or class name", "Use this API to fetch nslimitidentifier_binding resource of given name .", "Add a IN clause so the column must be equal-to one of the objects from the list passed in.", "Starts the animation with the given index.\n@param animIndex 0-based index of {@link GVRAnimator} to start;\n@see GVRAvatar#stop()\n@see #start(String)", "Initializes an annotation class\n\n@param name The name of the annotation class\n@return The instance of the annotation. Returns a dummy if the class was\nnot found", "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", "Use this API to add systemuser resources." ]
public TopicList<Topic> getTopicsList(String groupId, int perPage, int page) throws FlickrException { TopicList<Topic> topicList = new TopicList<Topic>(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_TOPICS_GET_LIST); parameters.put("group_id", groupId); if (perPage > 0) { parameters.put("per_page", "" + perPage); } if (page > 0) { parameters.put("page", "" + page); } Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element topicElements = response.getPayload(); topicList.setPage(topicElements.getAttribute("page")); topicList.setPages(topicElements.getAttribute("pages")); topicList.setPerPage(topicElements.getAttribute("perpage")); topicList.setTotal(topicElements.getAttribute("total")); topicList.setGroupId(topicElements.getAttribute("group_id")); topicList.setIconServer(Integer.parseInt(topicElements.getAttribute("iconserver"))); topicList.setIconFarm(Integer.parseInt(topicElements.getAttribute("iconfarm"))); topicList.setName(topicElements.getAttribute("name")); topicList.setMembers(Integer.parseInt(topicElements.getAttribute("members"))); topicList.setPrivacy(Integer.parseInt(topicElements.getAttribute("privacy"))); topicList.setLanguage(topicElements.getAttribute("lang")); topicList.setIsPoolModerated("1".equals(topicElements.getAttribute("ispoolmoderated"))); NodeList topicNodes = topicElements.getElementsByTagName("topic"); for (int i = 0; i < topicNodes.getLength(); i++) { Element element = (Element) topicNodes.item(i); topicList.add(parseTopic(element)); } return topicList; }
[ "Get a list of topics from a group.\n\n@param groupId\nUnique identifier of a group returns a list of topics for a given group {@link Group}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A group topic list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html\">API Documentation</a>" ]
[ "Get the value of the specified column.\n\n@param columnName the name of the column\n@return the corresponding value of the column, {@code null} if the column does not exist in the row key", "Reads baseline values for the current task.\n\n@param xmlTask MSPDI task instance\n@param mpxjTask MPXJ task instance\n@param durationFormat duration format to use", "returns array with length 3 and optional entries version, encoding, standalone", "Ensures that the foreign keys required by the given collection are present in the element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the foreign keys", "Append Join for SQL92 Syntax without parentheses", "Register the given callback as to be executed after request completion.\n\n@param name The name of the bean.\n@param callback The callback of the bean to be executed for destruction.", "Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd, while reporting the\nprogress to a ProgressListener.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.\n@param listener a listener for monitoring the download's progress.", "Filter that's either negated or normal as specified.", "Sets the jdbcLevel. parse the string setting and check that it is indeed an integer.\n@param jdbcLevel The jdbcLevel to set" ]
public boolean merge(final PluginXmlAccess other) { boolean _xblockexpression = false; { String _path = this.getPath(); String _path_1 = other.getPath(); boolean _notEquals = (!Objects.equal(_path, _path_1)); if (_notEquals) { String _path_2 = this.getPath(); String _plus = ("Merging plugin.xml files with different paths: " + _path_2); String _plus_1 = (_plus + ", "); String _path_3 = other.getPath(); String _plus_2 = (_plus_1 + _path_3); PluginXmlAccess.LOG.warn(_plus_2); } _xblockexpression = this.entries.addAll(other.entries); } return _xblockexpression; }
[ "Merge the contents of the given plugin.xml into this one." ]
[ "Gets a list of registered docker images from the images cache, if it has been\nregistered to the cache for a specific build-info ID and if a docker manifest has been captured for it\nby the build-info proxy.\nAdditionally, the methods also removes the returned images from the cache.\n@param buildInfoId\n@return", "Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.", "Set the buttons size.", "Returns new instance of OptionalValue with given value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue", "Start the initialization.\n\n@param id\n@param manager\n@param bootstrap\n@return the initialized Weld container", "Divide two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the divide of specified complex numbers.", "Mark the given TaskItem depends on this taskGroup.\n\n@param dependentTaskItem the task item that depends on this task group\n@return key to be used as parameter to taskResult(string) method to retrieve result of\ninvocation of given task item.", "Utility method used to convert an integer time representation into a\nDuration instance.\n\n@param totalTime integer time representation\n@param format required time format\n@return new Duration instance", "Iterates over all tags of current member and evaluates the template for each one.\n\n@param template The template to be evaluated\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" optional=\"true\" description=\"The parameter name.\"" ]
public static dbdbprofile[] get(nitro_service service) throws Exception{ dbdbprofile obj = new dbdbprofile(); dbdbprofile[] response = (dbdbprofile[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the dbdbprofile resources that are configured on netscaler." ]
[ "The setter for setting configuration file. It will convert the value to a URI.\n\n@param configurationFiles the configuration file map.", "This constructs and returns the request object for the producer pool\n\n@param topic the topic to which the data should be published\n@param bidPid the broker id and partition id\n@param data the data to be published\n@return producer data of builder", "Get the element at the index as an integer.\n\n@param i the index of the element to access", "Add a shutdown listener, which gets called when all requests completed on shutdown.\n\n@param listener the shutdown listener", "Adds a JSON string to the DB.\n\n@param obj the JSON to record\n@param table the table to insert into\n@return the number of rows in the table, or DB_OUT_OF_MEMORY_ERROR/DB_UPDATE_ERROR", "Get bean manager from portlet context.\n\n@param ctx the portlet context\n@return bean manager if found", "This method evaluates a if a graphical indicator should\nbe displayed, given a set of Task or Resource data. The\nmethod will return -1 if no indicator should be displayed.\n\n@param container Task or Resource instance\n@return indicator index", "Use this API to fetch wisite_farmname_binding resources of given name .", "Use this API to fetch filtered set of sslcipher_individualcipher_binding resources.\nset the filter parameter values in filtervalue object." ]
@SuppressWarnings("unchecked") public Set<RateType> getRateTypes() { Set<RateType> result = get(KEY_RATE_TYPES, Set.class); if (result == null) { return Collections.emptySet(); } return result; }
[ "Get the rate types set.\n\n@return the rate types set, or an empty array, but never null." ]
[ "Returns a collection of all profiles\n\n@return Collection of all Profiles\n@throws Exception exception", "Decode the password from the given data. Will decode the data block as well.\n\n@param data encrypted data block\n@param encryptionCode encryption code\n\n@return password", "Generates the path to an output file for a given source URL. Creates\nall necessary parent directories for the destination file.\n@param src the source\n@return the path to the output file", "The primary run loop of the kqueue event processor.", "Print the class's constructors m", "generate a message for loglevel DEBUG\n\n@param pObject the message Object", "Gets a collection.\n\n@param collectionName the name of the collection to return\n@return the collection", "Obtains a Discordian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Updates the indices in the index buffer from a Java CharBuffer.\nAll of the entries of the input buffer 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 CharBuffer containing the new values\n@throws IllegalArgumentException if char array is wrong size" ]
public Iterable<RowKey> getKeys() { if ( currentState.isEmpty() ) { if ( cleared ) { // if the association has been cleared and the currentState is empty, we consider that there are no rows. return Collections.emptyList(); } else { // otherwise, the snapshot rows are the current ones return snapshot.getRowKeys(); } } else { // It may be a bit too large in case of removals, but that's fine for now Set<RowKey> keys = CollectionHelper.newLinkedHashSet( cleared ? currentState.size() : snapshot.size() + currentState.size() ); if ( !cleared ) { // we add the snapshot RowKeys only if the association has not been cleared for ( RowKey rowKey : snapshot.getRowKeys() ) { keys.add( rowKey ); } } for ( Map.Entry<RowKey,AssociationOperation> op : currentState.entrySet() ) { switch ( op.getValue().getType() ) { case PUT: keys.add( op.getKey() ); break; case REMOVE: keys.remove( op.getKey() ); break; } } return keys; } }
[ "Returns all keys of all rows contained within this association.\n\n@return all keys of all rows contained within this association" ]
[ "Close a transaction and do all the cleanup associated with it.", "Moves to the next step.", "Retrieve a Double from an input stream.\n\n@param is input stream\n@return Double instance", "Base64 encodes a byte array.\n\n@param bytes Bytes to encode.\n@return Encoded string.\n@throws IllegalArgumentException if {@code bytes} is null or exceeds 3/4ths of {@code\nInteger.MAX_VALUE}.", "Sets the indirection handler class.\n\n@param indirectionHandlerClass The class for indirection handlers", "Use this API to clear route6 resources.", "Add a '&gt;' clause so the column must be greater-than the value.", "Begin writing a named list attribute.\n\n@param name attribute name", "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." ]
public void setQueryExecuteTimeLimit(long queryExecuteTimeLimit, TimeUnit timeUnit) { this.queryExecuteTimeLimitInMs = TimeUnit.MILLISECONDS.convert(queryExecuteTimeLimit, timeUnit); }
[ "Queries taking longer than this limit to execute are logged.\n@param queryExecuteTimeLimit the limit to set in milliseconds.\n@param timeUnit" ]
[ "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", "Attachments are only structurally different if one step has an inline attachment\nand the other step either has no inline attachment or the inline attachment is\ndifferent.", "This method changes package_path into folder's path\n\n@param path\n, as es.upm.gsi\n@return the new path, es/upm/gsi", "Checks if the provided license is valid and could be stored into the database\n\n@param license the license to test\n@throws WebApplicationException if the data is corrupted", "Assign to the data object the val corresponding to the fieldType.", "Returns a query filter for the given document _id and version. The version is allowed to be\nnull. The query will match only if there is either no version on the document in the database\nin question if we have no reference of the version or if the version matches the database's\nversion.\n\n@param documentId the _id of the document.\n@param version the expected version of the document, if any.\n@return a query filter for the given document _id and version for a remote operation.", "Notifies all interested subscribers of the given revision.\n\n@param mwRevision\nthe given revision\n@param isCurrent\ntrue if this is guaranteed to be the most current revision", "Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object", "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 static snmpalarm[] get(nitro_service service, String trapname[]) throws Exception{ if (trapname !=null && trapname.length>0) { snmpalarm response[] = new snmpalarm[trapname.length]; snmpalarm obj[] = new snmpalarm[trapname.length]; for (int i=0;i<trapname.length;i++) { obj[i] = new snmpalarm(); obj[i].set_trapname(trapname[i]); response[i] = (snmpalarm) obj[i].get_resource(service); } return response; } return null; }
[ "Use this API to fetch snmpalarm resources of given names ." ]
[ "Dump an array of bytes in hexadecimal.\n\n@param displayOffset the display offset (left column)\n@param data the byte array of data\n@param offset the offset to start dumping in the byte array\n@param len the length of data to dump\n@return the dump string", "Obtain the ID associated with a profile name\n\n@param profileName profile name\n@return ID of profile", "Sobel method to generate bump map from a height map\n\n@param input - A height map\n@return bump map", "Process an MPP file to make it anonymous.\n\n@param input input file name\n@param output output file name\n@throws Exception", "as we know nothing has changed.", "Throws one RendererException if the content parent or layoutInflater are null.", "Merges the hardcoded results of this Configuration with the given\nConfiguration.\n\nThe resultant hardcoded results will be the union of the two sets of\nhardcoded results. Where the AnalysisResult for a class is found in both\nConfigurations, the result from otherConfiguration will replace the\nexisting result in this Configuration. This replacement behaviour will\noccur for subsequent calls to\n{@link #mergeHardcodedResultsFrom(Configuration)}.\n\n@param otherConfiguration - Configuration to merge hardcoded results with.", "Restores a BoxAPIConnection from a saved state.\n\n@see #save\n@param clientID the client ID to use with the connection.\n@param clientSecret the client secret to use with the connection.\n@param state the saved state that was created with {@link #save}.\n@return a restored API connection.", "Sets the specified long 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" ]
public boolean detectSonyMylo() { if ((userAgent.indexOf(manuSony) != -1) && ((userAgent.indexOf(qtembedded) != -1) || (userAgent.indexOf(mylocom2) != -1))) { return true; } return false; }
[ "Detects if the current browser is a Sony Mylo device.\n@return detection of a Sony Mylo device" ]
[ "In common shader cases, NaN makes little sense. Correspondingly, GVRF is\ngoing to use Float.NaN as illegal flag in many cases. Therefore, we need\na function to check if there is any setX that is using NaN as input.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param data\nA single float data.\n@throws IllegalArgumentException\nif the data includes NaN.", "Find out which method to call on the service bean.", "Tests correctness.", "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", "Attachments are only structurally different if one step has an inline attachment\nand the other step either has no inline attachment or the inline attachment is\ndifferent.", "Writes a number to the specified byte array field, breaking it into its component bytes in big-endian order.\nIf the number is too large to fit in the specified number of bytes, only the low-order bytes are written.\n\n@param number the number to be written to the array\n@param buffer the buffer to which the number should be written\n@param start where the high-order byte should be written\n@param length how many bytes of the number should be written", "Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under", "Use this API to add vpnclientlessaccesspolicy.", "Build a new WebDriver based EmbeddedBrowser.\n\n@return the new build WebDriver based embeddedBrowser" ]
public static void dumpBlockData(int headerSize, int blockSize, byte[] data) { if (data != null) { System.out.println(ByteArrayHelper.hexdump(data, 0, headerSize, false)); int index = headerSize; while (index < data.length) { System.out.println(ByteArrayHelper.hexdump(data, index, blockSize, false)); index += blockSize; } } }
[ "Dumps the contents of a structured block made up from a header\nand fixed sized records.\n\n@param headerSize header zie\n@param blockSize block size\n@param data data block" ]
[ "Add a user by ID to the list of people to notify when the retention period is ending.\n@param userID The ID of the user to add to the list.", "Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source", "Handles incoming Send Data Request. Send Data request are used\nto acknowledge or cancel failed messages.\n@param incomingMessage the request message to process.", "Searches the variables layers, top to bottom, for given name, and returns if found; null otherwise.\n\nIf maxDepth is set to {@link Variables#SEARCH_ALL_LAYERS}, then search all layers.", "Creates an object instance according to clb, and fills its fileds width data provided by row.\n@param row A {@link Map} contain the Object/Row mapping for the object.\n@param targetClassDescriptor If the \"ojbConcreteClass\" feature was used, the target\n{@link org.apache.ojb.broker.metadata.ClassDescriptor} could differ from the descriptor\nthis class was associated - see {@link #selectClassDescriptor}.\n@param targetObject If 'null' a new object instance is build, else fields of object will\nbe refreshed.\n@throws PersistenceBrokerException if there ewas an error creating the new object", "send object to client and serialize it using JSON\n\n@param objectToSend the object to send\n@param cb the callback after sending the message", "Returns the ending used by the Wikimedia-provided dumpfile names of the\ngiven type.\n\n@param dumpContentType\nthe type of dump\n@return postfix of the dumpfile name\n@throws IllegalArgumentException\nif the given dump file type is not known", "Gets the path used for the results of XSLT Transforms.", "Use this API to delete nsacl6 resources of given names." ]
protected BlockBox createBlock(BlockBox parent, Element n, boolean replaced) { BlockBox root; if (replaced) { BlockReplacedBox rbox = new BlockReplacedBox((Element) n, (Graphics2D) parent.getGraphics().create(), parent.getVisualContext().create()); rbox.setViewport(viewport); rbox.setContentObj(new ReplacedImage(rbox, rbox.getVisualContext(), baseurl, n.getAttribute("src"))); root = rbox; } else { root = new BlockBox((Element) n, (Graphics2D) parent.getGraphics().create(), parent.getVisualContext().create()); root.setViewport(viewport); } root.setBase(baseurl); root.setParent(parent); root.setContainingBlockBox(parent); root.setClipBlock(viewport); root.setOrder(next_order++); return root; }
[ "Creates a new block box from the given element with the given parent. No style is assigned to the resulting box.\n@param parent The parent box in the tree of boxes.\n@param n The element that this box belongs to.\n@param replaced When set to <code>true</code>, a replaced block box will be created. Otherwise, a normal non-replaced block will be created.\n@return The new block box." ]
[ "Creates new legal hold policy assignment.\n@param api the API connection to be used by the resource.\n@param policyID ID of policy to create assignment for.\n@param resourceType type of target resource. Can be 'file_version', 'file', 'folder', or 'user'.\n@param resourceID ID of the target resource.\n@return info about created legal hold policy assignment.", "Split string of comma-delimited ints into an a int array\n\n@param str\n@return\n@throws IllegalArgumentException", "This method returns the value random variable of the product within the specified model,\nevaluated at a given evalutationTime.\nCash-flows prior evaluationTime are not considered.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model The model used to price the product.\n@return The random variable representing the value of the product discounted to evaluation time.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Validate the header signature.\n\n@param input The input to read the signature from\n@throws IOException If any read problems occur", "Create a classname from a given path\n\n@param path\n@return", "Read the metadata from a hadoop SequenceFile\n\n@param fs The filesystem to read from\n@param path The file to read from\n@return The metadata from this file", "Resolve the given string using any plugin and the DMR resolve method", "Use this API to delete dnsaaaarec resources.", "Write the patch.xml\n\n@param rollbackPatch the patch\n@param file the target file\n@throws IOException" ]
public void read(InputStream is) throws IOException { byte[] headerBlock = new byte[20]; is.read(headerBlock); int headerLength = PEPUtility.getShort(headerBlock, 8); int recordCount = PEPUtility.getInt(headerBlock, 10); int recordLength = PEPUtility.getInt(headerBlock, 16); StreamHelper.skip(is, headerLength - headerBlock.length); byte[] record = new byte[recordLength]; for (int recordIndex = 1; recordIndex <= recordCount; recordIndex++) { is.read(record); readRow(recordIndex, record); } }
[ "Reads the table data from an input stream and breaks\nit down into rows.\n\n@param is input stream" ]
[ "The quick way to detect for a tier of devices.\nThis method detects for devices which can\ndisplay iPhone-optimized web content.\nIncludes iPhone, iPod Touch, Android, Windows Phone 7 and 8, BB10, WebOS, Playstation Vita, etc.\n@return detection of any device in the iPhone/Android/Windows Phone/BlackBerry/WebOS Tier", "When an alias for a field is added, index it here to allow lookup by alias and type.\n\n@param type field type\n@param alias field alias", "Sets the target implementation type required. This can be used to explicitly acquire a specific\nimplementation\ntype and use a query to configure the instance or factory to be returned.\n\n@param type the target implementation type, not null.\n@return this query builder for chaining.", "Add an order on the given column\n\n@param columnName the name of the column\n@param ascending whether the sorting is ascending or descending", "return a generic Statement for the given ClassDescriptor", "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", "Merge msg bundles together, creating new MsgBundle with merges msg bundles passed in as a method argument", "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.", "Here the lambda in the implicit step is determined dynamically. At first\nit selects zeros to quickly reveal singular values that are zero or close to zero.\nThen it computes it using a Wilkinson shift." ]
public static <T> List<List<T>> getNGrams(List<T> items, int minSize, int maxSize) { List<List<T>> ngrams = new ArrayList<List<T>>(); int listSize = items.size(); for (int i = 0; i < listSize; ++i) { for (int ngramSize = minSize; ngramSize <= maxSize; ++ngramSize) { if (i + ngramSize <= listSize) { List<T> ngram = new ArrayList<T>(); for (int j = i; j < i + ngramSize; ++j) { ngram.add(items.get(j)); } ngrams.add(ngram); } } } return ngrams; }
[ "Get all sub-lists of the given list of the given sizes.\n\nFor example:\n\n<pre>\nList&lt;String&gt; items = Arrays.asList(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;);\nSystem.out.println(CollectionUtils.getNGrams(items, 1, 2));\n</pre>\n\nwould print out:\n\n<pre>\n[[a], [a, b], [b], [b, c], [c], [c, d], [d]]\n</pre>\n\n@param <T>\nThe type of items contained in the list.\n@param items\nThe list of items.\n@param minSize\nThe minimum size of an ngram.\n@param maxSize\nThe maximum size of an ngram.\n@return All sub-lists of the given sizes." ]
[ "Create the actual patchable target.\n\n@param name the layer name\n@param layer the layer path config\n@param metadata the metadata location for this target\n@param image the installed image\n@return the patchable target\n@throws IOException", "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", "Read calendar hours and exception data.\n\n@param calendar parent calendar\n@param row calendar hours and exception data", "private int numCalls = 0;", "Start a timer of the given string name for the current thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked", "Filter the URI based on a regular expression.\nCan be combined with an additional file-extension filter.", "Convert a date to the String representation we use in the JSON.\n@param d the date to convert\n@return the String representation we use in the JSON.", "Creates a new tag in a workspace or organization.\n\nEvery tag is required to be created in a specific workspace or\norganization, and this cannot be changed once set. Note that you can use\nthe `workspace` parameter regardless of whether or not it is an\norganization.\n\nReturns the full record of the newly created tag.\n\n@param workspace The workspace or organization to create the tag in.\n@return Request object", "Navigate to, and remove, this address in the given model node.\n\n@param model the model node\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 would\nuse {@link org.jboss.as.controller.OperationContext#removeResource(PathAddress)} to\nremove resources." ]
public float getTangentY(int vertex) { if (!hasTangentsAndBitangents()) { throw new IllegalStateException("mesh has no bitangents"); } checkVertexIndexBounds(vertex); return m_tangents.getFloat((vertex * 3 + 1) * SIZEOF_FLOAT); }
[ "Returns the y-coordinate of a vertex bitangent.\n\n@param vertex the vertex index\n@return the y coordinate" ]
[ "Set the main attribute \"Bundle-RequiredExecutionEnvironment\" to the given\nvalue.\n\n@param bree The new value", "Get the context for the specified photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@return The PhotoContext\n@throws FlickrException", "Use this API to fetch all the snmpoption resources that are configured on netscaler.", "capture screenshot of an eye", "Reads the given source byte buffer into this buffer at the given offset\n@param src source byte buffer\n@param destOffset offset in this buffer to read to\n@return the number of bytes read", "Find and read the cache format entry in a metadata cache file.\n\n@return the content of the format entry, or {@code null} if none was found\n\n@throws IOException if there is a problem reading the file", "Adds the basic sentence.\n\n@param s the s\n@throws ParseException the parse exception", "Begin building a url for this host with the specified image.", "Record the connection establishment time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param connEstTimeUs The number of us to wait before establishing a\nconnection" ]
private JSONArray getApplicablePathNames (String requestUrl, Integer requestType) throws Exception { RequestInformation requestInfo = requestInformation.get(); List<EndpointOverride> applicablePaths; JSONArray pathNames = new JSONArray(); // Get all paths that match the request applicablePaths = PathOverrideService.getInstance().getSelectedPaths(Constants.OVERRIDE_TYPE_REQUEST, requestInfo.client, requestInfo.profile, requestUrl + "?" + requestInfo.originalRequestInfo.getQueryString(), requestType, true); // Extract just the path name from each path for (EndpointOverride path : applicablePaths) { JSONObject pathName = new JSONObject(); pathName.put("name", path.getPathName()); pathNames.put(pathName); } return pathNames; }
[ "Get the names of the paths that would apply to the request\n\n@param requestUrl URL of the request\n@param requestType Type of the request: GET, POST, PUT, or DELETE as integer\n@return JSONArray of path names\n@throws Exception" ]
[ "This method extracts resource data from a Planner file.\n\n@param plannerProject Root node of the Planner file", "This method generates a list of lists. Each list represents the data\nfor an embedded object, and contains set set of RTFEmbeddedObject instances\nthat make up the embedded object. This method will return null\nif there are no embedded objects in the RTF document.\n\n@param text RTF document\n@return list of lists of RTFEmbeddedObject instances", "Try to reconnect to a started server.", "Color waveforms are represented by a series of sixteen bit integers into which color and height information are\npacked. This function returns the integer corresponding to a particular half-frame in the waveform.\n\n@param waveBytes the raw data making up the waveform\n@param segment the index of hte half-frame of interest\n\n@return the sixteen-bit number encoding the height and RGB values of that segment", "Logs the time taken by this rule and adds this to the total time taken for this phase", "Add a task to the project.\n\n@return new task instance", "Add a text symbolizer definition to the rule.\n\n@param styleJson The old style.", "Checks the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "Parse currency.\n\n@param value currency value\n@return currency value" ]
private static <R> RowKey buildRowKey(AssociationKey associationKey, R row, AssociationRowAccessor<R> accessor) { String[] columnNames = associationKey.getMetadata().getRowKeyColumnNames(); Object[] columnValues = new Object[columnNames.length]; for ( int i = 0; i < columnNames.length; i++ ) { String columnName = columnNames[i]; columnValues[i] = associationKey.getMetadata().isKeyColumn( columnName ) ? associationKey.getColumnValue( columnName ) : accessor.get( row, columnName ); } return new RowKey( columnNames, columnValues ); }
[ "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." ]
[ "Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.\n@return a JSON string containing the pending changes.", "Validate the JtsLayer.\n\n@param name mvt layer name\n@param geometries geometries in the tile\n@throws IllegalArgumentException when {@code name} or {@code geometries} are null", "Gets the '.disabled' file for a given version of this store. That file may or may not\nexist.\n\n@param version of the store for which to get the '.disabled' file.\n@return an instance of {@link File} pointing to the '.disabled' file.\n@throws PersistenceFailureException if the requested version cannot be found.", "Calculates the distance between two points\n\n@return distance between two points", "returns an Array with an Objects NON-PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values", "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", "Get the object responsible for printing to the correct output format.\n\n@param specJson the request json from the client", "Reads a quoted string value from the request.", "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" ]
private <T> void deferNotification(T event, final EventMetadata metadata, final ObserverMethod<? super T> observer, final List<DeferredEventNotification<?>> notifications) { TransactionPhase transactionPhase = observer.getTransactionPhase(); boolean before = transactionPhase.equals(TransactionPhase.BEFORE_COMPLETION); Status status = Status.valueOf(transactionPhase); notifications.add(new DeferredEventNotification<T>(contextId, event, metadata, observer, currentEventMetadata, status, before)); }
[ "Defers an event for processing in a later phase of the current\ntransaction.\n\n@param metadata The event object" ]
[ "A property tied to the map, updated when the idle state event is fired.\n\n@return", "Issue the database statements to drop the table associated with a class.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param dataClass\nThe class for which a table will be dropped.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.", "Use this API to update snmpmanager resources.", "Checks if the specified max levels is correct.\n\n@param userMaxLevels the maximum number of levels in the tree\n@param defaultMaxLevels the default max number of levels\n@return the validated max levels", "Recursively searches for formatting annotations.\n\n@param visitedTypes used to prevent an endless loop\n@param parameterName", "Returns the remote collection representing the given namespace.\n\n@param namespace the namespace referring to the remote collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the remote collection representing the given namespace.", "Get the context for a photo in the group pool.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@param groupId\nThe group ID\n@return The PhotoContext\n@throws FlickrException", "This implementation does not support the 'offset' and 'maxResultSize' parameters.", "Creates a new access control entry and stores it for later write out.\n\n@param res the resource\n@param id the id of the principal\n@param allowed the allowed permissions\n@param denied the denied permissions\n@param flags the flags\n\n@return the created ACE" ]
public AbstractVolatilitySurfaceParametric getCloneCalibrated(final AnalyticModel calibrationModel, final Vector<AnalyticProduct> calibrationProducts, final List<Double> calibrationTargetValues, Map<String,Object> calibrationParameters, final ParameterTransformation parameterTransformation, OptimizerFactory optimizerFactory) throws SolverException { if(calibrationParameters == null) { calibrationParameters = new HashMap<>(); } Integer maxIterationsParameter = (Integer)calibrationParameters.get("maxIterations"); Double accuracyParameter = (Double)calibrationParameters.get("accuracy"); Double evaluationTimeParameter = (Double)calibrationParameters.get("evaluationTime"); // @TODO currently ignored, we use the setting form the OptimizerFactory int maxIterations = maxIterationsParameter != null ? maxIterationsParameter.intValue() : 600; double accuracy = accuracyParameter != null ? accuracyParameter.doubleValue() : 1E-8; double evaluationTime = evaluationTimeParameter != null ? evaluationTimeParameter.doubleValue() : 0.0; AnalyticModel model = calibrationModel.addVolatilitySurfaces(this); Solver solver = new Solver(model, calibrationProducts, calibrationTargetValues, parameterTransformation, evaluationTime, optimizerFactory); Set<ParameterObject> objectsToCalibrate = new HashSet<>(); objectsToCalibrate.add(this); AnalyticModel modelCalibrated = solver.getCalibratedModel(objectsToCalibrate); // Diagnostic output if (logger.isLoggable(Level.FINE)) { double lastAccuracy = solver.getAccuracy(); int lastIterations = solver.getIterations(); logger.fine("The solver achieved an accuracy of " + lastAccuracy + " in " + lastIterations + "."); } return (AbstractVolatilitySurfaceParametric)modelCalibrated.getVolatilitySurface(this.getName()); }
[ "Create a clone of this volatility surface using a generic calibration\nof its parameters to given market data.\n\n@param calibrationModel The model used during calibration (contains additional objects required during valuation, e.g. curves).\n@param calibrationProducts The calibration products.\n@param calibrationTargetValues The target values of the calibration products.\n@param calibrationParameters A map containing additional settings like \"evaluationTime\" (Double).\n@param parameterTransformation An optional parameter transformation.\n@param optimizerFactory The factory providing the optimizer to be used during calibration.\n@return An object having the same type as this one, using (hopefully) calibrated parameters.\n@throws SolverException Exception thrown when solver fails." ]
[ "Check if the an operation is done or not.\n\n@param requestId Id of the request\n@param remove Whether remove the request out of the list if it is done.\n@return True if request is complete, false otherwise", "Unzip a file to a target directory.\n@param zip the path to the zip file.\n@param target the path to the target directory into which the zip file will be unzipped.\n@throws IOException", "Returns the negative of the input variable", "Return the factor loading for a given time and a given component.\n\nThe factor loading is the vector <i>f<sub>i</sub></i> such that the scalar product <br>\n<i>f<sub>j</sub>f<sub>k</sub> = f<sub>j,1</sub>f<sub>k,1</sub> + ... + f<sub>j,m</sub>f<sub>k,m</sub></i> <br>\nis the instantaneous covariance of the component <i>j</i> and <i>k</i>.\n\nWith respect to simulation time <i>t</i>, this method uses a piece wise constant interpolation, i.e.,\nit calculates <i>t_<sub>i</sub></i> such that <i>t_<sub>i</sub></i> is the largest point in <code>getTimeDiscretization</code>\nsuch that <i>t_<sub>i</sub> &le; t </i>.\n\nThe component here, it given via a double <i>T</i> which may be associated with the LIBOR fixing date.\nWith respect to component time <i>T</i>, this method uses a piece wise constant interpolation, i.e.,\nit calculates <i>T_<sub>j</sub></i> such that <i>T_<sub>j</sub></i> is the largest point in <code>getTimeDiscretization</code>\nsuch that <i>T_<sub>j</sub> &le; T </i>.\n\n@param time The time <i>t</i> at which factor loading is requested.\n@param component The component time (as a double associated with the fixing of the forward rate) <i>T<sub>i</sub></i>.\n@param realizationAtTimeIndex The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).\n@return The factor loading <i>f<sub>i</sub>(t)</i>.", "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.", "2-D Perlin noise function.\n\n@param x X Value.\n@param y Y Value.\n@return Returns function's value at point xy.", "Use this API to unset the properties of nsrpcnode resources.\nProperties that need to be unset are specified in args array.", "This method retrieves a byte array 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 byte array containing required data", "Use this API to delete sslcertkey." ]
public ItemRequest<Task> update(String task) { String path = String.format("/tasks/%s", task); return new ItemRequest<Task>(this, Task.class, path, "PUT"); }
[ "A specific, existing task can be updated by making a PUT request on the\nURL for that task. Only the fields provided in the `data` block will be\nupdated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated task record.\n\n@param task The task to update.\n@return Request object" ]
[ "Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard", "Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid", "Runs a Story with the given steps factory, applying the given meta\nfilter, and staring from given state.\n\n@param configuration the Configuration used to run story\n@param stepsFactory the InjectableStepsFactory used to created the\ncandidate steps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@param beforeStories the State before running any of the stories, if not\n<code>null</code>\n\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.", "Set child components.\n\n@param children\nchildren", "Find a given range object in a list of ranges by a value in that range. Does a binary\nsearch over the ranges but instead of checking for equality looks within the range.\nTakes the array size as an option in case the array grows while searching happens\n@param <T> Range type\n@param ranges data list\n@param value value in the list\n@param arraySize the max search index of the list\n@return search result of range\nTODO: This should move into SegmentList.scala", "Call the onQueryExecuteTimeLimitExceeded hook if necessary\n@param sql sql statement that took too long\n@param queryStartTime time when query was started.", "Add exceptions to the calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param gpCalendar GanttProject calendar", "Converts the given dislect to a human-readable datasource type.", "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." ]
public static void applyWsdlExtensions(Bus bus) { ExtensionRegistry registry = bus.getExtension(WSDLManager.class).getExtensionRegistry(); try { JAXBExtensionHelper.addExtensions(registry, javax.wsdl.Definition.class, org.talend.esb.mep.requestcallback.impl.wsdl.PLType.class); JAXBExtensionHelper.addExtensions(registry, javax.wsdl.Binding.class, org.talend.esb.mep.requestcallback.impl.wsdl.CallbackExtension.class); } catch (JAXBException e) { throw new RuntimeException("Failed to add WSDL JAXB extensions", e); } }
[ "Adds JAXB WSDL extensions to allow work with custom\nWSDL elements such as \\\"partner-link\\\"\n\n@param bus CXF bus" ]
[ "Retrieve the start slack.\n\n@return start slack", "Get an image as a stream. Callers must be sure to close the stream when they are done with it.\n\n@deprecated\n@see PhotosInterface#getImageAsStream(Photo, int)\n@param suffix\nThe suffix\n@return The InputStream\n@throws IOException", "Gets a SerialMessage with the WAKE_UP_NO_MORE_INFORMATION command.\n@return the serial message", "Remove a notification message. Recursive until all pending removals have been completed.", "Use this API to fetch appfwprofile_denyurl_binding resources of given name .", "Start the operation by instantiating the first job instance in a separate Thread.\n\n@param arguments {@inheritDoc}", "This method returns the actual raw class associated with the specified\ntype.", "Write a resource.\n\n@param record resource instance\n@throws IOException", "Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler." ]
List<Message> getFullTrackList(final CdjStatus.TrackSourceSlot slot, final Client client, final int sortOrder) throws IOException, InterruptedException, TimeoutException { // Send the metadata menu request if (client.tryLockingForMenuOperations(MENU_TIMEOUT, TimeUnit.SECONDS)) { try { Message response = client.menuRequest(Message.KnownType.TRACK_MENU_REQ, Message.MenuIdentifier.MAIN_MENU, slot, new NumberField(sortOrder)); final long count = response.getMenuResultsCount(); if (count == Message.NO_MENU_RESULTS_AVAILABLE || count == 0) { return Collections.emptyList(); } // Gather all the metadata menu items return client.renderMenuItems(Message.MenuIdentifier.MAIN_MENU, slot, CdjStatus.TrackType.REKORDBOX, response); } finally { client.unlockForMenuOperations(); } } else { throw new TimeoutException("Unable to lock the player for menu operations"); } }
[ "Request the list of all tracks in the specified slot, given a dbserver connection to a player that has already\nbeen set up.\n\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved track list entry items\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations" ]
[ "Renames the current base log file to the roll file name.\n\n@param from\nThe current base log file.\n@param to\nThe backup file.", "The selectionStrategy given as String argument is selected as locatorSelectionStrategy.\nIf selectionStrategy is null, the defaultLocatorSelectionStrategy is used instead.\nThen the new locatorSelectionStrategy is connected to the locatorClient and the matcher.\nA new LocatorTargetSelector is created, set to the locatorSelectionStrategy and then set\nas selector in the conduitSelectorHolder.\n\n@param conduitSelectorHolder\n@param matcher\n@param selectionStrategy", "Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by applying a key function to each element which yields a comparable criteria.\n\n@param iterable\nthe elements to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return a sorted list as a shallow copy of the given iterable.\n@see #sort(Iterable)\n@see #sort(Iterable, Comparator)\n@see ListExtensions#sortInplaceBy(List, org.eclipse.xtext.xbase.lib.Functions.Function1)", "Set the state of an individual day in a weekly recurrence.\n\n@param day Day instance\n@param value true if this day is included in the recurrence", "Read an optional month value form a JSON value.\n@param val the JSON value that should represent the month.\n@return the month from the JSON or null if reading the month fails.", "init database with demo data", "Returns the value associated with the given key, if any.\n\n@return the value associated with the given key, or <Code>null</Code>\nif the key maps to no value", "Create a WebMBeanAdaptor for a specified MBean name.\n@param mBeanName the MBean name (can be URL-encoded).\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the created WebMBeanAdaptor.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.", "Creates a document for the resource without extracting the content. The aim is to get a content indexed,\neven if extraction runs into a timeout.\n\n@return the document for the resource generated if the content is discarded,\ni.e., only meta information are indexed." ]
protected DatabaseConnection getSavedConnection() { NestedConnection nested = specialConnection.get(); if (nested == null) { return null; } else { return nested.connection; } }
[ "Returns the connection that has been saved or null if none." ]
[ "Unpause the server, allowing it to resume normal operations", "Update the context session to mark a user logged in\n\n@param userIdentifier\nthe user identifier, could be either userId or username", "Log column data.\n\n@param column column data", "private HttpServletResponse headers;", "Create a new connection manager, based on an existing connection.\n\n@param connection the existing connection\n@param openHandler a connection open handler\n@return the connected manager", "Use this API to fetch all the nspbr6 resources that are configured on netscaler.", "Creates a code location URL from a class\n\n@param codeLocationClass the class\n@return A URL created from Class\n@throws InvalidCodeLocation if URL creation fails", "makes object obj persistent to the Objectcache under the key oid.", "Adds a row to the internal storage, indexed by primary key.\n\n@param uniqueID unique ID of the row\n@param map row data as a simpe map" ]
protected void print(String text) { String tableStart = format(PARAMETER_TABLE_START, PARAMETER_TABLE_START); String tableEnd = format(PARAMETER_TABLE_END, PARAMETER_TABLE_END); boolean containsTable = text.contains(tableStart) && text.contains(tableEnd); String textToPrint = containsTable ? transformPrintingTable(text, tableStart, tableEnd) : text; print(output, textToPrint .replace(format(PARAMETER_VALUE_START, PARAMETER_VALUE_START), format("parameterValueStart", EMPTY)) .replace(format(PARAMETER_VALUE_END, PARAMETER_VALUE_END), format("parameterValueEnd", EMPTY)) .replace(format(PARAMETER_VALUE_NEWLINE, PARAMETER_VALUE_NEWLINE), format("parameterValueNewline", NL))); }
[ "Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print" ]
[ "Reconnect the context if the RedirectException is valid.", "Calculate start dates for a yearly recurrence.\n\n@param calendar current date\n@param dates array of start dates", "Allows testsuites to shorten the domain timeout adder", "This method lists any notes attached to resources.\n\n@param file MPX file", "Creates a new instance with the given key and value.\nMay be used instead of the constructor for convenience reasons.\n\n@param k\nthe key. May be <code>null</code>.\n@param v\nthe value. May be <code>null</code>.\n@return a newly created pair. Never <code>null</code>.\n@since 2.3", "Set the property on the given object to the new value.\n\n@param object on which to set the property\n@param newValue the new value of the property\n@throws RuntimeException if the property could not be set", "Reads the categories for the given resource.\n\n@param cms the {@link CmsObject} used for reading the categories.\n@param resource the resource for which the categories should be read.\n@return the categories assigned to the given resource.", "Calculate the color using the supplied angle.\n\n@param angle The selected color's position expressed as angle (in rad).\n\n@return The ARGB value of the color on the color wheel at the specified\nangle.", "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" ]
public void execute() { Runnable task = new Runnable() { public void run() { final V result = performTask(); SwingUtilities.invokeLater(new Runnable() { public void run() { postProcessing(result); latch.countDown(); } }); } }; new Thread(task, "SwingBackgroundTask-" + id).start(); }
[ "Asynchronous call that begins execution of the task\nand returns immediately." ]
[ "Disable all overrides for a specified path with overrideType\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client\n@param overrideType Override type identifier", "Print out the template information that the client needs for performing a request.\n\n@param json the writer to write the information to.", "Release a connection by placing the connection back in the pool.\n@param connectionHandle Connection being released.\n@throws SQLException", "Reads characters until any 'end' character is encountered, ignoring\nescape sequences.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found.", "Switches from a dense to sparse matrix", "Initialises JMX stuff.\n@param doRegister if true, perform registration, if false unregister", "This method is used to quote any special characters that appear in\nliteral text that is required as part of the currency format.\n\n@param literal Literal text\n@return literal text with special characters in quotes", "Perform the entire sort operation", "Use this API to fetch appfwpolicylabel_policybinding_binding resources of given name ." ]
public List<ServerRedirect> getServerMappings() { ArrayList<ServerRedirect> servers = new ArrayList<ServerRedirect>(); try { JSONObject response = new JSONObject(doGet(BASE_SERVER, null)); JSONArray serverArray = response.getJSONArray("servers"); for (int i = 0; i < serverArray.length(); i++) { JSONObject jsonServer = serverArray.getJSONObject(i); ServerRedirect server = getServerRedirectFromJSON(jsonServer); if (server != null) { servers.add(server); } } } catch (Exception e) { e.printStackTrace(); return null; } return servers; }
[ "Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects" ]
[ "Updates LetsEncrypt configuration.", "Add all the items from an iterable to a collection.\n\n@param <T>\nThe type of items in the iterable and the collection\n@param collection\nThe collection to which the items should be added.\n@param items\nThe items to add to the collection.", "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.", "get the bean property type\n\n@param clazz\n@param propertyName\n@param originalType\n@return", "Perform the module promotion\n\n@param moduleId String", "This method reads a single byte from the input stream.\n\n@param is the input stream\n@return byte value\n@throws IOException on file read error or EOF", "Adds the position.\n\n@param position the position", "Creates the button for converting an XML bundle in a property bundle.\n@return the created button.", "Use this API to fetch auditsyslogpolicy_lbvserver_binding resources of given name ." ]
private void initializeQueue() { this.queue.clear(); for (Map.Entry<String, NodeT> entry: nodeTable.entrySet()) { if (!entry.getValue().hasDependencies()) { this.queue.add(entry.getKey()); } } if (queue.isEmpty()) { throw new IllegalStateException("Detected circular dependency"); } }
[ "Initializes the queue that tracks the next set of nodes with no dependencies or\nwhose dependencies are resolved." ]
[ "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", "Add an executable \"post-run\" dependent for this model.\n\n@param executable the executable \"post-run\" dependent\n@return the key to be used as parameter to taskResult(string) method to retrieve result of executing\nthe executable \"post-run\" dependent", "Creates a block matrix the same size as A_inv, inverts the matrix and copies the results back\nonto A_inv.\n\n@param A_inv Where the inverted matrix saved. Modified.", "Compute the A matrix from the Q and R matrices.\n\n@return The A matrix.", "Sets the monitoring service.\n\n@param monitoringService the new monitoring service", "depth- first search for any module - just to check that the suggestion has any chance of delivering correct result", "Find the next match of the pattern on the tree\n\n@return whether there is a match somewhere in the tree", "Get the root build which triggered the current build. The build root is considered to be the one furthest one\naway from the current build which has the isPassIdentifiedDownstream active, if no parent build exists, check\nthat the current build needs an upstream identifier, if it does return it.\n\n@param currentBuild The current build.\n@return The root build with isPassIdentifiedDownstream active. Null if no upstream or non is found.", "Upload a photo from a byte-array.\n\n@param data\nThe photo data as a byte array\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException" ]
public Class<?> getColumnType(int c) { for (int r = 0; r < m_data.size(); r++) { Object val = m_data.get(r).get(c); if (val != null) { return val.getClass(); } } return Object.class; }
[ "Gets the type to use for the Vaadin table column corresponding to the c-th column in this result.\n\n@param c the column index\n@return the class to use for the c-th Vaadin table column" ]
[ "Adds parameters contained in the annotation into the annotation type reference\n\n@param typeRef\n@param node", "Return a long value from a prepared query.", "Get the short exception message using the requested locale. This does not include the cause exception message.\n\n@param locale locale for message\n@return (short) exception message", "Select which view to display based on the state of the promotion. Will return the form if user selects to perform\npromotion. Progress will be returned if the promotion is currently in progress.", "This is private. It is a helper function for the utils.", "prevent too many refreshes happening one after the other.", "Use this API to enable Interface of given name.", "Updates the options panel for a special configuration.\n@param gitConfig the git configuration.", "Adds is Null criteria,\ncustomer_id is Null\nThe attribute will NOT be translated into column name\n\n@param column The column name to be used without translation" ]
private TableAlias getTableAliasForPath(String aPath, String aUserAlias, List hintClasses) { if (aUserAlias == null) { return getTableAliasForPath(aPath, hintClasses); } else { return getTableAliasForPath(aUserAlias + ALIAS_SEPARATOR + aPath, hintClasses); } }
[ "Answer the TableAlias for aPath or aUserAlias\n@param aPath\n@param aUserAlias\n@param hintClasses\n@return TableAlias, null if none" ]
[ "read offsets before given time\n\n@param offsetRequest the offset request\n@return offsets before given time", "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", "Returns a projection object for specifying the fields to retrieve during a specific find operation.", "Ensure that the node is not null.\n\n@param node the node to ensure to be not null\n@param expression the expression was used to find the node\n@throws SpinXPathException if the node is null", "Copy a single named file to the output directory.\n@param outputDirectory The destination directory for the copied resource.\n@param sourceFile The path of the file to copy.\n@param targetFileName The name of the file created in {@literal outputDirectory}.\n@throws IOException If the file cannot be copied.", "Use this API to create sslfipskey resources.", "Utility function that fetches all stores 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@return List of all store names", "Use this API to fetch appfwjsoncontenttype resources of given names .", "Remove the S3 file that contains the domain controller data.\n\n@param directoryName the name of the directory that contains the S3 file" ]