query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public AsciiTable setPaddingTop(int paddingTop) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingTop(paddingTop); } } return this; }
[ "Sets the top padding for all cells in the table.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining" ]
[ "Returns sql statement used in this prepared statement together with the parameters.\n@param sql base sql statement\n@param logParams parameters to print out\n@return returns printable statement", "Loads the data from the database. Override this method if the objects\nshall be loaded in a specific way.\n\n@return The loaded data", "Switches DB type.\n\n@param dbName the database type\n@param webapp the webapp name", "Parses an RgbaColor from a hexadecimal, rgb, rgba, hsl, or hsla\nvalue.\n\n@return returns the parsed color", "Extract name of the resource from a resource ID.\n@param id the resource ID\n@return the name of the resource", "Use this API to delete route6 of given name.", "Checks the orderby attribute.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for orderby is invalid (unknown field or ordering)", "Apply filters to a method name.\n@param methodName", "converts a java.net.URI to a decoded string" ]
public void addConverter(int index, IConverter converter) { converterList.add(index, converter); if (converter instanceof IContainerConverter) { IContainerConverter containerConverter = (IContainerConverter) converter; if (containerConverter.getElementConverter() == null) { containerConverter.setElementConverter(elementConverter); } } }
[ "add converter at given index. The index can be changed during conversion\nif canReorder is true\n\n@param index\n@param converter" ]
[ "Copy the contents of this buffer to the destination LBuffer\n@param srcOffset\n@param dest\n@param destOffset\n@param size", "Process the start of this element.\n\n@param attributes The attribute list for this element\n@param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace\naware or the element has no namespace\n@param name the local name if the parser is namespace aware, or just the element name otherwise\n@throws Exception if something goes wrong", "Checks whether an uploaded file can be created in the VFS, and throws an exception otherwise.\n\n@param cms the current CMS context\n@param config the form configuration\n@param name the file name of the uploaded file\n@param size the size of the uploaded file\n\n@throws CmsUgcException if something goes wrong", "Initializes the default scope type", "Assigns this retention policy to a metadata template, optionally with certain field values.\n@param templateID the ID of the metadata template to apply to.\n@param fieldFilters optional field value filters.\n@return info about the created assignment.", "Return the list of all the module submodules\n\n@param module\n@return List<DbModule>", "Print the class's constructors m", "Returns the compact representations of all of the dependencies of a task.\n\n@param task The task to get dependencies on.\n@return Request object", "Write a priority field to the JSON file.\n\n@param fieldName field name\n@param value field value" ]
public static WebDriverBackedEmbeddedBrowser withRemoteDriver(String hubUrl, ImmutableSortedSet<String> filterAttributes, long crawlWaitEvent, long crawlWaitReload) { return WebDriverBackedEmbeddedBrowser.withDriver(buildRemoteWebDriver(hubUrl), filterAttributes, crawlWaitEvent, crawlWaitReload); }
[ "Create a RemoteWebDriver backed EmbeddedBrowser.\n\n@param hubUrl Url of the server.\n@param filterAttributes the attributes to be filtered from DOM.\n@param crawlWaitReload the period to wait after a reload.\n@param crawlWaitEvent the period to wait after an event is fired.\n@return The EmbeddedBrowser." ]
[ "Finds and returns the date for the given event summary and year within the given ics file,\nor null if not present.", "Add views to the tree.\n\n@param parentNode parent tree node\n@param file views container", "The way calendars are stored in an MPP8 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs", "Remove all the existing links of the DeclarationBinder.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder", "Check the version to assure it is allowed.\n\n@param pluginName plugin name which needs the dependency\n@param dependency dependency which needs to be verified\n@param requestedVersion requested/minimum version\n@param availableVersion available version\n@return version check problem or empty string when all is fine", "Gets information about the device pin.\n@param fields the fields to retrieve.\n@return info about the device pin.", "Determine the enum value corresponding to the track source slot found in the packet.\n\n@return the proper value", "Use this API to clear gslbldnsentries.", "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" ]
@Pure public static <K, V> Map<K, V> operator_minus(Map<K, V> map, final Iterable<?> keys) { return Maps.filterKeys(map, new Predicate<K>() { @Override public boolean apply(K input) { return !Iterables.contains(keys, input); } }); }
[ "Replies the elements of the given map except the pairs with the given keys.\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 keys the keys of the pairs to remove.\n@return the map with the content of the map except the pairs.\n@since 2.15" ]
[ "Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects", "return null if the operation has no params to validate", "Convert a string to a URL and fallback to classpath resource, if not convertible.\n\n@param s\nThe string to convert.\n\n@return The URL.", "Retrieves the work variance.\n\n@return work variance", "Add the string representation of the given object to this sequence at the given index. The given indentation will\nbe prepended to each line except the first one if the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.\n@param index\nthe index in the list of segments.", "Obtains a Accounting local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Returns all found resolvers\n@return", "Set the html as value inside the tooltip.", "Search one prototype using the prototype index which is equals to the view type. This method\nhas to be implemented because prototypes member is declared with Collection and that interface\ndoesn't allow the client code to get one element by index.\n\n@param prototypeIndex used to search.\n@return prototype renderer." ]
protected String getClasspath() throws IOException { List<String> classpath = new ArrayList<>(); classpath.add(getBundleJarPath()); classpath.addAll(getPluginsPath()); return StringUtils.toString(classpath.toArray(new String[classpath.size()]), " "); }
[ "Returns the classpath for executable jar." ]
[ "Returns the item at the specified position.\n\n@param position index of the item to return\n@return the item at the specified position or {@code null} when not found", "Parses operations where the input comes from variables to its left only. Hard coded to only look\nfor transpose for now\n\n@param tokens List of all the tokens\n@param sequence List of operation sequence", "Returns a single item from the Iterator.\nIf there's none, returns null.\nIf there are more, throws an IllegalStateException.\n\n@throws IllegalStateException", "Set an unknown field.\n@param name the unknown property name\n@param value the unknown property value", "Get the collection of the server groups\n\n@return Collection of active server groups", "Creates a new capsule\n\n@param mode the capsule mode, or {@code null} for the default mode\n@param wrappedJar a path to a capsule JAR that will be launched (wrapped) by the empty capsule in {@code jarFile}\nor {@code null} if no wrapped capsule is wanted\n@return the capsule.", "Handles DMR strings in the configuration\n\n@param node the node to create.\n@param name the name for the node.\n@param value the value for the node.", "Retrieve a FieldType instance based on an ID value from\nan MPP9 or MPP12 file.\n\n@param fieldID field ID\n@return FieldType instance", "Removes an accessory from being handled or advertised by this root. Any existing Homekit\nconnections will be terminated to allow the clients to reconnect and see the updated accessory\nlist.\n\n@param accessory accessory to cease advertising and handling" ]
void addOption(final String value) { Assert.checkNotNullParam("value", value); synchronized (options) { options.add(value); } }
[ "Adds an option to the Jvm options\n\n@param value the option to add" ]
[ "Main method for testing fetching", "If an error is thrown while loading zone data, the exception is logged\nto system error and null is returned for this and all future requests.\n\n@param id the id to load\n@return the loaded zone", "Only one boolean param should be true at a time for this function to return the proper results\n\n@param hostName\n@param enable\n@param disable\n@param remove\n@param isEnabled\n@param exists\n@return\n@throws Exception", "Extracts the last revision id from the JSON response returned\nby the API after an edit\n\n@param response\nthe response as returned by Mediawiki\n@return\nthe new revision id of the edited entity\n@throws JsonMappingException", "A variant of the gamma function.\n@param a the number to apply gain to\n@param b the gain parameter. 0.5 means no change, smaller values reduce gain, larger values increase gain.\n@return the output value", "Finds the column with the largest normal and makes that the first column\n\n@param j Current column being inspected", "Get all the names of inputs that are required to be in the Values object when this graph is executed.", "Sets current state\n@param state new state", "This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementation used to write the\nrequest and read the response\n@param operationName Simple string representing the type of request\n\n@return Data returned by the individual requests" ]
private void validateSegments(List<LogSegment> segments) { synchronized (lock) { for (int i = 0; i < segments.size() - 1; i++) { LogSegment curr = segments.get(i); LogSegment next = segments.get(i + 1); if (curr.start() + curr.size() != next.start()) { throw new IllegalStateException("The following segments don't validate: " + curr.getFile() .getAbsolutePath() + ", " + next.getFile().getAbsolutePath()); } } } }
[ "Check that the ranges and sizes add up, otherwise we have lost some data somewhere" ]
[ "Determine if a task field contains data.\n\n@param task task instance\n@param field target field\n@return true if the field contains data", "Get path ID for a given profileId and pathName\n\n@param pathName Name of path\n@param profileId ID of profile\n@return ID of path", "Checks if the object with the given identity has been deleted\nwithin the transaction.\n@param id The identity\n@return true if the object has been deleted\n@throws PersistenceBrokerException", "use this method to construct the ChainingIterator\niterator by iterator.", "Unregister all servlets registered by this exporter.", "Should be called after new data is inserted. Will be automatically called, when the view dimensions\nhas changed.\n\nCalculates the start- and end-angles for every PieSlice.", "radi otsu da dobije spojena crna slova i ra\n\n@param input\n@return the processed image", "Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory", "Append Join for SQL92 Syntax" ]
private void handleChange(Object propertyId) { if (!m_saveBtn.isEnabled()) { m_saveBtn.setEnabled(true); m_saveExitBtn.setEnabled(true); } m_model.handleChange(propertyId); }
[ "Handle a value change.\n@param propertyId the column in which the value has changed." ]
[ "init database with demo data", "Finds the null space of A\n@param A (Input) Matrix. Modified\n@param numSingularValues Number of singular values\n@param nullspace Storage for null-space\n@return true if successful or false if it failed", "Remove all the existing links of the DeclarationBinder.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder", "Returns the AirMapView implementation as requested by the mapType argument. Use this method if\nyou need to request a specific AirMapView implementation that is not necessarily the preferred\ntype. For example, you can use it to explicit request a web-based map implementation.\n\n@param mapType Map type for the requested AirMapView implementation.\n@return An {@link AirMapViewBuilder} for the requested {@link AirMapViewTypes} mapType.", "Notifies all interested subscribers of the given revision.\n\n@param mwRevision\nthe given revision\n@param isCurrent\ntrue if this is guaranteed to be the most current revision", "Generate JSON format as result of the scan.\n\n@since 1.2", "Computes annualized seasonal adjustments from given monthly realized CPI values.\n\n@param realizedCPIValues An array of consecutive monthly CPI values (minimum size is 12*numberOfYearsToAverage))\n@param lastMonth The index of the last month in the sequence of realizedCPIValues (corresponding to the enums in <code>{@link java.time.Month}</code>).\n@param numberOfYearsToAverage The number of years to go back in the array of realizedCPIValues.\n@return Array of annualized seasonal adjustments, where [0] corresponds to the adjustment for from December to January.", "Heat Equation Boundary Conditions", "Splits timephased work segments in line with cost rates. Note that this is\nan approximation - where a rate changes during a working day, the second\nrate is used for the whole day.\n\n@param table cost rate table\n@param calendar calendar used by this assignment\n@param work timephased work segment\n@param rateIndex rate applicable at the start of the timephased work segment\n@return list of segments which replace the one supplied by the caller" ]
boolean awaitState(final InternalState expected) { synchronized (this) { final InternalState initialRequired = this.requiredState; for(;;) { final InternalState required = this.requiredState; // Stop in case the server failed to reach the state if(required == InternalState.FAILED) { return false; // Stop in case the required state changed } else if (initialRequired != required) { return false; } final InternalState current = this.internalState; if(expected == current) { return true; } try { wait(); } catch(InterruptedException e) { Thread.currentThread().interrupt(); return false; } } } }
[ "Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise" ]
[ "Determines whether this table has a foreignkey of the given name.\n\n@param name The name of the foreignkey\n@return <code>true</code> if there is a foreignkey of that name", "Takes a string of the form \"x1=y1,x2=y2,...\" and returns Map\n@param map A string of the form \"x1=y1,x2=y2,...\"\n@return A Map m is returned such that m.get(xn) = yn", "Process this deployment for annotations. This will use an annotation indexer to create an index of all annotations\nfound in this deployment and attach it to the deployment unit context.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException", "Returns the association row with the given key.\n\n@param key the key of the row to return.\n@return the association row with the given key or {@code null} if no row with that key is contained in this\nassociation", "Return all valid tenors for a given moneyness and maturity.\n\n@param moneynessBP The moneyness in bp for which to get the tenors.\n@param maturityInMonths The maturities in months for which to get the tenors.\n@return The tenors in months.", "Returns true if the lattice contains an entry at the specified location.\n\n@param maturityInMonths The maturity in months to check.\n@param tenorInMonths The tenor in months to check.\n@param moneynessBP The moneyness in bp to check.\n@return True iff there is an entry at the specified location.", "This method retrieves ONLY the ROOT actions", "Logs all the canidate elements so that the plugin knows which elements were the candidate\nelements.", "Support the range subscript operator for GString\n\n@param text a GString\n@param range a Range\n@return the String of characters corresponding to the provided range\n@since 2.3.7" ]
public boolean hasUser(String userId) { String normalized = normalizerUserName(userId); return loginToUser.containsKey(normalized) || emailToUser.containsKey(normalized); }
[ "Checks if user exists.\n\n@param userId the user id, which can be an email or the login.\n@return true, if user exists." ]
[ "Unilaterally merge an update description into this update description.\n@param otherDescription the update description to merge into this\n@return this merged update description", "Provides a RunAs client login context", "Use this API to delete ntpserver.", "Write the text to the Path, using the specified encoding.\n\n@param self a Path\n@param text the text to write to the Path\n@param charset the charset used\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0", "returns &gt; 0 when o1 is more specific than o2,\n\nreturns == 0 when o1 and o2 are equal or unrelated,\n\nreturns &lt; 0 when o2 is more specific than o1,", "Gets the groupby for ReportQueries of all Criteria and Sub Criteria\nthe elements are of class FieldHelper\n@return List of FieldHelper", "Commit an upload session after all parts have been uploaded, creating the new file or the version.\n@param digest the base64-encoded SHA-1 hash of the file being uploaded.\n@param parts the list of uploaded parts to be committed.\n@param attributes the key value pairs of attributes from the file instance.\n@param ifMatch ensures that your app only alters files/folders on Box if you have the current version.\n@param ifNoneMatch ensure that it retrieve unnecessary data if the most current version of file is on-hand.\n@return the created file instance.", "Get the diff between any two valid revisions.\n\n@param from revision from\n@param to revision to\n@param pathPattern target path pattern\n@return the map of changes mapped by path\n@throws StorageException if {@code from} or {@code to} does not exist.", "Creates an immutable list that consists of the elements in the given array. A copy of the given array is used which means\nthat any modifications to the given array will not affect the immutable list.\n\n@param elements the given array of elements\n@return an immutable list" ]
public AssemblyResponse save(boolean isResumable) throws RequestException, LocalOperationException { Request request = new Request(getClient()); options.put("steps", steps.toMap()); // only do tus uploads if files will be uploaded if (isResumable && getFilesCount() > 0) { Map<String, String> tusOptions = new HashMap<String, String>(); tusOptions.put("tus_num_expected_upload_files", Integer.toString(getFilesCount())); AssemblyResponse response = new AssemblyResponse( request.post("/assemblies", options, tusOptions, null, null), true); // check if the assembly returned an error if (response.hasError()) { throw new RequestException("Request to Assembly failed: " + response.json().getString("error")); } try { handleTusUpload(response); } catch (IOException e) { throw new LocalOperationException(e); } catch (ProtocolException e) { throw new RequestException(e); } return response; } else { return new AssemblyResponse(request.post("/assemblies", options, null, files, fileStreams)); } }
[ "Submits the configured assembly to Transloadit for processing.\n\n@param isResumable boolean value that tells the assembly whether or not to use tus.\n@return {@link AssemblyResponse} the response received from the Transloadit server.\n@throws RequestException if request to Transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations." ]
[ "URL-Decodes a given string using UTF-8. No UnsupportedEncodingException to handle as it is dealt with in this\nmethod.", "List the photos with the most views, comments or favorites.\n\n@param date\n(Optional) 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. If no date is provided, all time view counts will be returned.\n@param sort\n(Optional) The order in which to sort returned photos. Defaults to views. The possible values are views, comments and favorites. Other sort\noptions are available through flickr.photos.search.\n@param perPage\n(Optional) Number of referrers to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html\"", "Converts the given dislect to a human-readable datasource type.", "Should be called after all columns have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return", "Logs all properties", "Init after constructor", "If the \"org.talend.esb.sam.agent.log.messageContent\" property value is \"true\" then log the message content\nIf it is \"false\" then skip the message content logging\nElse fall back to global property \"log.messageContent\"\n\n@param message\n@param logMessageContent\n@param logMessageContentOverride\n@return", "Print a day.\n\n@param day Day instance\n@return day value", "Use this API to update Interface resources." ]
@SuppressWarnings("unchecked") protected static void visitSubreports(DynamicReport dr, Map _parameters) { for (DJGroup group : dr.getColumnsGroups()) { //Header Subreports for (Subreport subreport : group.getHeaderSubreports()) { if (subreport.getDynamicReport() != null) { visitSubreport(dr, subreport); visitSubreports(subreport.getDynamicReport(), _parameters); } } //Footer Subreports for (Subreport subreport : group.getFooterSubreports()) { if (subreport.getDynamicReport() != null) { visitSubreport(dr, subreport); visitSubreports(subreport.getDynamicReport(), _parameters); } } } }
[ "Performs any needed operation on subreports after they are built like ensuring proper subreport with\nif \"fitToParentPrintableArea\" flag is set to true\n\n@param dr\n@param _parameters\n@throws JRException" ]
[ "Process events in the order as they were received.\n\n<p/>\n\nThe overall time to process the events must be within the bounds of the\ntimeout or an {@link InsufficientOperationalNodesException} will be\nthrown.", "private multi-value handlers and helpers", "An invalid reference or references. The verification of the digest of a\nreference failed. This can be caused by a change to the referenced data\nsince the signature was generated.\n\n@param aInvalidReferences\nThe indices to the invalid references.\n@return Result object", "Translate the operation address.\n\n@param op the operation\n@return the new operation", "Use this API to fetch all the dnsview resources that are configured on netscaler.", "given the groupId, returns the groupName\n\n@param groupId ID of group\n@return name of group", "Gets information about all of the group memberships for this user.\nDoes not support paging.\n\n<p>Note: This method is only available to enterprise admins.</p>\n\n@return a collection of information about the group memberships for this user.", "Helper to read an optional Boolean value.\n@param path The XML path of the element to read.\n@return The Boolean value stored in the XML, or <code>null</code> if the value could not be read.", "Record a content loader for a given patch id.\n\n@param patchID the patch id\n@param contentLoader the content loader" ]
@SuppressWarnings("unused") public static void changeCredentials(String accountID, String token) { changeCredentials(accountID, token, null); }
[ "This method is used to change the credentials of CleverTap account Id and token programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token" ]
[ "Returns true if this instance has the same config as a given config.\n@param that\n@return true if the instance has the same config, false otherwise.", "Records that there is no media mounted in a particular media player slot, updating listeners if this is a change,\nand clearing any affected items from our in-memory caches.\n\n@param slot the slot in which no media is mounted", "This method retrieves an integer of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required integer data", "Use this API to clear nsconfig.", "checkpoint the ObjectModification", "Sets no of currency digits.\n\n@param currDigs Available values, 0,1,2", "Translate the operation address.\n\n@param op the operation\n@return the new operation", "Use this API to fetch all the cachecontentgroup resources that are configured on netscaler.", "Connect to the HC and retrieve the current model updates.\n\n@param controller the server controller\n@param callback the operation completed callback\n\n@throws IOException for any error" ]
public static authenticationlocalpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationlocalpolicy_authenticationvserver_binding obj = new authenticationlocalpolicy_authenticationvserver_binding(); obj.set_name(name); authenticationlocalpolicy_authenticationvserver_binding response[] = (authenticationlocalpolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch authenticationlocalpolicy_authenticationvserver_binding resources of given name ." ]
[ "Function to perform backward softmax", "Throw IllegalArgumentException if the value is null.\n\n@param name the parameter name.\n@param value the value that should not be null.\n@param <T> the value type.\n@throws IllegalArgumentException if value is null.", "Set the \"everyWorkingDay\" flag.\n@param isEveryWorkingDay flag, indicating if the event should take place every working day.", "Use this API to fetch the statistics of all aaa_stats resources that are configured on netscaler.", "Close and remove expired streams. Package protected to allow unit tests to invoke it.", "Process the hours and exceptions for an individual calendar.\n\n@param calendar project calendar\n@param calendarData hours and exception rows for this calendar", "Use this API to fetch cacheselector resources of given names .", "A disposer method is bound to a producer if the producer is assignable to the disposed parameter.\n\n@param enhancedDisposedParameter\n@return the set of required qualifiers for the given disposed parameter", "Use this API to fetch all the snmpalarm resources that are configured on netscaler." ]
public Capsule newCapsule(String mode, Path wrappedJar) { final String oldMode = properties.getProperty(PROP_MODE); final ClassLoader oldCl = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(capsuleClass.getClassLoader()); try { setProperty(PROP_MODE, mode); final Constructor<?> ctor = accessible(capsuleClass.getDeclaredConstructor(Path.class)); final Object capsule = ctor.newInstance(jarFile); if (wrappedJar != null) { final Method setTarget = accessible(capsuleClass.getDeclaredMethod("setTarget", Path.class)); setTarget.invoke(capsule, wrappedJar); } return wrap(capsule); } catch (ReflectiveOperationException e) { throw new RuntimeException("Could not create capsule instance.", e); } finally { setProperty(PROP_MODE, oldMode); Thread.currentThread().setContextClassLoader(oldCl); } }
[ "Creates a new capsule\n\n@param mode the capsule mode, or {@code null} for the default mode\n@param wrappedJar a path to a capsule JAR that will be launched (wrapped) by the empty capsule in {@code jarFile}\nor {@code null} if no wrapped capsule is wanted\n@return the capsule." ]
[ "Detect if the given object has a PK field represents a 'null' value.", "Use this API to fetch all the ipv6 resources that are configured on netscaler.", "Look up a shaper by a short String name.\n\n@param name Shaper name. Known names have patterns along the lines of:\ndan[12](bio)?(UseLC)?, jenny1(useLC)?, chris[1234](useLC)?.\n@return An integer constant for the shaper", "Use this API to fetch aaauser_binding resource of given name .", "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", "Remove a PropertyChangeListener for a specific property from this node.\nThis functionality has. Please note that the listener this does not remove\na listener that has been added without specifying the property it is\ninterested in.", "Builds a configuration object based on given properties.\n\n@param properties the properties.\n@return a configuration and never null.", "don't run on main thread", "Add an event to the queue. It will be processed in the order received.\n\n@param event Event" ]
public static void setIndex(Matcher matcher, int idx) { int count = getCount(matcher); if (idx < -count || idx >= count) { throw new IndexOutOfBoundsException("index is out of range " + (-count) + ".." + (count - 1) + " (index = " + idx + ")"); } if (idx == 0) { matcher.reset(); } else if (idx > 0) { matcher.reset(); for (int i = 0; i < idx; i++) { matcher.find(); } } else if (idx < 0) { matcher.reset(); idx += getCount(matcher); for (int i = 0; i < idx; i++) { matcher.find(); } } }
[ "Set the position of the given Matcher to the given index.\n\n@param matcher a Matcher\n@param idx the index number\n@since 1.0" ]
[ "Cut all characters from maxLength and replace it with \"...\"", "Use this API to fetch dnstxtrec resources of given names .", "Search down all extent classes and return max of all found\nPK values.", "Get User application properties\nGet application properties of a user\n@param userId User Id (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", "Use this API to fetch all the linkset resources that are configured on netscaler.", "Performs an efficient update of each columns' norm", "Generate a Jongo query with provided the parameter.\n\n@param key\n@param value\n@return String", "Modify a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder", "We try to convert an Object to an Array and this is not easy in Java so we need a little bit of nasty magic.\n\n@param <T> Type of elements\n@param clazz Clazz of the Objct elements\n@param obj Object\n@return Array" ]
public static long addressToLong(InetAddress address) { long result = 0; for (byte element : address.getAddress()) { result = (result << 8) + unsign(element); } return result; }
[ "Converts the bytes that make up an internet address into the corresponding integer value to make\nit easier to perform bit-masking operations on them.\n\n@param address an address whose integer equivalent is desired\n\n@return the integer corresponding to that address" ]
[ "Changes to a new sub-view and stores a report to be displayed by that subview.<p<\n\n@param newState the new state\n@param thread the report thread which should be displayed in the sub view\n@param label the label to display for the report", "Output method responsible for sending the updated content to the Subscribers.\n\n@param cn", "Log a warning message with a throwable.", "This method writes project properties to a Planner file.", "Stops listening. Safe to call when already stopped. Ignored on devices\nwithout appropriate hardware.", "Fancy print without a space added to positive numbers", "trim \"act.\" from conf keys", "Selects the single element of the collection for which the provided OQL query\npredicate is true.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return The element that evaluates to true for the predicate. If no element\nevaluates to true, null is returned.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Helper method that encapsulates the logic to acquire a lock.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param lockName\nall calls to this method will contend for a unique lock with\nthe name of lockName\n@param timeout\nseconds until the lock will expire\n@param lockHolder\na unique string used to tell if you are the current holder of\na lock for both acquisition, and extension\n@return Whether or not the lock was acquired." ]
public Counter<K1> sumInnerCounter() { Counter<K1> summed = new ClassicCounter<K1>(); for (K1 key : this.firstKeySet()) { summed.incrementCount(key, this.getCounter(key).totalCount()); } return summed; }
[ "Returns the counters with keys as the first key and count as the\ntotal count of the inner counter for that key\n\n@return counter of type K1" ]
[ "Sets the specified long attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Reset the crawler to its initial state.", "Use this API to fetch nstrafficdomain_bridgegroup_binding resources of given name .", "Parse request parameters and files.\n@param request\n@param response", "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.", "Set the color for the statusBar\n\n@param statusBarColor", "Writes a DTD that can be used for data XML files matching the current model to the given writer.\n\n@param output The writer to write the DTD to", "Use this API to fetch vpnvserver_auditnslogpolicy_binding resources of given name .", "Adds a data set to IIM file.\n\n@param ds\ndata set id (see constants in IIM class)\n@param value\ndata set value. Null values are silently ignored.\n@throws SerializationException\nif value can't be serialized by data set's serializer\n@throws InvalidDataSetException\nif data set isn't defined" ]
private PlayState3 findPlayState3() { PlayState3 result = PLAY_STATE_3_MAP.get(packetBytes[157]); if (result == null) { return PlayState3.UNKNOWN; } return result; }
[ "Determine the enum value corresponding to the third play state found in the packet.\n\n@return the proper value" ]
[ "Set a new Cursor position if active and enabled.\n\n@param x x value of the position\n@param y y value of the position\n@param z z value of the position", "Returns the field descriptors given in the the field names list.\n\n@param fieldNames The field names, separated by commas\n@return The field descriptors in the order given by the field names\n@throws NoSuchFieldException If a field hasn't been found", "Method used to write the name of the scenarios\n\n@param word\n@return the same word starting with capital letter", "Reads data from the SP file.\n\n@return Project File instance", "Invoke the operation.\n@param parameterMap the {@link Map} of parameter names to value arrays.\n@return the {@link Object} return value from the operation.\n@throws JMException Java Management Exception", "Get the deferred flag. Exchange rates can be deferred or real.time.\n\n@return the deferred flag, or {code null}.", "Use this API to enable Interface of given name.", "Use this API to fetch all the responderpolicy resources that are configured on netscaler.", "Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected" ]
public void resizeKeys(int numKeys) { int n = numKeys * mFloatsPerKey; if (mKeys.length == n) { return; } float[] newKeys = new float[n]; n = Math.min(n, mKeys.length); System.arraycopy(mKeys, 0, newKeys, 0, n); mKeys = newKeys; mFloatInterpolator.setKeyData(mKeys); }
[ "Resize the key data area.\nThis function will truncate the keys if the\ninitial setting was too large.\n\n@oaran numKeys the desired number of keys" ]
[ "Create a mapping from entity names to entity ID values.", "Initialize VIDEO_INFO data.", "Parse a version String and add the components to a properties object.\n\n@param version the version to parse", "Counts the number of elements in A which are not zero.\n@param A A matrix\n@return number of non-zero elements", "Add the list with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The list of all packages to add.", "Use this API to fetch csvserver_copolicy_binding resources of given name .", "Gets the value of the resourceRequestCriterion property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the resourceRequestCriterion property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetResourceRequestCriterion().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ResourceRequestType.ResourceRequestCriterion }", "Should be called after all columns have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return", "Retrieve the number of minutes per year for this calendar.\n\n@return minutes per year" ]
public static nd6ravariables get(nitro_service service, Long vlan) throws Exception{ nd6ravariables obj = new nd6ravariables(); obj.set_vlan(vlan); nd6ravariables response = (nd6ravariables) obj.get_resource(service); return response; }
[ "Use this API to fetch nd6ravariables resource of given name ." ]
[ "Label accessor provided for JSON serialization only.", "Set the model used by the right table.\n\n@param model table model", "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", "ten less than Cube Q", "On throwable.\n\n@param cause\nthe cause", "IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery", "Return a list of websocket connection by key\n\n@param key\nthe key to find the websocket connection list\n@return a list of websocket connection or an empty list if no websocket connection found by key", "Use this API to fetch sslaction resource of given name .", "Determine the enum value corresponding to the first play state found in the packet.\n\n@return the proper value" ]
private void readActivities() { List<MapRow> items = new ArrayList<MapRow>(); for (MapRow row : m_tables.get("ACT")) { items.add(row); } final AlphanumComparator comparator = new AlphanumComparator(); Collections.sort(items, new Comparator<MapRow>() { @Override public int compare(MapRow o1, MapRow o2) { return comparator.compare(o1.getString("ACTIVITY_ID"), o2.getString("ACTIVITY_ID")); } }); for (MapRow row : items) { String activityID = row.getString("ACTIVITY_ID"); String wbs; if (m_wbsFormat == null) { wbs = null; } else { m_wbsFormat.parseRawValue(row.getString("WBS")); wbs = m_wbsFormat.getFormattedValue(); } ChildTaskContainer parent = m_wbsMap.get(wbs); if (parent == null) { parent = m_projectFile; } Task task = parent.addTask(); setFields(TASK_FIELDS, row, task); task.setStart(task.getEarlyStart()); task.setFinish(task.getEarlyFinish()); task.setMilestone(task.getDuration().getDuration() == 0); task.setWBS(wbs); Duration duration = task.getDuration(); Duration remainingDuration = task.getRemainingDuration(); task.setActualDuration(Duration.getInstance(duration.getDuration() - remainingDuration.getDuration(), TimeUnit.HOURS)); m_activityMap.put(activityID, task); } }
[ "Read activities." ]
[ "returns the zero argument constructor for the class represented by this class descriptor\nor null if a zero argument constructor does not exist. If the zero argument constructor\nfor this class is not public it is made accessible before being returned.", "Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved parameter type of the method return type, or {@code null}\nif not resolvable or if the single argument is of type {@link WildcardType}.", "Assign target number of partitions per node to specific node IDs. Then,\nseparates Nodes into donorNodes and stealerNodes based on whether the\nnode needs to donate or steal primary partitions.\n\n@param nextCandidateCluster\n@param numPartitionsPerNodePerZone\n@return a Pair. First element is donorNodes, second element is\nstealerNodes. Each element in the pair is a HashMap of Node to\nInteger where the integer value is the number of partitions to\nstore.", "Helper method to add a Java integer value to a message digest.\n\n@param digest the message digest being built\n@param value the integer whose bytes should be included in the digest", "Print a duration value.\n\n@param value Duration instance\n@return string representation of a duration", "Return key Values of an Identity\n@param cld\n@param oid\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException", "Read a short int from an input stream.\n\n@param is input stream\n@return int value", "Convert a Throwable into a list containing all of its causes.\n@param t The throwable for which the causes are to be returned.\n@return A (possibly empty) list of {@link Throwable}s.", "Check whether the delegate type implements or extends all decorated types.\n\n@param decorator\n@throws DefinitionException If the delegate type doesn't implement or extend all decorated types" ]
public static String join(Collection<String> s, String delimiter, boolean doQuote) { StringBuffer buffer = new StringBuffer(); Iterator<String> iter = s.iterator(); while (iter.hasNext()) { if (doQuote) { buffer.append("\"" + iter.next() + "\""); } else { buffer.append(iter.next()); } if (iter.hasNext()) { buffer.append(delimiter); } } return buffer.toString(); }
[ "Join the Collection of Strings using the specified delimter and optionally quoting each\n\n@param s\nThe String collection\n@param delimiter\nthe delimiter String\n@param doQuote\nwhether or not to quote the Strings\n@return The joined String" ]
[ "This is a convenience method which allows all projects in an\nXER file to be read in a single pass.\n\n@param is input stream\n@param linkCrossProjectRelations add Relation links that cross ProjectFile boundaries\n@return list of ProjectFile instances\n@throws MPXJException", "Perform the given work with a Jedis connection from the given pool.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work\n@throws Exception if something went wrong", "The user making this call must be a member of the team in order to add others.\nThe user to add must exist in the same organization as the team in order to be added.\nThe user to add can be referenced by their globally unique user ID or their email address.\nReturns the full user record for the added user.\n\n@param team Globally unique identifier for the team.\n@return Request object", "Parse a map of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.", "Set the draw mode for this mesh. Default is GL_TRIANGLES.\n\n@param drawMode", "Obtains a Discordian zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Add a range to an exception, ensure that we don't try to add null ranges.\n\n@param exception target exception\n@param start exception start\n@param finish exception finish", "Checks if the object with the given identity has been deleted\nwithin the transaction.\n@param id The identity\n@return true if the object has been deleted\n@throws PersistenceBrokerException", "Invoke to find all services for given service type using specified class loader\n\n@param classLoader specified class loader\n@param serviceType given service type\n@return List of found services" ]
synchronized void setServerProcessStopping() { this.requiredState = InternalState.STOPPED; internalSetState(null, InternalState.STOPPED, InternalState.PROCESS_STOPPING); }
[ "On host controller reload, remove a not running server registered in the process controller declared as stopping." ]
[ "Function to perform backward pooling", "given the groupId, returns the groupName\n\n@param groupId ID of group\n@return name of group", "It is required that T be Serializable", "Reloads the synchronization config. This wipes all in-memory synchronization settings.", "Looks up a variable given its name. If none is found then return null.", "Returns a resource wrapper created from the input.\n\nThe wrapped result of {@link #convertRawResource(CmsObject, Object)} is returned.\n\n@param cms the current OpenCms user context\n@param input the input to create a resource from\n\n@return a resource wrapper created from the given Object\n\n@throws CmsException in case of errors accessing the OpenCms VFS for reading the resource", "Instantiates a new event collector.", "Add a calendar node.\n\n@param parentNode parent node\n@param calendar calendar", "Sets an error message that will be displayed in a popup when the EditText has focus along\nwith an icon displayed at the right-hand side.\n\n@param error error message to show" ]
public static <T, X> ObserverMethodImpl<T, X> create(EnhancedAnnotatedMethod<T, ? super X> method, RIBean<X> declaringBean, BeanManagerImpl manager, boolean isAsync) { if (declaringBean instanceof ExtensionBean) { return new ExtensionObserverMethodImpl<T, X>(method, declaringBean, manager, isAsync); } return new ObserverMethodImpl<T, X>(method, declaringBean, manager, isAsync); }
[ "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" ]
[ "Register a new DropPasteWorkerInterface.\n@param worker The new worker", "sets the row reader class name for thie class descriptor", "Find all the node representing the entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@return an iterator over the nodes representing an entity", "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", "Adds an orthographic camera constructed from the designated\nperspective camera to describe the shadow projection.\nThe field of view and aspect ration of the perspective\ncamera are used to obtain the view volume of the\northographic camera. This type of camera is used\nfor shadows generated by direct lights at infinite distance.\n@param centerCam GVRPerspectiveCamera to derive shadow projection from\n@return Orthographic camera to use for shadow casting\n@see GVRDirectLight", "Returns with an iterable of URIs that points to all elements that are\nreferenced by the argument or vice-versa.\n\n@return an iterable of URIs that are referenced by the argument or the\nother way around.", "Allocate a timestamp", "Decide whether failure should trigger a rollback.\n\n@param cause\nthe cause of the failure, or {@code null} if failure is not\nthe result of catching a throwable\n@return the result action", "Decomposes a submatrix. The results are written to the submatrix\nand to its internal matrix L.\n\n@param mat A matrix which has a submatrix that needs to be inverted\n@param indexStart the first index of the submatrix\n@param n The width of the submatrix that is to be inverted.\n@return True if it was able to finish the decomposition." ]
public static Comment createComment(final String entityId, final String entityType, final String action, final String commentedText, final String user, final Date date) { final Comment comment = new Comment(); comment.setEntityId(entityId); comment.setEntityType(entityType); comment.setAction(action); comment.setCommentText(commentedText); comment.setCommentedBy(user); comment.setCreatedDateTime(date); return comment; }
[ "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" ]
[ "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", "this method is basically checking whether we can return \"this\" for getNetworkSection", "Output the SQL type for a Java String.", "The max possible width can be calculated doing the sum of of the inner cells and its totals\n@param crosstabColumn\n@return", "This method allows a resource assignment workgroup fields record\nto be added to the current resource assignment. A maximum of\none of these records can be added to a resource assignment record.\n\n@return ResourceAssignmentWorkgroupFields object\n@throws MPXJException if MSP defined limit of 1 is exceeded", "Try to open a file at the given position.", "Signal that we are about to close the channel. This will not have any affect on the underlying channel, however\nprevent setting a new channel.\n\n@return whether the closing state was set successfully", "This method writes calendar data to a Planner file.\n\n@throws JAXBException on xml creation errors", "Extracts the zip file to the output folder\n\n@param zipFile ZIP File to extract\n@param outputFolder Output Folder\n@return A Collection with the extracted files\n@throws IOException I/O Error" ]
public void transformConfig() throws Exception { List<TransformEntry> entries = readTransformEntries(new File(m_xsltDir, "transforms.xml")); for (TransformEntry entry : entries) { transform(entry.getConfigFile(), entry.getXslt()); } m_isDone = true; }
[ "Transforms the configuration.\n\n@throws Exception if something goes wrong" ]
[ "Handler for week of month changes.\n@param event the change event.", "Determines whether the given array only contains unbounded type variables or Object.class.\n\n@param types the given array of types\n@return true if and only if the given array only contains unbounded type variables or Object.class", "Only sets and gets that are by row and column are used.", "Either gets an existing lock on the specified resource or creates one if none exists.\nThis methods guarantees to do this atomically.\n\n@param resourceId the resource to get or create the lock on\n@param isolationId the isolation level identity key. See {@link CommonsOJBLockManager}.\n@return the lock for the specified resource", "Retrieves the earliest start date for all assigned tasks.\n\n@return start date", "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>", "Extract site path, base name and locale from the resource opened with the editor.", "Skip to the next matching short value.\n\n@param buffer input data array\n@param offset start offset into the input array\n@param value value to match\n@return offset of matching pattern", "Get history for a specific database ID\n\n@param id ID of history entry\n@return History entry" ]
public static ProxyMetaClass getInstance(Class theClass) throws IntrospectionException { MetaClassRegistry metaRegistry = GroovySystem.getMetaClassRegistry(); MetaClass meta = metaRegistry.getMetaClass(theClass); return new ProxyMetaClass(metaRegistry, theClass, meta); }
[ "convenience factory method for the most usual case." ]
[ "Select calendar data from the database.\n\n@throws SQLException", "Use this API to clear Interface resources.", "Append this message to the message set\n@param messages message to append\n@return the written size and first offset\n@throws IOException file write exception", "Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null.", "Pass a model object and return a SoyMapData if a model object happens\nto be a SoyMapData.\n\nAn implementation will also check if a passed in object is a Map and return\na SoyMapData wrapping that map", "Checks if the categoryfolder setting needs to be updated.\n\n@return true if the categoryfolder setting needs to be updated", "Pads the given String to the left with the given character to ensure that\nit's at least totalChars long.", "Get a value from a date metadata field.\n@param path the key path in the metadata object. Must be prefixed with a \"/\".\n@return the metadata value as a Date.\n@throws ParseException when the value cannot be parsed as a valid date", "Sets the response context.\n\n@param responseContext\nthe response context\n@return the parallel task builder" ]
public static StatisticsMatrix wrap( DMatrixRMaj m ) { StatisticsMatrix ret = new StatisticsMatrix(); ret.setMatrix( m ); return ret; }
[ "Wraps a StatisticsMatrix around 'm'. Does NOT create a copy of 'm' but saves a reference\nto it." ]
[ "Used to parse the dividend dates. Returns null if the date cannot be\nparsed.\n\n@param date String received that represents the date\n@return Calendar object representing the parsed date", "Use this API to fetch rewritepolicy_csvserver_binding resources of given name .", "Handles logging tasks related to a failure to connect to a remote HC.\n@param uri the URI at which the connection attempt was made. Can be {@code null} indicating a failure to discover the HC\n@param discoveryOption the {@code DiscoveryOption} used to determine {@code uri}\n@param moreOptions {@code true} if there are more untried discovery options\n@param e the exception", "Add a Renderer instance as prototype.\n\n@param renderer to use as prototype.\n@return the current RendererBuilder instance.", "Loads a classifier from the file specified by loadPath. If loadPath ends in\n.gz, uses a GZIPInputStream, else uses a regular FileInputStream.", "Finish the oauth flow after the user was redirected back.\n\n@param code\nCode returned by the Eve Online SSO\n@param state\nThis should be some secret to prevent XRSF see\ngetAuthorizationUri\n@throws net.troja.eve.esi.ApiException", "Combines adjacent blocks of the same type.", "Start transaction on the underlying connection.", "Calculate a shift value that can be used to create a power-of-two value between\nthe specified maximum and minimum values.\n@param minimumValue the minimum value\n@param maximumValue the maximum value\n@return the calculated shift (use {@code 1 << shift} to obtain a value)" ]
public void runOnInvariantViolationPlugins(Invariant invariant, CrawlerContext context) { LOGGER.debug("Running OnInvariantViolationPlugins..."); counters.get(OnInvariantViolationPlugin.class).inc(); for (Plugin plugin : plugins.get(OnInvariantViolationPlugin.class)) { if (plugin instanceof OnInvariantViolationPlugin) { try { LOGGER.debug("Calling plugin {}", plugin); ((OnInvariantViolationPlugin) plugin).onInvariantViolation( invariant, context); } catch (RuntimeException e) { reportFailingPlugin(plugin, e); } } } }
[ "Run the OnInvariantViolation plugins when an Invariant is violated. Invariant are checked\nwhen the state machine is updated that is when the dom is changed after a click on a\nclickable. When a invariant fails this kind of plugins are executed. Warning the session is\nnot a clone, changing the session can cause strange behaviour of Crawljax.\n\n@param invariant the failed invariants\n@param context the current {@link CrawlerContext} for this crawler." ]
[ "Retrieves the path using the endpoint value\n\n@param pathValue - path (endpoint) value\n@param requestType - \"GET\", \"POST\", etc\n@return Path or null\n@throws Exception exception", "Parses a String email address to an IMAP address string.", "What is the maximum bounds in screen space? Needed for correct clipping calculation.\n\n@param tile\ntile\n@param panOrigin\npan origin\n@return max screen bbox", "Converts milliseconds into a calendar object.\n\n@param millis a time given in milliseconds after epoch\n@return the calendar object for the given time", "Transform a TMS layer description object into a raster layer info object.\n\n@param tileMap\nThe TMS layer description object.\n@return The raster layer info object as used by Geomajas.", "Returns the complete definition of a custom field's metadata.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object", "Returns if this maps the specified cell.\n\n@param cell the cell name\n@return {@code true} if this maps the column, {@code false} otherwise", "Internal method used to locate an remove an item from a list Relations.\n\n@param relationList list of Relation instances\n@param targetTask target relationship task\n@param type target relationship type\n@param lag target relationship lag\n@return true if a relationship was removed", "It is required that T be Serializable" ]
public ParallelTaskBuilder prepareHttpPut(String url) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.getHttpMeta().setHttpMethod(HttpMethod.PUT); cb.getHttpMeta().setRequestUrlPostfix(url); return cb; }
[ "Prepare a parallel HTTP PUT Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder" ]
[ "Calculates the maximum text height which is possible based on the used Paint and its settings.\n\n@param _Paint Paint object which will be used to display a text.\n@param _Text The text which should be measured. If null, a default text is chosen, which\nhas a maximum possible height\n@return Maximum text height in px.", "Fetch a value from the Hashmap .\n\n@param firstKey\nfirst key\n@param secondKey\nsecond key\n@return the element or null.", "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", "Search for rectangles which have the same width and x position, and\nwhich join together vertically and merge them together to reduce the\nnumber of rectangles needed to describe a symbol.", "Invoke the operation.\n@param parameterMap the {@link Map} of parameter names to value arrays.\n@return the {@link Object} return value from the operation.\n@throws JMException Java Management Exception", "Execute a request through Odo processing\n\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@param history", "generate a message for loglevel FATAL\n\n@param pObject the message Object", "Use this API to add sslcertkey resources.", "Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance" ]
public static base_responses add(nitro_service client, appfwjsoncontenttype resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { appfwjsoncontenttype addresources[] = new appfwjsoncontenttype[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new appfwjsoncontenttype(); addresources[i].jsoncontenttypevalue = resources[i].jsoncontenttypevalue; addresources[i].isregex = resources[i].isregex; } result = add_bulk_request(client, addresources); } return result; }
[ "Use this API to add appfwjsoncontenttype resources." ]
[ "This is the profiles page. this is the 'regular' page when the url is typed in", "Get the int resource id with specified type definition\n@param context\n@param id String resource id\n@return int resource id", "Register an active operation with a specific operation id.\n\n@param id the operation id\n@param attachment the shared attachment\n@param callback the completed callback\n@return the created active operation\n\n@throws java.lang.IllegalStateException if an operation with the same id is already registered", "Processes the template for all index columns for the current index descriptor.\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\"", "Validates the type", "Returns all the pixels for the image\n\n@return an array of pixels for this image", "Use this API to update inat.", "Get FieldDescriptor from Reference", "Adopts an xml dom element to the owner document of this element if necessary.\n\n@param elementToAdopt the element to adopt" ]
private StringBuilder calculateCacheKeyInternal(String sql, int resultSetType, int resultSetConcurrency) { StringBuilder tmp = new StringBuilder(sql.length()+20); tmp.append(sql); tmp.append(", T"); tmp.append(resultSetType); tmp.append(", C"); tmp.append(resultSetConcurrency); return tmp; }
[ "Cache key calculation.\n@param sql\n@param resultSetType\n@param resultSetConcurrency\n@return cache key" ]
[ "low-level Graph API operations", "Creates an instance of a NewSimpleBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewSimpleBean instance", "Abort and close the transaction. Calling abort abandons all persistent\nobject modifications and releases the associated locks. Aborting a\ntransaction does not restore the state of modified transient objects", "Get the label distance..\n\n@param settings Parameters for rendering the scalebar.", "Append the given item to the end of the list\n@param segment segment to append", "Copies all node meta data from the other node to this one\n@param other - the other node", "Prepares Artifactory server either from serverID or from ArtifactoryServer.\n\n@param artifactoryServerID\n@param pipelineServer\n@return", "Purges the JSP repository.<p<\n\n@param afterPurgeAction the action to execute after purging", "Use this API to clear nspbr6." ]
static GVROrthogonalCamera makeOrthoShadowCamera(GVRPerspectiveCamera centerCam) { GVROrthogonalCamera shadowCam = new GVROrthogonalCamera(centerCam.getGVRContext()); float near = centerCam.getNearClippingDistance(); float far = centerCam.getFarClippingDistance(); float fovy = (float) Math.toRadians(centerCam.getFovY()); float h = (float) (Math.atan(fovy / 2.0f) * far) / 2.0f; shadowCam.setLeftClippingDistance(-h); shadowCam.setRightClippingDistance(h); shadowCam.setTopClippingDistance(h); shadowCam.setBottomClippingDistance(-h); shadowCam.setNearClippingDistance(near); shadowCam.setFarClippingDistance(far); return shadowCam; }
[ "Adds an orthographic camera constructed from the designated\nperspective camera to describe the shadow projection.\nThe field of view and aspect ration of the perspective\ncamera are used to obtain the view volume of the\northographic camera. This type of camera is used\nfor shadows generated by direct lights at infinite distance.\n@param centerCam GVRPerspectiveCamera to derive shadow projection from\n@return Orthographic camera to use for shadow casting\n@see GVRDirectLight" ]
[ "Use this API to Import application.", "Verifies if the new value is different from the field's old value. It's\nuseful, for example, in NoSQL databases that replicates data between\nservers. This verification prevents to mark a field as modified and to be\nreplicated needlessly.\n\n@param field\nthe field that we are checking before to be modified\n@param value\nthe new value\n@return true if the new and the old values are different and the value\nwas changed.", "Logs the time taken by this rule and adds this to the total time taken for this phase", "Converts an integer into a time format.\n\n@param format integer format value\n@return TimeUnit instance", "Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader.", "Returns the total number of weights associated with this classifier.\n\n@return number of weights", "Read FTS file data from the configured source and return a populated ProjectFile instance.\n\n@return ProjectFile instance", "Creates a PathAddress from the given ModelNode address. The given node is expected to be an address node.\n\n@param node the node (cannot be {@code null})\n\n@return the update identifier", "Returns the list of user defined attribute names.\n\n@return the list of user defined attribute names, if there are none it returns an empty set." ]
private void writeResourceAssignment(ResourceAssignment record) throws IOException { m_buffer.setLength(0); m_buffer.append(MPXConstants.RESOURCE_ASSIGNMENT_RECORD_NUMBER); m_buffer.append(m_delimiter); m_buffer.append(formatResource(record.getResource())); m_buffer.append(m_delimiter); m_buffer.append(format(formatUnits(record.getUnits()))); m_buffer.append(m_delimiter); m_buffer.append(format(formatDuration(record.getWork()))); m_buffer.append(m_delimiter); m_buffer.append(format(formatDuration(record.getBaselineWork()))); m_buffer.append(m_delimiter); m_buffer.append(format(formatDuration(record.getActualWork()))); m_buffer.append(m_delimiter); m_buffer.append(format(formatDuration(record.getOvertimeWork()))); m_buffer.append(m_delimiter); m_buffer.append(format(formatCurrency(record.getCost()))); m_buffer.append(m_delimiter); m_buffer.append(format(formatCurrency(record.getBaselineCost()))); m_buffer.append(m_delimiter); m_buffer.append(format(formatCurrency(record.getActualCost()))); m_buffer.append(m_delimiter); m_buffer.append(format(formatDateTime(record.getStart()))); m_buffer.append(m_delimiter); m_buffer.append(format(formatDateTime(record.getFinish()))); m_buffer.append(m_delimiter); m_buffer.append(format(formatDuration(record.getDelay()))); m_buffer.append(m_delimiter); m_buffer.append(format(record.getResourceUniqueID())); stripTrailingDelimiters(m_buffer); m_buffer.append(MPXConstants.EOL); m_writer.write(m_buffer.toString()); ResourceAssignmentWorkgroupFields workgroup = record.getWorkgroupAssignment(); if (workgroup == null) { workgroup = ResourceAssignmentWorkgroupFields.EMPTY; } writeResourceAssignmentWorkgroupFields(workgroup); m_eventManager.fireAssignmentWrittenEvent(record); }
[ "Write resource assignment.\n\n@param record resource assignment instance\n@throws IOException" ]
[ "helper method to activate or deactivate a specific flag\n\n@param bits\n@param on", "The fields returned by default. Typically the output is done via display formatters and hence nearly no\nfield is necessary. Returning all fields might cause performance problems.\n\n@return the default return fields.", "Populates a calendar instance.\n\n@param record MPX record\n@param calendar calendar instance\n@param isBaseCalendar true if this is a base calendar", "Use this API to apply nspbr6 resources.", "Displays text which shows the valid command line parameters, and then exits.", "Returns the query string currently in the text field.\n\n@return the query string", "Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error", "Returns the index of a key in the set.\n\n@param key The key to search for.\n@return Returns the index of the key if it exists, else a negative integer.", "Checks if class package match provided list of package locators\n\n@param classPackageName\nname of class package\n@return true if class package is on the {@link #packageLocators} list" ]
public void processCalendar(Row row) { ProjectCalendar calendar = m_project.addCalendar(); Integer id = row.getInteger("clndr_id"); m_calMap.put(id, calendar); calendar.setName(row.getString("clndr_name")); try { calendar.setMinutesPerDay(Integer.valueOf((int) NumberHelper.getDouble(row.getDouble("day_hr_cnt")) * 60)); calendar.setMinutesPerWeek(Integer.valueOf((int) (NumberHelper.getDouble(row.getDouble("week_hr_cnt")) * 60))); calendar.setMinutesPerMonth(Integer.valueOf((int) (NumberHelper.getDouble(row.getDouble("month_hr_cnt")) * 60))); calendar.setMinutesPerYear(Integer.valueOf((int) (NumberHelper.getDouble(row.getDouble("year_hr_cnt")) * 60))); } catch (ClassCastException ex) { // We have seen examples of malformed calendar data where fields have been missing // from the record. We'll typically get a class cast exception here as we're trying // to process something which isn't a double. // We'll just return at this point as it's not clear that we can salvage anything // sensible from this record. return; } // Process data String calendarData = row.getString("clndr_data"); if (calendarData != null && !calendarData.isEmpty()) { Record root = Record.getRecord(calendarData); if (root != null) { processCalendarDays(calendar, root); processCalendarExceptions(calendar, root); } } else { // if there is not DaysOfWeek data, Primavera seems to default to Mon-Fri, 8:00-16:00 DateRange defaultHourRange = new DateRange(DateHelper.getTime(8, 0), DateHelper.getTime(16, 0)); for (Day day : Day.values()) { if (day != Day.SATURDAY && day != Day.SUNDAY) { calendar.setWorkingDay(day, true); ProjectCalendarHours hours = calendar.addCalendarHours(day); hours.addRange(defaultHourRange); } else { calendar.setWorkingDay(day, false); } } } m_eventManager.fireCalendarReadEvent(calendar); }
[ "Process data for an individual calendar.\n\n@param row calendar data" ]
[ "Makes http GET request.\n@param url url to makes request to\n@param params data to add to params field\n@return {@link okhttp3.Response}\n@throws RequestException\n@throws LocalOperationException", "Add server redirect to a profile, using current active ServerGroup\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@return ID of added ServerRedirect\n@throws Exception exception", "Clones the given reference.\n\n@param refDef The reference descriptor\n@param prefix A prefix for the name\n@return The cloned reference", "Copies the jdb log files, with additional verification of the checksums.\n\n@param sourceFile\n@param destFile\n@throws IOException", "Adds a column pair to this foreignkey.\n\n@param localColumn The column in the local table\n@param remoteColumn The column in the remote table", "Get the default provider used.\n\n@return the default provider, never {@code null}.", "Joins the individual WBS elements to make the formated value.\n\n@param length number of elements to join\n@return formatted WBS value", "Checks if a given number is in the range of a short.\n\n@param number\na number which should be in the range of a short (positive or negative)\n\n@see java.lang.Short#MIN_VALUE\n@see java.lang.Short#MAX_VALUE\n\n@return number as a short (rounding might occur)", "Use this API to fetch all the systemcore resources that are configured on netscaler.\nThis uses systemcore_args which is a way to provide additional arguments while fetching the resources." ]
public static autoscalepolicy_binding get(nitro_service service, String name) throws Exception{ autoscalepolicy_binding obj = new autoscalepolicy_binding(); obj.set_name(name); autoscalepolicy_binding response = (autoscalepolicy_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch autoscalepolicy_binding resource of given name ." ]
[ "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", "GetJob helper - String predicates are all created the same way, so this factors some code.", "Returns the configured request parameter for the current query string, or the default parameter if the core is not specified.\n@return The configured request parameter for the current query string, or the default parameter if the core is not specified.", "In common shader cases, NaN makes little sense. Correspondingly, GVRF is\ngoing to use Float.NaN as illegal flag in many cases. Therefore, we need\na function to check if there is any setX that is using NaN as input.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param data\nA single float data.\n@throws IllegalArgumentException\nif the data includes NaN.", "This method is called to format a duration.\n\n@param value duration value\n@return formatted duration value", "Returns the value of the element with the largest value\n@param A (Input) Matrix. Not modified.\n@return scalar", "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", "Set up arguments for each FieldDescriptor in an array.", "A convenience method for creating an immutable list.\n\n@param self a Set\n@return an immutable Set\n@see java.util.Collections#unmodifiableSet(java.util.Set)\n@since 1.0" ]
private static List<Node> difference(List<Node> listA, List<Node> listB) { if(listA != null && listB != null) listA.removeAll(listB); return listA; }
[ "Computes A-B\n\n@param listA\n@param listB\n@return" ]
[ "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", "The main method. See the class documentation.", "Queries a Search Index and returns grouped results in a map where key\nof the map is the groupName. In case the query didnt use grouping,\nan empty map is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the grouped search query as a ordered {@code Map<String,T> }", "Returns the cost rate table index for this assignment.\n\n@return cost rate table index", "Recursively update parent task dates.\n\n@param parentTask parent task", "Obtain newline-delimited headers from method\n\n@param method HttpMethod to scan\n@return newline-delimited headers", "Returns a compact representation of all of the tags the task has.\n\n@param task The task to get tags on.\n@return Request object", "Use this API to fetch gslbservice resource of given name .", "Parses a String email address to an IMAP address string." ]
public synchronized Object next() throws NoSuchElementException { try { if (!isHasCalledCheck()) { hasNext(); } setHasCalledCheck(false); if (getHasNext()) { Object obj = getObjectFromResultSet(); m_current_row++; // Invoke events on PersistenceBrokerAware instances and listeners // set target object if (!disableLifeCycleEvents) { getAfterLookupEvent().setTarget(obj); getBroker().fireBrokerEvent(getAfterLookupEvent()); getAfterLookupEvent().setTarget(null); } return obj; } else { throw new NoSuchElementException("inner hasNext was false"); } } catch (ResourceClosedException ex) { autoReleaseDbResources(); throw ex; } catch (NoSuchElementException ex) { autoReleaseDbResources(); logger.error("Error while iterate ResultSet for query " + m_queryObject, ex); throw new NoSuchElementException("Could not obtain next object: " + ex.getMessage()); } }
[ "moves to the next row of the underlying ResultSet and returns the\ncorresponding Object materialized from this row." ]
[ "Set the model used by the left table.\n\n@param model table model", "Mark root of this task task group depends on the given task group's root.\nThis ensure this task group's root get picked for execution only after the completion\nof all tasks in the given group.\n\n@param dependencyTaskGroup the task group that this task group depends on", "Concatenate all the arrays in the list into a vector.\n\n@param arrays List of arrays.\n@return Vector.", "Starts advertising on Hyperbahn at a fixed interval.\n\n@return a future that resolves to the response of the first advertise request", "Set the html as value inside the tooltip.", "Process a single project.\n\n@param reader Primavera reader\n@param projectID required project ID\n@param outputFile output file name", "Read a single duration field extended attribute.\n\n@param row field data", "Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table.", "Use this API to fetch server_service_binding resources of given name ." ]
private String formatDate(Date date) { if (null == m_dateFormat) { m_dateFormat = DateFormat.getDateInstance( 0, OpenCms.getWorkplaceManager().getWorkplaceLocale(getCmsObject())); } return m_dateFormat.format(date); }
[ "Format the date for the status messages.\n\n@param date the date to format.\n\n@return the formatted date." ]
[ "Returns the item at the specified position.\n\n@param position index of the item to return\n@return the item at the specified position or {@code null} when not found", "Deletes the schema of an existing metadata template.\n\n@param api the API connection to be used\n@param scope the scope of the object\n@param template Unique identifier of the template", "We have obtained metadata for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this metadata\n@param data the metadata which we received", "Compute a singular-value decomposition of A.\n\n@return A DoubleMatrix[3] array of U, S, V such that A = U * diag(S) * V'", "Adds the dependencies typical for particular deployment types.\nThis is not accurate and doesn't cover the real needs of the project.\nBasically it's just to have \"something\" for the initial implementation.", "This method returns an array containing all of the unique identifiers\nfor which data has been stored in the Var2Data block.\n\n@return array of unique identifiers", "Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.", "Submits the configured assembly to Transloadit for processing.\n\n@param isResumable boolean value that tells the assembly whether or not to use tus.\n@return {@link AssemblyResponse} the response received from the Transloadit server.\n@throws RequestException if request to Transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma" ]
public static int getProfileIdFromPathID(int path_id) throws Exception { return (Integer) SQLService.getInstance().getFromTable(Constants.GENERIC_PROFILE_ID, Constants.GENERIC_ID, path_id, Constants.DB_TABLE_PATH); }
[ "Return the profileId for a path\n\n@param path_id ID of path\n@return ID of profile\n@throws Exception exception" ]
[ "Build all children.\n\n@return the child descriptions", "Do synchronization of the given J2EE ODMG Transaction", "Sets the specified boolean 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", "Record the duration of a get_all operation, along with how many values\nwere requested, how may were actually returned and the size of the values\nreturned.", "Returns new instance of OptionalString with given key and value\n@param key key of the returned OptionalString\n@param value wrapped string\n@return given object wrapped in OptionalString with given key", "Turn json string into map\n\n@param json\n@return", "Print a time value.\n\n@param value time value\n@return time value", "Computes the ratio of the smallest value to the largest. Does not assume\nthe array is sorted first\n@param sv array\n@return smallest / largest", "Processes the template for all procedures of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"" ]
public static Region fromName(String name) { if (name == null) { return null; } Region region = VALUES_BY_NAME.get(name.toLowerCase().replace(" ", "")); if (region != null) { return region; } else { return Region.create(name.toLowerCase().replace(" ", ""), name); } }
[ "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" ]
[ "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", "Set new particle coordinates somewhere off screen and apply new direction towards the screen\n\n@param position the particle position to apply new values to", "Retrieves a field type from a location in a data block.\n\n@param data data block\n@param offset offset into data block\n@return field type", "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>", "Establish connection to the ChromeCast device", "Calculates the smallest value between the three inputs.\n@param first value\n@param second value\n@param third value\n@return the smallest value between the three inputs", "Set the model used by the right table.\n\n@param model table model", "Returns the list of module dependencies regarding the provided filters\n\n@param moduleId String\n@param filters FiltersHolder\n@return List<Dependency>", "Updates the indices in the index buffer from a Java char array.\nAll of the entries of the input char array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if char array is wrong size" ]
public void storeIfNew(final DbArtifact fromClient) { final DbArtifact existing = repositoryHandler.getArtifact(fromClient.getGavc()); if(existing != null){ existing.setLicenses(fromClient.getLicenses()); store(existing); } if(existing == null){ store(fromClient); } }
[ "If the Artifact does not exist, it will add it to the database. Nothing if it already exit.\n\n@param fromClient DbArtifact" ]
[ "This method lists all tasks defined in the file.\n\n@param file MPX file", "If the status of a print job is not checked for a while, we assume that the user is no longer\ninterested in the report, and we cancel the job.\n\n@param printJob\n@return is the abandoned timeout exceeded?", "Register the ChangeHandler to become notified if the user changes the slider.\nThe Handler is called when the user releases the mouse only at the end of the slide\noperation.", "Reads a stringtemplate group from a stream.\n\nThis will always return a group (empty if necessary), even if reading it from the stream fails.\n\n@param stream the stream to read from\n@return the string template group", "Gets the element view.\n\n@return the element view", "Unilaterally merge an update description into this update description.\n@param otherDescription the update description to merge into this\n@return this merged update description", "Retrieves the real subject from the underlying RDBMS. Override this\nmethod if the object is to be materialized in a specific way.\n\n@return The real subject of the proxy", "This solution is based on an absolute path", "Print the given values after displaying the provided message." ]
private void reconnectFlows() { // create the reverse id map: for (Entry<Object, List<String>> entry : _outgoingFlows.entrySet()) { for (String flowId : entry.getValue()) { if (entry.getKey() instanceof SequenceFlow) { // if it is a sequence flow, we can tell its targets if (_idMap.get(flowId) instanceof FlowNode) { ((SequenceFlow) entry.getKey()).setTargetRef((FlowNode) _idMap.get(flowId)); } if (_idMap.get(flowId) instanceof Association) { ((Association) _idMap.get(flowId)).setTargetRef((SequenceFlow) entry.getKey()); } } else if (entry.getKey() instanceof Association) { ((Association) entry.getKey()).setTargetRef((BaseElement) _idMap.get(flowId)); } else { // if it is a node, we can map it to its outgoing sequence flows if (_idMap.get(flowId) instanceof SequenceFlow) { ((FlowNode) entry.getKey()).getOutgoing().add((SequenceFlow) _idMap.get(flowId)); } else if (_idMap.get(flowId) instanceof Association) { ((Association) _idMap.get(flowId)).setSourceRef((BaseElement) entry.getKey()); } } } } }
[ "Reconnect the sequence flows and the flow nodes.\nDone after the initial pass so that we have all the target information." ]
[ "Reads the configuration of a field facet.\n@param pathPrefix The XML Path that leads to the field facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.", "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", "Remove multiple fields from the map\n@param fields the fields to remove\n@return the number of fields removed", "This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file", "Generates a change event for a local deletion of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@return a change event for a local deletion of a document in the given namespace referring\nto the given document _id.", "Remove a server mapping from current profile by ID\n\n@param serverMappingId server mapping ID\n@return Collection of updated ServerRedirects", "Returns the local collection representing the given namespace.\n\n@param namespace the namespace referring to the local collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the local collection representing the given namespace.", "Print an extended attribute currency value.\n\n@param value currency value\n@return string representation", "Option check, forwards options to the standard doclet, if that one refuses them,\nthey are sent to UmlGraph" ]
public ItemRequest<Team> findById(String team) { String path = String.format("/teams/%s", team); return new ItemRequest<Team>(this, Team.class, path, "GET"); }
[ "Returns the full record for a single team.\n\n@param team Globally unique identifier for the team.\n@return Request object" ]
[ "Adds an additional description to the constructed document.\n\n@param text\nthe text of the description\n@param languageCode\nthe language code of the description\n@return builder object to continue construction", "Validate the consistency of patches to the point we rollback.\n\n@param patchID the patch id which gets rolled back\n@param identity the installed identity\n@throws PatchingException", "Find and return the appropriate setter method for field.\n\n@return Set method or null (or throws IllegalArgumentException) if none found.", "add a new producer, either synchronous or asynchronous, connecting\nto the specified broker\n\n@param broker broker to producer", "Computes the tree edit distance between trees t1 and t2.\n\n@param t1\n@param t2\n@return tree edit distance between trees t1 and t2", "Private function to allow looking for the field recursively up the superclasses.\n\n@param clazz\n@return", "Unlinks a set of dependencies from this task.\n\n@param task The task to remove dependencies from.\n@return Request object", "All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.", "Use this API to flush cachecontentgroup resources." ]
private boolean isSpecial(final char chr) { return ((chr == '.') || (chr == '?') || (chr == '*') || (chr == '^') || (chr == '$') || (chr == '+') || (chr == '[') || (chr == ']') || (chr == '(') || (chr == ')') || (chr == '|') || (chr == '\\') || (chr == '&')); }
[ "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." ]
[ "Initial random seed used for shuffling test suites and other sources\nof pseudo-randomness. If not set, any random value is set.\n\n<p>The seed's format is compatible with {@link RandomizedRunner} so that\nseed can be fixed for suites and methods alike.", "Converts a list of dates to a Json array with the long representation of the dates as strings.\n@param individualDates the list to convert.\n@return Json array with long values of dates as string", "Write project properties.\n\n@param record project properties\n@throws IOException", "Returns the Organization that produce this artifact or null if there is none\n\n@param dbArtifact DbArtifact\n@return DbOrganization", "Use this API to fetch dnsnsecrec resources of given names .", "Return the text content of the document. It does not containing trailing spaces and asterisks\nat the start of the line.", "Called by spring on initialization.", "Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given reference curve and an additional spread.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.\n@param referenceCurve The reference curve used for discounting the coupon payments.\n@param spread The spread which should be added to the discount curve.\n@param model The model under which the product is valued.\n@return The value of the bond for the given curve and spread.", "Finds the first Field with given field name in the Class and in its super classes.\n\n@param type The Class type\n@param fieldName The field name to get\n@return an {@code Optional}. Use isPresent() to find out if the field name was found." ]
protected boolean appendWhereStatement(StringBuilder sb, List<ArgumentHolder> argList, WhereOperation operation) throws SQLException { if (where == null) { return operation == WhereOperation.FIRST; } operation.appendBefore(sb); where.appendSql((addTableName ? getTableName() : null), sb, argList); operation.appendAfter(sb); return false; }
[ "Append the WHERE part of the statement to the StringBuilder." ]
[ "Sets the publish queue shutdown time.\n\n@param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code>", "Filter out interceptors and decorators which are also enabled globally.\n\n@param enabledClasses\n@param globallyEnabledClasses\n@param logMessageCallback\n@param deployment\n@return the filtered list", "Sets the delegate of the service, that gets notified of the\nstatus of message delivery.\n\nNote: This option has no effect when using non-blocking\nconnections.", "Determines whether the specified permission is permitted.\n\n@param permission\n@return <tt>false<tt> if the specified permission is not permitted, based on the current security policy; <tt>true<tt> otherwise", "Updates the text style according to a new text position\n@param bstyle the style to be updated\n@param text the text position", "Performs the conversion from standard XPath to xpath with parameterization support.", "Check invariant.\n\n@param browser The browser.\n@return Whether the condition is satisfied or <code>false</code> when it it isn't or a\n{@link CrawljaxException} occurs.", "gets the count of addresses that this address division grouping may represent\n\nIf this address division grouping is not a subnet block of multiple addresses or has no range of values, then there is only one such address.\n\n@return", "Obtains a Ethiopic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time" ]
public void removeLinks(ServiceReference<S> declarationBinderRef) { for (D declaration : linkerManagement.getMatchedDeclaration()) { if (declaration.getStatus().getServiceReferencesBounded().contains(declarationBinderRef)) { linkerManagement.unlink(declaration, declarationBinderRef); } } }
[ "Remove all the existing links of the DeclarationBinder.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder" ]
[ "Invokes a closure passing it a new Sql instance created from the given JDBC connection URL.\nThe created connection will be closed if required.\n\n@param url a database url of the form\n<code>jdbc:<em>subprotocol</em>:<em>subname</em></code>\n@param c the Closure to call\n@see #newInstance(String)\n@throws SQLException if a database access error occurs", "Handle interval change.\n@param event the change event.", "Helper to read an optional String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read.", "Normalizes elements in 'u' by dividing by max and computes the norm2 of the normalized\narray u. Adjust the sign of the returned value depending on the size of the first\nelement in 'u'. Normalization is done to avoid overflow.\n\n<pre>\nfor i=j:numRows\nu[i] = u[i] / max\ntau = tau + u[i]*u[i]\nend\ntau = sqrt(tau)\nif( u[j] &lt; 0 )\ntau = -tau;\n</pre>\n\n@param j Element in 'u' that it starts at.\n@param numRows Element in 'u' that it stops at.\n@param u Array\n@param max Max value in 'u' that is used to normalize it.\n@return norm2 of 'u'", "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", "Isn't there a method for this in GeoTools?\n\n@param crs\nCRS string in the form of 'EPSG:<srid>'.\n@return SRID as integer.", "Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.", "Appends a formatted line of code to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>", "Load the InstalledIdentity configuration based on the module.path\n\n@param installedImage the installed image\n@param productConfig the product config\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the available layers\n@throws IOException" ]
private static LogPriorType intToType(int intPrior) { LogPriorType[] values = LogPriorType.values(); for (LogPriorType val : values) { if (val.ordinal() == intPrior) { return val; } } throw new IllegalArgumentException(intPrior + " is not a legal LogPrior."); }
[ "why isn't this functionality in enum?" ]
[ "Create a local target.\n\n@param jbossHome the jboss home\n@param moduleRoots the module roots\n@param bundlesRoots the bundle roots\n@return the local target\n@throws IOException", "This method extracts assignment data from a Planner file.\n\n@param plannerProject Root node of the Planner file", "Reads each token from a single record and adds it to a list.\n\n@param tk tokenizer\n@param record list of tokens\n@throws IOException", "Calculates how much of a time range is before or after a\ntarget intersection point.\n\n@param start time range start\n@param end time range end\n@param target target intersection point\n@param after true if time after target required, false for time before\n@return length of time in milliseconds", "Populates default settings.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException", "Read relation data.", "Use this API to update clusterinstance resources.", "Retrieves list of inbox messages based on given userId\n@param userId String userid\n@return ArrayList of {@link CTMessageDAO}", "Checks the id value.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated" ]
private List<Row> join(List<Row> leftRows, String leftColumn, String rightTable, List<Row> rightRows, String rightColumn) { List<Row> result = new LinkedList<Row>(); RowComparator leftComparator = new RowComparator(new String[] { leftColumn }); RowComparator rightComparator = new RowComparator(new String[] { rightColumn }); Collections.sort(leftRows, leftComparator); Collections.sort(rightRows, rightComparator); ListIterator<Row> rightIterator = rightRows.listIterator(); Row rightRow = rightIterator.hasNext() ? rightIterator.next() : null; for (Row leftRow : leftRows) { Integer leftValue = leftRow.getInteger(leftColumn); boolean match = false; while (rightRow != null) { Integer rightValue = rightRow.getInteger(rightColumn); int comparison = leftValue.compareTo(rightValue); if (comparison == 0) { match = true; break; } if (comparison < 0) { if (rightIterator.hasPrevious()) { rightRow = rightIterator.previous(); } break; } rightRow = rightIterator.next(); } if (match && rightRow != null) { Map<String, Object> newMap = new HashMap<String, Object>(((MapRow) leftRow).getMap()); for (Entry<String, Object> entry : ((MapRow) rightRow).getMap().entrySet()) { String key = entry.getKey(); if (newMap.containsKey(key)) { key = rightTable + "." + key; } newMap.put(key, entry.getValue()); } result.add(new MapRow(newMap)); } } return result; }
[ "Very basic implementation of an inner join between two result sets.\n\n@param leftRows left result set\n@param leftColumn left foreign key column\n@param rightTable right table name\n@param rightRows right result set\n@param rightColumn right primary key column\n@return joined result set" ]
[ "Creates image stream request and returns it in JSON formatted string.\n\n@param name Name of the image stream\n@param insecure If the registry where the image is stored is insecure\n@param image Image name, includes registry information and tag\n@param version Image stream version.\n@return JSON formatted string", "Closes the connection to the dbserver. This instance can no longer be used after this action.", "Do the search, called as a \"page action\"", "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", "lookup a ClassDescriptor in the internal Hashtable\n@param strClassName a fully qualified class name as it is returned by Class.getName().", "Checks the given class descriptor for correct object cache setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "Add a LIKE clause so the column must mach the value using '%' patterns.", "Sets the matrix 'inv' equal to the inverse of the matrix that was decomposed.\n\n@param inv Where the value of the inverse will be stored. Modified.", "Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return" ]
public Integer getIdFromName(String profileName) { PreparedStatement query = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { query = sqlConnection.prepareStatement("SELECT * FROM " + Constants.DB_TABLE_PROFILE + " WHERE " + Constants.PROFILE_PROFILE_NAME + " = ?"); query.setString(1, profileName); results = query.executeQuery(); if (results.next()) { Object toReturn = results.getObject(Constants.GENERIC_ID); query.close(); return (Integer) toReturn; } query.close(); } catch (SQLException e) { e.printStackTrace(); } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (query != null) { query.close(); } } catch (Exception e) { } } return null; }
[ "Obtain the ID associated with a profile name\n\n@param profileName profile name\n@return ID of profile" ]
[ "I KNOW WHAT I AM DOING", "Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.", "Convert event type.\n\n@param eventType the event type\n@return the event enum type", "This method extracts byte arrays from the embedded object data\nand converts them into RTFEmbeddedObject instances, which\nit then adds to the supplied list.\n\n@param offset offset into the RTF document\n@param text RTF document\n@param objects destination for RTFEmbeddedObject instances\n@return new offset into the RTF document", "Set the attributes for this template.\n\n@param attributes the attribute map", "Checks if ranges contain the uid\n\n@param idRanges the id ranges\n@param uid the uid\n@return true, if ranges contain given uid", "Checks if class is on class path\n@param className of the class to check.\n@return true if class in on class path, false otherwise.", "Clones the cluster by constructing a new one with same name, partition\nlayout, and nodes.\n\n@param cluster\n@return clone of Cluster cluster.", "Use this API to fetch a cmpglobal_cmppolicy_binding resources." ]
protected void boot(final BootContext context) throws ConfigurationPersistenceException { List<ModelNode> bootOps = configurationPersister.load(); ModelNode op = registerModelControllerServiceInitializationBootStep(context); if (op != null) { bootOps.add(op); } boot(bootOps, false); finishBoot(); }
[ "Boot the controller. Called during service start.\n\n@param context the boot context\n@throws ConfigurationPersistenceException\nif the configuration failed to be loaded" ]
[ "creates a bounds object with both point parsed from the json and set it\nto the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException", "Returns a copy of the given document.\n@param document the document to copy.\n@return a copy of the given document.", "Print the visibility adornment of element e prefixed by\nany stereotypes", "Standard doclet entry point\n@param root\n@return", "remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.\n\nThe operation is performed in two steps - first all the files are moved to a backup folder, and afterwards backup folder is removed.\nIf an error occurs in the first step of the operation, all files are restored and the operation ends with status {@code false}.\nIf an error occurs in the second step, the operation ends with status {@code false}, but the files are not rolled back.\n\n@throws IOException if an error occurred", "Creates the parents of nested XML elements if necessary.\n@param xmlContent the XML content that is edited.\n@param xmlPath the path of the (nested) element, for which the parents should be created\n@param l the locale for which the XML content is edited.", "Return cached object by key. The key will be concatenated with\ncurrent session id when fetching the cached object\n\n@param key\n@param <T>\nthe object type\n@return the cached object", "Gets an iterable of all the assignments of this task.\n@param fields the fields to retrieve.\n@return an iterable containing info about all the assignments.", "Check whether the media seems to have changed since a saved version of it was used. We ignore changes in\nfree space because those probably just reflect history entries being added.\n\n@param originalMedia the media details when information about it was saved\n\n@return true if there have been detectable significant changes to the media since it was saved\n\n@throws IllegalArgumentException if the {@link #hashKey()} values of the media detail objects differ" ]
public static String plus(CharSequence left, Object value) { return left + DefaultGroovyMethods.toString(value); }
[ "Appends the String representation of the given operand to this CharSequence.\n\n@param left a CharSequence\n@param value any Object\n@return the original toString() of the CharSequence with the object appended\n@since 1.8.2" ]
[ "If the specified value is not greater than or equal to the specified minimum and\nless than or equal to the specified maximum, adjust it so that it is.\n@param value The value to check.\n@param min The minimum permitted value.\n@param max The maximum permitted value.\n@return {@code value} if it is between the specified limits, {@code min} if the value\nis too low, or {@code max} if the value is too high.\n@since 1.2", "Create a plan. The plan consists of batches. Each batch involves the\nmovement of no more than batchSize primary partitions. The movement of a\nsingle primary partition may require migration of other n-ary replicas,\nand potentially deletions. Migrating a primary or n-ary partition\nrequires migrating one partition-store for every store hosted at that\npartition.", "Checks the given class descriptor for correct object cache setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "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", "Schedules the task with a fixed delay period and an initialDelay period. This functions\nlike the normal java Timer.\n@param task\n@param initialDelay\n@param fixedDelay", "This method can be used by child classes to apply the configuration that is stored in config.", "Set the repeat type.\n\nIn the default {@linkplain GVRRepeatMode#ONCE run-once} mode, animations\nrun once, ignoring the {@linkplain #getRepeatCount() repeat count.} In\n{@linkplain GVRRepeatMode#PINGPONG ping pong} and\n{@linkplain GVRRepeatMode#REPEATED repeated} modes, animations do honor\nthe repeat count, which {@linkplain #DEFAULT_REPEAT_COUNT defaults} to 2.\n\n@param repeatMode\nOne of the {@link GVRRepeatMode} constants\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code repetitionType} is not one of the\n{@link GVRRepeatMode} constants", "Sets left and right padding for all cells in the table.\n@param padding new padding for left and right, ignored if smaller than 0\n@return this to allow chaining", "This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file" ]
public static String regexFindFirst(String pattern, String str) { return regexFindFirst(Pattern.compile(pattern), str, 1); }
[ "Gets the first group of a regex\n@param pattern Pattern\n@param str String to find\n@return the matching group" ]
[ "Populate the authenticated user profiles in the Shiro subject.\n\n@param profiles the linked hashmap of profiles", "returns a sorted array of constructors", "Sets an Integer attribute.\n\n@param key the key, non null.\n@param value the value\n@return the Builder, for chaining.", "Specify the Artifact for which the condition should search for.\n\n@param artifact\n@return", "Returns a resource wrapper created from the input.\n\nThe wrapped result of {@link #convertRawResource(CmsObject, Object)} is returned.\n\n@param cms the current OpenCms user context\n@param input the input to create a resource from\n\n@return a resource wrapper created from the given Object\n\n@throws CmsException in case of errors accessing the OpenCms VFS for reading the resource", "Returns the parsed story from the given text\n\n@param configuration the Configuration used to run story\n@param storyAsText the story text\n@param storyId the story Id, which will be returned as story path\n@return The parsed Story", "Specifies the timeout for a network request.\n\n@param timeout The timeout for a network request.\n@param unit The time unit of the specified timeout.\n@return This builder instance.", "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.", "Handle a simple ping request.\n\n@param channel the channel\n@param header the protocol header\n@throws IOException for any error" ]
protected Map<String, AbstractServer> createServices(ServerSetup[] config, Managers mgr) { Map<String, AbstractServer> srvc = new HashMap<>(); for (ServerSetup setup : config) { if (srvc.containsKey(setup.getProtocol())) { throw new IllegalArgumentException("Server '" + setup.getProtocol() + "' was found at least twice in the array"); } final String protocol = setup.getProtocol(); if (protocol.startsWith(ServerSetup.PROTOCOL_SMTP)) { srvc.put(protocol, new SmtpServer(setup, mgr)); } else if (protocol.startsWith(ServerSetup.PROTOCOL_POP3)) { srvc.put(protocol, new Pop3Server(setup, mgr)); } else if (protocol.startsWith(ServerSetup.PROTOCOL_IMAP)) { srvc.put(protocol, new ImapServer(setup, mgr)); } } return srvc; }
[ "Create the required services according to the server setup\n\n@param config Service configuration\n@return Services map" ]
[ "Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader.", "Sanity check precondition for above setters", "Replace known tags in the current data values with actual values as appropriate\n\n@param cr a reference to DataPipe from which to read the current map", "Ask the specified player for the specified waveform detail from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform detail\n\n@return the waveform detail, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running", "Method used to extract data from the block of properties and\ninsert the key value pair into a map.\n\n@param data block of property data\n@param previousItemOffset previous offset\n@param previousItemKey item key\n@param itemOffset current item offset", "Get a property as a boolean or null.\n\n@param key the property name", "Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance", "Get a random sample of k out of n elements.\n\nSee Algorithm S, D. E. Knuth, The Art of Computer Programming, Vol. 2, p.142.", "Retrieve the effective calendar for this task. If the task does not have\na specific calendar associated with it, fall back to using the default calendar\nfor the project.\n\n@return ProjectCalendar instance" ]
private void processFileType(String token) throws MPXJException { String version = token.substring(2).split(" ")[0]; //System.out.println(version); Class<? extends AbstractFileFormat> fileFormatClass = FILE_VERSION_MAP.get(Integer.valueOf(version)); if (fileFormatClass == null) { throw new MPXJException("Unsupported PP file format version " + version); } try { AbstractFileFormat format = fileFormatClass.newInstance(); m_tableDefinitions = format.tableDefinitions(); m_epochDateFormat = format.epochDateFormat(); } catch (Exception ex) { throw new MPXJException("Failed to configure file format", ex); } }
[ "Reads the file version and configures the expected file format.\n\n@param token token containing the file version\n@throws MPXJException" ]
[ "Extract note text.\n\n@param row task data\n@return note text", "Returns all the pixels for the image\n\n@return an array of pixels for this image", "Delivers the correct JSON Object for the Stencilset\n\n@param stencilSet\n@throws org.json.JSONException", "map a property id. Property id can only be an Integer or String", "Resets the handler data to a basic state.", "Remove a tag from a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param tagId\nThe tag ID\n@throws FlickrException", "Function to delete the specified store from Metadata store. This involves\n\n1. Remove entry from the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeName specifies name of the store to be deleted.", "Use this API to fetch all the dnspolicylabel resources that are configured on netscaler.", "Process the hours and exceptions for an individual calendar.\n\n@param calendar project calendar\n@param calendarData hours and exception rows for this calendar" ]
private String quoteFormatCharacters(String literal) { StringBuilder sb = new StringBuilder(); int length = literal.length(); char c; for (int loop = 0; loop < length; loop++) { c = literal.charAt(loop); switch (c) { case '0': case '#': case '.': case '-': case ',': case 'E': case ';': case '%': { sb.append("'"); sb.append(c); sb.append("'"); break; } default: { sb.append(c); break; } } } return (sb.toString()); }
[ "This method is used to quote any special characters that appear in\nliteral text that is required as part of the currency format.\n\n@param literal Literal text\n@return literal text with special characters in quotes" ]
[ "Use this API to unset the properties of systemuser resources.\nProperties that need to be unset are specified in args array.", "Retrieves the members of the given type.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the Members attribute\n@param paramValue The feature to be added to the Members attribute\n@throws XDocletException If an error occurs", "Removes the specified list of users from following the project, this will not affect project membership status.\nReturns the updated project record.\n\n@param project The project to remove followers from.\n@return Request object", "Adds an additional description to the constructed document.\n\n@param text\nthe text of the description\n@param languageCode\nthe language code of the description\n@return builder object to continue construction", "Look for the closing parenthesis corresponding to the one at position\nrepresented by the opening index.\n\n@param text input expression\n@param opening opening parenthesis index\n@return closing parenthesis index", "Helper function to return the minimum size of the index space to be passed to the reduction given the input and\noutput tensors", "Set the model used by the left table.\n\n@param model table model", "Add statistics about sent emails.\n\n@param recipients The list of recipients.\n@param storageUsed If a remote storage was used.", "Use this API to delete cacheselector of given name." ]
public static Chart getMSDLineWithFreeModelChart(Trajectory t, int lagMin, int lagMax, double timelag, double diffusionCoefficient, double intercept) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; double[] modelData = new double[lagMax - lagMin + 1]; MeanSquaredDisplacmentFeature msdeval = new MeanSquaredDisplacmentFeature( t, lagMin); msdeval.setTrajectory(t); msdeval.setTimelag(lagMin); for (int i = lagMin; i < lagMax + 1; i++) { msdeval.setTimelag(i); double msdhelp = msdeval.evaluate()[0]; xData[i - lagMin] = i; yData[i - lagMin] = msdhelp; modelData[i - lagMin] = intercept + 4*diffusionCoefficient*(i*timelag);//4 * D * Math.pow(i * timelag, a); } // Create Chart Chart chart = QuickChart.getChart("MSD Line", "LAG", "MSD", "MSD", xData, yData); chart.addSeries("y=4*D*t + a", xData, modelData); // Show it //new SwingWrapper(chart).displayChart(); return chart; }
[ "Plots the MSD curve with the trajectory t and adds the fitted model for free diffusion.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param diffusionCoefficient Diffusion coefficient\n@param intercept" ]
[ "Function to update store definitions. Unlike the put method, this\nfunction does not delete any existing state. It only updates the state of\nthe stores specified in the given stores.xml\n\n@param valueBytes specifies the bytes of the stores.xml containing\nupdates for the specified stores", "Use this API to fetch all the aaaparameter resources that are configured on netscaler.", "Determines if this connection's access token has expired and needs to be refreshed.\n@return true if the access token needs to be refreshed; otherwise false.", "Calculate a shift value that can be used to create a power-of-two value between\nthe specified maximum and minimum values.\n@param minimumValue the minimum value\n@param maximumValue the maximum value\n@return the calculated shift (use {@code 1 << shift} to obtain a value)", "Utility function to find the first index of a value in a\nListBox.", "Arrange to become the tempo master. Starts a sequence of interactions with the other players that should end\nup with us in charge of the group tempo and beat alignment.\n\n@throws IllegalStateException if we are not sending status updates\n@throws IOException if there is a problem sending the master yield request", "Checks the given class descriptor for correct row-reader setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "Validates that this string is a valid host name or IP address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws HostNameException", "Executes the sequence of operations" ]
private double sumSquaredDiffs() { double mean = getArithmeticMean(); double squaredDiffs = 0; for (int i = 0; i < getSize(); i++) { double diff = mean - dataSet[i]; squaredDiffs += (diff * diff); } return squaredDiffs; }
[ "Helper method for variance calculations.\n@return The sum of the squares of the differences between\neach value and the arithmetic mean.\n@throws EmptyDataSetException If the data set is empty." ]
[ "Adds a qualifier with the given property and value to the constructed\nstatement.\n\n@param propertyIdValue\nthe property of the qualifier\n@param value\nthe value of the qualifier\n@return builder object to continue construction", "Read a single field alias from an extended attribute.\n\n@param attribute extended attribute", "Retrieve the default mapping between MPXJ task fields and Primavera wbs field names.\n\n@return mapping", "Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived", "Notifies all registered BufferChangeLogger instances of a change.\n\n@param newData the buffer that contains the new data being added\n@param numChars the number of valid characters in the buffer", "Read the given number of bytes into a long\n\n@param bytes The byte array to read from\n@param offset The offset at which to begin reading\n@param numBytes The number of bytes to read\n@return The long value read", "Convenience wrapper for message parameters\n@param params\n@return", "Get an active operation.\n\n@param header the request header\n@return the active operation, {@code null} if if there is no registered operation", "Use this API to fetch gslbvserver_spilloverpolicy_binding resources of given name ." ]
public static base_response add(nitro_service client, nsacl6 resource) throws Exception { nsacl6 addresource = new nsacl6(); addresource.acl6name = resource.acl6name; addresource.acl6action = resource.acl6action; addresource.td = resource.td; addresource.srcipv6 = resource.srcipv6; addresource.srcipop = resource.srcipop; addresource.srcipv6val = resource.srcipv6val; addresource.srcport = resource.srcport; addresource.srcportop = resource.srcportop; addresource.srcportval = resource.srcportval; addresource.destipv6 = resource.destipv6; addresource.destipop = resource.destipop; addresource.destipv6val = resource.destipv6val; addresource.destport = resource.destport; addresource.destportop = resource.destportop; addresource.destportval = resource.destportval; addresource.ttl = resource.ttl; addresource.srcmac = resource.srcmac; addresource.protocol = resource.protocol; addresource.protocolnumber = resource.protocolnumber; addresource.vlan = resource.vlan; addresource.Interface = resource.Interface; addresource.established = resource.established; addresource.icmptype = resource.icmptype; addresource.icmpcode = resource.icmpcode; addresource.priority = resource.priority; addresource.state = resource.state; return addresource.add_resource(client); }
[ "Use this API to add nsacl6." ]
[ "Extract data for a single predecessor.\n\n@param task parent task\n@param row Synchro predecessor data", "Locates a task within a child task container which matches the supplied UUID.\n\n@param parent child task container\n@param uuid required UUID\n@return Task instance or null if the task is not found", "Scans a single class for Swagger annotations - does not invoke ReaderListeners", "Gets a first data set value.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation", "Obtains a International Fixed local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed local date-time, not null\n@throws DateTimeException if unable to create the date-time", "get the last segment at the moment\n\n@return the last segment", "Validate that the configuration is valid.\n\n@return any validation errors.", "Should be called after new data is inserted. Will be automatically called, when the view dimensions\nhas changed.\n\nCalculates the start- and end-angles for every PieSlice.", "Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string" ]
public static Shell createSubshell(String pathElement, Shell parent, String appName, Object mainHandler, MultiMap<String, Object> auxHandlers) { List<String> newPath = new ArrayList<String>(parent.getPath()); newPath.add(pathElement); Shell subshell = new Shell(parent.getSettings().createWithAddedAuxHandlers(auxHandlers), new CommandTable(parent.getCommandTable().getNamer()), newPath); subshell.setAppName(appName); subshell.addMainHandler(subshell, "!"); subshell.addMainHandler(new HelpCommandHandler(), "?"); subshell.addMainHandler(mainHandler, ""); return subshell; }
[ "Facade method facilitating the creation of subshell.\nSubshell is created and run inside Command method and shares the same IO and naming strategy.\n\nRun the obtained Shell with commandLoop().\n\n@param pathElement sub-prompt\n@param parent Shell to be subshell'd\n@param appName The app name string\n@param mainHandler Command handler\n@param auxHandlers Aux handlers to be passed to all subshells.\n@return subshell" ]
[ "When the descriptor was added while editing, but the change was not saved, it has to be removed\nwhen the editor is closed.\n@throws CmsException thrown when deleting the descriptor resource fails", "Set a colspan in a group of columns. First add the cols to the report\n\n@param colNumber the index of the col\n@param colQuantity the number of cols how i will take\n@param colspanTitle colspan title\n@return a Dynamic Report Builder\n@throws ColumnBuilderException When the index of the cols is out of\nbounds.", "This method recursively descends the directory structure, dumping\ndetails of any files it finds to the output file.\n\n@param pw Output PrintWriter\n@param dir DirectoryEntry to dump\n@param prefix prefix used to identify path to this object\n@param showData flag indicating if data is dumped, or just structure\n@param hex set to true if hex output is required\n@param indent indent used if displaying structure only\n@throws Exception Thrown on file read errors", "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", "Update a variable name with a date if the variable is detected as being a date.\n\n@param variableName the variable name.\n@param date the date to replace the value with if the variable is a date variable.", "Sets the stream for a resource.\nThis function allows you to provide a stream that is already open to\nan existing resource. It will throw an exception if that resource\nalready has an open stream.\n@param s InputStream currently open stream to use for I/O.", "Selects the single element of the collection for which the provided OQL query\npredicate is true.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return The element that evaluates to true for the predicate. If no element\nevaluates to true, null is returned.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "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.", "Delivers the correct JSON Object for properties\n\n@param properties\n@throws org.json.JSONException" ]
public void addRequiredBundles(Set<String> bundles) { // TODO manage transitive dependencies // don't require self Set<String> bundlesToMerge; String bundleName = (String) getMainAttributes().get(BUNDLE_SYMBOLIC_NAME); if (bundleName != null) { int idx = bundleName.indexOf(';'); if (idx >= 0) { bundleName = bundleName.substring(0, idx); } } if (bundleName != null && bundles.contains(bundleName) || projectName != null && bundles.contains(projectName)) { bundlesToMerge = new LinkedHashSet<String>(bundles); bundlesToMerge.remove(bundleName); bundlesToMerge.remove(projectName); } else { bundlesToMerge = bundles; } String s = (String) getMainAttributes().get(REQUIRE_BUNDLE); Wrapper<Boolean> modified = Wrapper.wrap(this.modified); String result = mergeIntoCommaSeparatedList(s, bundlesToMerge, modified, lineDelimiter); this.modified = modified.get(); getMainAttributes().put(REQUIRE_BUNDLE, result); }
[ "adds the qualified names to the require-bundle attribute, if not already\npresent.\n\n@param bundles - passing parameterized bundled (e.g. versions, etc.) is\nnot supported" ]
[ "Get a reader implementation class to perform API calls with while specifying\nan explicit page size for paginated API calls. This gets translated to a per_page=\nparameter on API requests. Note that Canvas does not guarantee it will honor this page size request.\nThere is an explicit maximum page size on the server side which could change. The default page size\nis 10 which can be limiting when, for example, trying to get all users in a 800 person course.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param paginationPageSize Requested pagination page size\n@param <T> The reader type to request an instance of\n@return An instance of the requested reader class", "Locks the bundle file that contains the translation for the provided locale.\n@param l the locale for which the bundle file should be locked.\n@throws CmsException thrown if locking fails.", "Sets the action label to be displayed, if any. Note that if this is not set, the action\nbutton will not be displayed\n\n@param actionButtonLabel\n@return", "Add the given pair into the map.\n\n<p>\nIf the pair key already exists in the map, its value is replaced\nby the value in the pair, and the old value in the map is returned.\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 entry the entry (key, value) to add into the map.\n@return the value previously associated to the key, or <code>null</code>\nif the key was not present in the map before the addition.\n@since 2.15", "Restores a saved connection state into this BoxAPIConnection.\n\n@see #save\n@param state the saved state that was created with {@link #save}.", "Check that a list allowing null and empty item contains at least one element that is\nnot blank.\n@param list can't be null\n@return", "Gets the logger.\n\n@return Returns a Category", "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", "A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged\n\nWhen using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.\n\nA custom field's `type` cannot be updated.\n\nAn enum custom field's `enum_options` cannot be updated with this endpoint. Instead see \"Work With Enum Options\" for information on how to update `enum_options`.\n\nReturns the complete updated custom field record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object" ]
private MavenProjectModel getMavenStubProject(MavenProjectService mavenProjectService, String groupId, String artifactId, String version) { Iterable<MavenProjectModel> mavenProjectModels = mavenProjectService.findByGroupArtifactVersion(groupId, artifactId, version); if (!mavenProjectModels.iterator().hasNext()) { return null; } for (MavenProjectModel mavenProjectModel : mavenProjectModels) { if (mavenProjectModel.getRootFileModel() == null) { // this is a stub... we can fill it in with details return mavenProjectModel; } } return null; }
[ "A Maven stub is a Maven Project for which we have found information, but the project has not yet been located\nwithin the input application. If we have found an application of the same GAV within the input app, we should\nfill out this stub instead of creating a new one." ]
[ "Adds a basic LHS OPERATOR RHS block.\n\n@param list parent criteria list\n@param block current block", "returns true if a job was queued within a timeout", "Builds the table for the database results.\n\n@param results the database results\n@return the table", "Read resource assignment baseline values.\n\n@param row result set row", "Get the bytes which represent the payload of this field, without the leading type tag and length header, as\na newly-allocated byte array.\n\n@return a new byte array containing a copy of the bytes this field contains", "Validates an operation against its description provider\n\n@param operation The operation to validate\n@throws IllegalArgumentException if the operation is not valid", "Adds the specified serie column to the dataset with custom label expression.\n\n@param column the serie column\n@param labelExpression column the custom label expression", "Searches for pairs of parentheses and processes blocks inside of them. Embedded parentheses are handled\nwith no problem. On output only a single token should be in tokens.\n@param tokens List of parsed tokens\n@param sequence Sequence of operators", "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" ]
public boolean destroyDependentInstance(T instance) { synchronized (dependentInstances) { for (Iterator<ContextualInstance<?>> iterator = dependentInstances.iterator(); iterator.hasNext();) { ContextualInstance<?> contextualInstance = iterator.next(); if (contextualInstance.getInstance() == instance) { iterator.remove(); destroy(contextualInstance); return true; } } } return false; }
[ "Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise" ]
[ "Uninstall current location collection client.\n\n@return true if uninstall was successful", "Map message info.\n\n@param messageInfoType the message info type\n@return the message info", "Filter on a search term. Can be course name, code or full ID. Must be at least 3 characters\n@param searchTerm Search term to filter by\n@return This object to allow adding more options", "Returns the dimensions for the video\n@param videoFile Video file\n@return the dimensions\n@throws IOException", "Iterates over the contents of an object or collection, and checks whether a\npredicate is valid for at least one element.\n\n@param self the object over which we iterate\n@param closure the closure predicate used for matching\n@return true if any iteration for the object matches the closure predicate\n@since 1.0", "Find the earliest start time of the specified methods.\n@param methods A list of test methods.\n@return The earliest start time.", "Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@param value\n@return ISO 8601 value (String)", "Consumes a produced result. Calls every transformer in sequence, then\ncalls every dataWriter in sequence.\n\n@param initialVars a map containing the initial variables assignments\n@return the number of lines written", "Get maximum gray value in the image.\n\n@param fastBitmap Image to be processed.\n@param startX Initial X axis coordinate.\n@param startY Initial Y axis coordinate.\n@param width Width.\n@param height Height.\n@return Maximum gray." ]
public static base_response Force(nitro_service client, hafailover resource) throws Exception { hafailover Forceresource = new hafailover(); Forceresource.force = resource.force; return Forceresource.perform_operation(client,"Force"); }
[ "Use this API to Force hafailover." ]
[ "Deploys application reading resources from specified classpath location\n\n@param applicationName to configure in cluster\n@param classpathLocations where resources are read\n@throws IOException", "Creates a new RgbaColor from the specified HSL components.\n\n<p>\n<i>Implementation based on <a\nhref=\"http://en.wikipedia.org/wiki/HSL_and_HSV\">wikipedia</a>\nand <a\nhref=\"http://www.w3.org/TR/css3-color/#hsl-color\">w3c</a></i>\n\n@param H\nHue [0,360)\n@param S\nSaturation [0,100]\n@param L\nLightness [0,100]", "Transforms an input file into HTML.\n\n@param file\nThe File to process.\n@param safeMode\nSet to <code>true</code> to escape unsafe HTML tags.\n@return The processed String.\n@throws IOException\nif an IO error occurs\n@see Configuration#DEFAULT", "Use this API to fetch aaagroup_aaauser_binding resources of given name .", "Initialize the field factories for the messages table.", "Indicates if this file represents a file on the underlying file system.\n\n@param filePath\n@return", "Calculate the value of a swaption assuming the Black'76 model.\n\n@param forwardSwaprate The forward (spot)\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity.\n@param optionStrike The option strike.\n@param swapAnnuity The swap annuity corresponding to the underlying swap.\n@return Returns the value of a Swaption under the Black'76 model", "legacy helper for setting background", "Saves the current translations from the container to the respective localization." ]
protected AbstractElement getEnclosingSingleElementGroup(AbstractElement elementToParse) { EObject container = elementToParse.eContainer(); if (container instanceof Group) { if (((Group) container).getElements().size() == 1) { return (AbstractElement) container; } } return null; }
[ "Return the containing group if it contains exactly one element.\n\n@since 2.14" ]
[ "Return the version string of this instance of finmath-lib.\n\n@return The version string of this instance of finmath-lib.", "Lift a Java Func3 to a Scala Function3\n\n@param f the function to lift\n\n@returns the Scala function", "Load the windows resize handler with initial view port detection.", "Executes the sequence of operations", "Write back to hints file.", "Classify stdin by senteces seperated by blank line\n@param readerWriter\n@return\n@throws IOException", "Gets the value of the project 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 project property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetProject().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ProjectListType.Project }", "Checks if the dependency server is available\n\n@return true if the server is reachable, false otherwise", "Use this API to fetch a appfwglobal_auditsyslogpolicy_binding resources." ]
public Widget addControl(String name, int resId, Widget.OnTouchListener listener, int position) { Widget control = findChildByName(name); if (control == null) { control = createControlWidget(resId, name, null); } setupControl(name, control, listener, position); return control; }
[ "Add new control at the control bar with specified touch listener, resource and position.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener\n@param position control position in the bar" ]
[ "Pops the top event off the current event stack. This action has to be\nperformed immediately after the event has been dispatched to all\nlisteners.\n\n@param <L> Type of the listener.\n@param expected The Event which is expected at the top of the stack.\n@see #pushEvent(Event)", "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", "Evaluates the filter, returns true if the supplied Task or Resource\ninstance matches the filter criteria.\n\n@param container Task or Resource instance\n@param promptValues respose to prompts\n@return boolean flag", "Overridden to ensure that our timestamp handling is as expected", "Computes the final list of versions to be stored, on top of what is\ncurrently being stored. Final list is valuesInStorage modified in place\n\n\n@param valuesInStorage list of versions currently in storage\n@param multiPutValues list of new versions being written to storage\n@return list of versions from multiPutVals that were rejected as obsolete", "Provisions a new user in an enterprise with additional user information.\n@param api the API connection to be used by the created user.\n@param login the email address the user will use to login.\n@param name the name of the user.\n@param params additional user information.\n@return the created user's info.", "Specify the class represented by this `ClassNode` is annotated\nby an annotation class specified by the name\n@param name the name of the annotation class\n@return this `ClassNode` instance", "Should the URI explicitly not be cached.\n\n@param requestUri request URI\n@return true when caching is prohibited", "Use this API to fetch all the transformpolicylabel resources that are configured on netscaler." ]
public static final String printTaskType(TaskType value) { return (Integer.toString(value == null ? TaskType.FIXED_UNITS.getValue() : value.getValue())); }
[ "Print a task type.\n\n@param value TaskType instance\n@return task type value" ]
[ "Called to execute this action.\n@param actionEvent", "Returns a list with argument words that are not equal in all cases", "Searches the model for all variable assignments and makes a default map of those variables, setting them to \"\"\n\n@return the default variable assignment map", "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", "Use this API to fetch servicegroupbindings resource of given name .", "Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator", "Deletes an entity by its primary key.\n\n@param id\nPrimary key of the entity.", "Convert maturity given as offset in months to year fraction.\n\n@param maturityInMonths The maturity as offset in months.\n@return The maturity as year fraction.", "Returns the complete definition of a custom field's metadata.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object" ]
public static Object findResult(Object self, Object defaultResult, Closure closure) { Object result = findResult(self, closure); if (result == null) return defaultResult; return result; }
[ "Treats the object as iterable, iterating through the values it represents and returns the first non-null result obtained from calling the closure, otherwise returns the defaultResult.\n\n@param self an Object with an iterator returning its values\n@param defaultResult an Object that should be returned if all closure results are null\n@param closure a closure that returns a non-null value when processing should stop\n@return the first non-null result of the closure, otherwise the default value\n@since 1.7.5" ]
[ "Get a property as a double or throw an exception.\n\n@param key the property name", "Create a Count-Query for QueryBySQL\n\n@param aQuery\n@return The count query", "Serialize a content into a targeted file, checking that the parent directory exists.\n\n@param folder File\n@param content String\n@param fileName String", "Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record", "Gets any app users that has an exact match with the externalAppUserId term.\n@param api the API connection to be used when retrieving the users.\n@param externalAppUserId the external app user id that has been set for app user\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing users matching the given email", "Start a task. The id is needed to end the task\n\n@param id\n@param taskName", "This is private. It is a helper function for the utils.", "Use this API to fetch vpnclientlessaccesspolicy resource of given name .", "Use this API to fetch lbvserver_scpolicy_binding resources of given name ." ]
public static final String vertexAsString(Vertex vertex, int depth, String withEdgesOfLabel) { StringBuilder sb = new StringBuilder(); vertexAsString(vertex, depth, withEdgesOfLabel, sb, 0, new HashSet<>()); return sb.toString(); }
[ "Formats a vertex using it's properties. Debugging purposes." ]
[ "a specialized version of solve that avoid additional checks that are not needed.", "Convert an Object to a Time.", "The full path of a jrxml file, or the path in the classpath of a jrxml\nresource.\n\n@param path\n@return", "Add image in the document.\n\n@param context\nPDF context\n@param imageResult\nimage\n@throws BadElementException\nPDF construction problem\n@throws IOException\nPDF construction problem", "Creates the default editor state for editing a bundle with descriptor.\n@return the default editor state for editing a bundle with descriptor.", "Append the data of another lattice to this lattice. If the other lattice follows a different quoting convention, it is automatically converted.\nHowever, this method does not check, whether the two lattices are aligned in terms of reference date, curve names and meta schedules.\nIf the two lattices have shared data points, the data from this lattice will be overwritten.\n\n@param other The lattice containing the data to be appended.\n@param model The model to use for context, in case the other lattice follows a different convention.\n\n@return The lattice with the combined swaption entries.", "This method is called to format a time value.\n\n@param value time value\n@return formatted time value", "Use this API to update nspbr6 resources.", "Convert weekly recurrence days into a bit field.\n\n@param task recurring task\n@return bit field as a string" ]
public void addCollaborator(String appName, String collaborator) { connection.execute(new SharingAdd(appName, collaborator), apiKey); }
[ "Add a collaborator to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param collaborator Username of the collaborator to add. This is usually in the form of \"[email protected]\"." ]
[ "Returns the value of the identified field as an Integer.\n@param fieldName the name of the field\n@return the value of the field as an Integer\n@throws FqlException if the field cannot be expressed as an Integer", "Examine the given model node, resolving any expressions found within, including within child nodes.\n\n@param node the node\n@return a node with all expressions resolved\n@throws OperationFailedException if an expression cannot be resolved", "Sets left and right padding for all cells in the table.\n@param padding new padding for left and right, ignored if smaller than 0\n@return this to allow chaining", "When using a map rotation, there might be tiles that are outside the rotated map area. To avoid to load\nthese tiles, this method checks if a tile is really required to draw the map.", "Use this API to update protocolhttpband.", "Use this API to fetch appfwpolicylabel_binding resource of given name .", "Use this API to fetch all the sslpolicylabel resources that are configured on netscaler.", "Mutate the gradient.\n@param amount the amount in the range zero to one", "Use this API to add vpnclientlessaccesspolicy." ]
public @Nullable ChangeEvent<BsonDocument> getUnprocessedEventForDocumentId( final MongoNamespace namespace, final BsonValue documentId ) { this.instanceLock.readLock().lock(); final NamespaceChangeStreamListener streamer; try { streamer = nsStreamers.get(namespace); } finally { this.instanceLock.readLock().unlock(); } if (streamer == null) { return null; } return streamer.getUnprocessedEventForDocumentId(documentId); }
[ "If there is an unprocessed change event for a particular document ID, fetch it from the\nappropriate namespace change stream listener, and remove it. By reading the event here, we are\nassuming it will be processed by the consumer.\n\n@return the latest unprocessed change event for the given document ID and namespace, or null\nif none exists." ]
[ "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", "Decomposes the provided matrix and stores the result in the same matrix.\n\n@param A Matrix that is to be decomposed. Modified.\n@return If it succeeded or not.", "disables the responses for a given pathname and user id\n\n@param model\n@param path_id\n@param clientUUID\n@return\n@throws Exception", "Queues a job for execution in specified time.\n\n@param job the job.\n@param millis execute the job in this time.", "Check if the provided manifestPath is correct.\nSet the manifest and imagePath in case of the correct manifest.\n@param manifestPath\n@param candidateImagePath\n@param dependenciesClient\n@param listener\n@return true if found the correct manifest\n@throws IOException", "Returns an array of all declared fields in the given class and all\nsuper-classes.", "Old REST client uses new REST service", "Stop Redwood, closing all tracks and prohibiting future log messages.", "Creates custom Http Client connection pool to be used by Http Client\n\n@return {@link PoolingHttpClientConnectionManager}" ]
private void rebalanceStore(String storeName, final AdminClient adminClient, RebalanceTaskInfo stealInfo, boolean isReadOnlyStore) { // Move partitions if (stealInfo.getPartitionIds(storeName) != null && stealInfo.getPartitionIds(storeName).size() > 0) { logger.info(getHeader(stealInfo) + "Starting partitions migration for store " + storeName + " from donor node " + stealInfo.getDonorId()); int asyncId = adminClient.storeMntOps.migratePartitions(stealInfo.getDonorId(), metadataStore.getNodeId(), storeName, stealInfo.getPartitionIds(storeName), null, stealInfo.getInitialCluster()); rebalanceStatusList.add(asyncId); if(logger.isDebugEnabled()) { logger.debug(getHeader(stealInfo) + "Waiting for completion for " + storeName + " with async id " + asyncId); } adminClient.rpcOps.waitForCompletion(metadataStore.getNodeId(), asyncId, voldemortConfig.getRebalancingTimeoutSec(), TimeUnit.SECONDS, getStatus()); rebalanceStatusList.remove((Object) asyncId); logger.info(getHeader(stealInfo) + "Completed partition migration for store " + storeName + " from donor node " + stealInfo.getDonorId()); } logger.info(getHeader(stealInfo) + "Finished all migration for store " + storeName); }
[ "Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store" ]
[ "Sets name, status, start time and title to specified step\n\n@param step which will be changed", "Use this API to fetch statistics of appfwpolicy_stats resource of given name .", "Read metadata by populating an instance of the target class\nusing SAXParser.", "Creates the udpClient with proper handler.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception", "Gets fully-qualified name of a table or sequence.\n\n@param localName local table name.\n@param params params.\n@return fully-qualified table name.", "Get the TagsInterface for working with Flickr Tags.\n\n@return The TagsInterface", "Used internally to find the solution to a single column vector.", "Curries a function that takes one argument.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a function that takes no arguments. Never <code>null</code>.", "Processes the original class rather than the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"" ]
public static void main(String[] args) throws Exception { StringUtils.printErrInvocationString("CMMClassifier", args); Properties props = StringUtils.argsToProperties(args); CMMClassifier cmm = new CMMClassifier<CoreLabel>(props); String testFile = cmm.flags.testFile; String textFile = cmm.flags.textFile; String loadPath = cmm.flags.loadClassifier; String serializeTo = cmm.flags.serializeTo; // cmm.crossValidateTrainAndTest(trainFile); if (loadPath != null) { cmm.loadClassifierNoExceptions(loadPath, props); } else if (cmm.flags.loadJarClassifier != null) { cmm.loadJarClassifier(cmm.flags.loadJarClassifier, props); } else if (cmm.flags.trainFile != null) { if (cmm.flags.biasedTrainFile != null) { cmm.trainSemiSup(); } else { cmm.train(); } } else { cmm.loadDefaultClassifier(); } if (serializeTo != null) { cmm.serializeClassifier(serializeTo); } if (testFile != null) { cmm.classifyAndWriteAnswers(testFile, cmm.makeReaderAndWriter()); } else if (cmm.flags.testFiles != null) { cmm.classifyAndWriteAnswers(cmm.flags.baseTestDir, cmm.flags.testFiles, cmm.makeReaderAndWriter()); } if (textFile != null) { DocumentReaderAndWriter readerAndWriter = new PlainTextDocumentReaderAndWriter(); cmm.classifyAndWriteAnswers(textFile, readerAndWriter); } }
[ "Command-line version of the classifier. See the class\ncomments for examples of use, and SeqClassifierFlags\nfor more information on supported flags." ]
[ "Use this API to fetch all the auditmessages resources that are configured on netscaler.\nThis uses auditmessages_args which is a way to provide additional arguments while fetching the resources.", "append normal text\n\n@param text normal text\n@return SimplifySpanBuild", "Removes a tag from the task. Returns an empty data block.\n\n@param task The task to remove a tag from.\n@return Request object", "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", "Converts the string representation of a Planner duration into\nan MPXJ Duration instance.\n\nPlanner represents durations as a number of seconds in its\nfile format, however it displays durations as days and hours,\nand seems to assume that a working day is 8 hours.\n\n@param value string representation of a duration\n@return Duration instance", "Decompiles the given .class file and creates the specified output source file.\n\n@param classFilePath the .class file to be decompiled.\n@param outputDir The directory where decompiled .java files will be placed.", "Create the index file that sets up the frameset.\n@param outputDirectory The target directory for the generated file(s).", "Get the sub registry for the domain.\n\n@param range the version range\n@return the sub registry", "Writes the given configuration to the given file." ]
public static vlan_nsip_binding[] get(nitro_service service, Long id) throws Exception{ vlan_nsip_binding obj = new vlan_nsip_binding(); obj.set_id(id); vlan_nsip_binding response[] = (vlan_nsip_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch vlan_nsip_binding resources of given name ." ]
[ "Computes A-B\n\n@param listA\n@param listB\n@return", "Reads characters until the 'end' character is encountered.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found.", "Reverse how the transition is applied, such that the transition previously performed when progress=start of range is only performed when progress=end of range\n\n@return", "Deserialize a directory of javascript design documents to a List of DesignDocument objects.\n\n@param directory the directory containing javascript files\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read", "Use this API to fetch all the protocolhttpband resources that are configured on netscaler.\nThis uses protocolhttpband_args which is a way to provide additional arguments while fetching the resources.", "Checks if the given argument is null and throws an exception with a\nmessage containing the argument name if that it true.\n\n@param argument the argument to check for null\n@param argumentName the name of the argument to check.\nThis is used in the exception message.\n@param <T> the type of the argument\n@return the argument itself\n@throws IllegalArgumentException in case argument is null", "Register a new PerformanceMonitor with Spring if it does not already exist.\n\n@param beanName The name of the bean that this performance monitor is wrapped around\n@param registry The registry where all the spring beans are registered", "common utility method for adding a statement to a record", "Utility function that gives list of values from list of value-pair\nstrings.\n\n@param valuePairs List of value-pair strings\n@param delim Delimiter that separates the value pair\n@returns The list of values; empty if no value-pair is present, The even\nelements are the first ones of the value pair, and the odd\nelements are the second ones. For example, if the list of\nvalue-pair is [\"cluster.xml=file1\", \"stores.xml=file2\"], and the\npair delimiter is '=', we will then have the list of values in\nreturn: [\"cluster.xml\", \"file1\", \"stores.xml\", \"file2\"]." ]
public ProjectCalendar addResourceCalendar() throws MPXJException { if (getResourceCalendar() != null) { throw new MPXJException(MPXJException.MAXIMUM_RECORDS); } ProjectCalendar calendar = new ProjectCalendar(getParentFile()); setResourceCalendar(calendar); return calendar; }
[ "This method allows a resource calendar to be added to a resource.\n\n@return ResourceCalendar\n@throws MPXJException if more than one calendar is added" ]
[ "Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data", "Returns a new instance of the class with the given qualified name using the constructor with\nthe specified signature.\n\n@param className The qualified name of the class to instantiate\n@param types The parameter types\n@param args The arguments\n@return The instance", "Returns if a request should be retried based on the retry count, current response,\nand the current strategy.\n\n@param retryCount The current retry attempt count.\n@param response The exception that caused the retry conditions to occur.\n@return true if the request should be retried; false otherwise.", "Sign in a group of connections to the registry by key\n\n@param key\nthe key\n@param connections\na collection of websocket connections", "Reads GIF image from byte array.\n\n@param data containing GIF file.\n@return read status code (0 = no errors).", "any possible bean invocations from other ADV observers", "Update the given resource in the persistent configuration model based on the values in the given operation.\n\n@param operation the operation\n@param resource the resource that corresponds to the address of {@code operation}\n\n@throws OperationFailedException if {@code operation} is invalid or populating the model otherwise fails", "Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identifying the association\n@param embeddedKey the {@link EntityKey} identifying the embedded component\n@return the created {@link Relationship} that represents the association", "We have received an update that invalidates the beat grid for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no beat grid for the associated player" ]
private PersistenceBrokerException createException(final Exception ex, String message, final Object objectToIdentify, Class topLevelClass, Class realClass, Object[] pks) { final String eol = SystemUtils.LINE_SEPARATOR; StringBuffer msg = new StringBuffer(); if(message == null) { msg.append("Unexpected error: "); } else { msg.append(message).append(" :"); } if(topLevelClass != null) msg.append(eol).append("objectTopLevelClass=").append(topLevelClass.getName()); if(realClass != null) msg.append(eol).append("objectRealClass=").append(realClass.getName()); if(pks != null) msg.append(eol).append("pkValues=").append(ArrayUtils.toString(pks)); if(objectToIdentify != null) msg.append(eol).append("object to identify: ").append(objectToIdentify); if(ex != null) { // add causing stack trace Throwable rootCause = ExceptionUtils.getRootCause(ex); if(rootCause != null) { msg.append(eol).append("The root stack trace is --> "); String rootStack = ExceptionUtils.getStackTrace(rootCause); msg.append(eol).append(rootStack); } return new PersistenceBrokerException(msg.toString(), ex); } else { return new PersistenceBrokerException(msg.toString()); } }
[ "Helper method which supports creation of proper error messages.\n\n@param ex An exception to include or <em>null</em>.\n@param message The error message or <em>null</em>.\n@param objectToIdentify The current used object or <em>null</em>.\n@param topLevelClass The object top-level class or <em>null</em>.\n@param realClass The object real class or <em>null</em>.\n@param pks The associated PK values of the object or <em>null</em>.\n@return The generated exception." ]
[ "Gets information about a trashed folder.\n@param folderID the ID of the trashed folder.\n@return info about the trashed folder.", "Count the total number of queued resource requests for all queues. The\nresult is \"approximate\" in the face of concurrency since individual\nqueues can change size during the aggregate count.\n\n@return The (approximate) aggregate count of queued resource requests.", "Finish the initialization.\n\n@param container\n@param isShutdownHookEnabled", "Returns a set of the distinct colours used in this image.\n\n@return the set of distinct Colors", "Runs the module import script.\n\n@param cms the CMS context to use\n@param module the module for which to run the script", "Returns the port as configured by the system variables, fallback is the default port value\n\n@param portIdentifier - SYS_*_PORT defined in Constants\n@return", "Removes the task from wait q.\n\n@param taskTobeRemoved\nthe task tobe removed\n@return true, if successful", "Use this API to fetch all the systemcore resources that are configured on netscaler.\nThis uses systemcore_args which is a way to provide additional arguments while fetching the resources.", "Get the error message with the dependencies appended\n\n@param dependencies - the list with dependencies to be attached to the message\n@param message - the custom error message to be displayed to the user\n@return String" ]
public PagedList<V> convert(final PagedList<U> uList) { if (uList == null || uList.isEmpty()) { return new PagedList<V>() { @Override public Page<V> nextPage(String s) throws RestException, IOException { return null; } }; } Page<U> uPage = uList.currentPage(); final PageImpl<V> vPage = new PageImpl<>(); vPage.setNextPageLink(uPage.nextPageLink()); vPage.setItems(new ArrayList<V>()); loadConvertedList(uPage, vPage); return new PagedList<V>(vPage) { @Override public Page<V> nextPage(String nextPageLink) throws RestException, IOException { Page<U> uPage = uList.nextPage(nextPageLink); final PageImpl<V> vPage = new PageImpl<>(); vPage.setNextPageLink(uPage.nextPageLink()); vPage.setItems(new ArrayList<V>()); loadConvertedList(uPage, vPage); return vPage; } }; }
[ "Converts the paged list.\n\n@param uList the resource list to convert from\n@return the converted list" ]
[ "Get the cached entry or null if no valid cached entry is found.", "Use this API to update dospolicy.", "Check that the range resulting from the mask is contiguous, otherwise we cannot represent it.\n\nFor instance, for the range 0 to 3 (bits are 00 to 11), if we mask all 4 numbers from 0 to 3 with 2 (ie bits are 10),\nthen we are left with 1 and 3. 2 is not included. So we cannot represent 1 and 3 as a contiguous range.\n\nThe underlying rule is that mask bits that are 0 must be above the resulting range in each segment.\n\nAny bit in the mask that is 0 must not fall below any bit in the masked segment range that is different between low and high.\n\nAny network mask must eliminate the entire segment range. Any host mask is fine.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException", "Use this API to fetch nd6ravariables resources of given names .", "Use this API to update appfwlearningsettings resources.", "Initialize that Foundation Logging library.", "Adds the List of Lists of CRFDatums to the data and labels arrays, treating\neach datum as if it were its own document. Adds context labels in addition\nto the target label for each datum, meaning that for a particular document,\nthe number of labels will be windowSize-1 greater than the number of\ndatums.\n\n@param processedData\na List of Lists of CRFDatums", "Checks whether given class descriptor has a primary key.\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", "Merge two maps of configuration properties. If the original contains a mapping for the same key, the new mapping is ignored.\n\n@param original\n@param toMerge" ]
public static ExtensibleConfigurationPersister createDomainXmlConfigurationPersister(final ConfigurationFile file, ExecutorService executorService, ExtensionRegistry extensionRegistry, final HostControllerEnvironment environment) { DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorService, extensionRegistry); boolean suppressLoad = false; ConfigurationFile.InteractionPolicy policy = file.getInteractionPolicy(); final boolean isReloaded = environment.getRunningModeControl().isReloaded(); if (!isReloaded && (policy == ConfigurationFile.InteractionPolicy.NEW && (file.getBootFile().exists() && file.getBootFile().length() != 0))) { throw HostControllerLogger.ROOT_LOGGER.cannotOverwriteDomainXmlWithEmpty(file.getBootFile().getName()); } if (!isReloaded && (policy == ConfigurationFile.InteractionPolicy.NEW || policy == ConfigurationFile.InteractionPolicy.DISCARD)) { suppressLoad = true; } BackupXmlConfigurationPersister persister = new BackupXmlConfigurationPersister(file, new QName(Namespace.CURRENT.getUriString(), "domain"), domainXml, domainXml, suppressLoad); for (Namespace namespace : Namespace.domainValues()) { if (!namespace.equals(Namespace.CURRENT)) { persister.registerAdditionalRootElement(new QName(namespace.getUriString(), "domain"), domainXml); } } extensionRegistry.setWriterRegistry(persister); return persister; }
[ "domain.xml" ]
[ "20130512 Converts the sdsm string generated above to Date format.\n\n@param str\nthe str\n@return the date from concise str", "Specifies convergence criteria\n\n@param maxIterations Maximum number of iterations\n@param ftol convergence based on change in function value. try 1e-12\n@param gtol convergence based on residual magnitude. Try 1e-12", "Deletes a template.\n\n@param id id of the template to delete.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message.", "Validates a String to be a valid name to be used in MongoDB for a collection name.\n\n@param collectionName", "Mark for creation all newly introduced dependent references.\nMark for deletion all nullified dependent references.\n@return the list of created objects", "Sends the collected dependencies over to the master and record them.", "Returns the default hidden preference for the user.\n\n@return boolean hidden or not\n@throws FlickrException", "Converts a byte array to a hexadecimal string representation\n@param bb the byte array to convert\n@return string the string representation" ]
protected String stringValue(COSBase value) { if (value instanceof COSString) return ((COSString) value).getString(); else if (value instanceof COSNumber) return String.valueOf(((COSNumber) value).floatValue()); else return ""; }
[ "Obtains a string from a PDF value\n@param value the PDF value of the String, Integer or Float type\n@return the corresponging string value" ]
[ "Create a list out of the items in the Iterable.\n\n@param <T>\nThe type of items in the Iterable.\n@param items\nThe items to be made into a list.\n@return A list consisting of the items of the Iterable, in the same order.", "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", "Process a file.\n\n@param file the file to be processed\n@param mode the patching mode\n@throws IOException", "Set the inner angle of the spotlight cone in degrees.\n\nBeyond the outer cone angle there is no illumination.\nThe underlying uniform \"outer_cone_angle\" is the cosine\nof this input angle. If the inner cone angle is larger than the outer cone angle\nthere will be unexpected results.\n@see #setInnerConeAngle(float)\n@see #getOuterConeAngle()", "host.xml", "Creates an immutable singleton instance.\n\n@param key\n@param value\n@return", "get the bean property type\n\n@param clazz\n@param propertyName\n@param originalType\n@return", "After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime", "Get the number of views, comments and favorites on a collection 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 collectionId\n(Required) The id (from the URL!) of the collection to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionStats.htm\"" ]
protected I_CmsSearchConfigurationFacetRange parseRangeFacet(JSONObject rangeFacetObject) { try { String range = rangeFacetObject.getString(JSON_KEY_RANGE_FACET_RANGE); String name = parseOptionalStringValue(rangeFacetObject, JSON_KEY_FACET_NAME); String label = parseOptionalStringValue(rangeFacetObject, JSON_KEY_FACET_LABEL); Integer minCount = parseOptionalIntValue(rangeFacetObject, JSON_KEY_FACET_MINCOUNT); String start = rangeFacetObject.getString(JSON_KEY_RANGE_FACET_START); String end = rangeFacetObject.getString(JSON_KEY_RANGE_FACET_END); String gap = rangeFacetObject.getString(JSON_KEY_RANGE_FACET_GAP); List<String> sother = parseOptionalStringValues(rangeFacetObject, JSON_KEY_RANGE_FACET_OTHER); Boolean hardEnd = parseOptionalBooleanValue(rangeFacetObject, JSON_KEY_RANGE_FACET_HARDEND); List<I_CmsSearchConfigurationFacetRange.Other> other = null; if (sother != null) { other = new ArrayList<I_CmsSearchConfigurationFacetRange.Other>(sother.size()); for (String so : sother) { try { I_CmsSearchConfigurationFacetRange.Other o = I_CmsSearchConfigurationFacetRange.Other.valueOf( so); other.add(o); } catch (Exception e) { LOG.error(Messages.get().getBundle().key(Messages.ERR_INVALID_OTHER_OPTION_1, so), e); } } } Boolean isAndFacet = parseOptionalBooleanValue(rangeFacetObject, JSON_KEY_FACET_ISANDFACET); List<String> preselection = parseOptionalStringValues(rangeFacetObject, JSON_KEY_FACET_PRESELECTION); Boolean ignoreAllFacetFilters = parseOptionalBooleanValue( rangeFacetObject, JSON_KEY_FACET_IGNOREALLFACETFILTERS); return new CmsSearchConfigurationFacetRange( range, start, end, gap, other, hardEnd, name, minCount, label, isAndFacet, preselection, ignoreAllFacetFilters); } catch (JSONException e) { LOG.error( Messages.get().getBundle().key( Messages.ERR_RANGE_FACET_MANDATORY_KEY_MISSING_1, JSON_KEY_RANGE_FACET_RANGE + ", " + JSON_KEY_RANGE_FACET_START + ", " + JSON_KEY_RANGE_FACET_END + ", " + JSON_KEY_RANGE_FACET_GAP), e); return null; } }
[ "Parses the query facet configurations.\n@param rangeFacetObject The JSON sub-node with the query facet configurations.\n@return The query facet configurations." ]
[ "Get an array of property ids.\n\nNot all property ids need be returned. Those properties\nwhose ids are not returned are considered non-enumerable.\n\n@return an array of Objects. Each entry in the array is either\na java.lang.String or a java.lang.Number", "Retrieves all file version retentions.\n@param api the API connection to be used by the resource.\n@param fields the fields to retrieve.\n@return an iterable contains information about all file version retentions.", "Goes through the first buckets, picking out candidate records and\ntallying up their scores.\n@return the index of the first bucket we did not process", "k\nReturns a list of artifact regarding the filters\n\n@return List<DbArtifact>", "associate the batched Children with their owner object loop over children", "Restores a trashed folder to a new location with a new name.\n@param folderID the ID of the trashed folder.\n@param newName an optional new name to give the folder. This can be null to use the folder's original name.\n@param newParentID an optional new parent ID for the folder. This can be null to use the folder's original\nparent.\n@return info about the restored folder.", "Associate a name with an object and make it persistent.\nAn object instance may be bound to more than one name.\nBinding a previously transient object to a name makes that object persistent.\n@param object The object to be named.\n@param name The name to be given to the object.\n@exception org.odmg.ObjectNameNotUniqueException\nIf an attempt is made to bind a name to an object and that name is already bound\nto an object.", "Adds a row to the internal storage, indexed by primary key.\n\n@param uniqueID unique ID of the row\n@param map row data as a simpe map", "Remove colProxy from list of pending collections and\nregister its contents with the transaction." ]
public void process(ProjectProperties properties, FilterContainer filters, FixedData fixedData, Var2Data varData) { int filterCount = fixedData.getItemCount(); boolean[] criteriaType = new boolean[2]; CriteriaReader criteriaReader = getCriteriaReader(); for (int filterLoop = 0; filterLoop < filterCount; filterLoop++) { byte[] filterFixedData = fixedData.getByteArrayValue(filterLoop); if (filterFixedData == null || filterFixedData.length < 4) { continue; } Filter filter = new Filter(); filter.setID(Integer.valueOf(MPPUtility.getInt(filterFixedData, 0))); filter.setName(MPPUtility.removeAmpersands(MPPUtility.getUnicodeString(filterFixedData, 4))); byte[] filterVarData = varData.getByteArray(filter.getID(), getVarDataType()); if (filterVarData == null) { continue; } //System.out.println(ByteArrayHelper.hexdump(filterVarData, true, 16, "")); List<GenericCriteriaPrompt> prompts = new LinkedList<GenericCriteriaPrompt>(); filter.setShowRelatedSummaryRows(MPPUtility.getByte(filterVarData, 4) != 0); filter.setCriteria(criteriaReader.process(properties, filterVarData, 0, -1, prompts, null, criteriaType)); filter.setIsTaskFilter(criteriaType[0]); filter.setIsResourceFilter(criteriaType[1]); filter.setPrompts(prompts); filters.addFilter(filter); //System.out.println(filter); } }
[ "Entry point for processing filter definitions.\n\n@param properties project properties\n@param filters project filters\n@param fixedData filter fixed data\n@param varData filter var data" ]
[ "Used for unit tests only.\n\nFIXME: Refactor test code with dependency injection or scope restrictions so this function is not public.\n\n@deprecated Do not use for production code, use {@link #fetch(String, String, voldemort.server.protocol.admin.AsyncOperationStatus, String, long, voldemort.store.metadata.MetadataStore, Long diskQuotaSizeInKB)} instead.", "Determine if the start of the buffer matches a fingerprint byte array.\n\n@param buffer bytes from file\n@param fingerprint fingerprint bytes\n@return true if the file matches the fingerprint", "Try to set the value from the provided Json string.\n@param value the value to set.\n@throws Exception thrown if parsing fails.", "Use this API to create sslfipskey.", "Gets the list of failed invocations that has been collected by this collector.\n\n@return The failed invocations.", "Sets the current collection 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=\"attributes\" optional=\"true\" description=\"Attributes of the collection as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\ncollection on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe collection\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\ncollection\"\[email protected] name=\"collection-class\" optional=\"true\" description=\"The type of the collection if not a\njava.util type or an array\"\[email protected] name=\"database-foreignkey\" optional=\"true\" description=\"Whether a database foreignkey shall be created\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the collection\"\[email protected] name=\"element-class-ref\" optional=\"true\" description=\"The fully qualified name of\nthe element type\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The name of the\nforeign keys (columns when an indirection table is given)\"\[email protected] name=\"foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the foreign keys as a comma-separated list if using an indirection table\"\[email protected] name=\"indirection-table\" optional=\"true\" description=\"The name of the indirection\ntable for m:n associations\"\[email protected] name=\"indirection-table-documentation\" optional=\"true\" description=\"Documentation\non the indirection table\"\[email protected] name=\"indirection-table-primarykeys\" optional=\"true\" description=\"Whether the\nfields referencing the collection and element classes, should also be primarykeys\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the collection is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the collection\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"query-customizer\" optional=\"true\" description=\"The query customizer for this collection\"\[email protected] name=\"query-customizer-attributes\" optional=\"true\" description=\"Attributes for the query customizer\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\ncollection\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The name of the\nforeign key columns pointing to the elements if using an indirection table\"\[email protected] name=\"remote-foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the remote foreign keys as a comma-separated list if using an indirection table\"", "Update the current position with specified length.\nThe input will append to the current position of the iterator.\n\n@param length update length", "Compiles the allowable actions for a file or folder.\n\n@param cms the current CMS context\n@param file the resource for which we want the allowable actions\n\n@return the allowable actions for the given resource", "Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this hazard curve.\n@param times Array of times as doubles.\n@param givenSurvivalProbabilities Array of corresponding survival probabilities.\n@return A new discount factor object." ]
public static authenticationtacacspolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationtacacspolicy_authenticationvserver_binding obj = new authenticationtacacspolicy_authenticationvserver_binding(); obj.set_name(name); authenticationtacacspolicy_authenticationvserver_binding response[] = (authenticationtacacspolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch authenticationtacacspolicy_authenticationvserver_binding resources of given name ." ]
[ "Re-initializes the shader texture used to fill in\nthe Circle upon drawing.", "This method writes a resource's availability table.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource", "Set the value of the underlying component. Note that this will\nnot work for ListEditor components. Also, note that for a JComboBox,\nThe value object must have the same identity as an object in the drop-down.\n\n@param propName The DMR property name to set.\n@param value The value.", "Remove a list of stores from the session\n\nFirst commit all entries for these stores and then cleanup resources\n\n@param storeNameToRemove List of stores to be removed from the current\nstreaming session", "Initialize the connection with the specified properties in OJB\nconfiguration files and platform depended properties.\nInvoke this method after a NEW connection is created, not if re-using from pool.\n\n@see org.apache.ojb.broker.platforms.PlatformFactory\n@see org.apache.ojb.broker.platforms.Platform", "This method can be called to ensure that the IDs of all\nentities are sequential, and start from an\nappropriate point. If entities are added to and removed from\nthis list, then the project is loaded into Microsoft\nproject, if the ID values have gaps in the sequence, there will\nbe blank rows shown.", "Use this API to fetch all the responderparam resources that are configured on netscaler.", "Returns the value of the element with the largest value\n@param A (Input) Matrix. Not modified.\n@return scalar", "Returns the header with the specified name from the supplied map. The\nheader lookup is case-insensitive.\n\n@param headers A <code>Map</code> containing the HTTP request headers.\n@param name The name of the header to return.\n@return The value of specified header, or a comma-separated list if there\nwere multiple headers of that name." ]
public static base_responses enable(nitro_service client, String acl6name[]) throws Exception { base_responses result = null; if (acl6name != null && acl6name.length > 0) { nsacl6 enableresources[] = new nsacl6[acl6name.length]; for (int i=0;i<acl6name.length;i++){ enableresources[i] = new nsacl6(); enableresources[i].acl6name = acl6name[i]; } result = perform_operation_bulk_request(client, enableresources,"enable"); } return result; }
[ "Use this API to enable nsacl6 resources of given names." ]
[ "Evaluates the body if value for the member tag equals the specified value.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"paramNum\" description=\"The zero-based parameter number. It's used if the user\nused the space-separated format for specifying parameters.\"\[email protected] name=\"value\" optional=\"false\" description=\"The expected value.\"", "Total count of partition-stores moved in this task.\n\n@return number of partition stores moved in this task.", "Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException", "This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target", "Static method to convert a binary operator into a string.\n\n@param oper is the binary comparison operator to be converted", "Intercepts calls for setting a key and value for a JSON object\n\n@param name the key name\n@param args the value associated with the key", "remove drag support from the given Component.\n@param c the Component to remove", "Throws an exception if the current thread is not a GL thread.\n\n@since 1.6.5", "Populate data for analytics." ]
public static void init() { reports.clear(); Reflections reflections = new Reflections(REPORTS_PACKAGE); final Set<Class<? extends Report>> reportClasses = reflections.getSubTypesOf(Report.class); for(Class<? extends Report> c : reportClasses) { LOG.info("Report class: " + c.getName()); try { reports.add(c.newInstance()); } catch (IllegalAccessException | InstantiationException e) { LOG.error("Error while loading report implementation classes", e); } } if(LOG.isInfoEnabled()) { LOG.info(String.format("Detected %s reports", reports.size())); } }
[ "Initializes the set of report implementation." ]
[ "generate a message for loglevel ERROR\n\n@param pObject the message Object", "Add new control at the end of control bar with specified touch listener.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param properties JSON control specific properties\n@param listener touch listener", "Produces a string identifying this half-edge by the point index values of\nits tail and head vertices.\n\n@return identifying string", "Read the domain controller data from an S3 file.\n\n@param directoryName the name of the directory in the bucket that contains the S3 file\n@return the domain controller data", "Show multiple channels. All other channels will be unaffected.\n@param channels The channels to show", "Send an announcement packet so the other devices see us as being part of the DJ Link network and send us\nupdates.", "Get log level depends on provided client parameters such as verbose and quiet.", "On host controller reload, remove a not running server registered in the process controller declared as down.", "Use this API to restore appfwprofile." ]
public void stop() { if (runnerThread == null) { return; } runnerThread.interrupt(); nsLock.writeLock().lock(); try { if (runnerThread == null) { return; } this.cancel(); this.close(); while (runnerThread.isAlive()) { runnerThread.interrupt(); try { runnerThread.join(1000); } catch (final Exception e) { e.printStackTrace(); return; } } runnerThread = null; } catch (Exception e) { e.printStackTrace(); } finally { nsLock.writeLock().unlock(); } }
[ "Stops the background stream thread." ]
[ "Use this API to unset the properties of systemcollectionparam resource.\nProperties that need to be unset are specified in args array.", "Get random stub matching this user type\n@param userType User type\n@return Random stub", "Enqueues a message for sending on the send thread.\n@param serialMessage the serial message to enqueue.", "Add a polygon symbolizer definition to the rule.\n\n@param styleJson The old style.", "Removes the specified list of users from following the project, this will not affect project membership status.\nReturns the updated project record.\n\n@param project The project to remove followers from.\n@return Request object", "Return the available format ids.", "Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach.", "read a producer request from buffer\n\n@param buffer data buffer\n@return parsed producer request", "Set the values of all the knots.\nThis version does not require the \"extra\" knots at -1 and 256\n@param x the knot positions\n@param rgb the knot colors\n@param types the knot types" ]
public Duration getDuration(Date startDate, Date endDate) { Calendar cal = DateHelper.popCalendar(startDate); int days = getDaysInRange(startDate, endDate); int duration = 0; Day day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK)); while (days > 0) { if (isWorkingDate(cal.getTime(), day) == true) { ++duration; } --days; day = day.getNextDay(); cal.set(Calendar.DAY_OF_YEAR, cal.get(Calendar.DAY_OF_YEAR) + 1); } DateHelper.pushCalendar(cal); return (Duration.getInstance(duration, TimeUnit.DAYS)); }
[ "This method is provided to allow an absolute period of time\nrepresented by start and end dates into a duration in working\ndays based on this calendar instance. This method takes account\nof any exceptions defined for this calendar.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object" ]
[ "Reads the configuration of a field facet.\n@param pathPrefix The XML Path that leads to the field facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.", "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.", "Returns the result of the performed spellcheck formatted in JSON.\n\n@param request The CmsSpellcheckingRequest.\n@return JSONObject that contains the result of the performed spellcheck.", "Retrieve a Double from an input stream.\n\n@param is input stream\n@return Double instance", "Produces or returns the existing proxy class. The operation is thread-safe.\n\n@return always the class of the proxy", "Requests the waveform detail for a specific track ID, given a connection to a player that has already been\nset up.\n\n@param rekordboxId the track whose waveform detail is desired\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 waveform detail, or {@code null} if none was available\n@throws IOException if there is a communication problem", "Calls a function script associated with this component.\nThe function is called even if the component\nis not enabled and not attached to a scene object.\n@param funcName name of script function to call.\n@param args function parameters as an array of objects.\n@return true if function was called, false if no such function\n@see org.gearvrf.script.GVRScriptFile#invokeFunction(String, Object[]) invokeFunction", "Get an integer property override value.\n@param name the {@link CircuitBreaker} name.\n@param key the property override key.\n@return the property override value, or null if it is not found.", "Get bean manager from portlet context.\n\n@param ctx the portlet context\n@return bean manager if found" ]
public boolean setVisibility(final Visibility visibility) { if (visibility != mVisibility) { Log.d(Log.SUBSYSTEM.WIDGET, TAG, "setVisibility(%s) for %s", visibility, getName()); updateVisibility(visibility); mVisibility = visibility; return true; } return false; }
[ "Set the visibility of the object.\n\n@see Visibility\n@param visibility\nThe visibility of the object.\n@return {@code true} if the visibility was changed, {@code false} if it\nwasn't." ]
[ "Use this API to fetch vlan_interface_binding resources of given name .", "Construct an InterestRateSwapLegProductDescriptor from a node in a FIPXML file.\n\n@param leg The node containing the leg.\n@param forwardCurveName Forward curve name form outside the node.\n@param discountCurveName Discount curve name form outside the node.\n@param daycountConvention Daycount convention from outside the node.\n@return Descriptor of the swap leg.", "returns an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searched objects\n@param query the query", "Recurses the given folder and creates the FileModels vertices for the child files to the graph.", "Populate a file creation record.\n\n@param record MPX record\n@param properties project properties", "Returns if a MongoDB document is a todo item.", "Get the last date to keep logs from, by a given current date.\n@param currentDate the date of today\n@return the last date to keep log files from.", "Parses the input stream to read the header\n\n@param input data input to read from\n@return the parsed protocol header\n@throws IOException", "Create a new server group for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception" ]
protected StrongCounter getCounterOrCreateIt(String counterName, int initialValue) { CounterManager counterManager = EmbeddedCounterManagerFactory.asCounterManager( cacheManager ); if ( !counterManager.isDefined( counterName ) ) { LOG.tracef( "Counter %s is not defined, creating it", counterName ); // global configuration is mandatory in order to define // a new clustered counter with persistent storage validateGlobalConfiguration(); counterManager.defineCounter( counterName, CounterConfiguration.builder( CounterType.UNBOUNDED_STRONG ) .initialValue( initialValue ) .storage( Storage.PERSISTENT ) .build() ); } StrongCounter strongCounter = counterManager.getStrongCounter( counterName ); return strongCounter; }
[ "Create a counter if one is not defined already, otherwise return the existing one.\n\n@param counterName unique name for the counter\n@param initialValue initial value for the counter\n@return a {@link StrongCounter}" ]
[ "Read calendar hours and exception data.\n\n@param calendar parent calendar\n@param row calendar hours and exception data", "Configure all UI elements in the exceptions panel.", "Construct a Libor index for a given curve and schedule.\n\n@param forwardCurveName\n@param schedule\n@return The Libor index or null, if forwardCurveName is null.", "Extract resource data.", "Implement this to do your drawing.\n\n@param canvas the canvas on which the background will be drawn", "Obtains a Pax zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Gets a legend graphic with the specified metadata parameters. All parameters are passed as request parameters.\n\n@param layerId\nthe layer id\n@param styleName\nthe style name\n@param ruleIndex\nthe rule index\n@param format\nthe image format ('png','jpg','gif')\n@param width\nthe graphic's width\n@param height\nthe graphic's height\n@param scale\nthe scale denominator (not supported yet)\n@param allRules\nif true the image will contain all rules stacked vertically\n@param request\nthe servlet request object\n@return the model and view\n@throws GeomajasException\nwhen a style or rule does not exist or is not renderable", "Gets the status text from given session.\n\n@param lastActivity miliseconds since last activity\n@return status string", "Create a new path address by appending more elements to the end of this address.\n\n@param additionalElements the elements to append\n@return the new path address" ]
protected void processLabels(List<MonolingualTextValue> labels) { for(MonolingualTextValue label : labels) { String lang = label.getLanguageCode(); NameWithUpdate currentValue = newLabels.get(lang); if (currentValue == null || !currentValue.value.equals(label)) { newLabels.put(lang, new NameWithUpdate(label, true)); // Delete any alias that matches the new label AliasesWithUpdate currentAliases = newAliases.get(lang); if (currentAliases != null && currentAliases.aliases.contains(label)) { deleteAlias(label); } } } }
[ "Adds labels to the item\n\n@param labels\nthe labels to add" ]
[ "Moves the elements contained in \"band\" in the Y axis \"yOffset\"\n@param yOffset\n@param band", "compares two java files", "Creates a REST client used to perform Voldemort operations against the\nCoordinator\n\n@param storeName Name of the store to perform the operations on\n@param resolver Custom resolver as specified by the application\n@return", "Find out the scrollable child view from a ViewGroup.\n\n@param viewGroup", "Parses whole value as list attribute\n@deprecated in favour of using {@link AttributeParser attribute parser}\n@param value String with \",\" separated string elements\n@param operation operation to with this list elements are added\n@param reader xml reader from where reading is be done\n@throws XMLStreamException if {@code value} is not valid", "Set the InputStream of request body data, of known length, to be sent to the server.\n\n@param input InputStream of request body data to be sent to the server\n@param inputLength Length of request body data to be sent to the server, in bytes\n@return an {@link HttpConnection} for method chaining\n@deprecated Use {@link #setRequestBody(InputStreamGenerator, long)}", "Use this API to fetch authenticationtacacspolicy_systemglobal_binding resources of given name .", "the absolute and relative calls are the trickiest parts. We have to\nmove across cursor boundaries potentially.\n\na + row value indexes from beginning of resultset\na - row value indexes from the end of th resulset.\n\nCalling absolute(1) is the same as calling first().\nCalling absolute(-1) is the same as calling last().", "Finish initializing service.\n\n@throws IOException oop" ]
public Set<String> getAttributeNames() { if (attributes == null) { return Collections.emptySet(); } else { return Collections.unmodifiableSet(attributes.keySet()); } }
[ "Returns the list of user defined attribute names.\n\n@return the list of user defined attribute names, if there are none it returns an empty set." ]
[ "Sets the frame pointer to a specific frame\n\n@return boolean true if the move was successful", "Extract note text.\n\n@param row task data\n@return note text", "This method extracts data for a single predecessor from an MSPDI file.\n\n@param currTask Current task object\n@param link Predecessor data", "Get the upload parameters.\n@return", "Call commit on the underlying connection.", "interceptors, decorators and observers go first", "Set the method arguments for an enabled method override\n\n@param pathName Path name\n@param methodName Fully qualified method name\n@param ordinal 1-based index of the override within the overrides of type methodName\n@param arguments Array of arguments to set(specify all arguments)\n@return true if success, false otherwise", "Use this API to expire cachecontentgroup resources.", "Clear the connection that was previously saved.\n\n@return True if the connection argument had been saved." ]
public Point2D.Double minDistancePointSpline(Point2D.Double p, int nPointsPerSegment){ double minDistance = Double.MAX_VALUE; Point2D.Double minDistancePoint = null; int numberOfSplines = spline.getN(); double[] knots = spline.getKnots(); for(int i = 0; i < numberOfSplines; i++){ double x = knots[i]; double stopx = knots[i+1]; double dx = (stopx-x)/nPointsPerSegment; for(int j = 0; j < nPointsPerSegment; j++){ Point2D.Double candidate = new Point2D.Double(x, spline.value(x)); double d = p.distance(candidate); if(d<minDistance){ minDistance = d; minDistancePoint = candidate; } x += dx; } } return minDistancePoint; }
[ "Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p" ]
[ "Gets a method based on data in the override_db table\n\n@param overrideId ID of override\n@return Method found", "Generate a sql where-clause for the array of fields\n\n@param fields array containing all columns used in WHERE clause", "Copy bytes from an input stream to a file and log progress\n@param is the input stream to read\n@param destFile the file to write to\n@throws IOException if an I/O error occurs", "Performs the conversion from standard XPath to xpath with parameterization support.", "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", "Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string", "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", "Unregister all servlets registered by this exporter.", "Demonstrates obtaining the request history data from a test run" ]
public static boolean isValidFqcn(String str) { if (isNullOrEmpty(str)) { return false; } final String[] parts = str.split("\\."); if (parts.length < 2) { return false; } for (String part : parts) { if (!isValidJavaIdentifier(part)) { return false; } } return true; }
[ "Returns true if the string is a valid Java full qualified class name.\n\n@param str the string to be examined\n@return true if str is a valid Java Fqcn" ]
[ "Return the knot at a given position.\n@param x the position\n@return the knot number, or 1 if no knot found", "Create the patching task based on the definition.\n\n@param definition the task description\n@param provider the content provider\n@param context the task context\n@return the created task", "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()", "Creates a Bytes object by copying the data of a subsequence of the given byte array\n\n@param data Byte data\n@param offset Starting offset in byte array (inclusive)\n@param length Number of bytes to include", "Create a Renderer getting a copy from the prototypes collection.\n\n@param content to render.\n@param parent used to inflate the view.\n@return a new renderer.", "Generates a change event for a local deletion of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@return a change event for a local deletion of a document in the given namespace referring\nto the given document _id.", "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", "Merges the hardcoded results of this Configuration with the given\nConfiguration.\n\nThe resultant hardcoded results will be the union of the two sets of\nhardcoded results. Where the AnalysisResult for a class is found in both\nConfigurations, the result from otherConfiguration will replace the\nexisting result in this Configuration. This replacement behaviour will\noccur for subsequent calls to\n{@link #mergeHardcodedResultsFrom(Configuration)}.\n\n@param otherConfiguration - Configuration to merge hardcoded results with.", "Check position type.\n\n@param type the type\n@return the boolean" ]
static void rethrowIrrecoverableConnectionFailures(IOException e) throws SlaveRegistrationException { Throwable cause = e; while ((cause = cause.getCause()) != null) { if (cause instanceof SaslException) { throw HostControllerLogger.ROOT_LOGGER.authenticationFailureUnableToConnect(cause); } else if (cause instanceof SSLHandshakeException) { throw HostControllerLogger.ROOT_LOGGER.sslFailureUnableToConnect(cause); } else if (cause instanceof SlaveRegistrationException) { throw (SlaveRegistrationException) cause; } } }
[ "Analyzes a failure thrown connecting to the master for causes that indicate\nsome problem not likely to be resolved by immediately retrying. If found,\nthrows an exception highlighting the underlying cause. If the cause is not\none of the ones understood by this method, the method returns normally.\n\n@throws org.jboss.as.domain.controller.SlaveRegistrationException if the remote HC rejected the request\n@throws IllegalStateException for other failures understood by this method" ]
[ "returns an array containing values for all the Objects attribute\n@throws PersistenceBrokerException if there is an erros accessing obj field values", "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", "Creates a Bytes object by copying the data of the given ByteBuffer.\n\n@param bb Data will be read from this ByteBuffer in such a way that its position is not\nchanged.", "Checks the component type of the given array against the expected component type.\n\n@param array\nthe array to be checked. May not be <code>null</code>.\n@param expectedComponentType\nthe expected component type of the array. May not be <code>null</code>.\n@return the unchanged array.\n@throws ArrayStoreException\nif the expected runtime {@code componentType} does not match the actual runtime component type.", "Sets the protocol, hostname and port to connect to.\n\n@param protocol the protocol to use\n@param hostname the host name\n@param port the port\n\n@return the builder", "Set the inner angle of the spotlight cone in degrees.\n\nBeyond the outer cone angle there is no illumination.\nThe underlying uniform \"outer_cone_angle\" is the cosine\nof this input angle. If the inner cone angle is larger than the outer cone angle\nthere will be unexpected results.\n@see #setInnerConeAngle(float)\n@see #getOuterConeAngle()", "Adds the correct load instruction based on the type descriptor\n\n@param code the bytecode to add the instruction to\n@param type the type of the variable\n@param variable the variable number", "Throws one RendererException if the viewType, layoutInflater or parent are null.", "Append the Parameter\nAdd the place holder ? or the SubQuery\n@param value the value of the criteria" ]
public Date toDate(String dateString) { Date date = null; DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); try { date = df.parse(dateString); } catch (ParseException ex) { System.out.println(ex.fillInStackTrace()); } return date; }
[ "Takes a String and converts it to a Date\n\n@param dateString the date\n@return Date denoted by dateString" ]
[ "Set the background color.\n\nIf you don't set the background color, the default is an opaque black:\n{@link Color#BLACK}, 0xff000000.\n\n@param color\nAn Android 32-bit (ARGB) {@link Color}, such as you get from\n{@link Resources#getColor(int)}", "Use this API to fetch all the inatparam resources that are configured on netscaler.", "Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started.", "Checks the given field descriptor.\n\n@param fieldDef The field descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "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", "Print all relations for a given's class's tag\n@param tagname the tag containing the given relation\n@param from the source class\n@param edgetype the dot edge specification", "Retrieves the time at which work starts on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return start time, or null for non-working day", "Returns a sampling of the source at the specified line and column,\nof null if it is unavailable.", "Gets a method based on data in the override_db table\n\n@param overrideId ID of override\n@return Method found" ]
private void updateSession(Session newSession) { if (this.currentSession == null) { this.currentSession = newSession; } else { synchronized (this.currentSession) { this.currentSession = newSession; } } }
[ "Overwrites the underlying WebSocket session.\n\n@param newSession new session" ]
[ "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.", "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", "Pseudo-Inverse of a matrix calculated in the least square sense.\n\n@param matrix The given matrix A.\n@return pseudoInverse The pseudo-inverse matrix P, such that A*P*A = A and P*A*P = P", "Plots the MSD curve for trajectory t\n@param t Trajectory to calculate the msd curve\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param msdeval Evaluates the mean squared displacment", "Get the underlying channel. This may block until the channel is set.\n\n@return the channel\n@throws IOException for any error", "Convert an Object to a Date.", "Set a variable in the top variables layer to given \"collection\" of the vertex frames. Can't be reassigned -\nthrows on attempt to reassign.", "Sets a new config and clears the previous cache", "Given a list of typedDependencies, returns true if the node \"node\" is the\ngovernor of a conj relation with a dependent which is not a preposition\n\n@param node\nA node in this GrammaticalStructure\n@param list\nA list of typedDependencies\n@return true If node is the governor of a conj relation in the list with\nthe dep not being a preposition" ]
@Override public void setPosition(float x, float y, float z) { position.set(x, y, z); pickDir.set(x, y, z); pickDir.normalize(); invalidate(); }
[ "Set the position of the pick ray.\nThis function is used internally to update the\npick ray with the new controller position.\n@param x the x value of the position.\n@param y the y value of the position.\n@param z the z value of the position." ]
[ "as we know nothing has changed.", "Change the color of the center which indicates the new color.\n\n@param color int of the color.", "Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Extract the field types from the fieldConfigs if they have not already been configured.", "Read predecessors from a Gantt Designer file.\n\n@param gantt Gantt Designer file", "Count some stats on what occurs in a file.", "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.", "Rename a key for all languages.\n@param oldKey the key to rename\n@param newKey the new key name\n@return <code>true</code> if renaming was successful, <code>false</code> otherwise.", "Looks up and returns the value of the given key in the properties file of\nthe currently-selected theme.\n\n@param code Key to look up in the theme properties file.\n@return The value of the code in the current theme properties file, or an\nempty string if the code could not be resolved." ]
public void moveRectangleTo(Rectangle rect, float x, float y) { float width = rect.getWidth(); float height = rect.getHeight(); rect.setLeft(x); rect.setBottom(y); rect.setRight(rect.getLeft() + width); rect.setTop(rect.getBottom() + height); }
[ "Move this rectangle to the specified bottom-left point.\n\n@param rect rectangle to move\n@param x new x origin\n@param y new y origin" ]
[ "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.", "Adds the includes of the fileset to the handling.\n\n@param handling The handling\n@param fileSet The fileset", "Gets an item that was shared with a shared link.\n@param api the API connection to be used by the shared item.\n@param sharedLink the shared link to the item.\n@return info about the shared item.", "Process the start of this element.\n\n@param attributes The attribute list for this element\n@param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace\naware or the element has no namespace\n@param name the local name if the parser is namespace aware, or just the element name otherwise\n@throws Exception if something goes wrong", "Creates a map of work pattern rows indexed by the primary key.\n\n@param rows work pattern rows\n@return work pattern map", "Delete a path recursively, not throwing Exception if it fails or if the path is null.\n@param path a Path pointing to a file or a directory that may not exists anymore.", "Attempts to substitute all the found expressions in the input\nwith their corresponding resolved values.\nIf any of the found expressions failed to resolve or\nif the input does not contain any expression, the input is returned as is.\n\n@param input the input string\n@return the input with resolved expressions or the original input in case\nthe input didn't contain any expressions or at least one of the\nexpressions could not be resolved", "Selects the single element of the collection for which the provided OQL query\npredicate is true.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return The element that evaluates to true for the predicate. If no element\nevaluates to true, null is returned.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Override this method to change the default splash screen size or\nposition.\n\nThis method will be called <em>before</em> {@link #onInit(GVRContext)\nonInit()} and before the normal render pipeline starts up. In particular,\nthis means that any {@linkplain GVRAnimation animations} will not start\nuntil the first {@link #onStep()} and normal rendering starts.\n\n@param splashScreen\nThe splash object created from\n{@link #getSplashTexture(GVRContext)},\n{@link #getSplashMesh(GVRContext)}, and\n{@link #getSplashShader(GVRContext)}.\n\n@since 1.6.4" ]
public static void setViewBackground(View v, Drawable d) { if (Build.VERSION.SDK_INT >= 16) { v.setBackground(d); } else { v.setBackgroundDrawable(d); } }
[ "legacy helper for setting background" ]
[ "Write flow id to message.\n\n@param message the message\n@param flowId the flow id", "Gets the publisher wrapped by the specofoed FlexiblePublisher.\n@param publisher The FlexiblePublisher wrapping the publisher.\n@param type The type of the publisher wrapped by the FlexiblePublisher.\n@return The publisher object wrapped by the FlexiblePublisher.\nNull is returned if the FlexiblePublisher does not wrap a publisher of the specified type.\n@throws IllegalArgumentException In case publisher is not of type\n{@link org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher}", "Sets the top padding for all cells in the table.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining", "Adds the remaining tokens to the processed tokens list.\n\n@param iter An iterator over the remaining tokens", "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.", "Add an additional SSExtension\n@param ssExt the ssextension to set", "Build the operation transformers.\n\n@param registry the shared resource registry\n@return the operation transformers", "Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests.", "Removes any child object that has the given name by performing\ncase-sensitive search.\n\n@param name name of scene object to be removed.\n\n@return number of removed objects, 0 if none was found." ]
private void logBinaryStringInfo(StringBuilder binaryString) { encodeInfo += "Binary Length: " + binaryString.length() + "\n"; encodeInfo += "Binary String: "; int nibble = 0; for (int i = 0; i < binaryString.length(); i++) { switch (i % 4) { case 0: if (binaryString.charAt(i) == '1') { nibble += 8; } break; case 1: if (binaryString.charAt(i) == '1') { nibble += 4; } break; case 2: if (binaryString.charAt(i) == '1') { nibble += 2; } break; case 3: if (binaryString.charAt(i) == '1') { nibble += 1; } encodeInfo += Integer.toHexString(nibble); nibble = 0; break; } } if ((binaryString.length() % 4) != 0) { encodeInfo += Integer.toHexString(nibble); } encodeInfo += "\n"; }
[ "Logs binary string as hexadecimal" ]
[ "Get the features collection from a GeoJson inline string or URL.\n\n@param template the template\n@param features what to parse\n@return the feature collection\n@throws IOException", "alert, prompt, and confirm behave as if the OK button is always clicked.", "Read the project data and return a ProjectFile instance.\n\n@return ProjectFile instance", "Closes any registered stream entries that have not yet been consumed", "Set a proxy with authentication for REST-requests.\n\n@param proxyHost\n@param proxyPort\n@param username\n@param password", "get the property source method corresponding to given destination\nproperty\n\n@param sourceObject\n@param destinationObject\n@param destinationProperty\n@return", "Get photos from the user's contacts.\n\nThis method requires authentication with 'read' permission.\n\n@param count\nThe number of photos to return\n@param justFriends\nSet to true to only show friends photos\n@param singlePhoto\nSet to true to get a single photo\n@param includeSelf\nSet to true to include self\n@return The Collection of photos\n@throws FlickrException", "Sets the ssh priv key relative path.\nNote that must be relative path for now.\nThis default to no need of passphrase for the private key.\nWill also auto set the login type to key based.\n\n@param privKeyRelativePath\nthe priv key relative path\n@return the parallel task builder", "Returns true if the class node represents a the class node for the Class class\nand if the parametrized type is a neither a placeholder or a wildcard. For example,\nthe class node Class&lt;Foo&gt; where Foo is a class would return true, but the class\nnode for Class&lt;?&gt; would return false.\n@param classNode a class node to be tested\n@return true if it is the class node for Class and its generic type is a real class" ]