query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public static int lengthOfCodePoint(int codePoint) { if (codePoint < 0) { throw new InvalidCodePointException(codePoint); } if (codePoint < 0x80) { // normal ASCII // 0xxx_xxxx return 1; } if (codePoint < 0x800) { return 2; } if (codePoint < 0x1_0000) { return 3; } if (codePoint < 0x11_0000) { return 4; } // Per RFC3629, UTF-8 is limited to 4 bytes, so more bytes are illegal throw new InvalidCodePointException(codePoint); }
[ "Gets the UTF-8 sequence length of the code point.\n\n@throws InvalidCodePointException if code point is not within a valid range" ]
[ "Use this API to count sslcertkey_crldistribution_binding resources configued on NetScaler.", "Requests that the given namespace stopped being listened to for change events.\n\n@param namespace the namespace to stop listening for change events on.", "1.0 version of parser is different at simple mapperParser", "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.", "This snapshot is meant to be used when updating data.", "Comparator against other element.\n\n@param otherElement The other element.\n@param logging Whether to do logging.\n@return Whether the elements are equal.", "This method dumps the entire contents of a file to an output\nprint writer as ascii data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors", "Obtain the realm used for authentication.\n\nThis realm name applies to both the user and the groups.\n\n@return The name of the realm used for authentication.", "Get the last non-white Y point\n@param img Image in memory\n@return The trimmed height" ]
public static base_responses delete(nitro_service client, String selectorname[]) throws Exception { base_responses result = null; if (selectorname != null && selectorname.length > 0) { cacheselector deleteresources[] = new cacheselector[selectorname.length]; for (int i=0;i<selectorname.length;i++){ deleteresources[i] = new cacheselector(); deleteresources[i].selectorname = selectorname[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "Use this API to delete cacheselector resources of given names." ]
[ "Writes a vInt directly to a byte array\n\n@param dest The destination array for the vInt to be written to\n@param offset The location where to write the vInt to\n@param i The Value being written into byte array\n@return Returns the new offset location", "Updates the statements of the item document identified by the given item\nid. The updates are computed with respect to the current data found\nonline, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged.\n\n@param itemIdValue\nid of the document to be updated\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 IO problems, such as missing network connection", "Describe the model as a list of resources with their address and model, which\nthe HC can directly apply to create the model. Although the format might appear\nsimilar as the operations generated at boot-time this description is only useful\nto create the resource tree and cannot be used to invoke any operation.\n\n@param rootAddress the address of the root resource being described\n@param resource the root resource\n@return the list of resources", "Build the tree of joins for the given criteria", "Gets the actual type arguments of a Type\n\n@param type The type to examine\n@return The type arguments", "Notifies that a content item is changed.\n\n@param position the position.", "Fetches the contents of a file representation with asset path and writes them to the provided output stream.\n@see <a href=https://developer.box.com/reference#section-x-rep-hints-header>X-Rep-Hints Header</a>\n@param representationHint the X-Rep-Hints query for the representation to fetch.\n@param assetPath the path of the asset for representations containing multiple files.\n@param output the output stream to write the contents to.", "We have more input since wait started", "Record the details of the media being cached, to make it easier to recognize, now that we have access to that\ninformation.\n\n@param slot the slot from which a metadata cache is being created\n@param zos the stream to which the ZipFile is being written\n@param channel the low-level channel to which the cache is being written\n\n@throws IOException if there is a problem writing the media details entry" ]
@SuppressWarnings("deprecation") public boolean cancelOnTargetHosts(List<String> targetHosts) { boolean success = false; try { switch (state) { case IN_PROGRESS: if (executionManager != null && !executionManager.isTerminated()) { executionManager.tell(new CancelTaskOnHostRequest( targetHosts), executionManager); logger.info( "asked task to stop from running on target hosts with count {}...", targetHosts.size()); } else { logger.info("manager already killed or not exist.. NO OP"); } success = true; break; case COMPLETED_WITHOUT_ERROR: case COMPLETED_WITH_ERROR: case WAITING: logger.info("will NO OP for cancelOnTargetHost as it is not in IN_PROGRESS state"); success = true; break; default: break; } } catch (Exception e) { logger.error( "cancel task {} on hosts with count {} error with exception details ", this.getTaskId(), targetHosts.size(), e); } return success; }
[ "Cancel on target hosts.\n\n@param targetHosts\nthe target hosts\n@return true, if successful" ]
[ "Parse a currency symbol position value.\n\n@param value currency symbol position\n@return CurrencySymbolPosition instance", "compute Cosh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "The derivative of the objective function. You may override this method\nif you like to implement your own derivative.\n\n@param parameters Input value. The parameter vector.\n@param derivatives Output value, where derivatives[i][j] is d(value(j)) / d(parameters(i)\n@throws SolverException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "returns the values of the orientation tag", "Sets the time to wait when close connection watch threads are enabled. 0 = wait forever.\n@param closeConnectionWatchTimeout the watchTimeout to set\n@param timeUnit Time granularity", "Convert an Object to a DateTime.", "Returns true if a Map literal that contains only entries where both key and value are constants.\n@param expression - any expression", "Writes a list of timephased data to the MSPDI file.\n\n@param assignmentID current assignment ID\n@param list output list of timephased data items\n@param data input list of timephased data\n@param type list type (planned or completed)", "Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived" ]
@Override public JulianDate date(int prolepticYear, int month, int dayOfMonth) { return JulianDate.of(prolepticYear, month, dayOfMonth); }
[ "Obtains a local date in Julian calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Julian local date, not null\n@throws DateTimeException if unable to create the date" ]
[ "Apply filter to an image.\n\n@param source FastBitmap", "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", "add trace information for received frame", "Use this API to fetch clusternodegroup_nslimitidentifier_binding resources of given name .", "Returns a prefix length for which the range of this segment grouping matches the the block of addresses for that prefix.\n\nIf no such prefix exists, returns null\n\nIf this segment grouping represents a single value, returns the bit length\n\n@return the prefix length or null", "Compare the supplied plaintext password to a hashed password.\n\n@param passwd Plaintext password.\n@param hashed scrypt hashed password.\n\n@return true if passwd matches hashed value.", "Encodes the given URI fragment with the given encoding.\n@param fragment the fragment to be encoded\n@param encoding the character encoding to encode to\n@return the encoded fragment\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "Obtains a Symmetry010 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Creates a ClassNode containing the wrapper of a ClassNode\nof primitive type. Any ClassNode representing a primitive\ntype should be created using the predefined types used in\nclass. The method will check the parameter for known\nreferences of ClassNode representing a primitive type. If\nReference is found, then a ClassNode will be contained that\nrepresents the wrapper class. For example for boolean, the\nwrapper class is java.lang.Boolean.\n\nIf the parameter is no primitive type, the redirected\nClassNode will be returned\n\n@see #make(Class)\n@see #make(String)\n@param cn the ClassNode containing a possible primitive type" ]
public static String encode(String component) { if (component != null) { try { return URLEncoder.encode(component, UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new RuntimeException("JVM must support UTF-8", e); } } return null; }
[ "Encode a path segment, escaping characters not valid for a URL.\n\n<p>The following characters are not escaped:\n\n<ul>\n<li>{@code a..z, A..Z, 0..9}\n<li>{@code . - * _}\n</ul>\n\n<p>' ' (space) is encoded as '+'.\n\n<p>All other characters (including '/') are converted to the triplet \"%xy\" where \"xy\" is the\nhex representation of the character in UTF-8.\n\n@param component a string containing text to encode.\n@return a string with all invalid URL characters escaped." ]
[ "Adds an individual alias. It will be merged with the current\nlist of aliases, or added as a label if there is no label for\nthis item in this language yet.\n\n@param alias\nthe alias to add", "This method take a list of fileName of the type partitionId_Replica_Chunk\nand returns file names that match the regular expression\nmasterPartitionId_", "checks if a bean has been seen before in the dependencyPath. If not, it\nresolves the InjectionPoints and adds the resolved beans to the set of\nbeans to be validated", "Deletes a vertex from this list.", "Gets an entry point for the given deployment. If one does not exist it will be created. If the request controller is disabled\nthis will return null.\n\nEntry points are reference counted. If this method is called n times then {@link #removeControlPoint(ControlPoint)}\nmust also be called n times to clean up the entry points.\n\n@param deploymentName The top level deployment name\n@param entryPointName The entry point name\n@return The entry point, or null if the request controller is disabled", "The grammar elements that may occur at the given offset.", "Creates a combined list of Entries using the provided mapping file, and sorts them by\nfirst by priority, then the number of tokens in the regex.\n\n@param mapping The path to a file of mappings\n@return a sorted list of Entries", "Get the sub registry for the servers.\n\n@param range the version range\n@return the sub registry", "Initializes OJB for the purposes of this task.\n\n@return The metadata manager used by OJB" ]
public <T extends Widget & Checkable> List<T> getCheckableChildren() { List<Widget> children = getChildren(); ArrayList<T> result = new ArrayList<>(); for (Widget c : children) { if (c instanceof Checkable) { result.add((T) c); } } return result; }
[ "Gets all Checkable widgets in the group\n@return list of Checkable widgets" ]
[ "AND operation which takes the previous clause and the next clause and AND's them together.", "Use this API to unset the properties of nsconfig resource.\nProperties that need to be unset are specified in args array.", "Ask the specified player for a Folder menu for exploring its raw filesystem.\nThis is a request for unanalyzed items, so we do a typed menu request.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n@param folderId identifies the folder whose contents should be listed, use -1 to get the root folder\n\n@return the entries in the folder menu\n\n@throws Exception if there is a problem obtaining the menu", "Retrieves a ProjectWriter instance which can write a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectWriter instance", "This is a convenience method used to add a calendar called\n\"Standard\" to the project, and populate it with a default working week\nand default working hours.\n\n@return a new default calendar", "Backup all xml files in a given directory.\n\n@param source the source directory\n@param target the target directory\n@throws IOException for any error", "Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource", "Given a cluster and a node id checks if the node exists\n\n@param nodeId The node id to search for\n@return True if cluster contains the node id, else false", "Returns the WDTK datatype IRI for the property datatype as represented by\nthe given JSON datatype string.\n\n@param jsonDatatype\nthe JSON datatype string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known" ]
private static Path resolveDockerDefinition(Path fullpath) { final Path ymlPath = fullpath.resolveSibling(fullpath.getFileName() + ".yml"); if (Files.exists(ymlPath)) { return ymlPath; } else { final Path yamlPath = fullpath.resolveSibling(fullpath.getFileName() + ".yaml"); if (Files.exists(yamlPath)) { return yamlPath; } } return null; }
[ "Resolves current full path with .yml and .yaml extensions\n\n@param fullpath\nwithout extension.\n\n@return Path of existing definition or null" ]
[ "Creates a ServiceCall from a paging operation that returns a header response.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@param <V> the header object type\n@return the future based ServiceCall", "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>", "The handling method.", "Returns a List of all of the values in the Map whose key matches an entry in the nameMapping array.\n\n@param map\nthe map\n@param nameMapping\nthe keys of the Map values to add to the List\n@return a List of all of the values in the Map whose key matches an entry in the nameMapping array\n@throws NullPointerException\nif map or nameMapping is null", "Get FieldDescriptor from joined superclass.", "Exports a single queue to an XML file.", "Parses a duration and returns the corresponding number of milliseconds.\n\nDurations consist of a space-separated list of components of the form {number}{time unit},\nfor example 1d 5m. The available units are d (days), h (hours), m (months), s (seconds), ms (milliseconds).<p>\n\n@param durationStr the duration string\n@param defaultValue the default value to return in case the pattern does not match\n@return the corresponding number of milliseconds", "Over simplistic helper to compare two strings to check radio buttons.\n\n@param value1 the first value\n@param value2 the second value\n@return \"checked\" if both values are equal, the empty String \"\" otherwise", "Setter for property value. Doesn't affect entity version and doesn't\ninvalidate any of the cached entity iterables.\n\n@param localId entity local id.\n@param value property value.\n@param oldValue property old value\n@param propertyId property id" ]
public static void log(String label, byte[] data) { if (LOG != null) { LOG.write(label); LOG.write(": "); LOG.println(ByteArrayHelper.hexdump(data, true)); LOG.flush(); } }
[ "Log a byte array.\n\n@param label label text\n@param data byte array" ]
[ "Delete the first n items from the list\n\n@param newStart the logsegment who's index smaller than newStart will be deleted.\n@return the deleted segment", "Use this API to fetch cmppolicylabel resource of given name .", "Retrieves the registar linked to the bus.\nCreates a new registar is not present.\n\n@param bus\n@return", "Populate data for analytics.", "Add a row to the table if it does not already exist\n\n@param cells String...", "Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded.", "Sets object for statement at specific index, adhering to platform- and null-rules.\n@param stmt the statement\n@param index the current parameter index\n@param value the value to set\n@param sqlType the JDBC SQL-type of the value\n@throws SQLException on platform error", "Print a class's relations", "Propagate onNoPick events to listeners\n@param picker GVRPicker which generated the event" ]
public double Function2D(double x, double y) { return Math.exp(-(x * x + y * y) / (2 * sqrSigma)) / (2 * Math.PI * sqrSigma); }
[ "2-D Gaussian function.\n\n@param x value.\n@param y value.\n@return Function's value at point (x,y)." ]
[ "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", "Add an exact path to the routing table.\n\n@throws RouteAlreadyMappedException", "Makes this pose the inverse of the input pose.\n@param src pose to invert.", "Use this API to fetch sslcertkey resource of given name .", "Collection of JRVariable\n\n@param variables\n@return", "Serialize specified object to directory with specified name.\n\n@param directory write to\n@param name serialize object with specified name\n@param obj object to serialize\n@return number of bytes written to directory", "Wrap connection with a proxy.\n@param target connection handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a connection.", "Attaches the menu drawer to the window.", "Use this API to fetch all the policydataset resources that are configured on netscaler." ]
public static String expandLine(CharSequence self, int tabStop) { String s = self.toString(); int index; while ((index = s.indexOf('\t')) != -1) { StringBuilder builder = new StringBuilder(s); int count = tabStop - index % tabStop; builder.deleteCharAt(index); for (int i = 0; i < count; i++) builder.insert(index, " "); s = builder.toString(); } return s; }
[ "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" ]
[ "Returns the intersection of sets s1 and s2.", "Returns the Java executable command.\n\n@param javaHome the java home directory or {@code null} to use the default\n\n@return the java command to use", "Convert an Object to a Date, without an Exception", "Replace a single value at the appropriate location in the existing value array.\n@param index - location in the array list\n@param newValue - the new String", "Finish a state transition from a notification.\n\n@param current\n@param next", "Exceptions specific to each operation is handled in the corresponding\nsubclass. At this point we don't know the reason behind this exception.\n\n@param exception", "Use this API to delete dnsview of given name.", "Removes the supplied marker from the map.\n\n@param marker", "Convenience method which locates the first P3 database in a directory\nand opens it.\n\n@param directory directory containing a P3 database\n@return ProjectFile instance" ]
public RedwoodConfiguration loggingClass(final Class<?> classToIgnoreInTraces){ tasks.add(new Runnable() { public void run() { Redwood.addLoggingClass(classToIgnoreInTraces.getName()); } }); return this; }
[ "Set a Java class to ignore when printing stack traces\n@param classToIgnoreInTraces The class to ignore.\n@return this" ]
[ "remove an objects entry from the object registry", "Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.", "Use this API to add dbdbprofile.", "Returns a valid DisplayMetrics object\n\n@param context valid context\n@return DisplayMetrics object", "Sorts the row indices in ascending order.\n@param sorter (Optional) Used to sort rows. If null a new instance will be declared internally.", "Use this API to link sslcertkey resources.", "Scales the brightness of a pixel.", "Gets the value of the given header field.\n@param fieldName name of the header field.\n@return value of the header.", "Extract calendar data." ]
@Override public PaxDate date(int prolepticYear, int month, int dayOfMonth) { return PaxDate.of(prolepticYear, month, dayOfMonth); }
[ "Obtains a local date in Pax calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Pax local date, not null\n@throws DateTimeException if unable to create the date" ]
[ "Old SOAP client uses new SOAP service with the\nredirection to the new endpoint and transformation\non the server side", "Use this API to fetch all the responderpolicy resources that are configured on netscaler.", "Return true if the two connections seem to one one connection under the covers.", "Converts a tab delimited string into an object with given fields\nRequires the object has public access for the specified fields\n\n@param objClass Class of object to be created\n@param str string to convert\n@param delimiterPattern delimiter\n@param fieldNames fieldnames\n@param <T> type to return\n@return Object created from string", "prefetch defined relationships requires JDBC level 2.0, does not work\nwith Arrays", "Authenticates the API connection for Box Developer Edition.", "Adds the content info for the collected resources used in the \"This page\" publish dialog.", "Copy the data from an InputStream to a temp file.\n\n@param inputStream data source\n@param tempFileSuffix suffix to use for temp file\n@return File instance", "Answers the ClassDescriptor referenced by 'super' ReferenceDescriptor.\n@return ClassDescriptor or null" ]
protected List<I_CmsSearchConfigurationSortOption> getSortOptions() { List<I_CmsSearchConfigurationSortOption> options = new LinkedList<I_CmsSearchConfigurationSortOption>(); try { JSONArray sortOptions = m_configObject.getJSONArray(JSON_KEY_SORTOPTIONS); for (int i = 0; i < sortOptions.length(); i++) { I_CmsSearchConfigurationSortOption option = parseSortOption(sortOptions.getJSONObject(i)); if (option != null) { options.add(option); } } } catch (JSONException e) { if (null == m_baseConfig) { if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.LOG_NO_SORT_CONFIG_0), e); } } else { options = m_baseConfig.getSortConfig().getSortOptions(); } } return options; }
[ "Returns the list of the configured sort options, or the empty list if no sort options are configured.\n@return The list of the configured sort options, or the empty list if no sort options are configured." ]
[ "Extracts the postal code, country code and service code from the primary data and returns the corresponding primary message\ncodewords.\n\n@return the primary message codewords", "Read relationship data from a PEP file.", "Determines whether the given list contains a descriptor with the same name.\n\n@param defs The list to search\n@param obj The object that is searched for\n@return <code>true</code> if the list contains a descriptor with the same name", "Quick and dirty XML text escape.\n\n@param sb working string buffer\n@param text input text\n@return escaped text", "Get a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked\n@return timer", "Expand a macro.\n\nThis will look up the macro definition from {@link #macros} map.\nIf not found then return passed in `macro` itself, otherwise return\nthe macro definition found.\n\n**note** if macro definition is not found and the string\n{@link #isMacro(String) comply to macro name convention}, then a\nwarn level message will be logged.\n\n@param macro the macro name\n@return macro definition or macro itself if no definition found.", "Checks whether the compilation has been canceled and reports the given work increment to the compiler progress.", "Returns the texture magnification filter\n\nIf missing, defaults to {@link GL_LINEAR }\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture magnification filter", "Print the visibility adornment of element e prefixed by\nany stereotypes" ]
private void decreaseIndent() throws IOException { if (m_pretty) { m_writer.write('\n'); m_indent = m_indent.substring(0, m_indent.length() - INDENT.length()); m_writer.write(m_indent); } m_firstNameValuePair.pop(); }
[ "Decrease the indent level." ]
[ "Creates an observer\n\n@param method The observer method abstraction\n@param declaringBean The declaring bean\n@param manager The Bean manager\n@return An observer implementation built from the method abstraction", "Obtains a local date in Pax calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Pax local date, not null\n@throws DateTimeException if unable to create the date", "Sets the target hosts from line by line text.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception", "Checks to see if an Oracle Server exists.\n\n@param curator It is the responsibility of the caller to ensure the curator is started\n@return boolean if the server exists in zookeeper", "Return the number of entries in the cue list that represent hot cues.\n\n@return the number of cue list entries that are hot cues", "This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar. The\ncalendar used is the \"Standard\" calendar. If this calendar does not exist,\nand exception will be thrown.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object\n@throws MPXJException normally when no Standard calendar is available\n@deprecated use calendar.getDuration(startDate, endDate)", "We have a non-null date, try each format in turn to see if it can be parsed.\n\n@param str date to parse\n@param pos position at which to start parsing\n@return Date instance", "Try to open a file at the given position.", "Reconstructs a number that is represented by more than one byte in a network packet in little-endian order, for\nthe very few protocol values that are sent in this quirky way.\n\n@param buffer the byte array containing the packet data\n@param start the index of the first byte containing a numeric value\n@param length the number of bytes making up the value\n@return the reconstructed number" ]
public static void sqrt(Complex_F64 input, Complex_F64 root) { double r = input.getMagnitude(); double a = input.real; root.real = Math.sqrt((r+a)/2.0); root.imaginary = Math.sqrt((r-a)/2.0); if( input.imaginary < 0 ) root.imaginary = -root.imaginary; }
[ "Computes the square root of the complex number.\n\n@param input Input complex number.\n@param root Output. The square root of the input" ]
[ "Populate the container, converting raw data into Java types.\n\n@param field custom field to which these values belong\n@param values raw value data\n@param descriptions raw description data", "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.", "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", "This method is called if the data set has been changed. Subclasses might want to override\nthis method to add some extra logic.\n\nGo through all items in the list:\n- reuse the existing views in the list\n- add new views in the list if needed\n- trim the unused views\n- request re-layout\n\n@param preferableCenterPosition the preferable center position. If it is -1 - keep the\ncurrent center position.", "Adds a command class to the list of supported command classes by this\nendpoint. Does nothing if command class is already added.\n@param commandClass the command class instance to add.", "Find a column by its name\n\n@param columnName the name of the column\n@return the given Column, or <code>null</code> if not found", "This method performs a set of queries to retrieve information\nfrom the an MPP or an MPX file.\n\n@param filename name of the MPX file\n@throws Exception on file read error", "Emit a event object with parameters and force all listeners to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)", "Writes an untagged OK response, with the supplied response code,\nand an optional message.\n\n@param responseCode The response code, included in [].\n@param message The message to follow the []" ]
public static boolean intArrayContains(int[] array, int numToCheck) { for (int i = 0; i < array.length; i++) { if (array[i] == numToCheck) { return true; } } return false; }
[ "a simple contains helper method, checks if array contains a numToCheck\n\n@param array array of ints\n@param numToCheck value to find\n@return True if found, false otherwise" ]
[ "Remove the group and all references to it\n\n@param groupId ID of group", "Add a date with a certain check state.\n@param date the date to add.\n@param checkState the check state.", "Get a boolean value from the values or null.\n\n@param key the look up key of the value", "Read remarks from a Gantt Designer file.\n\n@param gantt Gantt Designer file", "Get an extent aware Iterator based on the Query\n\n@param query\n@param cld the ClassDescriptor\n@return OJBIterator", "Add a channel to the animation to animate the named bone.\n@param boneName name of bone to animate.\n@param channel The animation channel.", "Removes the given object from the cache\n\n@param oid oid of the object to remove", "Adds a free connection.\n\n@param connectionHandle\n@throws SQLException on error", "Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level" ]
private static List<String> parseAndCompare(List<String> fileNames, int masterPartitionId) { List<String> sourceFileNames = new ArrayList<String>(); for(String fileName: fileNames) { String[] partitionIdReplicaChunk = fileName.split(SPLIT_LITERAL); if(Integer.parseInt(partitionIdReplicaChunk[0]) == masterPartitionId) { sourceFileNames.add(fileName); } } return sourceFileNames; }
[ "This method take a list of fileName of the type partitionId_Replica_Chunk\nand returns file names that match the regular expression\nmasterPartitionId_" ]
[ "Upload a photo from an InputStream.\n\n@param in\n@param metaData\n@return photoId or ticketId\n@throws FlickrException", "Closes the connection to the Z-Wave controller.", "Sets the RDF serialization tasks based on the given string value.\n\n@param tasks\na space-free, comma-separated list of task names", "Adds a new row after the given one.\n\n@param row the row after which a new one should be added", "Gets the name for the getter for this property\n\n@return The name of the property. The name is \"get\"+ the capitalized propertyName\nor, in the case of boolean values, \"is\" + the capitalized propertyName", "The default User-Agent header. Override this method to override the user agent.\n\n@return the user agent string.", "Creates necessary objects to make a chart an hyperlink\n\n@param design\n@param djlink\n@param chart\n@param name", "Retrieve a list of the available P3 project names from a directory.\n\n@param directory directory containing P3 files\n@return list of project names", "Retrieve timephased baseline work. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present" ]
@Override public ClosableIterator<Tuple> callStoredProcedure(String storedProcedureName, ProcedureQueryParameters params, TupleContext tupleContext) { validate( params ); StringBuilder commandLine = createCallStoreProcedureCommand( storedProcedureName, params ); Document result = callStoredProcedure( commandLine ); Object resultValue = result.get( "retval" ); List<Tuple> resultTuples = extractTuples( storedProcedureName, resultValue ); return CollectionHelper.newClosableIterator( resultTuples ); }
[ "In MongoDB the equivalent of a stored procedure is a stored Javascript.\n\n@param storedProcedureName name of stored procedure\n@param params query parameters\n@param tupleContext the tuple context\n\n@return the result as a {@link ClosableIterator}" ]
[ "Clone layer information considering what may be copied to the client.\n\n@param original layer info\n@return cloned copy including only allowed information", "Adds OPT_Z | OPT_ZONE option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Emit an enum event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(Enum, Object...)", "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", "Traces the duration between origin time in the http Request and time just\nbefore being processed by the fat client\n\n@param operationType\n@param originTimeInMS - origin time in the Http Request\n@param requestReceivedTimeInMs - System Time in ms\n@param keyString", "Construct a new uri by replacing query parameters in initialUri with the query parameters provided.\n\n@param initialUri the initial/template URI\n@param queryParams the new query parameters.", "Generates a set of HTML files that contain data about the outcome of\nthe specified test suites.\n@param suites Data about the test runs.\n@param outputDirectoryName The directory in which to create the report.", "Returns an array of all declared fields in the given class and all\nsuper-classes.", "Stop the drag action." ]
public static cacheselector get(nitro_service service, String selectorname) throws Exception{ cacheselector obj = new cacheselector(); obj.set_selectorname(selectorname); cacheselector response = (cacheselector) obj.get_resource(service); return response; }
[ "Use this API to fetch cacheselector resource of given name ." ]
[ "Passes the Socket's InputStream and OutputStream to the closure. The\nstreams will be closed after the closure returns, even if an exception\nis thrown.\n\n@param socket a Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.2", "Should be called after all columns have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return", "Returns the field definition with the specified name.\n\n@param name The name of the desired field\n@return The field definition or <code>null</code> if there is no such field", "Retrieve the frequency of an exception.\n\n@param exception XML calendar exception\n@return frequency", "Use this API to unset the properties of systemuser resource.\nProperties that need to be unset are specified in args array.", "Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.", "Convenience method to determine if a character is special to the regex system.\n\n@param chr\nthe character to test\n\n@return is the character a special character.", "Parses a string that contains single fat client config string in avro\nformat\n\n@param configAvro Input string of avro format, that contains config for\nmultiple stores\n@return Properties of single fat client config", "Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm." ]
public static base_responses delete(nitro_service client, String ciphergroupname[]) throws Exception { base_responses result = null; if (ciphergroupname != null && ciphergroupname.length > 0) { sslcipher deleteresources[] = new sslcipher[ciphergroupname.length]; for (int i=0;i<ciphergroupname.length;i++){ deleteresources[i] = new sslcipher(); deleteresources[i].ciphergroupname = ciphergroupname[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "Use this API to delete sslcipher resources of given names." ]
[ "Returns the index of each elem in a List.\n@param elems The list of items\n@return An array of indices", "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", "Writes resource baseline data.\n\n@param xmlResource MSPDI resource\n@param mpxjResource MPXJ resource", "Checks if the duration option is valid.\n\nNOTE: This does NOT check, if too many events are specified.\n\n@return a flag, indicating if the duration option is valid.", "List of releases for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return a list of releases", "Returns a set that contains all the unique entries of the given iterator in the order of their appearance.\nThe result set is a copy of the iterator with stable order.\n\n@param iterator\nthe iterator. May not be <code>null</code>.\n@return a set with the unique entries of the given iterator. Never <code>null</code>.", "Log a byte array.\n\n@param label label text\n@param data byte array", "For the DC to check whether an operation should be ignored on the slave, if the slave is set up to ignore config not relevant to it\n\n@param domainResource the domain root resource\n@param serverConfigs the server configs the slave is known to have\n@param pathAddress the address of the operation to check if should be ignored or not", "Send post request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws IOException the io exception" ]
public String getWorkplaceLink(CmsObject cms, String resourceName, boolean forceSecure) { String result = substituteLinkForUnknownTarget(cms, resourceName, forceSecure); return appendServerPrefix(cms, result, resourceName, true); }
[ "Returns the link for the given workplace resource.\n\nThis should only be used for resources under /system or /shared.<p<\n\n@param cms the current OpenCms user context\n@param resourceName the resource to generate the online link for\n@param forceSecure forces the secure server prefix\n\n@return the link for the given resource" ]
[ "Returns true if the query result has at least one row.", "create a HTTP POST request.\n\n@return {@link HttpConnection}", "Curries a procedure that takes three arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes two arguments. Never <code>null</code>.", "Attach a script file to a scriptable target.\n\n@param target The scriptable target.\n@param scriptFile The script file object.", "Builds the HTML code for a select widget given a bean containing the select options\n\n@param htmlAttributes html attributes for the select widget\n@param options the bean containing the select options\n\n@return the HTML for the select box", "invoked from the jelly file\n\n@throws Exception Any exception", "Returns a BSON version document representing a new version with a new instance ID, and\nversion counter of zero.\n@return a BsonDocument representing a synchronization version", "Begin writing a named object attribute.\n\n@param name attribute name", "Gets the SerialMessage as a byte array.\n@return the message" ]
@VisibleForTesting protected static int getLabelDistance(final ScaleBarRenderSettings settings) { if (settings.getParams().labelDistance != null) { return settings.getParams().labelDistance; } else { if (settings.getParams().getOrientation().isHorizontal()) { return settings.getMaxSize().width / 40; } else { return settings.getMaxSize().height / 40; } } }
[ "Get the label distance..\n\n@param settings Parameters for rendering the scalebar." ]
[ "Sets the value for the API's \"languages\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters", "Constraint that ensures that the field has a length if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)", "Inserts a String array value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a String array object, or null\n@return this bundler instance to chain method calls", "Determine the consistency level of a key\n\n@param versionNodeSetMap A map that maps version to set of PrefixNodes\n@param replicationFactor Total replication factor for the set of clusters\n@return ConsistencyLevel Enum", "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", "New SOAP client uses new SOAP service.", "Use this API to update appfwlearningsettings resources.", "This returns all profiles associated with a server name\n\n@param serverName server Name\n@return profile UUID\n@throws Exception exception", "1-D Gaussian function.\n\n@param x value.\n@return Function's value at point x." ]
public static appfwlearningsettings[] get(nitro_service service) throws Exception{ appfwlearningsettings obj = new appfwlearningsettings(); appfwlearningsettings[] response = (appfwlearningsettings[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the appfwlearningsettings resources that are configured on netscaler." ]
[ "Obtain plugin information\n\n@return", "Updates the given integer belief\nadding the given integer\nnewBelief = previousBelief + givenValue\n\n@param String - the belief name\n@param the value to add", "Adds a new task to this file. The task can have an optional message to include, and a due date.\n\n@param action the action the task assignee will be prompted to do.\n@param message an optional message to include with the task.\n@param dueAt the day at which this task is due.\n@return information about the newly added task.", "Returns requested content types or default content type if none found.\n\n@return Requested content types or default content type if none found.", "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", "Perform a normal scan", "Sinc function.\n\n@param x Value.\n@return Sinc of the value.", "Caches the given object using the given Identity as key\n\n@param oid The Identity key\n@param obj The object o cache", "Use this API to add dnsaaaarec resources." ]
@RequestMapping(value="/soy/compileJs", method=GET) public ResponseEntity<String> compile(@RequestParam(required = false, value="hash", defaultValue = "") final String hash, @RequestParam(required = true, value = "file") final String[] templateFileNames, @RequestParam(required = false, value = "locale") String locale, @RequestParam(required = false, value = "disableProcessors", defaultValue = "false") String disableProcessors, final HttpServletRequest request) throws IOException { return compileJs(templateFileNames, hash, new Boolean(disableProcessors).booleanValue(), request, locale); }
[ "An endpoint to compile an array of soy templates to JavaScript.\n\nThis endpoint is a preferred way of compiling soy templates to JavaScript but it requires a user to compose a url\non their own or using a helper class TemplateUrlComposer, which calculates checksum of a file and puts this in url\nso that whenever a file changes, after a deployment a JavaScript, url changes and a new hash is appended to url, which enforces\ngetting of new compiles JavaScript resource.\n\nInvocation of this url may throw two types of http exceptions:\n1. notFound - usually when a TemplateResolver cannot find a template with an associated name\n2. error - usually when there is a permission error and a user is not allowed to compile a template into a JavaScript\n\n@param hash - some unique number that should be used when we are caching this resource in a browser and we use http cache headers\n@param templateFileNames - an array of template names, e.g. client-words,server-time, which may or may not contain extension\ncurrently three modes are supported - soy extension, js extension and no extension, which is preferred\n@param disableProcessors - whether the controller should run registered outputProcessors after the compilation is complete.\n@param request - HttpServletRequest\n@param locale - locale\n@return response entity, which wraps a compiled soy to JavaScript files.\n@throws IOException - io error" ]
[ "Perform a module dependency graph of the target and return the graph as a JSON\n\n@param moduleName\n@param moduleVersion\n@param uriInfo\n@return Response", "Build the context name.\n\n@param objs the objects\n@return the global context name", "Note that the index can only be built once.\n\n@param beans The set of beans the index should be built from, only instances of {@link CommonBean} and implementations of {@link PassivationCapable} are\nincluded\n@throws IllegalStateException If the index is built already", "Parses the list of query items for the query facet.\n@param queryFacetObject JSON object representing the node with the query facet.\n@return list of query options\n@throws JSONException if the list cannot be parsed.", "Waits the given amount of time in seconds for a standalone server to start.\n\n@param client the client used to communicate with the server\n@param startupTimeout the time, in seconds, to wait for the server start\n\n@throws InterruptedException if interrupted while waiting for the server to start\n@throws RuntimeException if the process has died\n@throws TimeoutException if the timeout has been reached and the server is still not started", "In the 3.0 xsd the vault configuration and its options are part of the vault xsd.\n\n@param reader the reader at the vault element\n@param expectedNs the namespace\n@return the vault configuration", "Return the class of one of the properties of another class from which the Hibernate metadata is given.\n\n@param meta\nThe parent class to search a property in.\n@param propertyName\nThe name of the property in the parent class (provided by meta)\n@return Returns the class of the property in question.\n@throws HibernateLayerException\nThrows an exception if the property name could not be retrieved.", "Join with another query builder. This will add into the SQL something close to \" INNER JOIN other-table ...\".\nEither the object associated with the current QueryBuilder or the argument QueryBuilder must have a foreign field\nof the other one. An exception will be thrown otherwise.\n\n<p>\n<b>NOTE:</b> This will do combine the WHERE statement of the two query builders with a SQL \"AND\". See\n{@link #joinOr(QueryBuilder)}.\n</p>", "Unlock the given region. Does not report failures." ]
public Location getInfo(String placeId, String woeId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_INFO); if (placeId != null) { parameters.put("place_id", placeId); } if (woeId != null) { parameters.put("woe_id", woeId); } Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element locationElement = response.getPayload(); return parseLocation(locationElement); }
[ "Get informations about a place.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param placeId\nA Flickr Places ID. Optional, can be null. (While optional, you must pass either a valid Places ID or a WOE ID.)\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null. (While optional, you must pass either a valid Places ID or a WOE ID.)\n@return A Location\n@throws FlickrException" ]
[ "Creates an immutable map. A copy of the given map is used. As a result, it is safe to modify the source map afterwards.\n\n@param map the given map\n@return an immutable map", "Gets the host-ignore data for a slave host running the given version.\n\n@param major the kernel management API major version\n@param minor the kernel management API minor version\n@param micro the kernel management API micro version\n\n@return the host-ignore data, or {@code null} if there is no matching registration", "Figures out the correct class loader to use for a proxy for a given bean", "Get the Json Schema of the input path, assuming the path contains just one\nschema version in all files under that path.", "Answers the ClassDescriptor referenced by 'super' ReferenceDescriptor.\n@return ClassDescriptor or null", "Create a shell object and assign its id field.", "Perform a security check against OpenCms.\n\n@param cms The OpenCms object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user", "Fills a rectangle in the image.\n\n@param x rect�s start position in x-axis\n@param y rect�s start positioj in y-axis\n@param w rect�s width\n@param h rect�s height\n@param c rect�s color", "Checks the query-customizer setting of the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated" ]
public static base_response delete(nitro_service client, String labelname) throws Exception { dnspolicylabel deleteresource = new dnspolicylabel(); deleteresource.labelname = labelname; return deleteresource.delete_resource(client); }
[ "Use this API to delete dnspolicylabel of given name." ]
[ "Store the given data and return a uuid for later retrieval of the data\n\n@param data\n@return unique id for the stored data", "Record a new event.", "Gets the value of the task 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 task property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetTask().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link GanttDesignerRemark.Task }", "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.", "EAP 7.1", "Add a Renderer instance as prototype.\n\n@param renderer to use as prototype.\n@return the current RendererBuilder instance.", "Add a new subsystem to a given registry.\n\n@param registry the registry\n@param name the subsystem name\n@param version the version", "generate a message for loglevel WARN\n\n@param pObject the message Object", "Copy the data from an InputStream to a temp file.\n\n@param inputStream data source\n@param tempFileSuffix suffix to use for temp file\n@return File instance" ]
public static <T> T[] concat(T firstElement, T... array) { @SuppressWarnings("unchecked") T[] result = (T[]) Array.newInstance( firstElement.getClass(), 1 + array.length ); result[0] = firstElement; System.arraycopy( array, 0, result, 1, array.length ); return result; }
[ "Concats an element and an array.\n\n@param firstElement the first element\n@param array the array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after the first element" ]
[ "Returns true if the given item document lacks a label for at least one of\nthe languages covered.\n\n@param itemDocument\n@return true if some label is missing", "Main method, handles all the setup tasks for DataGenerator a user would normally do themselves\n\n@param args command line arguments", "Update the anchor based on arcore best knowledge of the world\n\n@param scale", "a useless object at the top level of the response JSON for no reason at all.", "Invalidate layout setup.", "Returns all the version directories present in the root directory\nspecified\n\n@param rootDir The parent directory\n@param maxId The\n@return An array of version directories", "Initializes the metadataCache for MetadataStore", "Returns the local collection representing the given namespace for raw document operations.\n\n@param namespace the namespace referring to the local collection.\n@return the local collection representing the given namespace for raw document operations.", "Configure the access permissions required to access this print job.\n\n@param template the containing print template which should have sufficient information to\nconfigure the access.\n@param context the application context" ]
@SuppressWarnings("unused") public void selectItem(int position, boolean invokeListeners) { IOperationItem item = mOuterAdapter.getItem(position); IOperationItem oldHidedItem = mOuterAdapter.getItem(mRealHidedPosition); int realPosition = mOuterAdapter.normalizePosition(position); //do nothing if position not changed if (realPosition == mCurrentItemPosition) { return; } int itemToShowAdapterPosition = position - realPosition + mRealHidedPosition; item.setVisible(false); startSelectedViewOutAnimation(position); mOuterAdapter.notifyRealItemChanged(position); mRealHidedPosition = realPosition; oldHidedItem.setVisible(true); mFlContainerSelected.requestLayout(); mOuterAdapter.notifyRealItemChanged(itemToShowAdapterPosition); mCurrentItemPosition = realPosition; if (invokeListeners) { notifyItemClickListeners(realPosition); } if (BuildConfig.DEBUG) { Log.i(TAG, "clicked on position =" + position); } }
[ "Select item by it's position\n\n@param position int value of item position to select\n@param invokeListeners boolean value for invoking listeners" ]
[ "Visit the implicit first frame of this method.", "Read resource assignment data from a PEP file.", "Test a given date for being easter sunday.\n\nThe method uses the algorithms sometimes cited as Meeus,Jones, Butcher Gregorian algorithm.\nTaken from http://en.wikipedia.org/wiki/Computus\n\n@param date The date to check.\n@return True, if date is easter sunday.", "Does the given class has bidirectional assiciation\nwith some other class?", "Sets the currently edited locale.\n@param locale the locale to set.", "Sets a single element of this vector. Elements 0, 1, and 2 correspond to\nx, y, and z.\n\n@param i\nelement index\n@param value\nelement value\n@return element value throws ArrayIndexOutOfBoundsException if i is not\nin the range 0 to 2.", "Lock the given region. Does not report failures.", "Writes the message to the specified channel, for example when creating metadata cache files.\n\n@param channel the channel to which it should be written\n\n@throws IOException if there is a problem writing to the channel", "Use this API to fetch sslcipher_individualcipher_binding resources of given name ." ]
private ArrayList<RunListener> instantiateRunListeners() throws Exception { ArrayList<RunListener> instances = new ArrayList<>(); if (runListeners != null) { for (String className : Arrays.asList(runListeners.split(","))) { instances.add((RunListener) this.instantiate(className).newInstance()); } } return instances; }
[ "Generates JUnit 4 RunListener instances for any user defined RunListeners" ]
[ "Send message to all connections connected to the same URL of this context\n\n@param message the message to be sent\n@param excludeSelf whether the connection of this context should be sent to\n@return this context", "Read the given source byte array, then overwrite this buffer's contents\n\n@param src source byte array\n@param srcOffset offset in source byte array to read from\n@param destOffset offset in this buffer to read to\n@param length max number of bytes to read\n@return the number of bytes read", "Creates and returns a GVRSceneObject with the specified mesh attributes.\n\n@param vertices the vertex positions of that make up the mesh. (x1, y1, z1, x2, y2, z2, ...)\n@param velocities the velocity attributes for each vertex. (vx1, vy1, vz1, vx2, vy2, vz2...)\n@param particleTimeStamps the spawning times of each vertex. (t1, 0, t2, 0, t3, 0 ..)\n\n@return The GVRSceneObject with this mesh.", "Parser for forecast\n\n@param feed\n@return", "Transforms the category path of a category to the category.\n@return a map from root or site path to category.", "Sets the character 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 charTranslator translator\n@return this to allow chaining", "Use this API to fetch the statistics of all lbvserver_stats resources that are configured on netscaler.", "Returns the full path of the resource file with extension.\n\n@return path of the GVRAndroidResource. May return null if the\nresource is not associated with any file", "Caches the given object using the given Identity as key\n\n@param oid The Identity key\n@param obj The object o cache" ]
protected long save() { // save leaf nodes ReclaimFlag flag = saveChildren(); // save self. complementary to {@link load()} final byte type = getType(); final BTreeBase tree = getTree(); final int structureId = tree.structureId; final Log log = tree.log; if (flag == ReclaimFlag.PRESERVE) { // there is a chance to update the flag to RECLAIM if (log.getWrittenHighAddress() % log.getFileLengthBound() == 0) { // page will be exactly on file border flag = ReclaimFlag.RECLAIM; } else { final ByteIterable[] iterables = getByteIterables(flag); long result = log.tryWrite(type, structureId, new CompoundByteIterable(iterables)); if (result < 0) { iterables[0] = CompressedUnsignedLongByteIterable.getIterable( (size << 1) + ReclaimFlag.RECLAIM.value ); result = log.writeContinuously(type, structureId, new CompoundByteIterable(iterables)); if (result < 0) { throw new TooBigLoggableException(); } } return result; } } return log.write(type, structureId, new CompoundByteIterable(getByteIterables(flag))); }
[ "Save page to log\n\n@return address of this page after save" ]
[ "Adds OPT_J | OPT_JSON option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Build a valid datastore URL.", "Stops the emulator. Multiple calls are allowed.\n\n@throws DatastoreEmulatorException if the emulator cannot be stopped", "Find the next match of the pattern on the tree\n\n@return whether there is a match somewhere in the tree", "Iterates over all tokens in current member tag with the name tagName and evaluates the body for every token.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"delimiter\" description=\"delimiter for the StringTokenizer. consult javadoc for\njava.util.StringTokenizer default is ','\"\[email protected] name=\"skip\" description=\"how many tokens to skip on start\"", "Button onClick listener.\n\n@param v", "Set RGB output range.\n\n@param outRGB Range.", "Calculates the next date, starting from the provided date.\n\n@param date the current date.\n@param interval the number of month to add when moving to the next month.", "Adds a patch operation.\n@param op the operation type. Must be add, replace, remove, or test.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value to be set." ]
public static vpnvserver_appcontroller_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_appcontroller_binding obj = new vpnvserver_appcontroller_binding(); obj.set_name(name); vpnvserver_appcontroller_binding response[] = (vpnvserver_appcontroller_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch vpnvserver_appcontroller_binding resources of given name ." ]
[ "Use this API to add snmpmanager resources.", "Creates a random symmetric matrix. The entire matrix will be filled in, not just a triangular\nportion.\n\n@param N Number of rows and columns\n@param nz_total Number of nonzero elements in the triangular portion of the matrix\n@param min Minimum element value, inclusive\n@param max Maximum element value, inclusive\n@param rand Random number generator\n@return Randomly generated matrix", "Normalizes the name so it can be used as Maven artifactId or groupId.", "Return true if the Declaration can be linked to the ImporterService.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference<ImporterService> of the ImporterService\n@return true if the Declaration can be linked to the ImporterService", "use parseJsonResponse instead", "Computes execution time\n@param extra", "Attaches a morph to scene object with a base mesh\n@param sceneObj is the base mesh.\n@throws IllegalStateException if component is null\n@throws IllegalStateException if mesh is null\n@throws IllegalStateException if material is null", "Returns the complete tag record for a single tag.\n\n@param tag The tag to get.\n@return Request object", "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." ]
private void readTasks(Project project) { Project.Tasks tasks = project.getTasks(); if (tasks != null) { int tasksWithoutIDCount = 0; for (Project.Tasks.Task task : tasks.getTask()) { Task mpxjTask = readTask(task); if (mpxjTask.getID() == null) { ++tasksWithoutIDCount; } } for (Project.Tasks.Task task : tasks.getTask()) { readPredecessors(task); } // // MS Project will happily read tasks from an MSPDI file without IDs, // it will just generate ID values based on the task order in the file. // If we find that there are no ID values present, we'll do the same. // if (tasksWithoutIDCount == tasks.getTask().size()) { m_projectFile.getTasks().renumberIDs(); } } m_projectFile.updateStructure(); }
[ "This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file" ]
[ "Perform a normal scan", "Detaches or removes the value from this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.", "add a Component to this Worker. After the call dragging is enabled for this\nComponent.\n@param c the Component to register", "Add a given factory to the list of factories at the BEGINNING.\n\n@param factory The factory to be added.\n@return Cascade with amended factory list.", "Extracts the column from the matrix a.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column.", "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", "Encrypt a string with HMAC-SHA1 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output.", "Loads the columns for this table into the alChildren list.", "Constructs a triangule Face from vertices v0, v1, and v2.\n\n@param v0\nfirst vertex\n@param v1\nsecond vertex\n@param v2\nthird vertex" ]
public static Boolean askConfirm(Boolean confirm, String opDesc) throws IOException { if(confirm) { System.out.println("Confirmed " + opDesc + " in command-line."); return true; } else { System.out.println("Are you sure you want to " + opDesc + "? (yes/no)"); BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in)); String text = buffer.readLine().toLowerCase(Locale.ENGLISH); boolean go = text.equals("yes") || text.equals("y"); if (!go) { System.out.println("Did not confirm; " + opDesc + " aborted."); } return go; } }
[ "Utility function that pauses and asks for confirmation on dangerous\noperations.\n\n@param confirm User has already confirmed in command-line input\n@param opDesc Description of the dangerous operation\n@throws IOException\n@return True if user confirms the operation in either command-line input\nor here." ]
[ "Returns the simple name of the builder class that should be generated for the given type.\n\n<p>This is simply the {@link #BUILDER_SIMPLE_NAME_TEMPLATE} with the original type name\nsubstituted in. (If the original type is nested, its enclosing classes will be included,\nseparated with underscores, to ensure uniqueness.)", "Provides a normalized string which is lowercase for host strings, and which is a normalized string for addresses.\n@return", "Use this API to unset the properties of responderpolicy resource.\nProperties that need to be unset are specified in args array.", "Get a patch entry for either a layer or add-on.\n\n@param name the layer name\n@param addOn whether the target is an add-on\n@return the patch entry, {@code null} if it there is no such layer", "2-D Double array to integer array.\n\n@param array Double array.\n@return Integer array.", "Sets a new config and clears the previous cache", "Return key Values of an Identity\n@param cld\n@param oid\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException", "Adjusts beforeIndex to account for the possibility that the given widget is\nalready a child of this panel.\n\n@param child the widget that might be an existing child\n@param beforeIndex the index at which it will be added to this panel\n@return the modified index", "Counts a single page of the specified gender. If this is the first page\nof that gender on this site, a suitable key is added to the list of the\nsite's genders.\n\n@param gender\nthe gender to count\n@param siteRecord\nthe site record to count it for" ]
protected void setColumnsFinalWidth() { log.debug("Setting columns final width."); float factor; int printableArea = report.getOptions().getColumnWidth(); //Create a list with only the visible columns. List visibleColums = getVisibleColumns(); if (report.getOptions().isUseFullPageWidth()) { int columnsWidth = 0; int notRezisableWidth = 0; //Store in a variable the total with of all visible columns for (Object visibleColum : visibleColums) { AbstractColumn col = (AbstractColumn) visibleColum; columnsWidth += col.getWidth(); if (col.isFixedWidth()) notRezisableWidth += col.getWidth(); } factor = (float) (printableArea - notRezisableWidth) / (float) (columnsWidth - notRezisableWidth); log.debug("printableArea = " + printableArea + ", columnsWidth = " + columnsWidth + ", columnsWidth = " + columnsWidth + ", notRezisableWidth = " + notRezisableWidth + ", factor = " + factor); int acumulated = 0; int colFinalWidth; //Select the non-resizable columns Collection resizableColumns = CollectionUtils.select(visibleColums, new Predicate() { public boolean evaluate(Object arg0) { return !((AbstractColumn) arg0).isFixedWidth(); } }); //Finally, set the new width to the resizable columns for (Iterator iter = resizableColumns.iterator(); iter.hasNext(); ) { AbstractColumn col = (AbstractColumn) iter.next(); if (!iter.hasNext()) { col.setWidth(printableArea - notRezisableWidth - acumulated); } else { colFinalWidth = (new Float(col.getWidth() * factor)).intValue(); acumulated += colFinalWidth; col.setWidth(colFinalWidth); } } } // If the columns width changed, the X position must be setted again. int posx = 0; for (Object visibleColum : visibleColums) { AbstractColumn col = (AbstractColumn) visibleColum; col.setPosX(posx); posx += col.getWidth(); } }
[ "Sets the columns width by reading some report options like the\nprintableArea and useFullPageWidth.\ncolumns with fixedWidth property set in TRUE will not be modified" ]
[ "For a given activity, retrieve a map of the activity code values which have been assigned to it.\n\n@param activity target activity\n@return map of activity code value UUIDs", "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", "Check if the node matches the column values\n\n@param nodeProperties the properties on the node\n@param keyColumnNames the name of the columns to check\n@param keyColumnValues the value of the columns to check\n@return true if the properties of the node match the column names and values", "Adds a slash to a path if it doesn't end with a slash.\n\n@param folderName The path to append a possible slash.\n@return The new, correct path.", "Detect new objects.", "Log a free-form warning\n@param message the warning message. Cannot be {@code null}", "Print formatted string in the center of 80 chars line, left and right padded.\n\n@param format\nThe string format pattern\n@param args\nThe string format arguments", "Send an album art update announcement to all registered listeners.", "For running queries embebed in the report design\n\n@param dr\n@param layoutManager\n@param con\n@param _parameters\n@return\n@throws JRException" ]
public int delete(DatabaseConnection databaseConnection, PreparedDelete<T> preparedDelete) throws SQLException { CompiledStatement compiledStatement = preparedDelete.compile(databaseConnection, StatementType.DELETE); try { int result = compiledStatement.runUpdate(); if (dao != null && !localIsInBatchMode.get()) { dao.notifyChanges(); } return result; } finally { IOUtils.closeThrowSqlException(compiledStatement, "compiled statement"); } }
[ "Delete rows that match the prepared statement." ]
[ "Returns true if the provided matrix is has a value of 1 along the diagonal\nelements and zero along all the other elements.\n\n@param a Matrix being inspected.\n@param tol How close to zero or one each element needs to be.\n@return If it is within tolerance to an identity matrix.", "Build control archive of the deb\n\n@param packageControlFile the package control file\n@param controlFiles the other control information files (maintainer scripts, etc)\n@param dataSize the size of the installed package\n@param checksums the md5 checksums of the files in the data archive\n@param output\n@return\n@throws java.io.FileNotFoundException\n@throws java.io.IOException\n@throws java.text.ParseException", "Figure out, based on how much time has elapsed since we received an update, and the playback position,\nspeed, and direction at the time of that update, where the player will be now.\n\n@param update the most recent update received from a player\n@param currentTimestamp the nanosecond timestamp representing when we want to interpolate the track's position\n\n@return the playback position we believe that player has reached now", "Called when a ParentViewHolder has triggered a collapse for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be collapsed", "Extract a Class from the given Type.", "Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead", "Designate the vertex attribute and shader variable for the texture coordinates\nassociated with the named texture.\n\n@param texName name of texture\n@param texCoordAttr name of vertex attribute with texture coordinates.\n@param shaderVarName name of shader variable to get texture coordinates.", "Add a 'IS NOT NULL' clause so the column must not be null. '&lt;&gt;' NULL does not work.", "Returns all visble sets and pools the photo belongs to.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo to return information for.\n@return a list of {@link PhotoContext} objects\n@throws FlickrException" ]
public static final int getInt(InputStream is) throws IOException { byte[] data = new byte[4]; is.read(data); return getInt(data, 0); }
[ "Read an int from an input stream.\n\n@param is input stream\n@return int value" ]
[ "This static method calculated the rho of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The rho of the option", "Determines run length for each 'initial' partition ID. Note that a\ncontiguous run may \"wrap around\" the end of the ring.\n\n@param cluster\n@param zoneId\n@return map of initial partition Id to length of contiguous run of\npartition IDs within the same zone..", "Updates all inverse associations managed by a given entity.", "Adds a new metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.", "Returns the currently set filters in a map column -> filter.\n\n@return the currently set filters in a map column -> filter.", "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", "Returns redirect information for the given ID\n\n@param id ID of redirect\n@return ServerRedirect\n@throws Exception exception", "Returns the position for a given number of occurrences or NOT_FOUND if\nthis value is not found.\n\n@param nOccurrence\nnumber of occurrences\n@return the position for a given number of occurrences or NOT_FOUND if\nthis value is not found", "Creates a random matrix where all elements are zero but diagonal elements. Diagonal elements\nrandomly drawn from a uniform distribution from min to max, inclusive.\n\n@param numRows Number of rows in the returned matrix..\n@param numCols Number of columns in the returned matrix.\n@param min Minimum value of a diagonal element.\n@param max Maximum value of a diagonal element.\n@param rand Random number generator.\n@return A random diagonal matrix." ]
private void deleteRecursive(final File file) { if (file.isDirectory()) { final String[] files = file.list(); if (files != null) { for (String name : files) { deleteRecursive(new File(file, name)); } } } if (!file.delete()) { ControllerLogger.ROOT_LOGGER.cannotDeleteFileOrDirectory(file); } }
[ "note, this just logs an error and doesn't throw as its only used to remove old configuration files, and shouldn't stop boot" ]
[ "Will auto format the given string to provide support for pickadate.js formats.", "Obtain the ID associated with a profile name\n\n@param profileName profile name\n@return ID of profile", "Return a Halton number, sequence starting at index = 0, base &gt; 1.\n\n@param index The index of the sequence.\n@param base The base of the sequence. Has to be greater than one (this is not checked).\n@return The Halton number.", "Does a query for the object's Id and copies in each of the field values from the database to refresh the data\nparameter.", "Expand a macro.\n\nThis will look up the macro definition from {@link #macros} map.\nIf not found then return passed in `macro` itself, otherwise return\nthe macro definition found.\n\n**note** if macro definition is not found and the string\n{@link #isMacro(String) comply to macro name convention}, then a\nwarn level message will be logged.\n\n@param macro the macro name\n@return macro definition or macro itself if no definition found.", "Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available", "Decomposes the input matrix 'a' and makes sure it isn't modified.", "Copies information between specified streams and then closes\nboth of the streams.\n@throws java.io.IOException", "Sets the fieldConversion.\n@param fieldConversionClassName The fieldConversion to set" ]
protected MethodVisitor makeDelegateCall(final String name, final String desc, final String signature, final String[] exceptions, final int accessFlags) { MethodVisitor mv = super.visitMethod(accessFlags, name, desc, signature, exceptions); mv.visitVarInsn(ALOAD, 0); // load this mv.visitFieldInsn(GETFIELD, proxyName, DELEGATE_OBJECT_FIELD, BytecodeHelper.getTypeDescription(delegateClass)); // load delegate // using InvokerHelper to allow potential intercepted calls int size; mv.visitLdcInsn(name); // method name Type[] args = Type.getArgumentTypes(desc); BytecodeHelper.pushConstant(mv, args.length); mv.visitTypeInsn(ANEWARRAY, "java/lang/Object"); size = 6; int idx = 1; for (int i = 0; i < args.length; i++) { Type arg = args[i]; mv.visitInsn(DUP); BytecodeHelper.pushConstant(mv, i); // primitive types must be boxed if (isPrimitive(arg)) { mv.visitIntInsn(getLoadInsn(arg), idx); String wrappedType = getWrappedClassDescriptor(arg); mv.visitMethodInsn(INVOKESTATIC, wrappedType, "valueOf", "(" + arg.getDescriptor() + ")L" + wrappedType + ";", false); } else { mv.visitVarInsn(ALOAD, idx); // load argument i } size = Math.max(size, 5+registerLen(arg)); idx += registerLen(arg); mv.visitInsn(AASTORE); // store value into array } mv.visitMethodInsn(INVOKESTATIC, "org/codehaus/groovy/runtime/InvokerHelper", "invokeMethod", "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;", false); unwrapResult(mv, desc); mv.visitMaxs(size, registerLen(args) + 1); return mv; }
[ "Generate a call to the delegate object." ]
[ "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`.", "Report all Java ClassFile files available on the class path within\nthe specified packages and sub packages.\n\n@see #detect(File...)", "Returns the Euclidean distance between this vector and vector v.\n\n@return distance between this vector and v", "Constraint that ensures that the field has a length if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)", "Use this API to add dbdbprofile.", "generate a prepared INSERT-Statement for the Class\ndescribed by cld.\n\n@param cld the ClassDescriptor", "Determines the component type for a given array type.\n\n@param type the given array type\n@return the component type of a given array type", "Validate the configuration.\n\n@param validationErrors where to put the errors.", "Draw an elliptical exterior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for stroking\n@param linewidth line width" ]
private Iterable<BoxRetentionPolicyAssignment.Info> getAssignments(String type, int limit, String ... fields) { QueryStringBuilder queryString = new QueryStringBuilder(); if (type != null) { queryString.appendParam("type", type); } if (fields.length > 0) { queryString.appendParam("fields", fields); } URL url = ASSIGNMENTS_URL_TEMPLATE.buildWithQuery(getAPI().getBaseURL(), queryString.toString(), getID()); return new BoxResourceIterable<BoxRetentionPolicyAssignment.Info>(getAPI(), url, limit) { @Override protected BoxRetentionPolicyAssignment.Info factory(JsonObject jsonObject) { BoxRetentionPolicyAssignment assignment = new BoxRetentionPolicyAssignment(getAPI(), jsonObject.get("id").asString()); return assignment.new Info(jsonObject); } }; }
[ "Returns iterable with all assignments of given type of this retention policy.\n@param type the type of the retention policy assignment to retrieve. Can either be \"folder\" or \"enterprise\".\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 all assignments of given type." ]
[ "Stores all entries contained in the given map in the cache.", "Copies from buffer to our internal strBufferIndex, expanding the internal buffer if necessary\n@param offset offset in the buffer to start copying from\n@param length length to copy", "Build the default transformation description.\n\n@param discardPolicy the discard policy to use\n@param inherited whether the definition is inherited\n@param registry the attribute transformation rules for the resource\n@param discardedOperations the discarded operations\n@return the transformation description", "Find all methods on classes under scanBase that are annotated with annotationClass.\n\n@param scanBase Package to scan recursively, in dot notation (ie: org.jrugged...)\n@param annotationClass Class of the annotation to search for\n@return Set&lt;Method&gt; The set of all @{java.lang.reflect.Method}s having the annotation", "Returns true if a List literal that contains only entries that are constants.\n@param expression - any expression", "Clears the collection and uses the iterator to run through the dao and delete all of the items in the collection\nfrom the associated database table. This is different from removing all of the elements in the table since this\niterator is across just one item's foreign objects.", "Serializes the given object in JSON and returns the resulting string. In\ncase of errors, null is returned. In particular, this happens if the\nobject is not based on a Jackson-annotated class. An error is logged in\nthis case.\n\n@param object\nobject to serialize\n@return JSON serialization or null", "Build data model for serialization.", "Use this API to delete clusterinstance of given name." ]
public static double Magnitude(ComplexNumber z) { return Math.sqrt(z.real * z.real + z.imaginary * z.imaginary); }
[ "Magnitude of complex number.\n\n@param z Complex number.\n@return Magnitude of complex number." ]
[ "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", "Gets an expiring URL for downloading a file directly from Box. This can be user,\nfor example, for sending as a redirect to a browser to cause the browser\nto download the file directly from Box.\n\n@return the temporary download URL", "Switch to a new DataSource using the given configuration.\n@param newConfig BoneCP DataSource to use.\n@throws SQLException", "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", "Repeat a CharSequence a certain number of times.\n\n@param self a CharSequence to be repeated\n@param factor the number of times the CharSequence should be repeated\n@return a String composed of a repetition\n@throws IllegalArgumentException if the number of repetitions is &lt; 0\n@since 1.8.2", "Additional bean deployment archives are used for extentions, synthetic annotated types and beans which do not come from a bean archive.\n\n@param beanClass\n@return the additional bean deployment archive", "Assemble the configuration section of the URL.", "Provides a RunAs client login context", "Returns a new instance of the class with the given qualified name using the constructor with\nthe specified parameter.\n\n@param className The qualified name of the class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance" ]
public synchronized void stop() { if (isRunning()) { socket.get().close(); socket.set(null); deliverLifecycleAnnouncement(logger, false); } }
[ "Stop listening for beats." ]
[ "High-accuracy Normal cumulative distribution function.\n\n@param x Value.\n@return Result.", "Mbeans for UPDATE_ENTRIES", "Returns the intersection of sets s1 and s2.", "Returns the DBCP DataSource for the specified connection descriptor,\nafter creating a new DataSource if needed.\n@param jcd the descriptor for which to return a DataSource\n@return a DataSource, after creating a new pool if needed.\nGuaranteed to never be null.\n@throws LookupException if pool is not in cache and cannot be created", "Generate a results file for each test in each suite.\n@param outputDirectory The target directory for the generated file(s).", "Remove any overrides for an endpoint on the default profile, client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise", "Parse the given projection.\n\n@param projection The projection string.\n@param longitudeFirst longitudeFirst", "Convert tenor given as offset in months to year fraction.\n\n@param maturityInMonths The maturity as offset in months.\n@param tenorInMonths The tenor as offset in months.\n@return THe tenor as year fraction.", "Handles reports by consumers\n\n@param name the name of the reporting consumer\n@param report the number of lines the consumer has written since last report\n@return \"exit\" if maxScenarios has been reached, \"ok\" otherwise" ]
private boolean checkDeploymentDir(File directory) { if (!directory.exists()) { if (deploymentDirAccessible) { deploymentDirAccessible = false; ROOT_LOGGER.directoryIsNonexistent(deploymentDir.getAbsolutePath()); } } else if (!directory.isDirectory()) { if (deploymentDirAccessible) { deploymentDirAccessible = false; ROOT_LOGGER.isNotADirectory(deploymentDir.getAbsolutePath()); } } else if (!directory.canRead()) { if (deploymentDirAccessible) { deploymentDirAccessible = false; ROOT_LOGGER.directoryIsNotReadable(deploymentDir.getAbsolutePath()); } } else if (!directory.canWrite()) { if (deploymentDirAccessible) { deploymentDirAccessible = false; ROOT_LOGGER.directoryIsNotWritable(deploymentDir.getAbsolutePath()); } } else { deploymentDirAccessible = true; } return deploymentDirAccessible; }
[ "Checks that given directory if readable & writable and prints a warning if the check fails. Warning is only\nprinted once and is not repeated until the condition is fixed and broken again.\n\n@param directory deployment directory\n@return does given directory exist and is readable and writable?" ]
[ "Builds a string that serializes a list of objects separated by the pipe\ncharacter. The toString methods are used to turn objects into strings.\nThis operation is commonly used to build parameter lists for API\nrequests.\n\n@param objects\nthe objects to implode\n@return string of imploded objects", "Computes either the vector p-norm or the induced matrix p-norm depending on A\nbeing a vector or a matrix respectively.\n\n@param A Vector or matrix whose norm is to be computed.\n@param p The p value of the p-norm.\n@return The computed norm.", "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.", "Attach a script file to a scriptable target.\n\n@param target The scriptable target.\n@param scriptFile The script file object.", "Sets the working directory.\n\n@param dir The directory\n@throws IOException If the directory does not exist or cannot be written/read", "Use this API to disable nsfeature.", "Create a BoxStoragePolicyAssignment for a BoxStoragePolicy.\n@param api the API connection to be used by the resource.\n@param policyID the policy ID of the BoxStoragePolicy.\n@param userID the user ID of the to assign the BoxStoragePolicy to.\n@return the information about the BoxStoragePolicyAssignment created.", "Creates a new indirection handler instance.\n\n@param brokerKey The associated {@link PBKey}.\n@param id The subject's ids\n@return The new instance", "Creates a Document that can be passed to the MongoDB batch insert function" ]
public static Collection<Field> getAttributes( final Class<?> classToInspect, final Predicate<Field> filter) { Set<Field> allFields = new HashSet<>(); getAllAttributes(classToInspect, allFields, Function.identity(), filter); return allFields; }
[ "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." ]
[ "Helper method to create a string template source for a given formatter and content.\n\n@param formatter the formatter\n@param contentSupplier the content supplier\n\n@return the string template provider", "Transform the operation into something the proxy controller understands.\n\n@param identity the server identity\n@return the transformed operation", "Find the number of Strings matched to the given Matcher.\n\n@param matcher a Matcher\n@return int the number of Strings matched to the given matcher.\n@since 1.0", "Given a list of store definitions return a set of store names\n\n@param storeDefList The list of store definitions\n@return Returns a set of store names", "Returns a lazily generated map from site paths of resources to the available locales for the resource.\n\n@return a lazily generated map from site paths of resources to the available locales for the resource.", "The document field must not exist in the list provided\n@param rhs The argument - one or more values\n@return PredicateExpression: $nin rhs", "Set the dates for the specified photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param datePosted\nThe date the photo was posted or null\n@param dateTaken\nThe date the photo was taken or null\n@param dateTakenGranularity\nThe granularity of the taken date or null\n@throws FlickrException", "Groups all of the metadata cache files that are candidates for auto-attachment to player slots into lists\nthat are keyed by the playlist ID used to create the cache file. Files that cache all tracks have a playlist\nID of 0.\n\n@return a map from playlist ID to the caches holding tracks from that playlist", "Use this API to fetch csvserver_cmppolicy_binding resources of given name ." ]
public String load() { this.paginator = new Paginator(); this.codes = null; // Perform a search this.codes = codeFragmentManager.searchCodeFragments(this.codeFragmentPrototype, this.page, this.paginator); return "history"; }
[ "Do the search, called as a \"page action\"" ]
[ "Return true only if the node has the named annotation\n@param node - the AST Node to check\n@param name - the name of the annotation\n@return true only if the node has the named annotation", "Starts advertising on Hyperbahn at a fixed interval.\n\n@return a future that resolves to the response of the first advertise request", "Use this API to fetch authorizationpolicylabel_binding resource of given name .", "Use this API to fetch filtered set of lbvserver resources.\nset the filter parameter values in filtervalue object.", "Set the named arguments.\n\n@param vars\nthe new named arguments", "Verifies given web-hook information.\n\n@param signatureVersion\nsignature version received from web-hook\n@param signatureAlgorithm\nsignature algorithm received from web-hook\n@param primarySignature\nprimary signature received from web-hook\n@param secondarySignature\nsecondary signature received from web-hook\n@param webHookPayload\npayload of web-hook\n@param deliveryTimestamp\ndevilery timestamp received from web-hook\n@return true, if given payload is successfully verified against primary and secondary signatures, false otherwise", "Get a property as an int or throw an exception.\n\n@param key the property name", "Performs a get all operation with the specified composite request object\n\n@param requestWrapper Composite request object containing a reference to\nthe Iterable keys\n\n@return Map of the keys to the corresponding versioned values", "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 appfwhtmlerrorpage get(nitro_service service, options option) throws Exception{ appfwhtmlerrorpage obj = new appfwhtmlerrorpage(); appfwhtmlerrorpage[] response = (appfwhtmlerrorpage[])obj.get_resources(service,option); return response[0]; }
[ "Use this API to fetch all the appfwhtmlerrorpage resources that are configured on netscaler." ]
[ "Use this API to restart dbsmonitors.", "Parses the configuration node and provides a pipeline configuration without any extensions marked for loading.\nThe configuration node is supposed to conform to the pipeline configuration JSON schema.\n\n<p>The caller is supposed to use the methods from the builder to add/find extension classes that will be used in\nthe analysis.\n\n<p>Note that the returned pipeline configuration might not contain all the extensions available in\nthe classloader depending on the include/exclude filters in the configuration.\n\n@param json the configuration node\n@return a pipeline configuration parsed from the configuration\n@see Builder#build()", "Cleans up a extension module's subsystems from the resource registration model.\n\n@param rootResource the model root resource\n@param moduleName the name of the extension's module. Cannot be {@code null}\n@throws IllegalStateException if the extension still has subsystems present in {@code rootResource} or its children", "Adds a file with the provided description.", "Creates needed textfields for general label in footer groups.\n@param djgroup\n@param jgroup", "use this method to construct the ChainingIterator\niterator by iterator.", "Determine if a CharSequence can be parsed as a BigInteger.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigInteger(String)\n@since 1.8.2", "Use this API to fetch servicegroupbindings resource of given name .", "Use this API to fetch sslcertkey resource of given name ." ]
public static BatchASTFuture analyze(final BatchASTListener listener, final WildcardImportResolver importResolver, final Set<String> libraryPaths, final Set<String> sourcePaths, Set<Path> sourceFiles) { final String[] encodings = null; final String[] bindingKeys = new String[0]; final ExecutorService executor = WindupExecutors.newFixedThreadPool(WindupExecutors.getDefaultThreadCount()); final FileASTRequestor requestor = new FileASTRequestor() { @Override public void acceptAST(String sourcePath, CompilationUnit ast) { try { /* * This super() call doesn't do anything, but we call it just to be nice, in case that ever changes. */ super.acceptAST(sourcePath, ast); ReferenceResolvingVisitor visitor = new ReferenceResolvingVisitor(importResolver, ast, sourcePath); ast.accept(visitor); listener.processed(Paths.get(sourcePath), visitor.getJavaClassReferences()); } catch (WindupStopException ex) { throw ex; } catch (Throwable t) { listener.failed(Paths.get(sourcePath), t); } } }; List<List<String>> batches = createBatches(sourceFiles); for (final List<String> batch : batches) { executor.submit(new Callable<Void>() { @Override public Void call() throws Exception { ASTParser parser = ASTParser.newParser(AST.JLS8); parser.setBindingsRecovery(false); parser.setResolveBindings(true); Map<String, String> options = JavaCore.getOptions(); JavaCore.setComplianceOptions(JavaCore.VERSION_1_8, options); // these options seem to slightly reduce the number of times that JDT aborts on compilation errors options.put(JavaCore.CORE_INCOMPLETE_CLASSPATH, "warning"); options.put(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, "warning"); options.put(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE, "warning"); options.put(JavaCore.CORE_CIRCULAR_CLASSPATH, "warning"); options.put(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, "warning"); options.put(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION, "warning"); options.put(JavaCore.CORE_JAVA_BUILD_INVALID_CLASSPATH, "ignore"); options.put(JavaCore.COMPILER_PB_NULL_ANNOTATION_INFERENCE_CONFLICT, "warning"); options.put(JavaCore.CORE_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE, "warning"); options.put(JavaCore.CORE_JAVA_BUILD_DUPLICATE_RESOURCE, "warning"); parser.setCompilerOptions(options); parser.setEnvironment(libraryPaths.toArray(new String[libraryPaths.size()]), sourcePaths.toArray(new String[sourcePaths.size()]), null, true); parser.createASTs(batch.toArray(new String[batch.size()]), encodings, bindingKeys, requestor, null); return null; } }); } executor.shutdown(); return new BatchASTFuture() { @Override public boolean isDone() { return executor.isTerminated(); } }; }
[ "Process the given batch of files and pass the results back to the listener as each file is processed." ]
[ "Compares two fields given by their names.\n\n@param objA The name of the first field\n@param objB The name of the second field\n@return\n@see java.util.Comparator#compare(java.lang.Object, java.lang.Object)", "Retrieve list of resource extended attributes.\n\n@return list of extended attributes", "Create a Css Selector Transform", "Sets the path to the script file to load and loads the script.\n\n@param filePath path to script file\n@throws IOException if the script cannot be read.\n@throws GVRScriptException if a script processing error occurs.", "See page 385 of Fundamentals of Matrix Computations 2nd", "Returns a string describing 'time' as a time relative to 'now'.\n\nSee {@link android.text.format.DateUtils#getRelativeTimeSpanString} for full docs.\n\n@param context the context\n@param time the time to describe\n@param flags a bit mask for formatting options, usually FORMAT_ABBREV_RELATIVE\n@return a string describing 'time' as a time relative to 'now'.", "Copy all of the mappings from the specified map to this one, replacing\nany mappings with the same keys.\n\n@param in the map whose mappings are to be copied", "Appends the query part for the facet to the query string.\n@param query The current query string.\n@param name The name of the facet parameter, e.g. \"limit\", \"order\", ....\n@param value The value to set for the parameter specified by name.", "Returns an HTML table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns." ]
public void contextInitialized(ServletContextEvent event) { this.context = event.getServletContext(); // Output a simple message to the server's console System.out.println("The Simple Web App. Is Ready"); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "/client.xml"); LocatorService client = (LocatorService) context .getBean("locatorService"); String serviceHost = this.context.getInitParameter("serviceHost"); try { client.registerEndpoint(new QName( "http://talend.org/esb/examples/", "GreeterService"), serviceHost, BindingType.SOAP_11, TransportType.HTTP, null); } catch (InterruptedExceptionFault e) { e.printStackTrace(); } catch (ServiceLocatorFault e) { e.printStackTrace(); } }
[ "is ready to service requests" ]
[ "Use this API to unset the properties of nsacl6 resources.\nProperties that need to be unset are specified in args array.", "Begin building a url for this host with the specified image.", "Cretae a BufferedImage from an ImageProducer.\n@param producer the ImageProducer\n@return a new TYPE_INT_ARGB BufferedImage", "Initializes the mode switcher.\n@param current the current edit mode", "returns a unique long value for class clazz and field fieldName.\nthe returned number is unique accross all tables in the extent of clazz.", "Build control archive of the deb\n\n@param packageControlFile the package control file\n@param controlFiles the other control information files (maintainer scripts, etc)\n@param dataSize the size of the installed package\n@param checksums the md5 checksums of the files in the data archive\n@param output\n@return\n@throws java.io.FileNotFoundException\n@throws java.io.IOException\n@throws java.text.ParseException", "An extremely simple method for identifying multimedia. This\ncould be improved, but it's good enough for this example.\n\n@param file which could be an image or a video\n@return true if the file can be previewed, false otherwise", "Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors", "Removes all events from table\n\n@param table the table to remove events" ]
protected String calculateNextVersion(String fromVersion) { // first turn it to release version fromVersion = calculateReleaseVersion(fromVersion); String nextVersion; int lastDotIndex = fromVersion.lastIndexOf('.'); try { if (lastDotIndex != -1) { // probably a major minor version e.g., 2.1.1 String minorVersionToken = fromVersion.substring(lastDotIndex + 1); String nextMinorVersion; int lastDashIndex = minorVersionToken.lastIndexOf('-'); if (lastDashIndex != -1) { // probably a minor-buildNum e.g., 2.1.1-4 (should change to 2.1.1-5) String buildNumber = minorVersionToken.substring(lastDashIndex + 1); int nextBuildNumber = Integer.parseInt(buildNumber) + 1; nextMinorVersion = minorVersionToken.substring(0, lastDashIndex + 1) + nextBuildNumber; } else { nextMinorVersion = Integer.parseInt(minorVersionToken) + 1 + ""; } nextVersion = fromVersion.substring(0, lastDotIndex + 1) + nextMinorVersion; } else { // maybe it's just a major version; try to parse as an int int nextMajorVersion = Integer.parseInt(fromVersion) + 1; nextVersion = nextMajorVersion + ""; } } catch (NumberFormatException e) { return fromVersion; } return nextVersion + "-SNAPSHOT"; }
[ "Calculates the next snapshot version based on the current release version\n\n@param fromVersion The version to bump to next development version\n@return The next calculated development (snapshot) version" ]
[ "Creates a new broker instance.\n\n@param jcdAlias The jdbc connection descriptor name as defined in the repository\n@param user The user name to be used for connecting to the database\n@param password The password to be used for connecting to the database\n@return The persistence broker\n@see org.apache.ojb.broker.core.PersistenceBrokerFactoryIF#createPersistenceBroker(java.lang.String, java.lang.String, java.lang.String)", "Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value", "Fetch the next event from a given stream\n@return the next event\n@throws IOException any io exception that could occur", "Visits a dependence of the current module.\n\n@param module the qualified name of the dependence.\n@param access the access flag of the dependence among\nACC_TRANSITIVE, ACC_STATIC_PHASE, ACC_SYNTHETIC\nand ACC_MANDATED.\n@param version the module version at compile time or null.", "returns all methods not in the group\n\n@param groupId Id of group\n@return List of Methods for a group\n@throws Exception exception", "Requests the cue list for a specific track ID, given a dbserver connection to a player that has already\nbeen set up.\n\n@param rekordboxId the track of interest\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 cue list, or {@code null} if none was available\n@throws IOException if there is a communication problem", "Logout the current session. After calling this method,\nthe session will be cleared", "Send get request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws URISyntaxException the uri syntax exception\n@throws IOException the io exception", "Adds listeners and reads from a file.\n\n@param reader reader for file type\n@param file schedule data\n@return ProjectFile instance" ]
private static void checkPreconditions(final String regex, final String replacement) { if( regex == null ) { throw new NullPointerException("regex should not be null"); } else if( regex.length() == 0 ) { throw new IllegalArgumentException("regex should not be empty"); } if( replacement == null ) { throw new NullPointerException("replacement should not be null"); } }
[ "Checks the preconditions for creating a new StrRegExReplace processor.\n\n@param regex\nthe supplied regular expression\n@param replacement\nthe supplied replacement text\n@throws IllegalArgumentException\nif regex is empty\n@throws NullPointerException\nif regex or replacement is null" ]
[ "Use this API to fetch the statistics of all service_stats resources that are configured on netscaler.", "Get the domain controller data from the given byte buffer.\n\n@param buffer the byte buffer\n@return the domain controller data\n@throws Exception", "Returns the title according to the given locale.\n@param locale the locale for which the title should be read.\n@return the title according to the given locale", "Calculate the signature by which we can reliably recognize a loaded track.\n\n@param title the track title\n@param artist the track artist, or {@code null} if there is no artist\n@param duration the duration of the track in seconds\n@param waveformDetail the monochrome waveform detail of the track\n@param beatGrid the beat grid of the track\n\n@return the SHA-1 hash of all the arguments supplied, or {@code null} if any either {@code waveFormDetail} or {@code beatGrid} were {@code null}", "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", "Retrieves all Metadata Cascade Policies on a folder.\n\n@param fields optional fields to retrieve for cascade policies.\n@return the Iterable of Box Metadata Cascade Policies in your enterprise.", "Returns a new iterator filtering any null references.\n\n@param unfiltered\nthe unfiltered iterator. May not be <code>null</code>.\n@return an unmodifiable iterator containing all elements of the original iterator without any <code>null</code>\nreferences. Never <code>null</code>.", "Displays a sample model for the report request.\n@return A string describing the structure of a certain report execution", "Generate attachment extension from mime type\n\n@param type valid mime-type\n@return extension if it's known for specified mime-type, or empty string\notherwise" ]
public static linkset[] get(nitro_service service) throws Exception{ linkset obj = new linkset(); linkset[] response = (linkset[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the linkset resources that are configured on netscaler." ]
[ "Send a waveform preview update announcement to all registered listeners.\n\n@param player the player whose waveform preview has changed\n@param preview the new waveform preview, if any", "Returns the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.\n\n@param namespace the namespace referring to the undo collection.\n@return the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.", "Redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@return\n@throws Exception", "Register the given Converter objects with the given target ConverterRegistry.\n@param converters the converter objects: implementing {@link Converter},\n{@link ConverterFactory}, or {@link GenericConverter}\n@param registry the target registry", "joins a collection of objects together as a String using a separator", "Waits for the current outstanding request retrying it with exponential backoff if it fails.\n\n@throws ClosedByInterruptException if request was interrupted\n@throws IOException In the event of FileNotFoundException, MalformedURLException\n@throws RetriesExhaustedException if exceeding the number of retries", "Use this API to fetch appfwpolicy_csvserver_binding resources of given name .", "Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards.\n\n@param key\nname of the parameter to add\n@param value\nvalue of the parameter to create\n@return the newly created parameter", "test, how many times the group was present in the list of groups." ]
public static base_response delete(nitro_service client, ntpserver resource) throws Exception { ntpserver deleteresource = new ntpserver(); deleteresource.serverip = resource.serverip; deleteresource.servername = resource.servername; return deleteresource.delete_resource(client); }
[ "Use this API to delete ntpserver." ]
[ "Create an `AppDescriptor` with appName and entry class specified.\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param entryClass\nthe entry class\n@return\nan `AppDescriptor` instance", "Places a new value at the end of the existing value array, increasing the field length accordingly.\n@param newValue - the 2 floats making the new SFVec2f appended to the MFVec2f array list", "Closing will only skip to the end of this fixed length input stream and\nnot call the parent's close method.\n@throws IOException if an I/O error occurs while closing stream", "Initializes the Stitch SDK so that app clients can be created.\n\n@param context An Android context value.", "Get the collection of the server groups\n\n@return Collection of active server groups", "Finds all nWise combinations of a set of variables, each with a given domain of values\n\n@param nWise the number of variables in each combination\n@param coVariables the varisbles\n@param variableDomains the domains\n@return all nWise combinations of the set of variables", "Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception", "Calculates the Boundedness value to given confinement radius, diffusion coefficient, timlag and number of steps.\n@param D diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param confRadius Confinement radius\n@return Boundedness value", "Get informations about a place.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param placeId\nA Flickr Places ID. Optional, can be null. (While optional, you must pass either a valid Places ID or a WOE ID.)\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null. (While optional, you must pass either a valid Places ID or a WOE ID.)\n@return A Location\n@throws FlickrException" ]
@Pure public static <K, V> Map<K, V> operator_minus(Map<K, V> map, final K key) { return Maps.filterKeys(map, new Predicate<K>() { @Override public boolean apply(K input) { return !Objects.equal(input, key); } }); }
[ "Replies the elements of the given map except the pair with the given key.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param key the key to remove.\n@return the map with the content of the map except the key.\n@since 2.15" ]
[ "Concatenate all the arrays in the list into a vector.\n\n@param arrays List of arrays.\n@return Vector.", "Add data for a column to this table.\n\n@param column column data", "Extract data for a single task.\n\n@param parent task parent\n@param row Synchro task data", "Given a json node, find a nested node using given composed key.\n\n@param jsonNode the parent json node\n@param composedKey a key combines multiple keys using flattening dots.\nFlattening dots are dot character '.' those are not preceded by slash '\\'\nEach flattening dot represents a level with following key as field key in that level\n@return nested json node located using given composed key", "Decide which donor node to steal from. This is a policy implementation.\nI.e., in the future, additional policies could be considered. At that\ntime, this method should be overridden in a sub-class, or a policy object\nought to implement this algorithm.\n\nCurrent policy:\n\n1) If possible, a stealer node that is the zone n-ary in the finalCluster\nsteals from the zone n-ary in the currentCluster in the same zone.\n\n2) If there are no partition-stores to steal in the same zone (i.e., this\nis the \"zone expansion\" use case), then a differnt policy must be used.\nThe stealer node that is the zone n-ary in the finalCluster determines\nwhich pre-existing zone in the currentCluster hosts the primary partition\nid for the partition-store. The stealer then steals the zone n-ary from\nthat pre-existing zone.\n\nThis policy avoids unnecessary cross-zone moves and distributes the load\nof cross-zone moves approximately-uniformly across pre-existing zones.\n\nOther policies to consider:\n\n- For zone expansion, steal all partition-stores from one specific\npre-existing zone.\n\n- Replace heuristic to approximately uniformly distribute load among\nexisting zones to something more concrete (i.e. track steals from each\npre-existing zone and forcibly balance them).\n\n- Select a single donor for all replicas in a new zone. This will require\ndonor-based rebalancing to be run (at least for this specific part of the\nplan). This would reduce the number of donor-side scans of data. (But\nstill send replication factor copies over the WAN.) This would require\napparatus in the RebalanceController to work.\n\n- Set up some sort of chain-replication in which a single stealer in the\nnew zone steals some replica from a pre-exising zone, and then other\nn-aries in the new zone steal from the single cross-zone stealer in the\nzone. This would require apparatus in the RebalanceController to work.\n\n@param currentSRP\n@param finalSRP\n@param stealerZoneId\n@param stealerNodeId\n@param stealerPartitionId\n@return the node id of the donor for this partition Id.", "Obtains the collection of server groups defined for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception", "Add filters to the tree.\n\n@param parentNode parent tree node\n@param filters list of filters", "Creates the stats items.\n\n@param statsType\nthe stats type\n@return the sorted set\n@throws IOException\nSignals that an I/O exception has occurred.", "Add UDFType objects to a PM XML file.\n\n@author kmahan\n@date 2014-09-24\n@author lsong\n@date 2015-7-24" ]
private String getValueFromProp(final String propValue) { String value = propValue; // remove quotes value = value.trim(); if ((value.startsWith("\"") && value.endsWith("\"")) || (value.startsWith("'") && value.endsWith("'"))) { value = value.substring(1, value.length() - 1); } return value; }
[ "Helper to read a line from the config file.\n@param propValue the property value\n@return the value of the variable set at this line." ]
[ "Returns a fine-grained word shape classifier, that equivalence classes\nlower and upper case and digits, and collapses sequences of the\nsame type, but keeps all punctuation. This adds an extra recognizer\nfor a greek letter embedded in the String, which is useful for bio.", "Return true if the Declaration can be linked to the ImporterService.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference<ImporterService> of the ImporterService\n@return true if the Declaration can be linked to the ImporterService", "Set the attributes of a feature.\n\n@param feature the feature\n@param attributes the attributes\n@throws LayerException oops", "Throws one RendererException if the viewType, layoutInflater or parent are null.", "Remove a descriptor.\n@param validKey This could be the {@link JdbcConnectionDescriptor}\nitself, or the associated {@link JdbcConnectionDescriptor#getPBKey PBKey}.", "Creates a new deployment for the URL. The target server will require access to the URL.\n\n@param url the URL representing the content\n\n@return the deployment", "Copy new data to an existing float-point texture.\n\nCreating a new {@link GVRFloatImage} is pretty cheap, but it's still\nnot a totally trivial operation: it does involve some memory management\nand some GL hardware handshaking. Reusing the texture reduces this\noverhead (primarily by delaying garbage collection). Do be aware that\nupdating a texture will affect any and all {@linkplain GVRMaterial\nmaterials} (and/or post effects that use the texture!\n\n@param width\nTexture width, in pixels\n@param height\nTexture height, in pixels\n@param data\nA linear array of float pairs.\n@return {@code true} if the updateGPU succeeded, and {@code false} if it\nfailed. Updating a texture requires that the new data parameter\nhas the exact same {@code width} and {@code height} and pixel\nformat as the original data.\n@throws IllegalArgumentException\nIf {@code width} or {@code height} is {@literal <= 0,} or if\n{@code data} is {@code null}, or if\n{@code data.length < height * width * 2}", "This method writes task data to a JSON file.\nNote that we write the task hierarchy in order to make rebuilding the hierarchy easier.", "Use this API to unset the properties of sslparameter resource.\nProperties that need to be unset are specified in args array." ]
public List<WbSearchEntitiesResult> wbSearchEntities(String search, String language, Boolean strictLanguage, String type, Long limit, Long offset) throws MediaWikiApiErrorException { Map<String, String> parameters = new HashMap<String, String>(); parameters.put(ApiConnection.PARAM_ACTION, "wbsearchentities"); if (search != null) { parameters.put("search", search); } else { throw new IllegalArgumentException( "Search parameter must be specified for this action."); } if (language != null) { parameters.put("language", language); } else { throw new IllegalArgumentException( "Language parameter must be specified for this action."); } if (strictLanguage != null) { parameters.put("strictlanguage", Boolean.toString(strictLanguage)); } if (type != null) { parameters.put("type", type); } if (limit != null) { parameters.put("limit", Long.toString(limit)); } if (offset != null) { parameters.put("continue", Long.toString(offset)); } List<WbSearchEntitiesResult> results = new ArrayList<>(); try { JsonNode root = this.connection.sendJsonRequest("POST", parameters); JsonNode entities = root.path("search"); for (JsonNode entityNode : entities) { try { JacksonWbSearchEntitiesResult ed = mapper.treeToValue(entityNode, JacksonWbSearchEntitiesResult.class); results.add(ed); } catch (JsonProcessingException e) { LOGGER.error("Error when reading JSON for entity " + entityNode.path("id").asText("UNKNOWN") + ": " + e.toString()); } } } catch (IOException e) { LOGGER.error("Could not retrive data: " + e.toString()); } return results; }
[ "Executes the API action \"wbsearchentity\" for the given parameters.\nSearches for entities using labels and aliases. Returns a label and\ndescription for the entity in the user language if possible. Returns\ndetails of the matched term. The matched term text is also present in the\naliases key if different from the display label.\n\n<p>\nSee the <a href=\n\"https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentity\"\n>online API documentation</a> for further information.\n<p>\n\n@param search\n(required) search for this text\n@param language\n(required) search in this language\n@param strictLanguage\n(optional) whether to disable language fallback\n@param type\n(optional) search for this type of entity\nOne of the following values: item, property\nDefault: item\n@param limit\n(optional) maximal number of results\nno more than 50 (500 for bots) allowed\nDefault: 7\n@param offset\n(optional) offset where to continue a search\nDefault: 0\nthis parameter is called \"continue\" in the API (which is a Java keyword)\n\n@return list of matching entities retrieved via the API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IllegalArgumentException\nif the given combination of parameters does not make sense" ]
[ "Token Info\nReturns the Token Information\n@return ApiResponse&lt;TokenInfoSuccessResponse&gt;\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "Mbeans for FETCH_KEYS", "Removes the supplied marker from the map.\n\n@param marker", "Accessor method used to retrieve a Number instance representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails", "Sets the whole day flag.\n@param isWholeDay flag, indicating if the event lasts whole days.", "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", "Converts from a bitmap to individual day flags for a weekly recurrence,\nusing the array of masks.\n\n@param days bitmap\n@param masks array of mask values", "Given a cluster and a node id checks if the node exists\n\n@param nodeId The node id to search for\n@return True if cluster contains the node id, else false", "Transform the given object into an array of bytes\n\n@param object The object to be serialized\n@return The bytes created from serializing the object" ]
private Number calculateDurationPercentComplete(Row row) { double result = 0; double targetDuration = row.getDuration("target_drtn_hr_cnt").getDuration(); double remainingDuration = row.getDuration("remain_drtn_hr_cnt").getDuration(); if (targetDuration == 0) { if (remainingDuration == 0) { if ("TK_Complete".equals(row.getString("status_code"))) { result = 100; } } } else { if (remainingDuration < targetDuration) { result = ((targetDuration - remainingDuration) * 100) / targetDuration; } } return NumberHelper.getDouble(result); }
[ "Calculate the duration percent complete.\n\n@param row task data\n@return percent complete" ]
[ "Get the number of views, comments and favorites on a photoset for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param photosetId\n(Required) The id of the photoset to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotosetStats.htm\"", "Returns the key of the entity targeted by the represented association, retrieved from the given tuple.\n\n@param tuple the tuple from which to retrieve the referenced entity key\n@return the key of the entity targeted by the represented association", "Decrease the indent level.", "retrieve a collection of type collectionClass matching the Query query\nif lazy = true return a CollectionProxy\n\n@param collectionClass\n@param query\n@param lazy\n@return ManageableCollection\n@throws PersistenceBrokerException", "Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream\nproperly.\n\n@param out target archive.\n@param source file to be added.\n@param fileSize size of the file (which is known in most cases).\n@throws IOException in case of any issues with underlying store.", "Sets the specified float attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Process a graphical indicator definition for a known type.\n\n@param type field type", "Figures out the correct class loader to use for a proxy for a given bean", "Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception" ]
public Collection<Exif> getExif(String photoId, String secret) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_EXIF); parameters.put("photo_id", photoId); if (secret != null) { parameters.put("secret", secret); } Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } List<Exif> exifs = new ArrayList<Exif>(); Element photoElement = response.getPayload(); NodeList exifElements = photoElement.getElementsByTagName("exif"); for (int i = 0; i < exifElements.getLength(); i++) { Element exifElement = (Element) exifElements.item(i); Exif exif = new Exif(); exif.setTagspace(exifElement.getAttribute("tagspace")); exif.setTagspaceId(exifElement.getAttribute("tagspaceid")); exif.setTag(exifElement.getAttribute("tag")); exif.setLabel(exifElement.getAttribute("label")); exif.setRaw(XMLUtilities.getChildValue(exifElement, "raw")); exif.setClean(XMLUtilities.getChildValue(exifElement, "clean")); exifs.add(exif); } return exifs; }
[ "Get the Exif data for the photo.\n\nThe calling user must have permission to view the photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@param secret\nThe secret\n@return A collection of Exif objects\n@throws FlickrException" ]
[ "Update list of sorted services by copying it from the array and making it unmodifiable.", "Starts advertising on Hyperbahn at a fixed interval.\n\n@return a future that resolves to the response of the first advertise request", "Use this API to fetch vpnsessionpolicy_aaauser_binding resources of given name .", "Return the value of field in the data argument if it is not the default value for the class. If it is the default\nthen null is returned.", "Helper method for formatting connection termination messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@param terminationReason\nThe reason for terminating the connection\n@return A formatted message in the format:\n\"[&lt;connectionName&gt;] remote host[&lt;host&gt;] &lt;connectionReason&gt; - &lt;terminationReason&gt;\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG -\nterminated by remote host.", "Ask the specified player for the waveform preview in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param trackReference uniquely identifies the desired waveform preview\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nwaveform updates will use available caches only\n\n@return the waveform preview found, if any", "Use this API to add autoscaleaction resources.", "Assign a new value to this field.\n@param numStrings - number of strings\n@param newValues - the new strings", "Get a value as a string.\n\n@param key the key for looking up the value.\n@param type the type of the object\n@param <V> the type" ]
public BoxFolder.Info getFolderInfo(String folderID) { URL url = FOLDER_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), folderID); BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject jsonObject = JsonObject.readFrom(response.getJSON()); BoxFolder folder = new BoxFolder(this.api, jsonObject.get("id").asString()); return folder.new Info(response.getJSON()); }
[ "Gets information about a trashed folder.\n@param folderID the ID of the trashed folder.\n@return info about the trashed folder." ]
[ "Loops through all resource roots that have been made available transitively via Class-Path entries, and\nadds them to the list of roots to be processed.", "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.", "Encodes the given URI authority with the given encoding.\n@param authority the authority to be encoded\n@param encoding the character encoding to encode to\n@return the encoded authority\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "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)", "Lookup an object instance from JNDI context.\n\n@param jndiName JNDI lookup name\n@return Matching object or <em>null</em> if none found.", "This method is called to alert project listeners to the fact that\na relation has been written to a project file.\n\n@param relation relation instance", "provides a safe toString", "OR operation which takes the previous clause and the next clause and OR's them together.", "Returns a valid DisplayMetrics object\n\n@param context valid context\n@return DisplayMetrics object" ]
public static List<String> getStoreNames(List<StoreDefinition> list, boolean ignoreViews) { List<String> storeNameSet = new ArrayList<String>(); for(StoreDefinition def: list) if(!def.isView() || !ignoreViews) storeNameSet.add(def.getName()); return storeNameSet; }
[ "Get the list of store names from a list of store definitions\n\n@param list\n@param ignoreViews\n@return list of store names" ]
[ "Controls whether we report that we are playing. This will only have an impact when we are sending status and\nbeat packets.\n\n@param playing {@code true} if we should seem to be playing", "Gets the sub-entries of the navigation entry.\n\n@return the sub-entries", "Called by spring on initialization.", "Maps a bindingId to its corresponding BindingType.\n@param bindingId\n@return", "Create a temporary directory with the same attributes as its parent directory.\n@param dir\nthe path to directory in which to create the directory\n@param prefix\nthe prefix string to be used in generating the directory's name;\nmay be {@code null}\n@return the path to the newly created directory that did not exist before\nthis method was invoked\n@throws IOException", "Use this API to fetch authorizationpolicylabel_binding resource of given name .", "Processes text as a FreeMarker template. Usually used to process an inner body of a tag.\n\n@param text text of a template.\n@param params map with parameters for processing.\n@param writer writer to write output to.", "Parses a name into a Region object and creates a new Region instance if not found among the existing ones.\n\n@param name a region name\n@return the parsed or created region", "Used to locate the first timephased resource assignment block which\nintersects with the target date range.\n\n@param <T> payload type\n@param range target date range\n@param assignments timephased resource assignments\n@param startIndex index at which to start the search\n@return index of timephased resource assignment which intersects with the target date range" ]
public ReportWriter getReportWriter(final JasperPrint _jasperPrint, final String _format, final Map<JRExporterParameter,Object> _parameters) { final JRExporter exporter = FormatInfoRegistry.getInstance().getExporter(_format); exporter.setParameters(_parameters); if (_jasperPrint.getPages().size() > PAGES_THRESHHOLD) { return new FileReportWriter(_jasperPrint, exporter); } else { return new MemoryReportWriter(_jasperPrint, exporter); } }
[ "Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD\n@param _jasperPrint\n@param _format\n@param _parameters\n@return" ]
[ "Inserts a Parcelable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Parcelable object, or null\n@return this bundler instance to chain method calls", "Private function to allow looking for the field recursively up the superclasses.\n\n@param clazz\n@return", "Issue the database statements to drop the table associated with a dao.\n\n@param dao\nAssociated dao.\n@return The number of statements executed to do so.", "Gets the currency codes, or the regular expression to select codes.\n\n@return the query for chaining.", "Creates the automata.\n\n@param prefix the prefix\n@param regexp the regexp\n@param automatonMap the automaton map\n@return the list\n@throws IOException Signals that an I/O exception has occurred.", "Extracts a flat set of interception bindings from a given set of interceptor bindings.\n\n@param addTopLevelInterceptorBindings add top level interceptor bindings to the result set.\n@param addInheritedInterceptorBindings add inherited level interceptor bindings to the result set.\n@return", "Mapping originator.\n\n@param originator the originator\n@return the originator type", "Use this API to fetch lbvserver_rewritepolicy_binding resources of given name .", "Returns an immutable view of a given map." ]
public boolean setCurrentConfiguration(CmsGitConfiguration configuration) { if ((null != configuration) && configuration.isValid()) { m_currentConfiguration = configuration; return true; } return false; }
[ "Sets the current configuration if it is a valid configuration. Otherwise the configuration is not set.\n@param configuration the configuration to set.\n@return flag, indicating if the configuration is set." ]
[ "Retrieve a string value.\n\n@param data byte array\n@param offset offset into byte array\n@return string value", "Shows the Loader component", "Use this API to add autoscaleprofile resources.", "New REST client uses new REST service", "Performs MAC signing of the SMB. This is done as follows.\nThe signature field of the SMB is overwritted with the sequence number;\nThe MD5 digest of the MAC signing key + the entire SMB is taken;\nThe first 8 bytes of this are placed in the signature field.\n\n@param data The data.\n@param offset The starting offset at which the SMB header begins.\n@param length The length of the SMB data starting at offset.", "Adds a perspective camera constructed from the designated\nperspective camera to describe the shadow projection.\nThis type of camera is used for shadows generated by spot lights.\n@param centerCam GVRPerspectiveCamera to derive shadow projection from\n@param coneAngle spot light cone angle\n@return Perspective camera to use for shadow casting\n@see GVRSpotLight", "selects either a synchronous or an asynchronous producer, for the\nspecified broker id and calls the send API on the selected producer\nto publish the data to the specified broker partition\n\n@param ppd the producer pool request object", "Returns the default shared instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object", "Parses the dictionary from an InputStream.\n\n@param client The SolrClient instance object.\n@param lang The language of the dictionary.\n@param is The InputStream object.\n@param documents List to put the assembled SolrInputObjects into.\n@param closeStream boolean flag that determines whether to close the inputstream\nor not." ]
private void writeExceptions12(Project.Calendars.Calendar calendar, List<ProjectCalendarException> exceptions) { Exceptions ce = m_factory.createProjectCalendarsCalendarExceptions(); calendar.setExceptions(ce); List<Exceptions.Exception> el = ce.getException(); for (ProjectCalendarException exception : exceptions) { Exceptions.Exception ex = m_factory.createProjectCalendarsCalendarExceptionsException(); el.add(ex); ex.setName(exception.getName()); boolean working = exception.getWorking(); ex.setDayWorking(Boolean.valueOf(working)); if (exception.getRecurring() == null) { ex.setEnteredByOccurrences(Boolean.FALSE); ex.setOccurrences(BigInteger.ONE); ex.setType(BigInteger.ONE); } else { populateRecurringException(exception, ex); } Project.Calendars.Calendar.Exceptions.Exception.TimePeriod period = m_factory.createProjectCalendarsCalendarExceptionsExceptionTimePeriod(); ex.setTimePeriod(period); period.setFromDate(exception.getFromDate()); period.setToDate(exception.getToDate()); if (working) { Project.Calendars.Calendar.Exceptions.Exception.WorkingTimes times = m_factory.createProjectCalendarsCalendarExceptionsExceptionWorkingTimes(); ex.setWorkingTimes(times); List<Project.Calendars.Calendar.Exceptions.Exception.WorkingTimes.WorkingTime> timesList = times.getWorkingTime(); for (DateRange range : exception) { Project.Calendars.Calendar.Exceptions.Exception.WorkingTimes.WorkingTime time = m_factory.createProjectCalendarsCalendarExceptionsExceptionWorkingTimesWorkingTime(); timesList.add(time); time.setFromTime(range.getStart()); time.setToTime(range.getEnd()); } } } }
[ "Write exceptions into the format used by MSPDI files from\nProject 2007 onwards.\n\n@param calendar parent calendar\n@param exceptions list of exceptions" ]
[ "Introspect the given object.\n\n@param obj object for introspection.\n\n@return a map containing object's field values.\n\n@throws IntrospectionException if an exception occurs during introspection\n@throws InvocationTargetException if property getter throws an exception\n@throws IllegalAccessException if property getter is inaccessible", "Get stream for URL only\n\n@param stringUrl URL to get content\n@return the input stream\n@throws IOException I/O error happened", "Provide Jersey client for the targeted Grapes server\n\n@return webResource", "Add an URL to the given classloader\n\n@param loader ClassLoader\n@param url URL to add\n@throws IOException I/O Error\n@throws InvocationTargetException Invocation Error\n@throws IllegalArgumentException Illegal Argument\n@throws IllegalAccessException Illegal Access\n@throws SecurityException Security Constraint\n@throws NoSuchMethodException Method not found", "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", "Check if the current node is part of routing request based on cluster.xml\nor throw an exception.\n\n@param key The key we are checking\n@param routingStrategy The routing strategy\n@param currentNode Current node", "Set an enterprise date value.\n\n@param index date index (1-30)\n@param value date value", "Invoked when an action occurs.", "Use this API to fetch tmtrafficaction resource of given name ." ]
protected void updateNorms( int j ) { boolean foundNegative = false; for( int col = j; col < numCols; col++ ) { double e = dataQR[col][j-1]; double v = normsCol[col] -= e*e; if( v < 0 ) { foundNegative = true; break; } } // if a negative sum has been found then clearly too much precision has been lost // and it should recompute the column norms from scratch if( foundNegative ) { for( int col = j; col < numCols; col++ ) { double u[] = dataQR[col]; double actual = 0; for( int i=j; i < numRows; i++ ) { double v = u[i]; actual += v*v; } normsCol[col] = actual; } } }
[ "Performs an efficient update of each columns' norm" ]
[ "This method tokenizes a string by space characters,\nbut ignores spaces in quoted parts,that are parts in\n'' or \"\". The method does allows the usage of \"\" in ''\nand '' in \"\". The space character between tokens is not\nreturned.\n\n@param s the string to tokenize\n@return the tokens", "Start the operation by instantiating the first job instance in a separate Thread.\n\n@param arguments {@inheritDoc}", "Translate the given byte array into a string of 1s and 0s\n\n@param bytes The bytes to translate\n@return The string", "Creates an SslHandler\n\n@param bufferAllocator the buffer allocator\n@return instance of {@code SslHandler}", "Gets the JVM memory usage.\n\n@return the JVM memory usage", "Helper function that drops all local databases for every client.", "Set a proxy with authentication for REST-requests.\n\n@param proxyHost\n@param proxyPort\n@param username\n@param password", "Convenience method for setting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field to set.\n@param value\nValue to which to set the field.", "This method reads a two byte integer from the input stream.\n\n@param is the input stream\n@return integer value\n@throws IOException on file read error or EOF" ]
public static String[] allUpperCase(String... strings){ String[] tmp = new String[strings.length]; for(int idx=0;idx<strings.length;idx++){ if(strings[idx] != null){ tmp[idx] = strings[idx].toUpperCase(); } } return tmp; }
[ "Make all elements of a String array upper case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements upper case" ]
[ "Use this API to update dospolicy.", "Extract data for a single predecessor.\n\n@param task parent task\n@param row Synchro predecessor data", "Constructs the convex hull of a set of points.\n\n@param points\ninput points\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater then\nthe length of <code>points</code>, or the points appear to be\ncoincident, colinear, or coplanar.", "Clear any current allowed job types and use the given set.\n@param jobTypes the job types to allow", "Does the headset the device is docked into have a dedicated home key\n@return", "Returns the inverse of a given matrix.\n\n@param matrix A matrix given as double[n][n].\n@return The inverse of the given matrix.", "Pads the given String to the left with the given character to ensure that\nit's at least totalChars long.", "Utility method used to convert an arbitrary Number into an Integer.\n\n@param value Number instance\n@return Integer instance", "Retrieves a ProjectReader instance which can read a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectReader instance" ]
@Override public final Optional<Boolean> tryOverrideValidation(final MatchInfo matchInfo) throws SocketException, UnknownHostException, MalformedURLException { for (AddressHostMatcher addressHostMatcher: this.matchersForHost) { if (addressHostMatcher.matches(matchInfo)) { return Optional.empty(); } } return Optional.of(false); }
[ "Check the given URI to see if it matches.\n\n@param matchInfo the matchInfo to validate.\n@return True if it matches." ]
[ "Get all the handlers at a specific address.\n\n@param address the address\n@param inherited true to include the inherited operations\n@return the handlers", "Returns a list of Elements form the DOM tree, matching the tag element.", "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", "Boyer Moore scan that proceeds backwards from the end of the file looking for endsig\n\n@param file the file being checked\n@param channel the channel\n@param context the scan context\n@return\n@throws IOException", "Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments", "Create a Collection Proxy for a given query.\n\n@param brokerKey The key of the persistence broker\n@param query The query\n@param collectionClass The class to build the proxy for\n@return The collection proxy", "Calculate the starting content offset based on the layout orientation and Gravity\n@param totalSize total size occupied by the content", "Adds main report query.\n\n@param text\n@param language use constants from {@link DJConstants}\n@return", "Performs the BFS and gives the results to a distributor to distribute\n\n@param distributor the distributor" ]
public static ObjectName createObjectName(String domain, String type) { try { return new ObjectName(domain + ":type=" + type); } catch(MalformedObjectNameException e) { throw new VoldemortException(e); } }
[ "Create a JMX ObjectName\n\n@param domain The domain of the object\n@param type The type of the object\n@return An ObjectName representing the name" ]
[ "calculate distance of two points\n\n@param a\n@param b\n@return", "Use this API to fetch filtered set of sslcipher_individualcipher_binding resources.\nset the filter parameter values in filtervalue object.", "Set child components.\n\n@param children\nchildren", "Sets the current field definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"access\" optional=\"true\" description=\"The accessibility of the column\" values=\"readonly,readwrite\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"none,ojb,database\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"column-documentation\" optional=\"true\" description=\"Documentation on the column\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"", "Determines if the queue identified by the given key is a regular queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key identifies a regular queue, false otherwise", "Retrieve a list of the available P3 project names from a directory.\n\n@param directory directory containing P3 files\n@return list of project names", "Validate the Combination filter field in Multi configuration jobs", "Sets either the upper or low triangle of a matrix to zero", "Read the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar object\n@param mpxjCalendar MPXJ calendar object" ]
public void setManyToOneAttribute(String name, AssociationValue value) { ensureAttributes(); Attribute attribute = new ManyToOneAttribute(value); attribute.setEditable(isEditable(name)); getAllAttributes().put(name, attribute); }
[ "Sets the specified many-to-one attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0" ]
[ "List all apps for the current user's account.\n@param range The range of apps provided by {@link Range#getNextRange()}\n@return a list of apps", "Returns a client object for a clientId\n\n@param clientId ID of client to return\n@return Client or null\n@throws Exception exception", "Derive a calendar for a resource.\n\n@param parentCalendarID calendar from which resource calendar is derived\n@return new calendar for a resource", "Creates an Executor that is based on daemon threads.\nThis allows the program to quit without explicitly\ncalling shutdown on the pool\n\n@return the newly created single-threaded Executor", "Handle click on \"Add\" button.\n@param e the click event.", "Renames this folder.\n\n@param newName the new name of the folder.", "Deserializes a variable, NOT checking whether the datatype is custom\n@param s\n@param variableType\n@return", "Call the Yahoo! PlaceFinder service for a result.\n\n@param q\nsearch string\n@param maxRows\nmax number of rows in result, or 0 for all\n@param locale\nlocale for strings\n@return list of found results\n@throws Exception\noops\n@see <a\nhref=\"http://developer.yahoo.com/boss/geo/docs/free_YQL.html#table_pf\">Yahoo!\nBoss Geo PlaceFinder</a>", "Write the standard set of day types.\n\n@param calendars parent collection of calendars" ]
public static void checkFolderForFile(String fileName) throws IOException { if (fileName.lastIndexOf(File.separator) > 0) { String folder = fileName.substring(0, fileName.lastIndexOf(File.separator)); directoryCheck(folder); } }
[ "Checks whether the folder exists for fileName, and creates it if necessary.\n\n@param fileName folder name.\n@throws IOException an IO exception." ]
[ "The user to remove can be referenced by their globally unique user ID or their email address.\nRemoves the user from the specified team. Returns an empty data record.\n\n@param team Globally unique identifier for the team.\n@return Request object", "Sets the target translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining", "Use this API to enable Interface of given name.", "Registers a new site for specific data collection. If null is used as a\nsite key, then all data is collected.\n\n@param siteKey\nthe site to collect geo data for", "Create an import declaration and delegates its registration for an upper class.", "Adds a new point.\n\n@param point a point\n@return this for chaining", "The only properties added to a relationship are the columns representing the index of the association.", "Create a model controller client which is exclusively receiving messages on an existing channel.\n\n@param channel the channel\n@param executorService an executor\n@return the created client", "Configures the configuration selector." ]
public AT_Row setPaddingTop(int paddingTop) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingTop(paddingTop); } } return this; }
[ "Sets the top padding for all cells in the row.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining" ]
[ "Extract the generic return type from the given method.\n@param method the method to check the return type for\n@param source the source class/interface defining the generic parameter types\n@param typeIndex the index of the type (e.g. 0 for Collections,\n0 for Map keys, 1 for Map values)\n@param nestingLevel the nesting level of the target type\n@return the generic type, or {@code null} if none", "Adds the HIBC prefix and check digit to the specified data, returning the resultant data string.\n\n@see <a href=\"https://sourceforge.net/p/zint/code/ci/master/tree/backend/library.c\">Corresponding Zint code</a>", "Removes the task from wait q.\n\n@param taskTobeRemoved\nthe task tobe removed\n@return true, if successful", "Retrieves the constructor that is used by OJB to create instances of the given collection proxy\nclass.\n\n@param proxyClass The proxy class\n@param baseType The required base type of the proxy class\n@param typeDesc The type of collection proxy\n@return The constructor", "Sets the baseline finish text value.\n\n@param baselineNumber baseline number\n@param value baseline finish text value", "Apply clipping to the features in a tile. The tile and its features should already be in map space.\n\n@param tile\ntile to put features in\n@param scale\nscale\n@param panOrigin\nWhen panning on the client, only this parameter changes. So we need to be aware of it as we calculate\nthe maxScreenEnvelope.\n@throws GeomajasException oops", "Loads the schemas associated to this catalog.", "Does this procedure return any values to the 'caller'?\n\n@return <code>true</code> if the procedure returns at least 1\nvalue that is returned to the caller.", "Try to get an attribute value from two elements.\n\n@param firstElement\n@param secondElement\n@return attribute value" ]
public void updateColor(TestColor color) { switch (color) { case green: m_forwardButton.setEnabled(true); m_confirmCheckbox.setVisible(false); m_status.setValue(STATUS_GREEN); break; case yellow: m_forwardButton.setEnabled(false); m_confirmCheckbox.setVisible(true); m_status.setValue(STATUS_YELLOW); break; case red: m_forwardButton.setEnabled(false); m_confirmCheckbox.setVisible(true); m_status.setValue(STATUS_RED); break; default: break; } }
[ "Sets test status." ]
[ "Creates multiple aliases at once.", "Modify the meta-data for a photoset.\n\n@param photosetId\nThe photoset ID\n@param title\nA new title\n@param description\nA new description (can be null)\n@throws FlickrException", "Returns the user defined field without its prefix.\n\n@param field the name of the user defined field\n@return the user defined field without the prefix, or null if the fields\ndoesn't apply to this control file.\n@since 1.1", "Adds to this set all of the elements in the specified members array\n@param members the members to add\n@return the number of members actually added", "Create an embedded host controller.\n\n@param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty.\n@param modulePath the location of the root of the module repository. May be {@code null} if the standard\nlocation under {@code jbossHomePath} should be used\n@param systemPackages names of any packages that must be treated as system packages, with the same classes\nvisible to the caller's classloader visible to host-controller-side classes loaded from\nthe server's modular classloader\n@param cmdargs any additional arguments to pass to the embedded host controller (e.g. -b=192.168.100.10)\n@return the server. Will not be {@code null}", "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", "Returns the value of a property of the current object on the specified level.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"", "Initializes the queue that tracks the next set of nodes with no dependencies or\nwhose dependencies are resolved.", "From three tagNames, if one is under sectorTag and one under rowTag, returns the remaining one, which is supposedly the a box label. Otherwise,\nreturns null." ]
public static ModelMBean createModelMBean(Object o) { try { ModelMBean mbean = new RequiredModelMBean(); JmxManaged annotation = o.getClass().getAnnotation(JmxManaged.class); String description = annotation == null ? "" : annotation.description(); ModelMBeanInfo info = new ModelMBeanInfoSupport(o.getClass().getName(), description, extractAttributeInfo(o), new ModelMBeanConstructorInfo[0], extractOperationInfo(o), new ModelMBeanNotificationInfo[0]); mbean.setModelMBeanInfo(info); mbean.setManagedResource(o, "ObjectReference"); return mbean; } catch(MBeanException e) { throw new VoldemortException(e); } catch(InvalidTargetObjectTypeException e) { throw new VoldemortException(e); } catch(InstanceNotFoundException e) { throw new VoldemortException(e); } }
[ "Create a model mbean from an object using the description given in the\nJmx annotation if present. Only operations are supported so far, no\nattributes, constructors, or notifications\n\n@param o The object to create an MBean for\n@return The ModelMBean for the given object" ]
[ "Performs a streaming request against a Stitch app server determined by the deployment model\nof the underlying app. Throws a Stitch specific exception if the request fails.\n\n@param stitchReq the request to perform.\n@return an {@link EventStream} that will provide response events.", "Set the main attribute \"Bundle-RequiredExecutionEnvironment\" to the given\nvalue.\n\n@param bree The new value", "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", "Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above.", "Renders the document to the specified output stream.", "Retrieve a flag value.\n\n@param index flag index (1-20)\n@return flag value", "Adds a type to collection with inheriting base type properties.\n\n@param type the type definition to add\n\n@return true if the type definition was added", "Checks that the targetClass is widening the argument class\n\n@param argumentClass\n@param targetClass\n@return", "Set the map attribute.\n\n@param name the attribute name\n@param attribute the attribute" ]
public void setValue(String constantValue) { this.fieldSource = SOURCE_VALUE; this.fieldRefName = null; this.returnedByProcedure = false; this.constantValue = constantValue; }
[ "Sets up this object to represent an argument that will be set to a\nconstant value.\n\n@param constantValue the constant value." ]
[ "Adds a license to an artifact if the license exist into the database\n\n@param gavc String\n@param licenseId String", "Initialize VIDEO_INFO data.", "Creates the stats items.\n\n@param statsType\nthe stats type\n@return the sorted set\n@throws IOException\nSignals that an I/O exception has occurred.", "marks the message as read", "Adds mappings for each declared field in the mapped class. Any fields\nalready mapped by addColumn are skipped.", "Declares a shovel.\n\n@param vhost virtual host where to declare the shovel\n@param info Shovel info.", "Executes the mojo.", "Checks the initialization-method of given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "Collapse repeated records, using exact string match on the record.\nThis is generally useful for making very verbose logs more readable.\n@return this" ]
public static void startNamedTimer(String timerName, int todoFlags, long threadId) { getNamedTimer(timerName, todoFlags, threadId).start(); }
[ "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" ]
[ "Iterates over the elements of an iterable collection of items, starting from\na specified startIndex, and returns the index values of the items that match\nthe condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return a list of numbers corresponding to the index values of all matched objects\n@since 1.5.2", "Tests that the area is valid geojson, the style ref is valid or null and the display is non-null.", "Remove all children that have been added to the owner object of this camera rig; except the\ncamera objects.", "Clears the Parameters before performing a new search.\n@return this.true;", "Manage the artifact add to the Module AbstractGraph\n\n@param graph\n@param depth", "Require that the namespace of the current element matches the required namespace.\n\n@param reader the reader\n@param requiredNs the namespace required\n@throws XMLStreamException if the current namespace does not match the required namespace", "Given a protobuf rebalance-partition info, converts it into our\nrebalance-partition info\n\n@param rebalanceTaskInfoMap Proto-buff version of\nRebalanceTaskInfoMap\n@return RebalanceTaskInfo object.", "Closes the server socket. No new clients are accepted afterwards.", "Produces or returns the existing proxy class. The operation is thread-safe.\n\n@return always the class of the proxy" ]
public static void setBackgroundDrawable(View view, Drawable drawable) { if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) { view.setBackgroundDrawable(drawable); } else { view.setBackground(drawable); } }
[ "Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable" ]
[ "Process normal calendar working and non-working days.\n\n@param calendar parent calendar", "This method writes resource data to a JSON file.", "Deserialize an `AppDescriptor` from byte array\n\n@param bytes\nthe byte array\n@return\nan `AppDescriptor` instance", "Make a copy of JobContext of current thread\n@return the copy of current job context or an empty job context", "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", "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.", "Create a new AwsServiceClient instance with a different codec registry.\n\n@param codecRegistry the new {@link CodecRegistry} for the client.\n@return a new AwsServiceClient instance with the different codec registry", "Append Join for SQL92 Syntax", "Use this API to fetch filtered set of dbdbprofile resources.\nset the filter parameter values in filtervalue object." ]
public static base_response update(nitro_service client, vpnclientlessaccesspolicy resource) throws Exception { vpnclientlessaccesspolicy updateresource = new vpnclientlessaccesspolicy(); updateresource.name = resource.name; updateresource.rule = resource.rule; updateresource.profilename = resource.profilename; return updateresource.update_resource(client); }
[ "Use this API to update vpnclientlessaccesspolicy." ]
[ "Finish configuration.", "Returns the expected name of a workspace for a given suffix\n@param suffix\n@return", "Retrieves the class object for the given qualified class name.\n\n@param className The qualified name of the class\n@param initialize Whether the class shall be initialized\n@return The class object", "Retrieves a byte value from the property data.\n\n@param type Type identifier\n@return byte value", "Checks if the provided module is valid and could be stored into the database\n\n@param module the module to test\n@throws WebApplicationException if the data is corrupted", "Method for reporting SQLException. This is used by\nthe treenodes if retrieving information for a node\nis not successful.\n@param message The message describing where the error occurred\n@param sqlEx The exception to be reported.", "Look for the specified album art in both the hot cache of loaded tracks and the longer-lived LRU cache.\n\n@param artReference uniquely identifies the desired album art\n\n@return the art, if it was found in one of our caches, or {@code null}", "Given a path to a VFS resource, the method removes the OpenCms context,\nin case the path is prefixed by that context.\n@param path the path where the OpenCms context should be removed\n@return the adjusted path", "Read recurring data for a calendar exception.\n\n@param bce MPXJ calendar exception\n@param exception XML calendar exception" ]
private long lastModified(Set<File> files) { long result = 0; for (File file : files) { if (file.lastModified() > result) result = file.lastModified(); } return result; }
[ "Get the last modified time for a set of files." ]
[ "Use this API to fetch gslbsite resources of given names .", "Remove duplicate Strings from the given array. Also sorts the array, as\nit uses a TreeSet.\n\n@param array the String array\n@return an array without duplicates, in natural sort order", "Computes the blend weights for the given time and\nupdates them in the target.", "Use this API to delete ntpserver resources of given names.", "Obtains a local date in Ethiopic calendar system from the\nera, year-of-era, month-of-year and day-of-month fields.\n\n@param era the Ethiopic era, not null\n@param yearOfEra the year-of-era\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code EthiopicEra}", "Finds the beat in which the specified track position falls.\n\n@param milliseconds how long the track has been playing\n\n@return the beat number represented by that time, or -1 if the time is before the first beat", "Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops", "Possibly coalesces the newest change event to match the user's original intent. For example,\nan unsynchronized insert and update is still an insert.\n\n@param lastUncommittedChangeEvent the last change event known about for a document.\n@param newestChangeEvent the newest change event known about for a document.\n@return the possibly coalesced change event.", "See if a range for assignment is specified. If so return the range, otherwise return null\n\nExample of assign range:\na(0:3,4:5) = blah\na((0+2):3,4:5) = blah" ]
public void saveFile(File file, String type) { if (file != null) { m_treeController.saveFile(file, type); } }
[ "Saves the project file displayed in this panel.\n\n@param file target file\n@param type file type" ]
[ "Use this API to fetch sslservicegroup_sslcertkey_binding resources of given name .", "Warning emitter. Uses whatever alternative non-event communication channel is.", "Creates a setter method with the given body.\n\n@param declaringClass the class to which we will add the setter\n@param propertyNode the field to back the setter\n@param setterName the name of the setter\n@param setterBlock the statement representing the setter block", "Decomposes the matrix using the QR algorithm. Care was taken to minimize unnecessary memory copying\nand cache skipping.\n\n@param orig The matrix which is being decomposed. Not modified.\n@return true if it decomposed the matrix or false if an error was detected. This will not catch all errors.", "Use this API to fetch nslimitidentifier_binding resource of given name .", "Read all top level tasks.", "Map originator type.\n\n@param originatorType the originator type\n@return the originator", "Resolves the POM for the specified parent.\n\n@param parent the parent coordinates to resolve, must not be {@code null}\n@return The source of the requested POM, never {@code null}\n@since Apache-Maven-3.2.2 (MNG-5639)", "Use this API to fetch all the filterhtmlinjectionparameter resources that are configured on netscaler." ]
public void setPickingEnabled(boolean enabled) { if (enabled != getPickingEnabled()) { if (enabled) { attachComponent(new GVRSphereCollider(getGVRContext())); } else { detachComponent(GVRCollider.getComponentType()); } } }
[ "Simple, high-level API to enable or disable eye picking for this scene\nobject.\n\nThe {@linkplain #attachCollider low-level\nAPI} gives you a lot of control over eye picking, but it does involve an\nawful lot of details. This method\n(and {@link #getPickingEnabled()}) provides a simple boolean property.\nIt attaches a GVRSphereCollider to the scene object. If you want more\naccurate picking, you can use {@link #attachComponent(GVRComponent)} to attach a\nmesh collider instead. The mesh collider is more accurate but also\ncosts more to compute.\n\n@param enabled\nShould eye picking 'see' this scene object?\n\n@since 2.0.2\n@see GVRSphereCollider\n@see GVRMeshCollider" ]
[ "Displays a sample model for the report request.\n@return A string describing the structure of a certain report execution", "seeks to a particular month\n\n@param direction the direction to seek: two possibilities\n'<' go backward\n'>' go forward\n\n@param seekAmount the amount to seek. Must be guaranteed to parse as an integer\n\n@param month the month to seek to. Must be guaranteed to parse as an integer\nbetween 1 and 12", "Retrieve all Collection attributes of a given instance\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs", "Convert moneyness given as difference to par swap rate to moneyness in bp.\nUses the fixing times of the fix schedule to determine fractions.\n\n@param moneyness as offset.\n@return Moneyness in bp.", "Naive implementation of the difference in days between two dates", "Create the required services according to the server setup\n\n@param config Service configuration\n@return Services map", "Removes columns from the matrix.\n\n@param A Matrix. Modified\n@param col0 First column\n@param col1 Last column, inclusive.", "Set the pattern scheme to either \"by weekday\" or \"by day of month\".\n@param isByWeekDay flag, indicating if the pattern \"by weekday\" should be set.\n@param fireChange flag, indicating if a value change event should be fired.", "This method retrieves a String of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return string containing required data" ]
private void saveToPropertyVfsBundle() throws CmsException { for (Locale l : m_changedTranslations) { SortedProperties props = m_localizations.get(l); LockedFile f = m_lockedBundleFiles.get(l); if ((null != props) && (null != f)) { try { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); Writer writer = new OutputStreamWriter(outputStream, f.getEncoding()); props.store(writer, null); byte[] contentBytes = outputStream.toByteArray(); CmsFile file = f.getFile(); file.setContents(contentBytes); String contentEncodingProperty = m_cms.readPropertyObject( file, CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, false).getValue(); if ((null == contentEncodingProperty) || !contentEncodingProperty.equals(f.getEncoding())) { m_cms.writePropertyObject( m_cms.getSitePath(file), new CmsProperty( CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, f.getEncoding(), f.getEncoding())); } m_cms.writeFile(file); } catch (IOException e) { LOG.error( Messages.get().getBundle().key( Messages.ERR_READING_FILE_UNSUPPORTED_ENCODING_2, f.getFile().getRootPath(), f.getEncoding()), e); } } } }
[ "Saves messages to a propertyvfsbundle file.\n\n@throws CmsException thrown if writing to the file fails." ]
[ "Computes the square root of the complex number.\n\n@param input Input complex number.\n@param root Output. The square root of the input", "Assign FK value to all n-side objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation", "Initializes the upper left component. Does not show the mode switch.", "Return all scripts of a given type\n\n@param type integer value of type\n@return Array of scripts of the given type", "Performs a null edit on an entity. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param currentDocument\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection", "Returns the approximate size of slop to help in throttling\n\n@param slopVersioned The versioned slop whose size we want\n@return Size in bytes", "we can't call this method 'of', cause it won't compile on JDK7", "The user can be referenced by their globally unique user ID or their email address.\nReturns the full user record for the invited user.\n\n@param workspace The workspace or organization to invite the user to.\n@return Request object", "Utility function to get the current value." ]
public static String convertToSQL92(char escape, char multi, char single, String pattern) throws IllegalArgumentException { if ((escape == '\'') || (multi == '\'') || (single == '\'')) { throw new IllegalArgumentException("do not use single quote (') as special char!"); } StringBuilder result = new StringBuilder(pattern.length() + 5); int i = 0; while (i < pattern.length()) { char chr = pattern.charAt(i); if (chr == escape) { // emit the next char and skip it if (i != (pattern.length() - 1)) { result.append(pattern.charAt(i + 1)); } i++; // skip next char } else if (chr == single) { result.append('_'); } else if (chr == multi) { result.append('%'); } else if (chr == '\'') { result.append('\''); result.append('\''); } else { result.append(chr); } i++; } return result.toString(); }
[ "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" ]
[ "Use this API to fetch hanode_routemonitor6_binding resources of given name .", "Get the raw data bytes of the device update packet.\n\n@return the data sent by the device to update its status", "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", "Disconnects from the serial interface and stops\nsend and receive threads.", "Retrieves the index of a cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry index", "Checks the existence of the directory. If it does not exist, the method creates it.\n\n@param dir the directory to check.\n@throws IOException if fails.", "Load the available layers.\n\n@param image the installed image\n@param productConfig the product config to establish the identity\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the layers\n@throws IOException", "Retrieves state and metrics information for individual channel.\n\n@param name channel name\n@return channel information", "Adds a file to your assembly but automatically genarates the name of the file.\n\n@param inputStream {@link InputStream} the file to be uploaded." ]
private void processProperties() { state = true; try { exporterServiceFilter = getFilter(exporterServiceFilterProperty); } catch (InvalidFilterException invalidFilterException) { LOG.debug("The value of the Property " + FILTER_EXPORTERSERVICE_PROPERTY + " is invalid," + " the recuperation of the Filter has failed. The instance gonna stop.", invalidFilterException); state = false; return; } try { exportDeclarationFilter = getFilter(exportDeclarationFilterProperty); } catch (InvalidFilterException invalidFilterException) { LOG.debug("The value of the Property " + FILTER_EXPORTDECLARATION_PROPERTY + " is invalid," + " the recuperation of the Filter has failed. The instance gonna stop.", invalidFilterException); state = false; return; } }
[ "Get the filters ExporterServiceFilter and ExportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid." ]
[ "Returns the list of colliders attached to scene objects that are\nvisible from the viewpoint of the camera.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is picking against particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n\nThe hit location returned is the world position of the scene object center.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@return A list of {@link org.gearvrf.GVRPicker.GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link org.gearvrf.GVRPicker.GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6", "Read an optional int value form a JSON value.\n@param val the JSON value that should represent the int.\n@return the int from the JSON or 0 reading the int fails.", "Populates the bean by mapping the processed columns to the fields of the bean.\n\n@param resultBean\nthe bean to populate\n@param nameMapping\nthe name mappings\n@return the populated bean\n@throws SuperCsvReflectionException\nif there was a reflection exception while populating the bean", "Generate a currency format.\n\n@param position currency symbol position\n@return currency format", "Make a string with the shader layout for a uniform block\nwith a given descriptor. The format of the descriptor is\nthe same as for a @{link GVRShaderData} - a string of\ntypes and names of each field.\n<p>\nThis function will return a Vulkan shader layout if the\nVulkan renderer is being used. Otherwise, it returns\nan OpenGL layout.\n@param descriptor string with types and names of each field\n@param blockName name of uniform block\n@param useUBO true to output uniform buffer layout, false for push constants\n@return string with shader declaration", "Pre API 11, this does an alpha animation.\n\n@param progress", "Restores a saved connection state into this BoxAPIConnection.\n\n@see #save\n@param state the saved state that was created with {@link #save}.", "Creates the tcpClient with proper handler.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception", "Send the message using the JavaMail session defined in the message\n\n@param mimeMessage Message to send" ]
public final boolean roll(final LoggingEvent loggingEvent) { for (int i = 0; i < this.fileRollables.length; i++) { if (this.fileRollables[i].roll(loggingEvent)) { return true; } } return false; }
[ "Delegates file rolling to composed objects.\n\n@see FileRollable#roll(org.apache.log4j.spi.LoggingEvent)" ]
[ "Checks if the last argument matches the vararg type.\n@param params\n@param args\n@return -1 if no match, 0 if the last argument is exactly the vararg type and 1 if of an assignable type", "Moves the given row down.\n\n@param row the row to move", "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", "Parses the given Reader for PmdRuleSets.\n\n@return The extracted PmdRuleSet - empty in case of problems, never null.", "Sets the content type for this ID\n\n@param pathId ID of path\n@param contentType content type value", "Code common to both XER and database readers to extract\ncurrency format data.\n\n@param row row containing currency data", "This method reads a six byte long from the input array.\n\n@param data the input array\n@param offset offset of integer data in the array\n@return integer value", "Adds a member to this group with the specified role.\n@param user the member to be added to this group.\n@param role the role of the user in this group. Can be null to assign the default role.\n@return info about the new group membership.", "Prints a currency symbol position value.\n\n@param value CurrencySymbolPosition instance\n@return currency symbol position" ]
public int nullity() { if( is64 ) { return SingularOps_DDRM.nullity((SingularValueDecomposition_F64)svd, 10.0 * UtilEjml.EPS); } else { return SingularOps_FDRM.nullity((SingularValueDecomposition_F32)svd, 5.0f * UtilEjml.F_EPS); } }
[ "The nullity of the decomposed matrix.\n\n@see SingularOps_DDRM#nullity(SingularValueDecomposition_F64, double)\n\n@return The matrix's nullity" ]
[ "Undo changes for a single patch entry.\n\n@param entry the patch entry\n@param loader the content loader", ">>>>>> measureUntilFull helper methods", "Makes it possible to uniquify a collection of objects which are normally\nnon-hashable. Alternatively, it lets you define an alternate hash function\nfor them for limited-use hashing.", "return the list of FormInputs that match this element\n\n@param element\n@return", "apply the base fields to other views if configured to do so.", "Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level", "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.", "a small helper to set the text color to a textView null save\n\n@param textView\n@param colorDefault", "The main conversion method.\n@param image A BufferedImage containing the image that needs to be converted\n@param favicon When ico is true it will convert ico file into 16 x 16 size\n@return A string containing the ASCII version of the original image." ]
public ItemRequest<Webhook> getById(String webhook) { String path = String.format("/webhooks/%s", webhook); return new ItemRequest<Webhook>(this, Webhook.class, path, "GET"); }
[ "Returns the full record for the given webhook.\n\n@param webhook The webhook to get.\n@return Request object" ]
[ "Generates a comment regarding the parameters.\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@param action - the action performed by the user\n@param commentedText - comment text\n@param user - comment left by\n@param date - date comment was created\n@return - comment entity", "Gets an exception reporting an unexpected XML element.\n\n@param reader a reference to the stream reader.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.", "Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set", "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.", "Fetch the next event from a given stream\n@return the next event\n@throws IOException any io exception that could occur", "Returns package name of a class\n\n@param clazz\nthe class\n@return\nthe package name of the class", "Create a classname from a given path\n\n@param path\n@return", "Convert moneyness given as difference to par swap rate to moneyness in bp.\nUses the fixing times of the fix schedule to determine fractions.\n\n@param moneyness as offset.\n@return Moneyness in bp.", "Look up the database server port reported by a given player. You should not use this port directly; instead\nask this class for a session to use while you communicate with the database.\n\n@param player the player number of interest\n\n@return the port number on which its database server is running, or -1 if unknown\n\n@throws IllegalStateException if not running" ]
public static nspbr6[] get(nitro_service service) throws Exception{ nspbr6 obj = new nspbr6(); nspbr6[] response = (nspbr6[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the nspbr6 resources that are configured on netscaler." ]
[ "Create User Application Properties\nCreate application properties for a user\n@param userId User Id (required)\n@param properties Properties to be updated (required)\n@param aid Application ID (optional)\n@return PropertiesEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "Updates the position and direction of this light from the transform of\nscene object that owns it.", "Find the path to the first association in the property path.\n\n@param targetTypeName the entity with the property\n@param pathWithoutAlias the path to the property WITHOUT the alias\n@return the path to the first association or {@code null} if there isn't an association in the property path", "Trim and append a file separator to the string", "Returns a byte array containing a copy of the bytes", "Emit a string event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)", "After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime", "Convert an Object to a Timestamp, without an Exception", "Computes the longest common contiguous substring of s and t.\nThe LCCS is the longest run of characters that appear consecutively in\nboth s and t. For instance, the LCCS of \"color\" and \"colour\" is 4, because\nof \"colo\"." ]
public static String taskListToString(List<RebalanceTaskInfo> infos) { StringBuffer sb = new StringBuffer(); for (RebalanceTaskInfo info : infos) { sb.append("\t").append(info.getDonorId()).append(" -> ").append(info.getStealerId()).append(" : ["); for (String storeName : info.getPartitionStores()) { sb.append("{").append(storeName).append(" : ").append(info.getPartitionIds(storeName)).append("}"); } sb.append("]").append(Utils.NEWLINE); } return sb.toString(); }
[ "Pretty prints a task list of rebalancing tasks.\n\n@param infos list of rebalancing tasks (RebalancePartitionsInfo)\n@return pretty-printed string" ]
[ "Use this API to Shutdown shutdown.", "Propagate onMotionOutside events to listeners\n@param MotionEvent Android MotionEvent when nothing is picked", "Assign float value to inputOutput SFFloat field named speed.\nNote that our implementation with ExoPlayer that pitch and speed will be set to the same value.\n@param newValue", "Use this API to fetch appflowpolicy_appflowpolicylabel_binding resources of given name .", "Converts a vector from eigen space into sample space.\n\n@param eigenData Eigen space data.\n@return Sample space projection.", "Update the installed identity using the modified state from the modification.\n\n@param name the identity name\n@param modification the modification\n@param state the installation state\n@return the installed identity", "This method is called if the data set has been scrolled.", "Allocate a timestamp", "Convert this object to a json array." ]
public static Organization unserializeOrganization(final String organization) throws IOException { final ObjectMapper mapper = new ObjectMapper(); mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS); return mapper.readValue(organization, Organization.class); }
[ "Un-serialize a Json into Organization\n@param organization String\n@return Organization\n@throws IOException" ]
[ "Use this API to unset the properties of nsacl6 resource.\nProperties that need to be unset are specified in args array.", "k\nReturns a list of artifact regarding the filters\n\n@return List<DbArtifact>", "Returns all known Java installations\n\n@return a map from the version strings to their respective paths of the Java installations.", "Builds a new instance for the class represented by the given class descriptor.\n\n@param cld The class descriptor\n@return The instance", "Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero", "Use this API to update ipv6.", "Returns the JMX connector address of a child process.\n\n@param p the process to which to connect\n@param startAgent whether to installed the JMX agent in the target process if not already in place\n@return a {@link JMXServiceURL} to the process's MBean server", "Return a licenses view of the targeted module\n\n@param moduleId String\n@return List<DbLicense>", "Perform construction.\n\n@param callbackHandler" ]
public static sslcipher_individualcipher_binding[] get_filtered(nitro_service service, String ciphergroupname, filtervalue[] filter) throws Exception{ sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding(); obj.set_ciphergroupname(ciphergroupname); options option = new options(); option.set_filter(filter); sslcipher_individualcipher_binding[] response = (sslcipher_individualcipher_binding[]) obj.getfiltered(service, option); return response; }
[ "Use this API to fetch filtered set of sslcipher_individualcipher_binding resources.\nset the filter parameter values in filtervalue object." ]
[ "Attempts to return the token from cache. If this is not possible because it is expired or was\nnever assigned, a new token is requested and parallel requests will block on retrieving a new\ntoken. As such no guarantee of maximum latency is provided.\n\nTo avoid blocking the token is refreshed before it's expiration, while parallel requests\ncontinue to use the old token.", "Make sure that we have some reasonable defaults available. These would typically be provided by the rulesets\nin the real world.", "Returns the data sources belonging to a particular group of data\nsources. Data sources are grouped in record linkage mode, but not\nin deduplication mode, so only use this method in record linkage\nmode.", "removes an Object from the cache.\n\n@param oid the Identity of the object to be removed.", "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", "Get a handler based on its class\n@param clazz The class of the Handler to return.\nIf multiple Handlers exist, the first one is returned.\n@param <E> The class of the handler to return.\n@return The handler matching the class name.", "Get Rule\nGet a rule using the Rule ID\n@param ruleId Rule ID. (required)\n@return RuleEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "Remove the set of partitions from the node provided\n\n@param node The node from which we're removing the partitions\n@param donatedPartitions The list of partitions to remove\n@return The new node without the partitions", "Generates a License regarding the parameters.\n\n@param name String\n@param longName String\n@param comments String\n@param regexp String\n@param url String\n@return License" ]
public static String getDefaultJdbcTypeFor(String javaType) { return _jdbcMappings.containsKey(javaType) ? (String)_jdbcMappings.get(javaType) : JDBC_DEFAULT_TYPE; }
[ "Returns the default jdbc type for the given java type.\n\n@param javaType The qualified java type\n@return The default jdbc type" ]
[ "Gets or creates the a resource for the sub-deployment on the parent deployments resource.\n\n@param deploymentName the name of the deployment\n@param parent the parent deployment used to find the parent resource\n\n@return the already registered resource or a newly created resource", "Use this API to fetch crvserver_binding resource of given name .", "Get siblings of the same type as element from parent.\n\n@param parent parent node.\n@param element element.\n@return List of sibling (from element) under parent", "Gets the thread dump.\n\n@return the thread dump", "Start a server.\n\n@return the http server\n@throws Exception the exception", "Use this API to fetch all the sslservice resources that are configured on netscaler.", "Sets all padding to the same value.\n@param padding new padding for top, bottom, left, and right, ignored if smaller than 0\n@return this to allow chaining", "Returns the log message id used by this checker. This is used to group it so that all attributes failing a type of rejction\nend up in the same error message. This default implementation uses the formatted log message with an empty attribute map as the id.\n\n@return the log message id", "Extracts location result from intent object\n\n@param intent valid intent object\n@return location result.\n@since 1.1.0" ]
public void initializePersistenceStrategy(CacheMappingType cacheMappingType, Set<EntityKeyMetadata> entityTypes, Set<AssociationKeyMetadata> associationTypes, Set<IdSourceKeyMetadata> idSourceTypes, Iterable<Namespace> namespaces) { persistenceStrategy = PersistenceStrategy.getInstance( cacheMappingType, externalCacheManager, config.getConfigurationUrl(), jtaPlatform, entityTypes, associationTypes, idSourceTypes ); // creates handler for TableGenerator Id sources boolean requiresCounter = hasIdGeneration( idSourceTypes ); if ( requiresCounter ) { this.tableClusterHandler = new TableClusteredCounterHandler( persistenceStrategy.getCacheManager().getCacheManager() ); } // creates handlers for SequenceGenerator Id sources for ( Namespace namespace : namespaces ) { for ( Sequence seq : namespace.getSequences() ) { this.sequenceCounterHandlers.put( seq.getExportIdentifier(), new SequenceClusteredCounterHandler( persistenceStrategy.getCacheManager().getCacheManager(), seq ) ); } } // clear resources this.externalCacheManager = null; this.jtaPlatform = null; }
[ "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" ]
[ "Delivers the correct JSON Object for the dockers\n\n@param dockers\n@throws org.json.JSONException", "The local event will decide the next state of the document in question.\n\n@param <T> the type of class represented by the document in the change event.\n@return the local full document which may be null.", "Assign arguments to the statement.\n\n@return The statement passed in or null if it had to be closed on error.", "Given a list of partition plans and a set of stores, copies the store\nnames to every individual plan and creates a new list\n\n@param existingPlanList Existing partition plan list\n@param storeDefs List of store names we are rebalancing\n@return List of updated partition plan", "Resizes an image to the specified width, changing width in the same proportion\n@param originalImage Image in memory\n@param widthOut The width to resize\n@return New Image in memory", "Get by index is used here.", "Utility method to convert a String to an Integer, and\nhandles null values.\n\n@param value string representation of an integer\n@return int value", "Specifies the ARM resource id of the user assigned managed service identity resource that\nshould be used to retrieve the access token.\n\n@param identityId the ARM resource id of the user assigned identity resource\n@return MSICredentials", "Writes the timephased data for a resource assignment.\n\n@param mpx MPXJ assignment\n@param xml MSDPI assignment" ]
private void writeCalendar(ProjectCalendar record) throws IOException { // // Test used to ensure that we don't write the default calendar used for the "Unassigned" resource // if (record.getParent() == null || record.getResource() != null) { m_buffer.setLength(0); if (record.getParent() == null) { m_buffer.append(MPXConstants.BASE_CALENDAR_RECORD_NUMBER); m_buffer.append(m_delimiter); if (record.getName() != null) { m_buffer.append(record.getName()); } } else { m_buffer.append(MPXConstants.RESOURCE_CALENDAR_RECORD_NUMBER); m_buffer.append(m_delimiter); m_buffer.append(record.getParent().getName()); } for (DayType day : record.getDays()) { if (day == null) { day = DayType.DEFAULT; } m_buffer.append(m_delimiter); m_buffer.append(day.getValue()); } m_buffer.append(MPXConstants.EOL); m_writer.write(m_buffer.toString()); ProjectCalendarHours[] hours = record.getHours(); for (int loop = 0; loop < hours.length; loop++) { if (hours[loop] != null) { writeCalendarHours(record, hours[loop]); } } if (!record.getCalendarExceptions().isEmpty()) { // // A quirk of MS Project is that these exceptions must be // in date order in the file, otherwise they are ignored. // The getCalendarExceptions method now guarantees that // the exceptions list is sorted when retrieved. // for (ProjectCalendarException ex : record.getCalendarExceptions()) { writeCalendarException(record, ex); } } m_eventManager.fireCalendarWrittenEvent(record); } }
[ "Write a calendar.\n\n@param record calendar instance\n@throws IOException" ]
[ "If needed declares and sets up internal data structures.\n\n@param A Matrix being decomposed.", "Compares two annotated types and returns true if they are the same", "Copy one Gradient into another.\n@param g the Gradient to copy into", "Returns the list view of corporate groupIds of an organization\n\n@param organizationId String\n@return ListView", "create a broker with given broker info\n\n@param id broker id\n@param brokerInfoString broker info format: <b>creatorId:host:port:autocreated</b>\n@return broker instance with connection config\n@see #getZKString()", "Writes assignment baseline data.\n\n@param xml MSPDI assignment\n@param mpxj MPXJ assignment", "Set the TimeSensor's cycleInterval property\nCurrently, this does not change the duration of the animation.\n@param newCycleInterval", "Create a random video.\n\n@return random video.", "Create the function. Be sure to handle all possible input types and combinations correctly and provide\nmeaningful error messages. The output matrix should be resized to fit the inputs." ]
private void initPixelsArray(BufferedImage image) { int width = image.getWidth(); int height = image.getHeight(); pixels = new int[width * height]; image.getRGB(0, 0, width, height, pixels, 0, width); }
[ "takes the pixels from a BufferedImage and stores them in an array" ]
[ "Gets Widget bounds height\n@return height", "Use this API to unset the properties of rnatparam resource.\nProperties that need to be unset are specified in args array.", "This filter changes the amount of color in each of the three channels.\n\n@param r The amount of redness in the picture. Can range from -100 to 100 in percentage.\n@param g The amount of greenness in the picture. Can range from -100 to 100 in percentage.\n@param b The amount of blueness in the picture. Can range from -100 to 100 in percentage.\n@throws IllegalArgumentException if {@code r}, {@code g}, or {@code b} are outside of bounds.", "Finish the initialization.\n\n@param container\n@param isShutdownHookEnabled", "Get the VCS revision from the Jenkins build environment. The search will one of \"SVN_REVISION\", \"GIT_COMMIT\",\n\"P4_CHANGELIST\" in the environment.\n\n@param env Th Jenkins build environment.\n@return The vcs revision for supported VCS", "Logs a message for a case where the value of a property does not fit to\nits declared datatype.\n\n@param propertyIdValue\nthe property that was used\n@param datatype\nthe declared type of the property\n@param valueType\na string to denote the type of value", "Check if values in the column \"property\" are written to the bundle descriptor.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle descriptor.", "A specific, existing task can be deleted by making a DELETE request on the\nURL for that task. Deleted tasks go into the \"trash\" of the user making\nthe delete request. Tasks can be recovered from the trash within a period\nof 30 days; afterward they are completely removed from the system.\n\nReturns an empty data record.\n\n@param task The task to delete.\n@return Request object", "Add a column to be set to a value for UPDATE statements. This will generate something like columnName = 'value'\nwith the value escaped if necessary." ]
public static void keyPresent(final String key, final Map<String, ?> map) { if (!map.containsKey(key)) { throw new IllegalStateException( String.format("expected %s to be present", key)); } }
[ "Throw IllegalStateException if key is not present in map.\n@param key the key to expect.\n@param map the map to search.\n@throws IllegalArgumentException if key is not in map." ]
[ "Reads outline code custom field values and populates container.", "Send message to all connections connected to the same URL of this context\n\n@param message the message to be sent\n@param excludeSelf whether the connection of this context should be sent to\n@return this context", "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", "Adds a clause that checks whether ANY set bits in a bitmask are present\nin a numeric expression.\n\n@param expr\nSQL numeric expression to check.\n@param bits\nInteger containing the bits for which to check.", "Calculates the size based constraint width and height if present, otherwise from children sizes.", "Get the number of views, comments and favorites on a photostream for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotostreamStats.htm\"", "Stop an animation.", "Converts the given CharSequence into a List of Strings of one character.\n\n@param self a CharSequence\n@return a List of characters (a 1-character String)\n@see #toSet(String)\n@since 1.8.2", "Provides a message which describes the expected format and arguments\nfor this command. This is used to provide user feedback when a command\nrequest is malformed.\n\n@return A message describing the command protocol format." ]
public URL getDownloadURL() { URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID()); BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET"); request.setFollowRedirects(false); BoxRedirectResponse response = (BoxRedirectResponse) request.send(); return response.getRedirectURL(); }
[ "Gets an expiring URL for downloading a file directly from Box. This can be user,\nfor example, for sending as a redirect to a browser to cause the browser\nto download the file directly from Box.\n\n@return the temporary download URL" ]
[ "Add a IN clause so the column must be equal-to one of the objects passed in.", "Create a standalone target.\n\n@param controllerClient the connected controller client to a standalone instance.\n@return the remote target", "Add a property.", "Does the slice contain only 7-bit ASCII characters.", "If the String argument defaultLocatorSelectionStrategy is as key in the map representing the locatorSelectionStrategies, the\ncorresponding strategy is selected and set as default strategy, else both the selected strategy and the default strategy remain\nunchanged.\n@param defaultLocatorSelectionStrategy", "This produces a shorter string for the address that uses the canonical representation but not using leading zeroes.\n\nEach address has a unique compressed string.", "Use this API to fetch appfwprofile_csrftag_binding resources of given name .", "Starts the loading process and creates a timer that sets of the callback after a given tiime if it hasn't already been triggered.\n\n@param timeout number of milliseconds after which the callback should be called if it hasn't already been", "This ensures that we are able to use the default preference from JSDK, to check basically if we are in Android or Not\n@param preference\n@throws BackingStoreException" ]
private static char[] buildTable() { char[] table = new char[26]; for (int ix = 0; ix < table.length; ix++) table[ix] = '0'; table['B' - 'A'] = '1'; table['P' - 'A'] = '1'; table['F' - 'A'] = '1'; table['V' - 'A'] = '1'; table['C' - 'A'] = '2'; table['S' - 'A'] = '2'; table['K' - 'A'] = '2'; table['G' - 'A'] = '2'; table['J' - 'A'] = '2'; table['Q' - 'A'] = '2'; table['X' - 'A'] = '2'; table['Z' - 'A'] = '2'; table['D' - 'A'] = '3'; table['T' - 'A'] = '3'; table['L' - 'A'] = '4'; table['M' - 'A'] = '5'; table['N' - 'A'] = '5'; table['R' - 'A'] = '6'; return table; }
[ "Builds the mapping table." ]
[ "returns an Array with an Objects PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values", "Inject external stylesheets.", "A document that is paused no longer has remote updates applied to it.\nAny local updates to this document cause it to be resumed. An example of pausing a document\nis when a conflict is being resolved for that document and the handler throws an exception.\n\nThis method allows you to resume sync for a document.\n\n@param namespace namespace for the document\n@param documentId the id of the document to resume syncing\n@return true if successfully resumed, false if the document\ncould not be found or there was an error resuming", "Allocate a timestamp", "Converts Observable of page to Observable of Inner.\n@param <InnerT> type of inner.\n@param innerPage Page to be converted.\n@return Observable for list of inner.", "Adds a new step to the list of steps.\n\n@param name Name of the step to add.\n@param robot The name of the robot ot use with the step.\n@param options extra options required for the step.", "Get the signatures that have been computed for all tracks currently loaded in any player for which we have\nbeen able to obtain all necessary metadata.\n\n@return the signatures that uniquely identify the tracks loaded in each player\n\n@throws IllegalStateException if the SignatureFinder is not running", "Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed.", "Gets the i-th half-edge associated with the face.\n\n@param i\nthe half-edge index, in the range 0-2.\n@return the half-edge" ]
public void drawImage(Image img, Rectangle rect, Rectangle clipRect, float opacity) { try { template.saveState(); // opacity PdfGState state = new PdfGState(); state.setFillOpacity(opacity); state.setBlendMode(PdfGState.BM_NORMAL); template.setGState(state); // clipping code if (clipRect != null) { template.rectangle(clipRect.getLeft() + origX, clipRect.getBottom() + origY, clipRect.getWidth(), clipRect.getHeight()); template.clip(); template.newPath(); } template.addImage(img, rect.getWidth(), 0, 0, rect.getHeight(), origX + rect.getLeft(), origY + rect.getBottom()); } catch (DocumentException e) { log.warn("could not draw image", e); } finally { template.restoreState(); } }
[ "Draws the specified image with the first rectangle's bounds, clipping with the second one.\n\n@param img image\n@param rect rectangle\n@param clipRect clipping bounds\n@param opacity opacity of the image (1 = opaque, 0= transparent)" ]
[ "Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return", "Transforms user name and icon size into the image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path", "Use this API to save nsconfig.", "Main entry point. Reads a directory containing a P3 Btrieve database files\nand returns a map of table names and table content.\n\n@param directory directory containing the database\n@param prefix file name prefix used to identify files from the same database\n@return Map of table names to table data", "Finds the file at the provided path within the archive.\n\nEg, getChildFile(ArchiveModel, \"/META-INF/MANIFEST.MF\") will return a {@link FileModel} if a file named\n/META-INF/MANIFEST.MF exists within the archive\n\n@return Returns the located {@link FileModel} or null if no file with this path could be located", "Use this API to change appfwsignatures.", "Get the service implementations for a given type name.\n\n@param serviceTypeName the type name\n@return the possibly empty list of services", "Collect environment variables and system properties under with filter constrains", "Decode a content Type header line into types and parameters pairs" ]
public static void checkMinimumArrayLength(String parameterName, int actualLength, int minimumLength) { if (actualLength < minimumLength) { throw Exceptions .IllegalArgument( "Array %s should have at least %d elements, but it only has %d", parameterName, minimumLength, actualLength); } }
[ "Check that the parameter array has at least as many elements as it\nshould.\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 actualLength\nThe actual array length\n@param minimumLength\nThe minimum array length" ]
[ "Check real offset.\n\n@return the boolean", "Retrieves the working hours on the given date.\n\n@param date required date\n@param cal optional calendar instance\n@param day optional day instance\n@return working hours", "Run the configured crawl. This method blocks until the crawl is done.\n\n@return the CrawlSession once the crawl is done.", "This method retrieves the UID for a calendar associated with a task.\n\n@param mpx MPX Task instance\n@return calendar UID", "Based on a provided locale return a SoyMsgBundle file.\n\nIf a passed in locale object is \"Optional.absent()\",\nthe implementation will return Optional.absent() as well\n@param locale - maybe locale\n@return maybe soy msg bundle", "Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List", "Provide Jersey client for the targeted Grapes server\n\n@return webResource", "Takes a list of Strings and combines them into a single comma-separated\nString.\n@param strings The Strings to combine.\n@return The combined, comma-separated, String.", "Return an input stream to read the data from the named table.\n\n@param name table name\n@return InputStream instance\n@throws IOException" ]
public String calculateLabelUnit(final CoordinateReferenceSystem mapCrs) { String unit; if (this.labelProjection != null) { unit = this.labelCRS.getCoordinateSystem().getAxis(0).getUnit().toString(); } else { unit = mapCrs.getCoordinateSystem().getAxis(0).getUnit().toString(); } return unit; }
[ "Determine which unit to use when creating grid labels.\n\n@param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined." ]
[ "Return the hostname of this address such as \"MYCOMPUTER\".", "Find Flickr Places information by Place URL.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link PlacesInterface#getInfoByUrl(String)} instead.\n@param flickrPlacesUrl\n@return A Location\n@throws FlickrException", "Recursively add files to a ZipOutputStream\n\n@param parent Parent file\n@param zout ZipOutputStream to append\n@param fileSource The file source\n@throws IOException I/O Error", "Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return", "Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFileName The file to write the stream contents to.\n@throws IOException If the stream cannot be copied.", "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 submatrix of W up give Y is already configured and if it is being cached or not.", "Creates a sorted list that contains the items of the given iterable. The resulting list is in ascending order,\naccording to the natural ordering of the elements in the iterable.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List)\n@see #sort(Iterable, Comparator)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List)", "We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException" ]
public void createDB() throws PlatformException { if (_creationScript == null) { createCreationScript(); } Project project = new Project(); TorqueDataModelTask modelTask = new TorqueDataModelTask(); File tmpDir = null; File scriptFile = null; try { tmpDir = new File(getWorkDir(), "schemas"); tmpDir.mkdir(); scriptFile = new File(tmpDir, CREATION_SCRIPT_NAME); writeCompressedText(scriptFile, _creationScript); project.setBasedir(tmpDir.getAbsolutePath()); // we use the ant task 'sql' to perform the creation script SQLExec sqlTask = new SQLExec(); SQLExec.OnError onError = new SQLExec.OnError(); onError.setValue("continue"); sqlTask.setProject(project); sqlTask.setAutocommit(true); sqlTask.setDriver(_jcd.getDriver()); sqlTask.setOnerror(onError); sqlTask.setUserid(_jcd.getUserName()); sqlTask.setPassword(_jcd.getPassWord() == null ? "" : _jcd.getPassWord()); sqlTask.setUrl(getDBCreationUrl()); sqlTask.setSrc(scriptFile); sqlTask.execute(); deleteDir(tmpDir); } catch (Exception ex) { // clean-up if ((tmpDir != null) && tmpDir.exists()) { try { scriptFile.delete(); } catch (NullPointerException e) { LoggerFactory.getLogger(this.getClass()).error("NPE While deleting scriptFile [" + scriptFile.getName() + "]", e); } } throw new PlatformException(ex); } }
[ "Creates the database.\n\n@throws PlatformException If some error occurred" ]
[ "Emit an event object with parameters.\n\nThis will invoke all {@link SimpleEventListener} bound to the event object\nclass given the listeners has the matching argument list.\n\nIf there is no parameter passed in, i.e. `args.length == 0`, then it will\nalso invoke all the {@link ActEventListener} bound to the event class.\n\nFor example, suppose we have the following Event defined:\n\n```java\npublic class UserActivityEvent extends ActEvent<User> {\npublic UserActivityEvent(User user) {super(user);}\n}\n```\n\nAnd we have the following event handler defined:\n\n```java\n{@literal @}OnEvent\npublic void logUserLogin(UserActivityEvent event, long timestamp) {...}\n\n{@literal @}OnEvent\npublic void checkDuplicateLoginAttempts(UserActivityEvent, Object... args) {...}\n\n{@literal @}OnEvent\npublic void foo(UserActivityEvent event) {...}\n```\n\nThe following code will invoke `logUserLogin` and `checkDuplicateLoginAttempts` methods:\n\n```java\nUser user = ...;\neventBus.emit(new UserActivityEvent(user), System.currentTimeMills());\n```\n\nThe `foo(UserActivityEvent)` will not invoked because:\n\n* The parameter list `(UserActivityEvent, long)` does not match the declared\nargument list `(UserActivityEvent)`. Here the `String` in the parameter\nlist is taken out because it is used to indicate the event, instead of being\npassing through to the event handler method.\n* The method `checkDuplicateLoginAttempts(UserActivityEvent, Object ...)` will\nbe invoked because it declares a varargs typed arguments, meaning it matches\nany parameters passed in.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener", "commit all envelopes against the current broker", "Prepares a Jetty server for communicating with consumers.", "Ignore some element from the AST\n\n@param element\n@return", "Loads a PDF document and creates a DOM tree from it.\n@param doc the source document\n@return a DOM Document representing the DOM tree\n@throws IOException", "Adds the given value to the set.\n\n@return true if the value was actually new", "Casts a ray into the scene graph, and returns the objects it intersects.\n\nThe ray is defined by its origin {@code [ox, oy, oz]} and its direction\n{@code [dx, dy, dz]}.\n\n<p>\nThe ray origin may be [0, 0, 0] and the direction components should be\nnormalized from -1 to 1: Note that the y direction runs from -1 at the\nbottom to 1 at the top. To construct a picking ray originating at the\nuser's head and pointing into the scene along the camera lookat vector,\npass in 0, 0, 0 for the origin and 0, 0, -1 for the direction.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is doing a ray cast into a particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n<p>\nDepending on the type of collider, that the hit location may not be exactly\nwhere the ray would intersect the scene object itself. Rather, it is\nwhere the ray intersects the collision geometry associated with the collider.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@param ox\nThe x coordinate of the ray origin.\n\n@param oy\nThe y coordinate of the ray origin.\n\n@param oz\nThe z coordinate of the ray origin.\n\n@param dx\nThe x vector of the ray direction.\n\n@param dy\nThe y vector of the ray direction.\n\n@param dz\nThe z vector of the ray direction.\n@return A list of {@link GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6", "Register child resources associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition", "Generates timephased costs from timephased work where multiple cost rates\napply to the assignment.\n\n@param standardWorkList timephased work\n@param overtimeWorkList timephased work\n@return timephased cost" ]
static void i(String message){ if (getStaticDebugLevel() >= CleverTapAPI.LogLevel.INFO.intValue()){ Log.i(Constants.CLEVERTAP_LOG_TAG,message); } }
[ "Logs to Info if the debug level is greater than or equal to 1." ]
[ "Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance", "Returns true if string starts and ends with double-quote\n@param str\n@return", "Performs DBSCAN cluster analysis.\n\n@param points the points to cluster\n@return the list of clusters\n@throws NullArgumentException if the data points are null", "get children nodes name\n\n@param zkClient zkClient\n@param path full path\n@return children nodes name or null while path not exist", "Convert a Java date into a Planner date-time string.\n\n20070222T080000Z\n\n@param value Java date\n@return Planner date-time string", "Remove duplicate Strings from the given array. Also sorts the array, as\nit uses a TreeSet.\n\n@param array the String array\n@return an array without duplicates, in natural sort order", "Get the AuthInterface.\n\n@return The AuthInterface", "Parses a type annotation table to find the labels, and to visit the try\ncatch block annotations.\n\n@param u\nthe start offset of a type annotation table.\n@param mv\nthe method visitor to be used to visit the try catch block\nannotations.\n@param context\ninformation about the class being parsed.\n@param visible\nif the type annotation table to parse contains runtime visible\nannotations.\n@return the start offset of each type annotation in the parsed table.", "1-D Double array to integer array.\n\n@param array Double array.\n@return Integer array." ]
private void fillQueue(QueueItem item, Integer minStartPosition, Integer maxStartPosition, Integer minEndPosition) throws IOException { int newStartPosition; int newEndPosition; Integer firstRetrievedPosition = null; // remove everything below minStartPosition if ((minStartPosition != null) && (item.lowestPosition != null) && (item.lowestPosition < minStartPosition)) { item.del((minStartPosition - 1)); } // fill queue while (!item.noMorePositions) { boolean doNotCollectAnotherPosition; doNotCollectAnotherPosition = item.filledPosition && (minStartPosition == null) && (maxStartPosition == null); doNotCollectAnotherPosition |= item.filledPosition && (maxStartPosition != null) && (item.lastRetrievedPosition != null) && (maxStartPosition < item.lastRetrievedPosition); if (doNotCollectAnotherPosition) { return; } else { // collect another full position firstRetrievedPosition = null; while (!item.noMorePositions) { newStartPosition = item.sequenceSpans.spans.nextStartPosition(); if (newStartPosition == NO_MORE_POSITIONS) { if (!item.queue.isEmpty()) { item.filledPosition = true; item.lastFilledPosition = item.lastRetrievedPosition; } item.noMorePositions = true; return; } else if ((minStartPosition != null) && (newStartPosition < minStartPosition)) { // do nothing } else { newEndPosition = item.sequenceSpans.spans.endPosition(); if ((minEndPosition == null) || (newEndPosition >= minEndPosition - ignoreItem.getMinStartPosition(docId, newEndPosition))) { item.add(newStartPosition, newEndPosition); if (firstRetrievedPosition == null) { firstRetrievedPosition = newStartPosition; } else if (!firstRetrievedPosition.equals(newStartPosition)) { break; } } } } } } }
[ "Fill queue.\n\n@param item the item\n@param minStartPosition the min start position\n@param maxStartPosition the max start position\n@param minEndPosition the min end position\n@throws IOException Signals that an I/O exception has occurred." ]
[ "The period of time to ban a node that gives an error on an operation.\n\n@param nodeBannagePeriod The period of time to ban the node\n@param unit The time unit of the given value\n\n@deprecated Use {@link #setFailureDetectorBannagePeriod(long)} instead", "Creates a template node for the given templateString and appends it to the given parent node.\n\nTemplates are translated to generator node trees and expressions in templates can be of type IGeneratorNode.\n\n@return the given parent node", "Gets the final transform of the bone.\n\n@return the 4x4 matrix representing the final transform of the\nbone during animation, which comprises bind pose and skeletal\ntransform at the current time of the animation.", "Retrieve the version number", "Return a capitalized version of the specified property name.\n\n@param s\nThe property name", "Use this API to disable Interface resources of given names.", "Prints a stores xml to a file.\n\n@param outputDirName\n@param fileName\n@param list of storeDefs", "Fills in the element with the InputValues for input\n\n@param element the node element\n@param input the input data", "Read an int from an input stream.\n\n@param is input stream\n@return int value" ]