query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public void getDataDTD(Writer output) throws DataTaskException
{
try
{
output.write("<!ELEMENT dataset (\n");
for (Iterator it = _preparedModel.getElementNames(); it.hasNext();)
{
String elementName = (String)it.next();
output.write(" ");
output.write(elementName);
output.write("*");
output.write(it.hasNext() ? " |\n" : "\n");
}
output.write(")>\n<!ATTLIST dataset\n name CDATA #REQUIRED\n>\n");
for (Iterator it = _preparedModel.getElementNames(); it.hasNext();)
{
String elementName = (String)it.next();
List classDescs = _preparedModel.getClassDescriptorsMappingTo(elementName);
if (classDescs == null)
{
output.write("\n<!-- Indirection table");
}
else
{
output.write("\n<!-- Mapped to : ");
for (Iterator classDescIt = classDescs.iterator(); classDescIt.hasNext();)
{
ClassDescriptor classDesc = (ClassDescriptor)classDescIt.next();
output.write(classDesc.getClassNameOfObject());
if (classDescIt.hasNext())
{
output.write("\n ");
}
}
}
output.write(" -->\n<!ELEMENT ");
output.write(elementName);
output.write(" EMPTY>\n<!ATTLIST ");
output.write(elementName);
output.write("\n");
for (Iterator attrIt = _preparedModel.getAttributeNames(elementName); attrIt.hasNext();)
{
String attrName = (String)attrIt.next();
output.write(" ");
output.write(attrName);
output.write(" CDATA #");
output.write(_preparedModel.isRequired(elementName, attrName) ? "REQUIRED" : "IMPLIED");
output.write("\n");
}
output.write(">\n");
}
}
catch (IOException ex)
{
throw new DataTaskException(ex);
}
} | [
"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 aaagroup_authorizationpolicy_binding resources of given name .",
"poll the response queue for response\n\n@param timeout timeout amount\n@param timeUnit timeUnit of timeout\n@return same result of BlockQueue.poll(long, TimeUnit)\n@throws InterruptedException",
"Retrieve the default mapping between MPXJ task fields and Primavera wbs field names.\n\n@return mapping",
"Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website.",
"Returns the smallest prefix length possible such that this address division grouping includes the block of addresses for that prefix.\n\n@return the prefix length",
"Start with specifying the artifact version",
"Recursively searches for formatting annotations.\n\n@param visitedTypes used to prevent an endless loop\n@param parameterName",
"Specify the output format of the image.\n\n@see ImageFormat",
"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."
] |
public static boolean blockAligned( int blockLength , DSubmatrixD1 A ) {
if( A.col0 % blockLength != 0 )
return false;
if( A.row0 % blockLength != 0 )
return false;
if( A.col1 % blockLength != 0 && A.col1 != A.original.numCols ) {
return false;
}
if( A.row1 % blockLength != 0 && A.row1 != A.original.numRows) {
return false;
}
return true;
} | [
"Checks to see if the submatrix has its boundaries along inner blocks.\n\n@param blockLength Size of an inner block.\n@param A Submatrix.\n@return If it is block aligned or not."
] | [
"Reads all text up to next XML tag and returns it as a String.\n\n@return the String of the text read, which may be empty.",
"Removes all currently assigned labels for this Datum then adds all\nof the given Labels.",
"Returns the corporate dependencies of a module\n\n@param module Module\n@param corporateFilters List<String>\n@return List<Dependency>",
"Converts the node to JSON\n@return JSON object",
"Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value.",
"Use this API to disable snmpalarm of given name.",
"Creates a file logger in the current thread. The file is in XML format, suitable for interpretation by Eclipse's Drools Audit View\nor other tools. Note that while events are written as they happen, the file will not be flushed until it is closed or the underlying\nfile buffer is filled. If you need real time logging then use a Console Logger or a Threaded File Logger.\n\n@param session\n@param fileName - .log is appended to this.\n@return",
"Sets the max.\n\n@param n the new max",
"Reads a PEP file from the input stream.\n\n@param is input stream representing a PEP file"
] |
protected Object[] idsOf(final List<?> idsOrValues) {
// convert list to array that we can mutate
final Object[] ids = idsOrValues.toArray();
// mutate array to contain only non-empty ids
int length = 0;
for (int i = 0; i < ids.length;) {
final Object p = ids[i++];
if (p instanceof HasId) {
// only use values with ids that are non-empty
final String id = ((HasId) p).getId();
if (!StringUtils.isEmpty(id)) {
ids[length++] = id;
}
} else if (p instanceof String) {
// only use ids that are non-empty
final String id = p.toString();
if (!StringUtils.isEmpty(id)) {
ids[length++] = id;
}
} else if (p != null) {
throw new StoreException("Invalid id or value of type " + p);
}
}
// no ids in array
if (length == 0) {
return null;
}
// some ids in array
if (length != ids.length) {
final Object[] tmp = new Object[length];
System.arraycopy(ids, 0, tmp, 0, length);
return tmp;
}
// array was full
return ids;
} | [
"Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids"
] | [
"Check that an array only contains elements that are not null.\n@param values, can't be null\n@return",
"Adds all items from the iterable to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed",
"Generate attachment extension from mime type\n\n@param type valid mime-type\n@return extension if it's known for specified mime-type, or empty string\notherwise",
"Inserts the currently contained data objects into the database.\n\n@param platform The (connected) database platform for inserting data\n@param model The database model\n@param batchSize The batch size; use 1 for not using batch mode",
"Get the object responsible for printing to the correct output format.\n\n@param specJson the request json from the client",
"Returns the data sources belonging to a particular group of data\nsources. Data sources are grouped in record linkage mode, but not\nin deduplication mode, so only use this method in record linkage\nmode.",
"Returns the key value in the given array.\n\n@param keyIndex the index of the scale key",
"Returns all the dependencies of a module\n\n@param module Module\n@return List<Dependency>",
"Counts the number of elements in A which are not zero.\n@param A A matrix\n@return number of non-zero elements"
] |
private void merge(Map<String, NodeT> source, Map<String, NodeT> target) {
for (Map.Entry<String, NodeT> entry : source.entrySet()) {
String key = entry.getKey();
if (!target.containsKey(key)) {
target.put(key, entry.getValue());
}
}
} | [
"Copies entries in the source map to target map.\n\n@param source source map\n@param target target map"
] | [
"Adds a new task to this file. The task can have an optional message to include, and a due date.\n\n@param action the action the task assignee will be prompted to do.\n@param message an optional message to include with the task.\n@param dueAt the day at which this task is due.\n@return information about the newly added task.",
"Return the releaseId\n\n@return releaseId",
"Counts the amount of 'ch' at the start of this line optionally ignoring\nspaces.\n\n@param ch\nThe char to count.\n@param allowSpaces\nWhether to allow spaces or not\n@return Number of characters found.\n@since 0.12",
"Hide multiple channels. All other channels will be unaffected.\n@param channels The channels to hide",
"Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to process.",
"adds a FIELDDESCRIPTOR to this ClassDescriptor.\n@param fld",
"Returns an iban with replaced check digit.\n\n@param iban The iban\n@return The iban without the check digit",
"Checks if the given AnnotatedType is sensible, otherwise provides warnings.",
"Method to know if already exists one file with the same name in the same\nfolder\n\n@param scenario_name\n@param path\n@param dest_dir\n@return true when the file does not exist"
] |
protected Map getAllVariables(){
try{
Iterator names = FreeMarkerTL.getEnvironment().getKnownVariableNames().iterator();
Map vars = new HashMap();
while (names.hasNext()) {
Object name =names.next();
vars.put(name, get(name.toString()));
}
return vars;
}catch(Exception e){
throw new ViewException(e);
}
} | [
"Returns a map of all variables in scope.\n@return map of all variables in scope."
] | [
"Notifies that a header item is changed.\n\n@param position the position.",
"Combines weighted crf with this crf\n\n@param crf\n@param weight",
"blocks until there is a connection",
"Creates a Bytes object by copying the data of the CharSequence and encoding it using UTF-8.",
"Readable yyyyMMdd int representation of a day, which is also sortable.",
"Returns true if the given document should be included in the\nserialization.\n\n@param itemDocument\nthe document to check\n@return true if the document should be serialized",
"Generates a usable test specification for a given test definition\nUses the first bucket as the fallback value\n\n@param testDefinition a {@link TestDefinition}\n@return a {@link TestSpecification} which corresponding to given test definition.",
"Use this API to delete dnstxtrec.",
"Parses the field facet configurations.\n@param fieldFacetObject The JSON sub-node with the field facet configurations.\n@return The field facet configurations."
] |
public static void permutationInverse( int []original , int []inverse , int length ) {
for (int i = 0; i < length; i++) {
inverse[original[i]] = i;
}
} | [
"Computes the inverse permutation vector\n\n@param original Original permutation vector\n@param inverse It's inverse"
] | [
"Updates the exceptions.\n@param exceptions the exceptions to set",
"Runs the given method with the specified arguments, substituting with proxies where necessary\n@param method\n@param target proxy target\n@param args\n@return Proxy-fied result for statements, actual call result otherwise\n@throws IllegalAccessException\n@throws InvocationTargetException",
"Convert a Identification to a By used in WebDriver Drivers.\n\n@return the correct By specification of the current Identification.",
"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}.",
"Returns the texture magnification filter\n\nIf missing, defaults to {@link GL_LINEAR }\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture magnification filter",
"Use this API to add gslbsite resources.",
"Generated the report.",
"Adds folders to perform the search in.\n@param folders Folders to search in.",
"Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master."
] |
private synchronized void freeClient(Client client) {
int current = useCounts.get(client);
if (current > 0) {
timestamps.put(client, System.currentTimeMillis()); // Mark that it was used until now.
useCounts.put(client, current - 1);
if ((current == 1) && (idleLimit.get() == 0)) {
closeClient(client); // This was the last use, and we are supposed to immediately close idle clients.
}
} else {
logger.error("Ignoring attempt to free a client that is not allocated: {}", client);
}
} | [
"Decrements the client's use count, and makes it eligible for closing if it is no longer in use.\n\n@param client the dbserver connection client which is no longer being used for a task"
] | [
"Is the transport secured by a JAX-WS property",
"Increase the priority of an overrideId\n\n@param overrideId ID of override\n@param pathId ID of path containing override\n@param clientUUID UUID of client",
"Returns iban's country code and check digit.\n\n@param iban String\n@return countryCodeAndCheckDigit String",
"Stops all transitions.",
"This could be a self-extracting archive. If we understand the format, expand\nit and check the content for files we can read.\n\n@param stream schedule data\n@return ProjectFile instance",
"Get the value of a primitive type from the request data.\n\n@param fieldName the name of the attribute to get from the request data.\n@param pAtt the primitive attribute.\n@param requestData the data to retrieve the value from.",
"Checks all data sets in IIM records 1, 2 and 3 for constraint violations.\n\n@return list of constraint violations, empty set if IIM file is valid",
"Process TestCaseStartedEvent. New testCase will be created and added\nto suite as child.\n\n@param event to process",
"This method returns the actual raw class associated with the specified\ntype."
] |
public static <T> void finish(T query, long correlationId, EventBus bus, String... labels) {
for (String type : labels) {
RemoveLabelledQuery<T> next = finish(query, correlationId, type);
bus.post(next);
}
} | [
"Publish finish events for each of the specified query labels\n\n<pre>\n{@code\nLabelledEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId Identifier\n@param bus EventBus to post events to\n@param labels Query types to post to event bus"
] | [
"Set whether we should obtain color versions of waveforms and previews when they are available. This will only\naffect waveforms loaded after the setting has been changed. If this changes the setting, and we were running,\nstop and restart in order to flush and reload the correct waveform versions.\n\n@param preferColor if {@code true}, the full-color versions of waveforms will be requested, if {@code false}\nonly the older blue versions will be retrieved",
"Returns a short class name for an object.\nThis is the class name stripped of any package name.\n\n@return The name of the class minus a package name, for example\n<code>ArrayList</code>",
"Checks that the targetClass is widening the argument class\n\n@param argumentClass\n@param targetClass\n@return",
"Gets the index of a ExpandableWrapper within the helper item list based on\nthe index of the ExpandableWrapper.\n\n@param parentPosition The index of the parent in the list of parents\n@return The index of the parent in the merged list of children and parents",
"Create dummy groups for each concatenated report, and in the footer of\neach group adds the subreport.",
"Generic method to extract Primavera fields and assign to MPXJ fields.\n\n@param map map of MPXJ field types and Primavera field names\n@param row Primavera data container\n@param container MPXJ data contain",
"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.",
"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'",
"Use this API to fetch csvserver_copolicy_binding resources of given name ."
] |
public TransactionImpl getCurrentTransaction()
{
TransactionImpl tx = tx_table.get(Thread.currentThread());
if(tx == null)
{
throw new TransactionNotInProgressException("Calling method needed transaction, but no transaction found for current thread :-(");
}
return tx;
} | [
"Returns the current transaction for the calling thread.\n\n@throws org.odmg.TransactionNotInProgressException\n{@link org.odmg.TransactionNotInProgressException} if no transaction was found."
] | [
"Creates a favorite widget for a favorite entry.\n\n@param entry the favorite entry\n@return the favorite widget\n\n@throws CmsException if something goes wrong",
"this method mimics EMC behavior",
"Adds an environment variable to the process being created.\n\n@param key they key for the variable\n@param value the value for the variable\n\n@return the launcher",
"Get the sub registry for the servers.\n\n@param range the version range\n@return the sub registry",
"EAP 7.1",
"Loads the file content in the properties collection\n@param filePath The path of the file to be loaded",
"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",
"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",
"Create a new entry in the database from an object."
] |
protected String toHexString(boolean with0xPrefix, CharSequence zone) {
if(isDualString()) {
return toNormalizedStringRange(toIPParams(with0xPrefix ? IPStringCache.hexPrefixedParams : IPStringCache.hexParams), getLower(), getUpper(), zone);
}
return toIPParams(with0xPrefix ? IPStringCache.hexPrefixedParams : IPStringCache.hexParams).toString(this, zone);
} | [
"overridden in ipv6 to handle zone"
] | [
"This will blur the view behind it and set it in\na imageview over the content with a alpha value\nthat corresponds to slideOffset.",
"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",
"Reads, stems, and prints the trees in the file.\n\n@param args Usage: WordStemmer file",
"Creates a new form session to edit the file with the given name using the given form configuration.\n\n@param configPath the site path of the form configuration\n@param fileName the name (not path) of the XML content to edit\n@return the id of the newly created form session\n\n@throws CmsUgcException if something goes wrong",
"Write a calendar.\n\n@param record calendar instance\n@throws IOException",
"Handles an initial response from a PUT or PATCH operation response by polling\nthe status of the operation until the long running operation terminates.\n\n@param observable the initial observable from the PUT or PATCH operation.\n@param <T> the return type of the caller\n@param resourceType the java.lang.reflect.Type of the resource.\n@return the terminal response for the operation.\n@throws CloudException REST exception\n@throws InterruptedException interrupted exception\n@throws IOException thrown by deserialization",
"Find any standard methods the user has 'underridden' in their type.",
"Set the value of a field using its alias.\n\n@param alias field alias\n@param value field value",
"Use this API to fetch all the lbsipparameters resources that are configured on netscaler."
] |
private boolean containsValue(StatementGroup statementGroup, Value value) {
for (Statement s : statementGroup) {
if (value.equals(s.getValue())) {
return true;
}
}
return false;
} | [
"Checks if the given group of statements contains the given value as the\nvalue of a main snak of some statement.\n\n@param statementGroup\nthe statement group to scan\n@param value\nthe value to scan for\n@return true if value was found"
] | [
"Convert an Object to a Time, without an Exception",
"Use this API to unset the properties of nsacl6 resources.\nProperties that need to be unset are specified in args array.",
"Classify the contents of a file.\n\n@param filename\nContains the sentence(s) to be classified.\n@return {@link List} of classified List of IN.",
"Attempts exclusive acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success.",
"Starts or stops capturing.\n\n@param capture If true, capturing is started. If false, it is stopped.\n@param fps Capturing FPS (frames per second).",
"Updates the existing cluster such that we remove partitions mentioned\nfrom the stealer node and add them to the donor node\n\n@param currentCluster Existing cluster metadata. Both stealer and donor\nnode should already exist in this metadata\n@param stealerNodeId Id of node for which we are stealing the partitions\n@param donatedPartitions List of partitions we are moving\n@return Updated cluster metadata",
"create logs with given partition number\n\n@param topic the topic name\n@param partitions partition number\n@param forceEnlarge enlarge the partition number of log if smaller than runtime\n@return the partition number of the log after enlarging",
"Configs created by this ConfigBuilder will use the given Redis sentinels.\n\n@param sentinels the Redis set of sentinels\n@return this ConfigBuilder",
"Get a View that displays the data at the specified\nposition in the data set.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View"
] |
private void readTextsCompressed(File dir, HashMap results) throws IOException
{
if (dir.exists() && dir.isDirectory())
{
File[] files = dir.listFiles();
for (int idx = 0; idx < files.length; idx++)
{
if (files[idx].isDirectory())
{
continue;
}
results.put(files[idx].getName(), readTextCompressed(files[idx]));
}
}
} | [
"Reads the text files in the given directory and puts their content\nin the given map after compressing it. Note that this method does not\ntraverse recursivly into sub-directories.\n\n@param dir The directory to process\n@param results Map that will receive the contents (indexed by the relative filenames)\n@throws IOException If an error ocurred"
] | [
"Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource",
"Check whether the value is matched by a regular expression.\n\n@param value value\n@param regex regular expression\n@return true when value is matched",
"Parses chroot section of Zookeeper connection string\n\n@param zookeepers Zookeeper connection string\n@return Returns root path or \"/\" if none found",
"Determines whether a project has the specified publisher type, wrapped by the \"Flexible Publish\" publisher.\n@param project The project\n@param type The type of the publisher\n@return true if the project contains a publisher of the specified type wrapped by the \"Flexible Publish\" publisher.",
"Returns the names of the bundles configured as workplace bundles in any module configuration.\n@return the names of the bundles configured as workplace bundles in any module configuration.",
"Sets the target translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining",
"Removes elements from begin to end from the list, inclusive. Returns a new list which\nis composed of the removed elements",
"Checks the given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Updates the indices in the index buffer from a Java CharBuffer.\nAll of the entries of the input buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data CharBuffer containing the new values\n@throws IllegalArgumentException if char array is wrong size"
] |
public static Boolean compareSingleClientConfigAvro(String configAvro1, String configAvro2) {
Properties props1 = readSingleClientConfigAvro(configAvro1);
Properties props2 = readSingleClientConfigAvro(configAvro2);
if(props1.equals(props2)) {
return true;
} else {
return false;
}
} | [
"Compares two avro strings which contains single store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content"
] | [
"Create a smaller array from an existing one.\n\n@param strings an array containing element of type {@link String}\n@param begin the starting position of the sub-array\n@param length the number of element to consider\n@return a new array continaining only the selected elements",
"Register a loader with the 'sniffer'.\n\n'Factory loaders' are pre-registered. To load a format we don't support,\ncreate a {@link GVRCompressedTextureLoader} descendant. Then, before\ntrying to load any files in that format, create an instance and call\n{@link #register()}:\n\n<pre>\n\nnew MyCompressedFormat().register();\n</pre>",
"Use this API to fetch all the gslbrunningconfig resources that are configured on netscaler.",
"Detach any script file from a scriptable target.\n\n@param target The scriptable target.",
"Add a new subsystem to a given registry.\n\n@param registry the registry\n@param name the subsystem name\n@param version the version",
"Make a sort order for use in a query.",
"Create a ModelNode representing the operating system the instance is running on.\n\n@return a ModelNode representing the operating system the instance is running on.\n@throws OperationFailedException",
"Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance",
"Restores the dropout descriptor to a previously saved-off state"
] |
public synchronized GeoInterface getGeoInterface() {
if (geoInterface == null) {
geoInterface = new GeoInterface(apiKey, sharedSecret, transport);
}
return geoInterface;
} | [
"Get the geo interface.\n\n@return Access class to the flickr.photos.geo methods."
] | [
"Get a list of the members of a group. The call must be signed on behalf of a Flickr member, and the ability to see the group membership will be\ndetermined by the Flickr member's group privileges.\n\n@param groupId\nReturn a list of members for this group. The group must be viewable by the Flickr member on whose behalf the API call is made.\n@param memberTypes\nA set of Membertypes as available as constants in {@link Member}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A members-list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.members.getList.html\">API Documentation</a>",
"Check if the the nodeId is present in the cluster managed by the metadata store\nor throw an exception.\n\n@param nodeId The nodeId to check existence of",
"Use this API to rename a gslbservice resource.",
"Apply the necessary rotation to the transform so that it is in front of\nthe camera.\n\n@param transform The transform to modify.",
"Get the related tags.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param tag\nThe source tag\n@return A RelatedTagsList object\n@throws FlickrException",
"Access an attribute.\n\n@param type the attribute's type, not {@code null}\n@param key the attribute's key, not {@code null}\n@return the attribute value, or {@code null}.",
"Cancel request and worker on host.\n\n@param targetHosts\nthe target hosts",
"Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts.",
"Re-initializes the shader texture used to fill in\nthe Circle upon drawing."
] |
@RequestMapping(value = "api/edit/repeatNumber", method = RequestMethod.POST)
public
@ResponseBody
String updateRepeatNumber(Model model, int newNum, int path_id,
@RequestParam(defaultValue = Constants.PROFILE_CLIENT_DEFAULT_ID) String clientUUID) throws Exception {
logger.info("want to update repeat number of path_id={}, to newNum={}", path_id, newNum);
editService.updateRepeatNumber(newNum, path_id, clientUUID);
return null;
} | [
"Calls a method from editService to update the repeat number for a path\n\n@param model\n@param newNum\n@param path_id\n@param clientUUID\n@return\n@throws Exception"
] | [
"Return the list of module that uses the targeted artifact\n\n@param gavc String\n@param filters FiltersHolder\n@return List<DbModule>",
"Removes the given key with its associated element from the receiver, if present.\n\n@param key the key to be removed from the receiver.\n@return <tt>true</tt> if the receiver contained the specified key, <tt>false</tt> otherwise.",
"Get top deployment unit.\n\n@param unit the current deployment unit\n@return top deployment unit",
"Sets all padding to the same value.\n@param padding new padding for top, bottom, left, and right, ignored if smaller than 0\n@return this to allow chaining",
"Populate the supplied response with the model representation of the certificates.\n\n@param result the response to populate.\n@param certificates the certificates to add to the response.\n@throws CertificateEncodingException\n@throws NoSuchAlgorithmException",
"Add a user by ID to the list of people to notify when the retention period is ending.\n@param userID The ID of the user to add to the list.",
"Checks that the targetClass is widening the argument class\n\n@param argumentClass\n@param targetClass\n@return",
"Encode a long into a byte array at an offset\n\n@param ba Byte array\n@param offset Offset\n@param v Long value\n@return byte array given in input",
"Use this API to fetch filtered set of appqoepolicy resources.\nset the filter parameter values in filtervalue object."
] |
public static Node addPartitionsToNode(final Node node, final Set<Integer> donatedPartitions) {
List<Integer> deepCopy = new ArrayList<Integer>(node.getPartitionIds());
deepCopy.addAll(donatedPartitions);
Collections.sort(deepCopy);
return updateNode(node, deepCopy);
} | [
"Add the set of partitions to the node provided\n\n@param node The node to which we'll add the partitions\n@param donatedPartitions The list of partitions to add\n@return The new node with the new partitions"
] | [
"Set a custom response for this path\n\n@param pathName name of path\n@param customResponse value of custom response\n@return true if success, false otherwise\n@throws Exception exception",
"This method extracts data for a single predecessor from an MSPDI file.\n\n@param currTask Current task object\n@param link Predecessor data",
"Puts strings inside quotes and numerics are left as they are.\n@param str\n@return",
"This procedure is invoked to process the \"subst\" Tcl command.\nSee the user documentation for details on what it does.\n\n@param interp the current interpreter.\n@param argv command arguments.\n@exception TclException if wrong # of args or invalid argument(s).",
"The normalized string returned by this method is consistent with java.net.Inet6address.\n\nIPs are not compressed nor mixed in this representation. If this has a prefix length, that will be included in the string.",
"Publish finish events for each of the specified query labels\n\n<pre>\n{@code\nLabelledEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId Identifier\n@param bus EventBus to post events to\n@param labels Query types to post to event bus",
"Print out the template information that the client needs for performing a request.\n\n@param json the writer to write the information to.",
"Lookup Seam integration resource loader.\n@return the Seam integration resource loader\n@throws DeploymentUnitProcessingException for any error",
"Gets the matching beans for binding criteria from a list of beans\n\n@param resolvable the resolvable\n@return A set of filtered beans"
] |
public Object getProperty(String property) {
if(ExpandoMetaClass.isValidExpandoProperty(property)) {
if(property.equals(ExpandoMetaClass.STATIC_QUALIFIER) ||
property.equals(ExpandoMetaClass.CONSTRUCTOR) ||
myMetaClass.hasProperty(this, property) == null) {
return replaceDelegate().getProperty(property);
}
}
return myMetaClass.getProperty(this, property);
} | [
"this method mimics EMC behavior"
] | [
"a small static helper which catches nulls for us\n\n@param imageHolder\n@param ctx\n@param iconColor\n@param tint\n@return",
"Checks if request is intended for Gerrit host.",
"Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color",
"Adds the download button.\n\n@param view layout which displays the log file",
"A specific, existing project can be updated by making a PUT request on the\nURL for that project. Only the fields provided in the `data` block will be\nupdated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated project record.\n\n@param project The project to update.\n@return Request object",
"Read a list of fixed size blocks using an instance of the supplied reader class.\n\n@param readerClass reader class\n@return list of blocks",
"Use this API to fetch vlan_interface_binding resources of given name .",
"Use this API to fetch all the sslservice resources that are configured on netscaler.",
"Use this API to fetch all the sslparameter resources that are configured on netscaler."
] |
public static long hash(final BsonDocument doc) {
if (doc == null) {
return 0L;
}
final byte[] docBytes = toBytes(doc);
long hashValue = FNV_64BIT_OFFSET_BASIS;
for (int offset = 0; offset < docBytes.length; offset++) {
hashValue ^= (0xFF & docBytes[offset]);
hashValue *= FNV_64BIT_PRIME;
}
return hashValue;
} | [
"Implementation of FNV-1a hash algorithm.\n@see <a href=\"https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function\">\nttps://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function</a>\n@param doc the document to hash\n@return"
] | [
"Collect the URIs of resources, that are referenced by the given description.\n@return the list of referenced URIs. Never <code>null</code>.",
"needs to be resolved once extension beans are deployed",
"Parses and removes embedded gallery configuration strings.\n\n@param configuration the configuration string to parse\n\n@return a map containing both the string resulting from removing the embedded configurations, and the embedded configurations as a a map",
"Use this API to add ntpserver resources.",
"Reads all sub-categories below the provided category.\n@return The map from the provided category to it's sub-categories in a {@link CmsJspCategoryAccessBean}.",
"Logs binary string as hexadecimal",
"Gets bounds which are identical for all dimensions.\n\n@param dim The number of dimensions.\n@param l The value of all lower bounds.\n@param u The value of all upper bounds.\n@return The new bounds.",
"Used to determine if the current method should be ignored.\n\n@param name method name\n@return true if the method should be ignored",
"Get the DMR path for this node. For leaves, the DMR path is the path of its parent.\n@return The DMR path for this node."
] |
public static final TimeUnit parseDurationTimeUnits(BigInteger value, TimeUnit defaultValue)
{
TimeUnit result = defaultValue;
if (value != null)
{
switch (value.intValue())
{
case 3:
case 35:
{
result = TimeUnit.MINUTES;
break;
}
case 4:
case 36:
{
result = TimeUnit.ELAPSED_MINUTES;
break;
}
case 5:
case 37:
{
result = TimeUnit.HOURS;
break;
}
case 6:
case 38:
{
result = TimeUnit.ELAPSED_HOURS;
break;
}
case 7:
case 39:
case 53:
{
result = TimeUnit.DAYS;
break;
}
case 8:
case 40:
{
result = TimeUnit.ELAPSED_DAYS;
break;
}
case 9:
case 41:
{
result = TimeUnit.WEEKS;
break;
}
case 10:
case 42:
{
result = TimeUnit.ELAPSED_WEEKS;
break;
}
case 11:
case 43:
{
result = TimeUnit.MONTHS;
break;
}
case 12:
case 44:
{
result = TimeUnit.ELAPSED_MONTHS;
break;
}
case 19:
case 51:
{
result = TimeUnit.PERCENT;
break;
}
case 20:
case 52:
{
result = TimeUnit.ELAPSED_PERCENT;
break;
}
default:
{
result = PARENT_FILE.get().getProjectProperties().getDefaultDurationUnits();
break;
}
}
}
return (result);
} | [
"Parse duration time units.\n\nNote that we don't differentiate between confirmed and unconfirmed\ndurations. Unrecognised duration types are default the supplied default value.\n\n@param value BigInteger value\n@param defaultValue if value is null, use this value as the result\n@return Duration units"
] | [
"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 a list of Elements form the DOM tree, matching the tag element.",
"Converts the search results from CmsSearchResource to CmsSearchResourceBean.\n@param searchResults The collection of search results to transform.",
"lookup a ClassDescriptor in the internal Hashtable\n@param strClassName a fully qualified class name as it is returned by Class.getName().",
"Performs the BFS and gives the results to a distributor to distribute\n\n@param distributor the distributor",
"Creates a new row with content with given cell context and a normal row style.\n@param content the content for the row, each member of the array represents the content for a cell in the row, must not be null but can contain null members\n@return a new row with content\n@throws {@link NullPointerException} if content was null",
"Attempts to checkout a resource so that one queued request can be\nserviced.\n\n@param key The key for which to process the requestQueue\n@return true iff an item was processed from the Queue.",
"If a given x is into an interval of the partition, this method returns the reference point of the corresponding interval.\nIf the given x is not contained in any interval of the partition, this method returns x.\n\n@param x The point of interest.\n@return The discretized value.",
"Get logs for an app by specifying additional parameters.\n@param logRequest See {LogRequestBuilder}\n@return log stream response"
] |
public void logAttributeWarning(PathAddress address, ModelNode operation, String message, Set<String> attributes) {
messageQueue.add(new AttributeLogEntry(address, operation, message, attributes));
} | [
"Log a warning for the given operation at the provided address for the given attributes, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attributes attributes we that have problems about"
] | [
"Computes A-B\n\n@param listA\n@param listB\n@return",
"Returns the value of the identified field as a Date.\nTime fields returned from an FQL query are expressed in terms of seconds since midnight, January 1, 1970 UTC.\n@param fieldName the name of the field\n@return the value of the field as a Date\n@throws FqlException if the field's value cannot be expressed as a long value from which a Date object can be constructed.",
"Returns a PreparedStatementCreator that returns a page of the underlying\nresult set.\n\n@param dialect\nDatabase dialect to use.\n@param limit\nMaximum number of rows to return.\n@param offset\nIndex of the first row to return.",
"Use this API to fetch responderpolicy resource of given name .",
"Collapses all parents in a range of indices in the list of parents.\n\n@param startParentPosition The index at which to to start collapsing parents\n@param parentCount The number of parents to collapse",
"Obtains a local date in Symmetry454 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 Symmetry454 local date, not null\n@throws DateTimeException if unable to create the date",
"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.",
"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.",
"Find the index of the specified name in field name array."
] |
private void handleGetVersionResponse(SerialMessage incomingMessage) {
this.ZWaveLibraryType = incomingMessage.getMessagePayloadByte(12);
this.zWaveVersion = new String(ArrayUtils.subarray(incomingMessage.getMessagePayload(), 0, 11));
logger.debug(String.format("Got MessageGetVersion response. Version = %s, Library Type = 0x%02X", zWaveVersion, ZWaveLibraryType));
} | [
"Handles the response of the getVersion request.\n@param incomingMessage the response message to process."
] | [
"Encode a path in a manner suitable for a GET request\n@param in The path to encode, eg \"a/document\"\n@return The encoded path eg \"a%2Fdocument\"",
"Helper to generate the common configuration part for client-side and server-side widget.\n@return the common configuration options as map",
"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",
"Add an extension to the set of extensions.\n\n@param extension an extension",
"Get or create the log context based on the logging profile.\n\n@param loggingProfile the logging profile to get or create the log context for\n\n@return the log context that was found or a new log context",
"Sets the replace var map to single target.\n\n@param replacementVarMapList\nthe replacement var map list\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"Populates the bean by mapping the processed columns to the fields of the bean.\n\n@param resultBean\nthe bean to populate\n@param nameMapping\nthe name mappings\n@return the populated bean\n@throws SuperCsvReflectionException\nif there was a reflection exception while populating the bean",
"convert selector used in an upsert statement into a document",
"Validates aliases.\n\n@param uuid The structure id for which the aliases should be valid\n@param aliasPaths a map from id strings to alias paths\n@param callback the callback which should be called with the validation results"
] |
public Association getAssociation(String collectionRole) {
if ( associations == null ) {
return null;
}
return associations.get( collectionRole );
} | [
"Return the association as cached in the entry state.\n\n@param collectionRole the role of the association\n@return the cached association"
] | [
"Returns the list of atlas information necessary to map\nthe texture atlas to each scene object.\n\n@return List of atlas information.",
"Sets an Integer attribute.\n\n@param key the key, non null.\n@param value the value\n@return the Builder, for chaining.",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"Serialize an object with Json\n@param obj Object\n@return String\n@throws IOException",
"Use this API to delete nsip6 resources of given names.",
"Gets all tags that are \"prime\" tags.",
"Modies the matrix to make sure that at least one element in each column has a value",
"Returns the primarykey fields.\n\n@return The field descriptors of the primarykey fields",
"Creates the code mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param realOffsetStart\nthe real offset start\n@param realOffsetEnd\nthe real offset end\n@param codePositions\nthe code positions\n@throws IOException\nSignals that an I/O exception has occurred."
] |
public double d(double x){
int intervalNumber =getIntervalNumber(x);
if (intervalNumber==0 || intervalNumber==points.length) {
return x;
}
return getIntervalReferencePoint(intervalNumber-1);
} | [
"If a given x is into an interval of the partition, this method returns the reference point of the corresponding interval.\nIf the given x is not contained in any interval of the partition, this method returns x.\n\n@param x The point of interest.\n@return The discretized value."
] | [
"GetJob helper - String predicates are all created the same way, so this factors some code.",
"Decodes a signed request, returning the payload of the signed request as a Map\n@param signedRequest the value of the signed_request parameter sent by Facebook.\n@return the payload of the signed request as a Map\n@throws SignedRequestException if there is an error decoding the signed request",
"This can be called to adjust the size of the dialog glass. It\nis implemented using JSNI to bypass the \"private\" keyword on\nthe glassResizer.",
"Loads the schemas associated to this catalog.",
"Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above.",
"The click handler for the add button.",
"Rollback an app to a specific release.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param releaseUuid Release UUID. See {@link #listReleases} for a list of the app's releases.\n@return the release object",
"Remove a notification message. Recursive until all pending removals have been completed.",
"Create the metadata which gets send to the DC when registering.\n\n\n@param hostInfo the local host info\n@param productConfig the product config\n@param ignoredResourceRegistry registry of ignored resources\n@return the host info"
] |
public static boolean isConstantVal(DMatrixRMaj mat , double val , double tol )
{
// see if the result is an identity matrix
int index = 0;
for( int i = 0; i < mat.numRows; i++ ) {
for( int j = 0; j < mat.numCols; j++ ) {
if( !(Math.abs(mat.get(index++)-val) <= tol) )
return false;
}
}
return true;
} | [
"Checks to see if every value in the matrix is the specified value.\n\n@param mat The matrix being tested. Not modified.\n@param val Checks to see if every element in the matrix has this value.\n@param tol True if all the elements are within this tolerance.\n@return true if the test passes."
] | [
"Returns all the deployment runtime names associated with an overlay accross all server groups.\n\n@param context the current OperationContext.\n@param overlay the name of the overlay.\n@return all the deployment runtime names associated with an overlay accross all server groups.",
"Adds a slash to a path if it doesn't end with a slash.\n\n@param folderName The path to append a possible slash.\n@return The new, correct path.",
"This loads plugin file information into a hash for lazy loading later on\n\n@param pluginDirectory path of plugin\n@throws Exception exception",
"Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.",
"Get the refresh frequency of this scene object.\n\n@return The refresh frequency of this TextViewSceneObject.",
"Notifies that multiple header items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Builds the DynamicReport object. Cannot be used twice since this produced\nundesired results on the generated DynamicReport object\n\n@return",
"Prepare all tasks.\n\n@param entry the patch entry\n@param context the patch context\n@param tasks a list for prepared tasks\n@param conflicts a list for conflicting content items\n@throws PatchingException",
"URL-Decodes a given string using UTF-8. No UnsupportedEncodingException to handle as it is dealt with in this\nmethod."
] |
public static PackageType resolve(final MavenProject project) {
final String packaging = project.getPackaging().toLowerCase(Locale.ROOT);
if (DEFAULT_TYPES.containsKey(packaging)) {
return DEFAULT_TYPES.get(packaging);
}
return new PackageType(packaging);
} | [
"Resolves the package type from the maven project.\n\n@param project the maven project\n\n@return the package type"
] | [
"Searches the variables layers, top to bottom, for given name, and returns if found; null otherwise.\n\nIf maxDepth is set to {@link Variables#SEARCH_ALL_LAYERS}, then search all layers.",
"Use this API to delete application.",
"Returns the output path specified on the javadoc options",
"make a copy of the criteria\n@param includeGroupBy if true\n@param includeOrderBy if ture\n@param includePrefetchedRelationships if true\n@return a copy of the criteria",
"Remove attachments matches pattern from step and all step substeps\n\n@param context from which attachments will be removed",
"Converts the provided javascript object to JSON string.\n\n<p>If the object is a Map instance, it is stringified as key-value pairs, if it is a list, it is stringified as\na list, otherwise the object is merely converted to string using the {@code toString()} method.\n\n@param object the object to stringify.\n\n@return the object as a JSON string",
"Detect what has changed in the store definition and rewire BDB\nenvironments accordingly.\n\n@param storeDef updated store definition",
"Log a warning for the given operation at the provided address for the given attribute, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attribute attribute we that has problem",
"Check if the path to the property correspond to an association.\n\n@param targetTypeName the name of the entity containing the property\n@param pathWithoutAlias the path to the property WITHOUT aliases\n@return {@code true} if the property is an association or {@code false} otherwise"
] |
public static responderpolicylabel_responderpolicy_binding[] get(nitro_service service, String labelname) throws Exception{
responderpolicylabel_responderpolicy_binding obj = new responderpolicylabel_responderpolicy_binding();
obj.set_labelname(labelname);
responderpolicylabel_responderpolicy_binding response[] = (responderpolicylabel_responderpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch responderpolicylabel_responderpolicy_binding resources of given name ."
] | [
"Use this API to add sslocspresponder.",
"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.",
"Use this API to unset the properties of vridparam resource.\nProperties that need to be unset are specified in args array.",
"Token Info\nReturns the Token Information\n@return ApiResponse<TokenInfoSuccessResponse>\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Use this API to update filterhtmlinjectionparameter.",
"Use this API to fetch sslpolicy_lbvserver_binding resources of given name .",
"Executes the given transaction within the context of a write lock.\n\n@param t The transaction to execute.",
"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.",
"Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.\nIf it is valid, the initializer function is applied to it."
] |
public void setProjectionMatrix(float x1, float y1, float z1, float w1,
float x2, float y2, float z2, float w2, float x3, float y3,
float z3, float w3, float x4, float y4, float z4, float w4) {
NativeCustomCamera.setProjectionMatrix(getNative(), x1, y1, z1, w1, x2,
y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4);
} | [
"Set the custom projection matrix with individual matrix elements."
] | [
"Process the next event in a given stream.\n@return the fully processed event\n@throws IOException if a stream is in the wrong state, IO errors can be thrown",
"Reset the combination generator.",
"Use this API to fetch server_service_binding resources of given name .",
"Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space.",
"IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery",
"Requests the beat grid for a specific track ID, given a connection to a player that has already been set up.\n\n@param rekordboxId the track of interest\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved beat grid, or {@code null} if there was none available\n\n@throws IOException if there is a communication problem",
"Uploads a new file to this folder while reporting the progress to a ProgressListener.\n\n@param fileContent a stream containing the contents of the file to upload.\n@param name the name to give the uploaded file.\n@param fileSize the size of the file used for determining the progress of the upload.\n@param listener a listener for monitoring the upload's progress.\n@return the uploaded file's info.",
"Invoke an operation on an MBean by name.\nNote that only basic data types are supported for parameter values.\n@param operationName the operation name (can be URL-encoded).\n@param parameterMap the {@link Map} of parameter names and value arrays.\n@return the returned value from the operation.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Encodes the given URI host with the given encoding.\n@param host the host to be encoded\n@param encoding the character encoding to encode to\n@return the encoded host\n@throws UnsupportedEncodingException when the given encoding parameter is not supported"
] |
public void commit() {
if (directory == null)
return;
try {
if (reader != null)
reader.close();
// it turns out that IndexWriter.optimize actually slows
// searches down, because it invalidates the cache. therefore
// not calling it any more.
// http://www.searchworkings.org/blog/-/blogs/uwe-says%3A-is-your-reader-atomic
// iwriter.optimize();
iwriter.commit();
openSearchers();
} catch (IOException e) {
throw new DukeException(e);
}
} | [
"Flushes all changes to disk."
] | [
"Do some magic to turn request parameters into a context object",
"Sets the max min.\n\n@param n the new max min",
"Creates the save and exit button UI Component.\n@return the save and exit button.",
"Creates a document for the resource without extracting the content. The aim is to get a content indexed,\neven if extraction runs into a timeout.\n\n@return the document for the resource generated if the content is discarded,\ni.e., only meta information are indexed.",
"This method allows a resource assignment to be added to the\ncurrent task.\n\n@param resource the resource to assign\n@return ResourceAssignment object",
"Sets the target translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining",
"Validate some of the properties of this layer.",
"Gets a JavaMail Session for given server type such as IMAP and additional props for JavaMail.\n\n@param setup the setup type, such as <code>ServerSetup.IMAP</code>\n@param mailProps additional mail properties.\n@return the JavaMail session.",
"Adds a file with the provided description."
] |
public static int bilinearInterpolate(float x, float y, int nw, int ne, int sw, int se) {
float m0, m1;
int a0 = (nw >> 24) & 0xff;
int r0 = (nw >> 16) & 0xff;
int g0 = (nw >> 8) & 0xff;
int b0 = nw & 0xff;
int a1 = (ne >> 24) & 0xff;
int r1 = (ne >> 16) & 0xff;
int g1 = (ne >> 8) & 0xff;
int b1 = ne & 0xff;
int a2 = (sw >> 24) & 0xff;
int r2 = (sw >> 16) & 0xff;
int g2 = (sw >> 8) & 0xff;
int b2 = sw & 0xff;
int a3 = (se >> 24) & 0xff;
int r3 = (se >> 16) & 0xff;
int g3 = (se >> 8) & 0xff;
int b3 = se & 0xff;
float cx = 1.0f-x;
float cy = 1.0f-y;
m0 = cx * a0 + x * a1;
m1 = cx * a2 + x * a3;
int a = (int)(cy * m0 + y * m1);
m0 = cx * r0 + x * r1;
m1 = cx * r2 + x * r3;
int r = (int)(cy * m0 + y * m1);
m0 = cx * g0 + x * g1;
m1 = cx * g2 + x * g3;
int g = (int)(cy * m0 + y * m1);
m0 = cx * b0 + x * b1;
m1 = cx * b2 + x * b3;
int b = (int)(cy * m0 + y * m1);
return (a << 24) | (r << 16) | (g << 8) | b;
} | [
"Bilinear interpolation of ARGB values.\n@param x the X interpolation parameter 0..1\n@param y the y interpolation parameter 0..1\n@param rgb array of four ARGB values in the order NW, NE, SW, SE\n@return the interpolated value"
] | [
"Handles the response of the SerialApiGetInitData request.\n@param incomingMlivessage the response message to process.",
"Get the sub registry for the servers.\n\n@param range the version range\n@return the sub registry",
"The document field must not exist in the list provided\n@param rhs The argument - one or more values\n@return PredicateExpression: $nin rhs",
"Create a SVG graphic with the give dimensions.\n\n@param size The size of the SVG graphic.",
"Get a prefix for the log message to help identify which request is which and which responses\nbelong to which requests.",
"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.",
"This method writes data for a single calendar to a Planner file.\n\n@param mpxjCalendar MPXJ calendar instance\n@param plannerCalendar Planner calendar instance\n@throws JAXBException on xml creation errors",
"Convert raw data into Java types.\n\n@param type data type\n@param data raw data\n@return list of Java object",
"Implement the persistence handler for storing the user properties."
] |
@Override
public Response doRequest(final StitchRequest stitchReq) {
initAppMetadata(clientAppId);
return super.doRequestUrl(stitchReq, getHostname());
} | [
"Performs a request against a Stitch app server determined by the deployment model\nof the underlying app. Throws a Stitch specific exception if the request fails.\n\n@param stitchReq the request to perform.\n@return a {@link Response} to the request."
] | [
"Transform the given bytes into an object.\n\n@param bytes The bytes to construct the object from\n@return The object constructed",
"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",
"Use this API to update autoscaleprofile resources.",
"Sets the the time of day\n\n@param hours the hours to set. Must be guaranteed to parse as an\ninteger between 0 and 23\n\n@param minutes the minutes to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param seconds the optional seconds to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param amPm the meridian indicator to use. Must be either 'am' or 'pm'\n\n@param zoneString the time zone to use in one of two formats:\n- zoneinfo format (America/New_York, America/Los_Angeles, etc)\n- GMT offset (+05:00, -0500, +5, etc)",
"Read all task relationships from a GanttProject.\n\n@param gpProject GanttProject project",
"Retrieve the routing type value from the REST request.\n\"X_VOLD_ROUTING_TYPE_CODE\" is the routing type header.\n\nBy default, the routing code is set to NORMAL\n\nTODO REST-Server 1. Change the header name to a better name. 2. Assumes\nthat integer is passed in the header",
"Removes the specified entry point\n\n@param controlPoint The entry point",
"Configure the mapping between a database column and a field.\n\n@param container column to field map\n@param name column name\n@param type field type",
"Adds a clause that checks whether ANY set bits in a bitmask are present\nin a numeric expression.\n\n@param expr\nSQL numeric expression to check.\n@param bits\nInteger containing the bits for which to check."
] |
@ArgumentsChecked
@Throws(IllegalNullArgumentException.class)
public static int checkLong(@Nonnull final Number number) {
Check.notNull(number, "number");
if (!isInLongRange(number)) {
throw new IllegalNumberRangeException(number.toString(), LONG_MIN, LONG_MAX);
}
return number.intValue();
} | [
"Checks if a given number is in the range of a long.\n\n@param number\na number which should be in the range of a long (positive or negative)\n\n@see java.lang.Long#MIN_VALUE\n@see java.lang.Long#MAX_VALUE\n\n@return number as a long (rounding might occur)"
] | [
"Generate a currency format.\n\n@param position currency symbol position\n@return currency format",
"Build call for getCharactersCharacterIdShip\n\n@param characterId\nAn EVE character ID (required)\n@param datasource\nThe server name you would like data from (optional, default to\ntranquility)\n@param ifNoneMatch\nETag from a previous request. A 304 will be returned if this\nmatches the current ETag (optional)\n@param token\nAccess token to use if unable to set a header (optional)\n@param callback\nCallback for upload/download progress\n@return Call to execute\n@throws ApiException\nIf fail to serialize the request body object",
"Drops a driver from the DriverManager's list.",
"Convert event type.\n\n@param eventType the event type\n@return the event enum type",
"Set the enum representing the type of this column.\n\n@param tableType type of table to which this column belongs",
"Append the Parameter\nAdd the place holder ? or the SubQuery\n@param value the value of the criteria",
"Read filename from spec.",
"Populates a resource availability table.\n\n@param table resource availability table\n@param data file data",
"Use this API to fetch all the nsfeature resources that are configured on netscaler."
] |
public static appfwjsoncontenttype[] get(nitro_service service, String jsoncontenttypevalue[]) throws Exception{
if (jsoncontenttypevalue !=null && jsoncontenttypevalue.length>0) {
appfwjsoncontenttype response[] = new appfwjsoncontenttype[jsoncontenttypevalue.length];
appfwjsoncontenttype obj[] = new appfwjsoncontenttype[jsoncontenttypevalue.length];
for (int i=0;i<jsoncontenttypevalue.length;i++) {
obj[i] = new appfwjsoncontenttype();
obj[i].set_jsoncontenttypevalue(jsoncontenttypevalue[i]);
response[i] = (appfwjsoncontenttype) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"Use this API to fetch appfwjsoncontenttype resources of given names ."
] | [
"Notify all WorkerListeners currently registered for the given WorkerEvent.\n@param event the WorkerEvent that occurred\n@param worker the Worker that the event occurred in\n@param queue the queue the Worker is processing\n@param job the Job related to the event (only supply for JOB_PROCESS, JOB_EXECUTE, JOB_SUCCESS, and\nJOB_FAILURE events)\n@param runner the materialized object that the Job specified (only supply for JOB_EXECUTE and\nJOB_SUCCESS events)\n@param result the result of the successful execution of the Job (only set for JOB_SUCCESS and if the Job was\na Callable that returned a value)\n@param t the Throwable that caused the event (only supply for JOB_FAILURE and ERROR events)",
"Gets an iterable of all the groups in the enterprise that are starting with the given name string.\n@param api the API connection to be used when retrieving the groups.\n@param name the name prefix of the groups. If the groups need to searched by full name that has spaces,\nthen the parameter string should have been wrapped with \"\".\n@return an iterable containing info about all the groups.",
"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",
"This continuously tries to reconnect in a separate thread and will only stop if the connection was established\nsuccessfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters\nand callback will get updated.\n\n@param reconnectUri the updated connection uri\n@param authKey the updated authentication key\n@param callback the current callback",
"Select a List of characters from a CharSequence using a Collection\nto identify the indices to be selected.\n\n@param self a CharSequence\n@param indices a Collection of indices\n@return a String consisting of the characters at the given indices\n@since 1.0",
"Returns the default table name for this class which is the unqualified class name.\n\n@return The default table name",
"Replaces each substring of this CharSequence that matches the given\nregular expression with the given replacement.\n\n@param self a CharSequence\n@param regex the capturing regex\n@param replacement the string to be substituted for each match\n@return the toString() of the CharSequence with content replaced\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceAll(String, String)\n@since 1.8.2",
"Given a Task instance, this task determines if it should be written to the\nPM XML file as an activity or as a WBS item, and calls the appropriate\nmethod.\n\n@param task Task instance",
"Process the response by reporting proper log and feeding failure\ndetectors\n\n@param response\n@param pipeline"
] |
public static void assertValidNode(MetadataStore metadataStore, Integer nodeId) {
if(!metadataStore.getCluster().hasNodeWithId(nodeId)) {
throw new InvalidMetadataException("NodeId " + nodeId + " is not or no longer in this cluster");
}
} | [
"Check if the the nodeId is present in the cluster managed by the metadata store\nor throw an exception.\n\n@param nodeId The nodeId to check existence of"
] | [
"Returns the value of the identified field as a Boolean.\n@param fieldName the name of the field\n@return the value of the field as a Boolean",
"Executes all event manipulating handler and writes the event with persist\nhandler.\n\n@param events the events",
"Adds an alias to the currently configured site.\n\n@param alias the URL of the alias server\n@param redirect <code>true</code> to always redirect to main URL\n@param offset the optional time offset for this alias",
"This method is used to extract the resource hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param resource resource instance\n@param data hyperlink data block",
"Sets the value associated with the given key; if the the key is one\nof the hashable keys, throws an exception.\n\n@throws HashableCoreMapException Attempting to set the value for an\nimmutable, hashable key.",
"This method returns the value of the product using a Black-Scholes model for the swap rate\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve on which to value the swap.\n@param swaprateVolatility The Black volatility.\n@return Value of this product",
"Returns a predicate that takes no parameters. The given SQL expression is\nused directly.\n\n@param sql\nSQL text of the expression",
"LRN cross-channel forward computation. Double parameters cast to tensor data type",
"Use this API to fetch all the nslimitselector resources that are configured on netscaler."
] |
public static Thread addShutdownHook(final Process process) {
final Thread thread = new Thread(new Runnable() {
@Override
public void run() {
if (process != null) {
process.destroy();
try {
process.waitFor();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
}
});
thread.setDaemon(true);
Runtime.getRuntime().addShutdownHook(thread);
return thread;
} | [
"Adds a shutdown hook for the process.\n\n@param process the process to add a shutdown hook for\n\n@return the thread set as the shutdown hook\n\n@throws java.lang.SecurityException If a security manager is present and it denies {@link\njava.lang.RuntimePermission <code>RuntimePermission(\"shutdownHooks\")</code>}"
] | [
"Closes the transactor node by removing its node in Zookeeper",
"Closes all the producers in the pool",
"bind attribute and value\n@param stmt\n@param index\n@param attributeOrQuery\n@param value\n@param cld\n@return\n@throws SQLException",
"Use this API to fetch all the vpnclientlessaccesspolicy resources that are configured on netscaler.",
"This method reads a byte array from the input stream.\n\n@param is the input stream\n@param size number of bytes to read\n@return byte array\n@throws IOException on file read error or EOF",
"Add a clause where the ID is equal to the argument.",
"Get the property of the given object.\n\n@param object which to be got\n@return the property of the given object\n@throws RuntimeException if the property could not be evaluated",
"Reconnect the sequence flows and the flow nodes.\nDone after the initial pass so that we have all the target information.",
"Extract child task data.\n\n@param task MPXJ task\n@param row Synchro task data"
] |
public static void acceptsDir(OptionParser parser) {
parser.acceptsAll(Arrays.asList(OPT_D, OPT_DIR), "directory path for input/output")
.withRequiredArg()
.describedAs("dir-path")
.ofType(String.class);
} | [
"Adds OPT_D | OPT_DIR option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional"
] | [
"Returns the bill for the month specified.\n\n@param month for which bill to retrieve.\n@param year for which bill to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Check that each requirement is satisfied.\n\n@param currentPath the json path to the element being checked",
"Retrieve a field from a particular entity using its alias.\n\n@param typeClass the type of entity we are interested in\n@param alias the alias\n@return the field type referred to be the alias, or null if not found",
"This method determines whether the cost rate table should be written.\nA default cost rate table should not be written to the file.\n\n@param entry cost rate table entry\n@param from from date\n@return boolean flag",
"Add an exception to a calendar.\n\n@param parentNode parent node\n@param exception calendar exceptions",
"Determines the feature state\n\n@param context the template context\n@param tag the tag\n@param attributeName the attribute name\n@param attributeValue the attribute value\n@param defaultState the default state if the expression evaluates to null\n@return the feature state",
"Converts assignment duration values from minutes to hours.\n\n@param list assignment data",
"Remove the realm name block.\n\n@see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String)",
"Set dates where the event should not take place, even if they are part of the series.\n@param dates dates to set."
] |
public static String determineAccessorName(@Nonnull final AccessorPrefix prefix, @Nonnull final String fieldName) {
Check.notNull(prefix, "prefix");
Check.notEmpty(fieldName, "fieldName");
final Matcher m = PATTERN.matcher(fieldName);
Check.stateIsTrue(m.find(), "passed field name '%s' is not applicable", fieldName);
final String name = m.group();
return prefix.getPrefix() + name.substring(0, 1).toUpperCase() + name.substring(1);
} | [
"Determines the accessor method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name"
] | [
"Calculates ATM Bachelier implied volatilities.\n\n@see net.finmath.functions.AnalyticFormulas#bachelierOptionImpliedVolatility(double, double, double, double, double)\n\n@param optionValue RandomVarable representing the value of the option\n@param optionMaturity Time to maturity.\n@param swapAnnuity The swap annuity as seen on valuation time.\n@return The Bachelier implied volatility.",
"Obtains a Accounting zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Execute a partitioned query using an index and a query selector.\n\nOnly available in partitioned databases. To verify a database is partitioned call\n{@link Database#info()} and check that {@link DbInfo.Props#getPartitioned()} returns\n{@code true}.\n\n<p>Example usage:</p>\n<pre>\n{@code\n// Query database partition 'Coppola'.\nQueryResult<Movie> movies = db.query(\"Coppola\", new QueryBuilder(and(\ngt(\"Movie_year\", 1960),\neq(\"Person_name\", \"Al Pacino\"))).\nfields(\"Movie_name\", \"Movie_year\").\nbuild(), Movie.class);\n}\n</pre>\n\n@param partitionKey Database partition to query.\n@param query String representation of a JSON object describing criteria used to\nselect documents.\n@param classOfT The class of Java objects to be returned in the {@code docs} field of\nresult.\n@param <T> The type of the Java object to be returned in the {@code docs} field of\nresult.\n@return A {@link QueryResult} object, containing the documents matching the query\nin the {@code docs} field.\n@see com.cloudant.client.api.Database#query(String, Class)",
"Repeat a CharSequence a certain number of times.\n\n@param self a CharSequence to be repeated\n@param factor the number of times the CharSequence should be repeated\n@return a String composed of a repetition\n@throws IllegalArgumentException if the number of repetitions is < 0\n@since 1.8.2",
"Use this API to fetch all the nsdiameter resources that are configured on netscaler.",
"The service name to be removed. Can be overridden for unusual service naming patterns\n@param name The name of the resource being removed\n@return The service name to remove. May return {@code null} if only removal based on {@code unavailableCapabilities}\npassed to the constructor are to be performed",
"Ensures that the specified fields are present in the given class.\n\n@param classDef The class to copy the fields into\n@param fields The fields to copy\n@throws ConstraintException If there is a conflict between the new fields and fields in the class",
"In the case where the prefix sits at a segment boundary, and the prefix sequence is null - null - 0, this changes to prefix sequence of null - x - 0, where x is segment bit length.\n\nNote: We allow both [null, null, 0] and [null, x, 0] where x is segment length. However, to avoid inconsistencies when doing segment replacements,\nand when getting subsections, in the calling constructor we normalize [null, null, 0] to become [null, x, 0].\nWe need to support [null, x, 0] so that we can create subsections and full addresses ending with [null, x] where x is bit length.\nSo we defer to that when constructing addresses and sections.\nAlso note that in our append/appendNetowrk/insert/replace we have special handling for cases like inserting [null] into [null, 8, 0] at index 2.\nThe straight replace would give [null, 8, null, 0] which is wrong.\nIn that code we end up with [null, null, 8, 0] by doing a special trick:\nWe remove the end of [null, 8, 0] and do an append [null, 0] and we'd remove prefix from [null, 8] to get [null, null] and then we'd do another append to get [null, null, null, 0]\nThe final step is this normalization here that gives [null, null, 8, 0]\n\nHowever, when users construct AddressDivisionGrouping or IPAddressDivisionGrouping, either one is allowed: [null, null, 0] and [null, x, 0].\nSince those objects cannot be further subdivided with getSection/getNetworkSection/getHostSection or grown with appended/inserted/replaced,\nthere are no inconsistencies introduced, we are simply more user-friendly.\nAlso note that normalization of AddressDivisionGrouping or IPAddressDivisionGrouping is really not possible without the address creator objects we use for addresses and sections,\nthat allow us to recreate new segments of the correct type.\n\n@param sectionPrefixBits\n@param segments\n@param segmentBitCount\n@param segmentByteCount\n@param segProducer",
"Write a map field to the JSON file.\n\n@param fieldName field name\n@param value field value"
] |
public Set<Class<?>> getPrevented() {
if (this.prevent == null) {
return Collections.emptySet();
}
return Collections.unmodifiableSet(this.prevent);
} | [
"Gets the listener classes to which dispatching should be prevented while\nthis event is being dispatched.\n\n@return The listener classes marked to prevent.\n@see #preventCascade(Class)"
] | [
"Sets the right padding character for all cells in the table.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining",
"Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order",
"Scans a single class for Swagger annotations - does not invoke ReaderListeners",
"Multiply scalar value to a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the multiply of specified complex number with the scalar value.",
"Commits the working copy.\n\n@param commitMessage@return The commit info upon successful operation.\n@throws IOException On IO of SVN failure",
"Sets the country for which currencies should be requested.\n\n@param countries The ISO countries.\n@return the query for chaining.",
"Get the current attribute type.\n@param key the entry's key, not null\n@return the current attribute type, or null, if no such attribute exists.",
"Update the default time unit for durations based on data read from the file.\n\n@param column column data",
"The keywords to include in the PDF metadata.\n\n@param keywords the keywords of the PDF."
] |
private int indexFor(int hash)
{
// mix the bits to avoid bucket collisions...
hash += ~(hash << 15);
hash ^= (hash >>> 10);
hash += (hash << 3);
hash ^= (hash >>> 6);
hash += ~(hash << 11);
hash ^= (hash >>> 16);
return hash & (table.length - 1);
} | [
"Converts the given hash code into an index into the\nhash table."
] | [
"Assigns a list of nodes in the cluster represented by this failure\ndetector configuration.\n\n@param nodes Collection of Node instances, usually determined from the\nCluster; must be non-null",
"Walk through the object graph of the specified insert object. Was used for\nrecursive object graph walk.",
"sets the class object described by this descriptor.\n@param c the class to describe",
"Destroys the context",
"Count the number of working hours in a day, based in the\ninteger representation of the working hours.\n\n@param hours working hours\n@return number of hours",
"Resets the text box by removing its content and resetting visual state.",
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response",
"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",
"Maps a story if it is allowed by the meta filter\n\n@param story\nthe Story\n@param metaFilter\nthe meta filter"
] |
private void parseUsersAuthentication(final XMLExtendedStreamReader reader,
final ModelNode realmAddress, final List<ModelNode> list)
throws XMLStreamException {
final ModelNode usersAddress = realmAddress.clone().add(AUTHENTICATION, USERS);
list.add(Util.getEmptyOperation(ADD, usersAddress));
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case USER: {
parseUser(reader, usersAddress, list);
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
} | [
"The users element defines users within the domain model, it is a simple authentication for some out of the box users."
] | [
"Add a raw SQL \"GROUP BY\" clause to the SQL query statement. This should not include the \"GROUP BY\".",
"Replace full request content.\n\n@param requestContentTemplate\nthe request content template\n@param replacementString\nthe replacement string\n@return the string",
"Replies the elements of the left map without the pairs in the right map.\nIf the pair's values differ from\nthe value within the map, the map entry is not removed.\n\n<p>\nThe difference is an immutable\nsnapshot of the state of the maps at the time this method is called. It\nwill never change, even if the maps change at a later time.\n</p>\n\n<p>\nSince this method uses {@code HashMap} instances internally, the keys of\nthe supplied maps must be well-behaved with respect to\n{@link Object#equals} and {@link Object#hashCode}.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to update.\n@param right the pairs to remove.\n@return the map with the content of the left map except the pairs of the right map.\n@since 2.15",
"Creates a searchable item that represents a metadata field found for a track.\n\n@param menuItem the rendered menu item containing the searchable metadata field\n@return the searchable metadata field",
"1-D Double array to integer array.\n\n@param array Double array.\n@return Integer array.",
"Use this API to fetch filtered set of gslbservice resources.\nset the filter parameter values in filtervalue object.",
"For a cert we have generated, return the private key.\n@param cert\n@return\n@throws CertificateEncodingException\n@throws KeyStoreException\n@throws UnrecoverableKeyException\n@throws NoSuchAlgorithmException",
"Returns the 'Up' - vector of the camera coordinate system.\n\nThe returned vector is relative to the coordinate space defined by the\ncorresponding node.<p>\n\nThe 'right' vector of the camera coordinate system is the cross product\nof the up and lookAt vectors. The default value is 0|1|0. The vector\nmay be normalized, but it needn't.<p>\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built-in behavior is to return a {@link AiVector}.\n\n@param wrapperProvider the wrapper provider (used for type inference)\n@return the 'Up' vector",
"Get the collection of public contacts for the specified user ID.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The Collection of Contact objects\n@throws FlickrException"
] |
public Collection<QName> getPortComponentQNames()
{
//TODO:Check if there is just one QName that drives all portcomponents
//or each port component can have a distinct QName (namespace/prefix)
//Maintain uniqueness of the QName
Map<String, QName> map = new HashMap<String, QName>();
for (PortComponentMetaData pcm : portComponents)
{
QName qname = pcm.getWsdlPort();
map.put(qname.getPrefix(), qname);
}
return map.values();
} | [
"Get the QNames of the port components to be declared\nin the namespaces\n\n@return collection of QNames"
] | [
"Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.\n\n@param flatParent Flat parent archetype\n@param specialized Specialized archetype",
"Check the variable name and if not set, set it with the singleton variable being on the top of the stack.",
"Write entries into the storage.\nOverriding methods should first delegate to super before adding their own entries.",
"Collect the total times measured by all known named timers of the given\nname. This is useful to add up times that were collected across separate\nthreads.\n\n@param timerName\n@return timer",
"Initialize the pattern controllers.",
"Harvest any values that may have been returned during the execution\nof a procedure.\n\n@param proc the procedure descriptor that provides info about the procedure\nthat was invoked.\n@param obj the object that was persisted\n@param stmt the statement that was used to persist the object.\n\n@throws PersistenceBrokerSQLException if a problem occurs.",
"Mark root of this task task group depends on the given TaskItem.\nThis ensure this task group's root get picked for execution only after the completion\nof invocation of provided TaskItem.\n\n@param dependencyTaskItem the task item that this task group depends on\n@return the key of the dependency",
"Sets the number of ms to wait before attempting to obtain a connection again after a failure.\n@param acquireRetryDelay the acquireRetryDelay to set\n@param timeUnit time granularity",
"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."
] |
protected HttpUriRequest createHttpRequest(HttpMethod httpMethod, URI uri) {
switch (httpMethod) {
case GET:
return new HttpGet(uri);
case DELETE:
return new HttpDelete(uri);
case HEAD:
return new HttpHead(uri);
case OPTIONS:
return new HttpOptions(uri);
case POST:
return new HttpPost(uri);
case PUT:
return new HttpPut(uri);
case TRACE:
return new HttpTrace(uri);
default:
throw new IllegalArgumentException("Invalid HTTP method: " + httpMethod);
}
} | [
"Create a HttpComponents HttpUriRequest object for the given HTTP method and URI specification.\n\n@param httpMethod the HTTP method\n@param uri the URI\n@return the HttpComponents HttpUriRequest object"
] | [
"Gets the Kumar-Johnson divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Kumar-Johnson divergence between p and q.",
"Convert a SSE to a Stitch SSE\n@param event SSE to convert\n@param decoder decoder for decoding data\n@param <T> type to decode data to\n@return a Stitch server-sent event",
"In Gerrit < 2.12 the XSRF token was included in the start page HTML.",
"Recursively update parent task dates.\n\n@param parentTask parent task",
"Retrieve a calendar exception which applies to this date.\n\n@param date target date\n@return calendar exception, or null if none match this date",
"Gets currently visible user.\n\n@return List of user",
"Utility to list indexes of a given type.\n\n@param type the type of index to list, null means all types\n@param modelType the class to deserialize the index into\n@param <T> the type of the index\n@return the list of indexes of the specified type",
"Wrapper delayed emission, based on delayProvider.\n\n@param event the event to emit\n@param milliseconds the delay in milliseconds\n@param <T> the type of event\n@return delayed observable",
"Record the resource request wait time in us\n\n@param dest Destination of the socket for which the resource was\nrequested. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param resourceRequestTimeUs The number of us to wait before getting a\nsocket"
] |
public List<File> getInactiveOverlays() throws PatchingException {
if (referencedOverlayDirectories == null) {
walk();
}
List<File> inactiveDirs = null;
for (Layer layer : installedIdentity.getLayers()) {
final File overlaysDir = new File(layer.getDirectoryStructure().getModuleRoot(), Constants.OVERLAYS);
final File[] inactiveLayerDirs = overlaysDir.listFiles(new FileFilter() {
@Override
public boolean accept(File pathname) {
return pathname.isDirectory() && !referencedOverlayDirectories.contains(pathname);
}
});
if (inactiveLayerDirs != null && inactiveLayerDirs.length > 0) {
if (inactiveDirs == null) {
inactiveDirs = new ArrayList<File>();
}
inactiveDirs.addAll(Arrays.asList(inactiveLayerDirs));
}
}
return inactiveDirs == null ? Collections.<File>emptyList() : inactiveDirs;
} | [
"Get the inactive overlay directories.\n\n@return the inactive overlay directories"
] | [
"Attempts exclusive acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success.",
"Rollback the last applied patch.\n\n@param contentPolicy the content policy\n@param resetConfiguration whether to reset the configuration\n@param modification the installation modification\n@return the patching result\n@throws PatchingException",
"Given a list of partition plans and a set of stores, copies the store\nnames to every individual plan and creates a new list\n\n@param existingPlanList Existing partition plan list\n@param storeDefs List of store names we are rebalancing\n@return List of updated partition plan",
"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",
"Obtains a Symmetry010 zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, or the default if the value is null or the key is not part of the map.",
"Mirrors the given bitmap",
"Create and return a SelectIterator for the class using the default mapped query for all statement.",
"Sets ID field value.\n\n@param val value"
] |
public final void fatal(Object pObject)
{
getLogger().log(FQCN, Level.FATAL, pObject, null);
} | [
"generate a message for loglevel FATAL\n\n@param pObject the message Object"
] | [
"The only indication that a task is a SubProject is the contents\nof the subproject file name field. We test these here then add a skeleton\nsubproject structure to match the way we do things with MPP files.",
"When the JRField needs properties, use this method.\n@param propertyName\n@param value\n@return",
"Checks to see if a handler is disabled\n\n@param handlerName the name of the handler to enable.",
"Use this API to unset the properties of protocolhttpband resource.\nProperties that need to be unset are specified in args array.",
"This method extracts candidate elements from the current DOM tree in the browser, based on\nthe crawl tags defined by the user.\n\n@param currentState the state in which this extract method is requested.\n@return a list of candidate elements that are not excluded.\n@throws CrawljaxException if the method fails.",
"Get the FieldDescriptor for the PathInfo\n\n@param aTableAlias\n@param aPathInfo\n@return FieldDescriptor",
"Returns the total number of times the app has been launched\n@return Total number of app launches in int",
"Convert a Java String instance into the equivalent array of single or\ndouble bytes.\n\n@param value Java String instance representing text\n@param unicode true if double byte characters are required\n@return byte array representing the supplied text",
"Return a list of the top 100 unique places clustered by a given placetype for a user.\n\n@param placeType\nUse Type-constants at {@link Place}\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null.\n@param placeId\nA Flickr Places ID. Optional, can be null.\n@param threshold\nThe minimum number of photos that a place type must have to be included. If the number of photos is lowered then the parent place type for\nthat place will be used. Optional, can be null.\n@param minUploadDate\nOptional, can be null.\n@param maxUploadDate\nOptional, can be null.\n@param minTakenDate\nOptional, can be null.\n@param maxTakenDate\nOptional, can be null.\n@return A PlacesList\n@throws FlickrException"
] |
public static void dumpTexCoords(AiMesh mesh, int coords) {
if (!mesh.hasTexCoords(coords)) {
System.out.println("mesh has no texture coordinate set " + coords);
return;
}
for (int i = 0; i < mesh.getNumVertices(); i++) {
int numComponents = mesh.getNumUVComponents(coords);
System.out.print("[" + mesh.getTexCoordU(i, coords));
if (numComponents > 1) {
System.out.print(", " + mesh.getTexCoordV(i, coords));
}
if (numComponents > 2) {
System.out.print(", " + mesh.getTexCoordW(i, coords));
}
System.out.println("]");
}
} | [
"Dumps a texture coordinate set of a mesh to stdout.\n\n@param mesh the mesh\n@param coords the coordinates"
] | [
"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",
"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.",
"Creates an element that represents a rectangle drawn at the specified coordinates in the page.\n@param x the X coordinate of the rectangle\n@param y the Y coordinate of the rectangle\n@param width the width of the rectangle\n@param height the height of the rectangle\n@param stroke should there be a stroke around?\n@param fill should the rectangle be filled?\n@return the resulting DOM element",
"Return a new client that may be cached or not. Given properties are always use when not cached, and only used at creation time for\ncached clients.\n\n@param name\nif null, default client. Otherwise, helpful to retrieve cached clients later.\n@param p\na set of properties. Implementation specific. Unknown properties are silently ignored.\n@param cached\nif false, the client will not be cached and subsequent calls with the same name will return different objects.",
"Set the specific device class of the node.\n@param specificDeviceClass the specificDeviceClass to set\n@exception IllegalArgumentException thrown when the specific device class does not match\nthe generic device class.",
"Makes a DocumentReaderAndWriter based on\nflags.plainTextReaderAndWriter. Useful for reading in\nuntokenized text documents or reading plain text from the command\nline. An example of a way to use this would be to return a\nedu.stanford.nlp.wordseg.Sighan2005DocumentReaderAndWriter for\nthe Chinese Segmenter.",
"This method is called by the ++ operator for the class CharSequence.\nIt increments the last character in the given CharSequence. If the last\ncharacter in the CharSequence is Character.MAX_VALUE a Character.MIN_VALUE\nwill be appended. The empty CharSequence is incremented to a string\nconsisting of the character Character.MIN_VALUE.\n\n@param self a CharSequence\n@return a value obtained by incrementing the toString() of the CharSequence\n@since 1.8.2",
"Parses a PDF document and serializes the resulting DOM tree to an output. This requires\na DOM Level 3 capable implementation to be available.",
"Adds a materialization listener.\n\n@param listener\nThe listener to add"
] |
public static bridgegroup_nsip_binding[] get(nitro_service service, Long id) throws Exception{
bridgegroup_nsip_binding obj = new bridgegroup_nsip_binding();
obj.set_id(id);
bridgegroup_nsip_binding response[] = (bridgegroup_nsip_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch bridgegroup_nsip_binding resources of given name ."
] | [
"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'",
"Convert this update description to an update document.\n\n@return an update document with the appropriate $set and $unset documents.",
"Add a cause to the backtrace.\n\n@param cause\nthe cause\n@param bTrace\nthe backtrace list",
"Generates timephased costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost",
"Remove the group and all references to it\n\n@param groupId ID of group",
"Writes batch of data to the source\n@param batch\n@throws InterruptedException",
"Register this broker in ZK for the first time.",
"Use this API to add clusterinstance.",
"Use this API to rename a responderpolicy resource."
] |
public static String minus(CharSequence self, Pattern pattern) {
return pattern.matcher(self).replaceFirst("");
} | [
"Remove a part of a CharSequence. This replaces the first occurrence\nof the pattern within self with '' and returns the result.\n\n@param self a String\n@param pattern a Pattern representing the part to remove\n@return a String minus the part to be removed\n@since 2.2.0"
] | [
"Given a string with method or package name, creates a Class Name with no\nspaces and first letter lower case\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name",
"This method finds the start of the next working period.\n\n@param cal current Calendar instance",
"sets the row reader class name for thie class descriptor",
"Init the licenses cache\n\n@param licenses",
"Use this API to delete nsip6 resources of given names.",
"Processes a stencilset template file\n@throws IOException",
"Support the range subscript operator for CharSequence with IntRange\n\n@param text a CharSequence\n@param range an IntRange\n@return the subsequence CharSequence\n@since 1.0",
"Returns iterable containing assignments for this single legal hold policy.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy.",
"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"
] |
public void afterCompletion(int status)
{
if(afterCompletionCall) return;
log.info("Method afterCompletion was called");
try
{
switch(status)
{
case Status.STATUS_COMMITTED:
if(log.isDebugEnabled())
{
log.debug("Method afterCompletion: Do commit internal odmg-tx, status of JTA-tx is " + TxUtil.getStatusString(status));
}
commit();
break;
default:
log.error("Method afterCompletion: Do abort call on internal odmg-tx, status of JTA-tx is " + TxUtil.getStatusString(status));
abort();
}
}
finally
{
afterCompletionCall = true;
log.info("Method afterCompletion finished");
}
} | [
"FOR internal use. This method was called after the external transaction was completed.\n\n@see javax.transaction.Synchronization"
] | [
"Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)",
"Record a Screen View event\n@param screenName String, the name of the screen",
"Use this API to update nsip6.",
"Use this API to delete sslfipskey resources of given names.",
"Samples a batch of indices in the range [0, numExamples) with replacement.",
"Load in a number of database configuration entries from a buffered reader.",
"Constructs a triangule Face from vertices v0, v1, and v2.\n\n@param v0\nfirst vertex\n@param v1\nsecond vertex\n@param v2\nthird vertex",
"returns whether masking with the given mask results in a valid contiguous range for this segment,\nand if it does, if it matches the range obtained when masking the given values with the same mask.\n\n@param lowerValue\n@param upperValue\n@param mask\n@return",
"Get the context for a photo in the group pool.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@param groupId\nThe group ID\n@return The PhotoContext\n@throws FlickrException"
] |
public void link(Object targetObject, ClassDescriptor cld, ObjectReferenceDescriptor rds, Object referencedObject, boolean insert)
{
// MBAIRD: we have 'disassociated' this object from the referenced object,
// the object represented by the reference descriptor is now null, so set
// the fk in the target object to null.
// arminw: if an insert was done and ref object was null, we should allow
// to pass FK fields of main object (maybe only the FK fields are set)
if (referencedObject == null)
{
/*
arminw:
if update we set FK fields to 'null', because reference was disassociated
We do nothing on insert, maybe only the FK fields of main object (without
materialization of the reference object) are set by the user
*/
if(!insert)
{
unlinkFK(targetObject, cld, rds);
}
}
else
{
setFKField(targetObject, cld, rds, referencedObject);
}
} | [
"Assign FK value to target object by reading PK values of referenced object.\n\n@param targetObject real (non-proxy) target object\n@param cld {@link ClassDescriptor} of the real target object\n@param rds An {@link ObjectReferenceDescriptor} or {@link CollectionDescriptor}\nassociated with the real object.\n@param referencedObject referenced object or proxy\n@param insert Show if \"linking\" is done while insert or update."
] | [
"Read project calendars.",
"Specify the output format of the image.\n\n@see ImageFormat",
"Map message info.\n\n@param messageInfoType the message info type\n@return the message info",
"This is a method to stream slops to \"slop\" store when a node is detected\nfaulty in a streaming session\n\n@param key -- original key\n@param value -- original value\n@param storeName -- the store for which we are registering the slop\n@param failedNodeId -- the faulty node ID for which we register a slop\n@throws IOException",
"If the `invokerClass` specified is singleton, or without field or all fields are\nstateless, then return an instance of the invoker class. Otherwise, return null\n@param invokerClass the invoker class\n@param app the app\n@return an instance of the invokerClass or `null` if invoker class is stateful class",
"This method retrieves ONLY the ROOT actions",
"Retrieves a thumbnail, or smaller image representation, of this file. Sizes of 32x32, 64x64, 128x128,\nand 256x256 can be returned in the .png format and sizes of 32x32, 94x94, 160x160, and 320x320 can be returned\nin the .jpg format.\n\n@param fileType either PNG of JPG\n@param minWidth minimum width\n@param minHeight minimum height\n@param maxWidth maximum width\n@param maxHeight maximum height\n@return the byte array of the thumbnail image",
"Tries to close off all the unused assigned connections back to the pool. Assumes that\nthe strategy mode has already been flipped prior to calling this routine.\nCalled whenever our no of connection requests > no of threads.",
"Set the individual dates.\n@param dates the dates to set."
] |
public SimpleFeatureCollection areaToFeatureCollection(
@Nonnull final MapAttribute.MapAttributeValues mapAttributes) {
Assert.isTrue(mapAttributes.areaOfInterest == this,
"map attributes passed in does not contain this area of interest object");
final SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder();
typeBuilder.setName("aoi");
CoordinateReferenceSystem crs = mapAttributes.getMapBounds().getProjection();
typeBuilder.add("geom", this.polygon.getClass(), crs);
final SimpleFeature feature =
SimpleFeatureBuilder.build(typeBuilder.buildFeatureType(), new Object[]{this.polygon}, "aoi");
final DefaultFeatureCollection features = new DefaultFeatureCollection();
features.add(feature);
return features;
} | [
"Return the area polygon as the only feature in the feature collection.\n\n@param mapAttributes the attributes that this aoi is part of."
] | [
"Use this API to fetch all the ci resources that are configured on netscaler.",
"Calculates the tiles width and height.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile width and the second value is the\ntile height.",
"returns a unique long value for class clazz and field fieldName.\nthe returned number is unique accross all tables in the extent of clazz.",
"Create a handful of default currencies to keep Primavera happy.",
"Add a clause where the ID is from an existing object.",
"Tests an observer method to see if it is transactional.\n\n@param observer The observer method\n@return true if the observer method is annotated as transactional",
"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",
"Get random stub matching this user type\n@param userType User type\n@return Random stub",
"Renders the document to the specified output stream."
] |
protected Element createTextElement(float width)
{
Element el = doc.createElement("div");
el.setAttribute("id", "p" + (textcnt++));
el.setAttribute("class", "p");
String style = curstyle.toString();
style += "width:" + width + UNIT + ";";
el.setAttribute("style", style);
return el;
} | [
"Creates an element that represents a single positioned box with no content.\n@return the resulting DOM element"
] | [
"Throws an IllegalStateException when the given value is not false.",
"Converts a sequence of unicode code points to a sequence of Java characters.\n\n@return the number of chars written to the destination buffer",
"Returns the list view of corporate groupIds of an organization\n\n@param organizationId String\n@return ListView",
"Sets the SCXML model with a string\n\n@param model the model text",
"Bessel function of order n.\n\n@param n Order.\n@param x Value.\n@return J value.",
"Returns the master mode's editor state for editing a bundle with descriptor.\n@return the master mode's editor state for editing a bundle with descriptor.",
"Use this API to Import application.",
"Retrieves the timephased breakdown of actual cost.\n\n@return timephased actual cost",
"Loads the localization for the current locale from a bundle of type xmlvfsbundle.\nIt assumes, the content has already been unmarshalled before.\n@param locale the locale for which the localization should be loaded"
] |
protected synchronized void stealExistingAllocations(){
for (ConnectionHandle handle: this.threadFinalizableRefs.keySet()){
// if they're not in use, pretend they are in use now and close them off.
// this method assumes that the strategy has been flipped back to non-caching mode
// prior to this method invocation.
if (handle.logicallyClosed.compareAndSet(true, false)){
try {
this.pool.releaseConnection(handle);
} catch (SQLException e) {
logger.error("Error releasing connection", e);
}
}
}
if (this.warnApp.compareAndSet(false, true)){ // only issue warning once.
logger.warn("Cached strategy chosen, but more threads are requesting a connection than are configured. Switching permanently to default strategy.");
}
this.threadFinalizableRefs.clear();
} | [
"Tries to close off all the unused assigned connections back to the pool. Assumes that\nthe strategy mode has already been flipped prior to calling this routine.\nCalled whenever our no of connection requests > no of threads."
] | [
"Returns the JRDesignGroup for the DJGroup passed\n@param jd\n@param layoutManager\n@param group\n@return",
"Use this API to add gslbservice.",
"First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe error\n@param errorMessage\nthe error message\n@param stackTrace\nthe stack trace\n@param statusCode\nthe status code\n@param statusCodeInt\nthe status code int",
"This method is currently in use only by the SvnCoordinator",
"Get the ordinal value for the last of a particular override on a path\n\n@param overrideId Id of the override to check\n@param pathId Path the override is on\n@param clientUUID UUID of the client\n@param filters If supplied, only endpoints ending with values in filters are returned\n@return The integer ordinal\n@throws Exception",
"Answer true if an Iterator for a Table is already available\n@param aTable\n@return",
"Updates the internal list of dates and fires a value change if necessary.\n\n@param dates the dates to set.",
"Sets the name of the designated bone.\n\n@param boneindex zero based index of bone to rotate.\n@param bonename string with name of bone.\n. * @see #getBoneName",
"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"
] |
public static ServiceName channelServiceName(final ServiceName endpointName, final String channelName) {
return endpointName.append("channel").append(channelName);
} | [
"Create the service name for a channel\n\n@param channelName\nthe channel name\n@return the service name"
] | [
"Helper to format term updates as expected by the Wikibase API\n@param updates\nplanned updates for the type of term\n@return map ready to be serialized as JSON by Jackson",
"Remove a descriptor.\n@param validKey This could be the {@link JdbcConnectionDescriptor}\nitself, or the associated {@link JdbcConnectionDescriptor#getPBKey PBKey}.",
"Sets the scale vector of the keyframe.",
"Merge this ExecutionStatistics with all the statistics created within the child threads. All the child threads had to be created using Windup-specific\nThreadFactory in order to contain a reference to the parent thread.",
"Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.",
"Patches the product module names\n\n@param name String\n@param moduleNames List<String>",
"Return the available format ids.",
"Return the structured backup data\n\n@return Backup of current configuration\n@throws Exception exception",
"Get the time zone for a specific stock or index.\nFor stocks, the exchange suffix is extracted from the stock symbol to retrieve the time zone.\n\n@param symbol stock symbol in YahooFinance\n@return time zone of the exchange on which this stock is traded"
] |
private ColumnDefinition[] columnDefinitions(ColumnDefinition[] columns, String[] order)
{
Map<String, ColumnDefinition> map = makeColumnMap(columns);
ColumnDefinition[] result = new ColumnDefinition[order.length];
for (int index = 0; index < order.length; index++)
{
result[index] = map.get(order[index]);
}
return result;
} | [
"Generate an ordered set of column definitions from an ordered set of column names.\n\n@param columns column definitions\n@param order column names\n@return ordered set of column definitions"
] | [
"append multi clickable SpecialUnit or String\n\n@param specialClickableUnit SpecialClickableUnit\n@param specialUnitOrStrings Unit Or String\n@return",
"This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance",
"Updates the indices in the index buffer from a Java CharBuffer.\nAll of the entries of the input buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data CharBuffer containing the new values\n@throws IllegalArgumentException if char array is wrong size",
"Returns the squared of the Euclidean distance between this vector and\nvector v.\n\n@return squared distance between this vector and v",
"Static main.\n\n@param args\nProgram arguments.\n@throws IOException\nIf an IO error occurred.",
"Adds title and subtitle to the TitleBand when it applies.\nIf title is not present then subtitle will be ignored",
"Use this API to fetch all the autoscaleprofile resources that are configured on netscaler.",
"Map a single ResultSet row to a T instance.\n\n@throws SQLException",
"Does the headset the device is docked into have a dedicated home key\n@return"
] |
public static LinearSolverDense<DMatrixRMaj> symmPosDef(int matrixWidth ) {
if(matrixWidth < EjmlParameters.SWITCH_BLOCK64_CHOLESKY ) {
CholeskyDecompositionCommon_DDRM decomp = new CholeskyDecompositionInner_DDRM(true);
return new LinearSolverChol_DDRM(decomp);
} else {
if( EjmlParameters.MEMORY == EjmlParameters.MemoryUsage.FASTER )
return new LinearSolverChol_DDRB();
else {
CholeskyDecompositionCommon_DDRM decomp = new CholeskyDecompositionInner_DDRM(true);
return new LinearSolverChol_DDRM(decomp);
}
}
} | [
"Creates a solver for symmetric positive definite matrices.\n\n@return A new solver for symmetric positive definite matrices."
] | [
"Use this API to fetch authenticationvserver_authenticationcertpolicy_binding resources of given name .",
"Flush output streams.",
"Returns a matrix of StatisticsMatrix type so that SimpleMatrix functions create matrices\nof the correct type.",
"Set the timeout for idle connections. Voldemort client caches all\nconnections to the Voldemort server. This setting allows the a connection\nto be dropped, if it is idle for more than this time.\n\nThis could be useful in the following cases 1) Voldemort client is not\ndirectly connected to the server and is connected via a proxy or\nfirewall. The Proxy or firewall could drop the connection silently. If\nthe connection is dropped, then client will see operations fail with a\ntimeout. Setting this property enables the Voldemort client to tear down\nthe connection before a firewall could drop it. 2) Voldemort server\ncaches the connection and each connection has an associated memory cost.\nSetting this property on all clients, enable the clients to prune the\nconnections and there by freeing up the server connections.\n\nthrows IllegalArgumentException if the timeout is less than 10 minutes.\n\nCurrently it can't be set below 10 minutes to avoid the racing risk of\ncontention between connection checkout and selector trying to close it.\nThis is intended for low throughput scenarios.\n\n@param idleConnectionTimeout\nzero or negative number to disable the feature ( default -1)\ntimeout\n@param unit {@link TimeUnit}\n@return ClientConfig object for chained set\n\nthrows {@link IllegalArgumentException} if the timeout is greater\nthan 0, but less than 10 minutes.",
"Used to create a new finite retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info.",
"Sets a new image\n\n@param BufferedImage imagem",
"Initialise an extension module's extensions in the extension registry\n\n@param extensionRegistry the extension registry\n@param module the name of the module containing the extensions\n@param rootRegistration The parent registration of the extensions. For a server or domain.xml extension, this will be the root resource registration. For a host.xml extension, this will be the host resource registration\n@param extensionRegistryType The type of the registry",
"Creates an operations that targets the valiadating handler.\n\n@param operationToValidate the operation that this handler will validate\n@return the validation operation",
"Implement the persistence handler for storing the user properties."
] |
public static <T extends Bean<?>> Set<T> removeDisabledBeans(Set<T> beans, final BeanManagerImpl beanManager) {
if (beans.isEmpty()) {
return beans;
} else {
for (Iterator<T> iterator = beans.iterator(); iterator.hasNext();) {
if (!isBeanEnabled(iterator.next(), beanManager.getEnabled())) {
iterator.remove();
}
}
return beans;
}
} | [
"Retains only beans which are enabled.\n\n@param beans The mutable set of beans to filter\n@param beanManager The bean manager\n@return a mutable set of enabled beans"
] | [
"Filter that's either negated or normal as specified.",
"If this node represents a bean property this method returns all annotations of its getter.\n\n@return A set of annotations of this nodes property getter or an empty set.",
"Try to get the line number associated with the given member.\n\nThe reflection API does not expose such an info and so we need to analyse the bytecode. Unfortunately, it seems there is no way to get this kind of\ninformation for fields. Moreover, the <code>LineNumberTable</code> attribute is just optional, i.e. the compiler is not required to store this\ninformation at all. See also <a href=\"http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1\">Java Virtual Machine Specification</a>\n\nImplementation note: it wouldn't be appropriate to add a bytecode scanning dependency just for this functionality, therefore Apache BCEL included in\nOracle JDK 1.5+ and OpenJDK 1.6+ is used. Other JVMs should not crash as we only use it if it's on the classpath and by means of reflection calls.\n\n@param member\n@param resourceLoader\n@return the line number or 0 if it's not possible to find it",
"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.",
"Runs the record linkage process.",
"Cancel the pause operation",
"Use this API to add responderpolicy.",
"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\"].",
"Return the item view type used by the adapter to implement recycle mechanism.\n\n@param content to be rendered.\n@return an integer that represents the renderer inside the adapter."
] |
public static base_response unset(nitro_service client, cmpparameter resource, String[] args) throws Exception{
cmpparameter unsetresource = new cmpparameter();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of cmpparameter resource.\nProperties that need to be unset are specified in args array."
] | [
"Get a collection of Photo objects for the specified Photoset.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@param photosetId\nThe photoset ID\n@param extras\nSet of extra-fields\n@param privacy_filter\nfilter value for authenticated calls\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return PhotoList The Collection of Photo objects\n@throws FlickrException",
"Obtains a local date in Ethiopic calendar system from the\nera, year-of-era, month-of-year and day-of-month fields.\n\n@param era the Ethiopic era, not null\n@param yearOfEra the year-of-era\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code EthiopicEra}",
"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",
"Moves the given row down.\n\n@param row the row to move",
"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",
"All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.",
"Returns the simplified name of the type of the specified object.",
"Sets an attribute in the main section of the manifest to a map.\nThe map entries will be joined with a single whitespace character, and each key-value pair will be joined with a '='.\n\n@param name the attribute's name\n@param values the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.",
"Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs."
] |
public static void clear() {
JobContext ctx = current_.get();
if (null != ctx) {
ctx.bag_.clear();
JobContext parent = ctx.parent;
if (null != parent) {
current_.set(parent);
ctx.parent = null;
} else {
current_.remove();
Act.eventBus().trigger(new JobContextDestroyed(ctx));
}
}
} | [
"Clear JobContext of current thread"
] | [
"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",
"Interfaces, enums, annotations, and abstract classes cannot be\ninstantiated.\n\n@param actionClass\nclass to check\n@return returns true if the class cannot be instantiated or should be\nignored",
"Process a single criteria block.\n\n@param list parent criteria list\n@param block current block",
"Maps this iterable from the source document type to the target document type.\n\n@param mapper a function that maps from the source to the target document type\n@param <U> the target document type\n@return an iterable which maps T to U",
"Generate a placeholder for an unknown type.\n\n@param type expected type\n@param fieldID field ID\n@return placeholder",
"Whether the given column is part of this key family or not.\n\n@return {@code true} if the given column is part of this key, {@code false} otherwise.",
"Uses data from a bar to populate a task.\n\n@param row bar data\n@param task task to populate",
"Initialize; cached threadpool is safe as it is releasing resources automatically if idle",
"Returns flag whose value indicates if the string is null, empty or\nonly contains whitespace characters\n\n@param s a string\n@return true if the string is null, empty or only contains whitespace characters"
] |
public static String getVcsUrl(Map<String, String> env) {
String url = env.get("SVN_URL");
if (StringUtils.isBlank(url)) {
url = publicGitUrl(env.get("GIT_URL"));
}
if (StringUtils.isBlank(url)) {
url = env.get("P4PORT");
}
return url;
} | [
"Get the VCS url from the Jenkins build environment. The search will one of \"SVN_REVISION\", \"GIT_COMMIT\",\n\"P4_CHANGELIST\" in the environment.\n\n@param env Th Jenkins build environment.\n@return The vcs url for supported VCS"
] | [
"Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of the operation performed.\n@throws Exception Nitro exception is thrown.",
"Stops the currently running animation, if any.\n@see GVRAvatar#start(String)\n@see GVRAnimationEngine#stop(GVRAnimation)",
"Validates the producer method",
"With the Batik SVG library it is only possible to create new SVG graphics, but you can not modify an\nexisting graphic. So, we are loading the SVG file as plain XML and doing the modifications by hand.",
"Returns a map of URIs to package name, as specified by the packageNames\nparameter.",
"Use this API to update inat resources.",
"Returns the user defined field without its prefix.\n\n@param field the name of the user defined field\n@return the user defined field without the prefix, or null if the fields\ndoesn't apply to this control file.\n@since 1.1",
"Reads a \"flags\" argument from the request.",
"This utility method calculates the difference in working\ntime between two dates, given the context of a task.\n\n@param task parent task\n@param date1 first date\n@param date2 second date\n@param format required format for the resulting duration\n@return difference in working time between the two dates"
] |
public static boolean isRevisionDumpFile(DumpContentType dumpContentType) {
if (WmfDumpFile.REVISION_DUMP.containsKey(dumpContentType)) {
return WmfDumpFile.REVISION_DUMP.get(dumpContentType);
} else {
throw new IllegalArgumentException("Unsupported dump type "
+ dumpContentType);
}
} | [
"Returns true if the given dump file type contains page revisions and\nfalse if it does not. Dumps that do not contain pages are for auxiliary\ninformation such as linked sites.\n\n@param dumpContentType\nthe type of dump\n@return true if the dumpfile contains revisions\n@throws IllegalArgumentException\nif the given dump file type is not known"
] | [
"Writes task baseline data.\n\n@param xmlTask MSPDI task\n@param mpxjTask MPXJ task",
"Generates the path to an output file for a given source URL. Creates\nall necessary parent directories for the destination file.\n@param src the source\n@return the path to the output file",
"Determines whether the current object on the specified level has a specific property, and if so, processes the\ntemplate\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"",
"Searches the Html5ReportGenerator in Java path and instantiates the report",
"Process a device update once it has been received. Track it as the most recent update from its address,\nand notify any registered listeners, including master listeners if it results in changes to tracked state,\nsuch as the current master player and tempo. Also handles the Baroque dance of handing off the tempo master\nrole from or to another device.",
"Creates a replica of the node with the new partitions list\n\n@param node The node whose replica we are creating\n@param partitionsList The new partitions list\n@return Replica of node with new partitions list",
"Creates a build\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param build the build information",
"Gets the path used for the results of XSLT Transforms.",
"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."
] |
public ParallelTaskBuilder prepareHttpGet(String url) {
reinitIfClosed();
ParallelTaskBuilder cb = new ParallelTaskBuilder();
cb.getHttpMeta().setHttpMethod(HttpMethod.GET);
cb.getHttpMeta().setRequestUrlPostfix(url);
return cb;
} | [
"Prepare a parallel HTTP GET 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"
] | [
"Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.",
"Returns a File object whose path is the expected user directory.\nDoes not create or check for existence.\n@param prefix\n@param suffix\n@param parent\n@return",
"Use this API to fetch authenticationradiusaction resource of given name .",
"Extract Primavera project data and export in another format.\n\n@param driverClass JDBC driver class name\n@param connectionString JDBC connection string\n@param projectID project ID\n@param outputFile output file\n@throws Exception",
"Clear all beans and call the destruction callback.",
"Get FieldDescriptor from joined superclass.",
"fetch correct array index if index is less than 0\n\nArrayNode will convert all negative integers into 0...\n\n@param index wanted index\n@return {@link Integer} new index",
"Set the group name\n\n@param name new name of server group\n@param id ID of group",
"Retrieve and validate vector clock value from the REST request.\n\"X_VOLD_VECTOR_CLOCK\" is the vector clock header.\n\n@return true if present, false if missing"
] |
@SuppressWarnings("deprecation")
private final void operationTimeout() {
/**
* first kill async http worker; before suicide LESSON: MUST KILL AND
* WAIT FOR CHILDREN to reply back before kill itself.
*/
cancelCancellable();
if (asyncWorker != null && !asyncWorker.isTerminated()) {
asyncWorker
.tell(RequestWorkerMsgType.PROCESS_ON_TIMEOUT, getSelf());
} else {
logger.info("asyncWorker has been killed or uninitialized (null). "
+ "Not send PROCESS ON TIMEOUT.\nREQ: "
+ request.toString());
replyErrors(PcConstants.OPERATION_TIMEOUT,
PcConstants.OPERATION_TIMEOUT, PcConstants.NA,
PcConstants.NA_INT);
}
} | [
"will trigger workers to cancel then wait for it to report back."
] | [
"Read task relationships from a Phoenix file.\n\n@param phoenixProject Phoenix project data",
"Remove a variable in the top variables layer.",
"Heuristic check if string might be an IPv6 address.\n\n@param input Any string or null\n@return true, if input string contains only hex digits and at least two colons, before '.' or '%' character.",
"Create an import declaration and delegates its registration for an upper class.",
"Function to perform forward softmax",
"Does this procedure return any values to the 'caller'?\n\n@return <code>true</code> if the procedure returns at least 1\nvalue that is returned to the caller.",
"Used to apply or update the watermark for the item.\n@param itemUrl url template for the item.\n@param imprint the value must be \"default\", as custom watermarks is not yet supported.\n@return the watermark associated with the item.",
"It should be called when the picker is hidden",
"caching is not supported for this method"
] |
private <T> CoreRemoteMongoCollection<T> getRemoteCollection(
final MongoNamespace namespace,
final Class<T> resultClass
) {
return remoteClient
.getDatabase(namespace.getDatabaseName())
.getCollection(namespace.getCollectionName(), resultClass);
} | [
"Returns the remote collection representing the given namespace.\n\n@param namespace the namespace referring to the remote collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the remote collection representing the given namespace."
] | [
"for bpm connector",
"Reads a markdown link.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link.",
"Select the specific vertex and fragment shader to use.\n\nThe shader template is used to generate the sources for the vertex and\nfragment shader based on the vertex, material and light properties. This\nfunction may compile the shader if it does not already exist.\n\n@param context\nGVRContext\n@param rdata\nrenderable entity with mesh and rendering options\n@param scene\nlist of light sources",
"Notifies that multiple content items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"This method attempts to locate a suitable directory by checking a number of different configuration sources.\n\n1 - serverConfigUserDirPropertyName - This value is used to check it a matching system property has been set. 2 -\nsuppliedConfigDir - If a path was specified on the command line it is expected to be passed in as this parameter. 3 -\nserverConfigDirPropertyName - This is a second system property to check.\n\nAnd finally if none of these match defaultBaseDir specifies the configuration being searched and is appended to the JBoss\nHome value discovered when the utility started.",
"binds the Identities Primary key values to the statement",
"Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer",
"Attaches the menu drawer to the window.",
"Helper method that creates a Velocity context and initialises it\nwith a reference to the ReportNG utils, report metadata and localised messages.\n@return An initialised Velocity context."
] |
public static AppDescriptor of(String appName, Class<?> entryClass) {
System.setProperty("osgl.version.suppress-var-found-warning", "true");
return of(appName, entryClass, Version.of(entryClass));
} | [
"Create an `AppDescriptor` with appName and entry class specified.\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param entryClass\nthe entry class\n@return\nan `AppDescriptor` instance"
] | [
"Dump timephased work for an assignment.\n\n@param assignment resource assignment",
"Move sections relative to each other in a board view. One of\n`before_section` or `after_section` is required.\n\nSections cannot be moved between projects.\n\nAt this point in time, moving sections is not supported in list views, only board views.\n\nReturns an empty data block.\n\n@param project The project in which to reorder the given section\n@return Request object",
"Returns the response error stream, handling the case when it contains gzipped data.\n@return gzip decoded (if needed) error stream or null",
"Use this API to fetch all the cmppolicylabel resources that are configured on netscaler.",
"Use this API to add clusternodegroup.",
"Permanently close the ClientRequestExecutor pool. Resources subsequently\nchecked in will be destroyed.",
"Sets the appropriate headers to response of this request.\n\n@param response The HttpServletResponse response object.",
"Use this API to add systemuser resources.",
"Get a property as a json array or throw exception.\n\n@param key the property name"
] |
protected void logIncompatibleValueError(PropertyIdValue propertyIdValue,
String datatype, String valueType) {
logger.warn("Property " + propertyIdValue.getId() + " has type \""
+ datatype + "\" but a value of type " + valueType
+ ". Data ignored.");
} | [
"Logs a message for a case where the value of a property does not fit to\nits declared datatype.\n\n@param propertyIdValue\nthe property that was used\n@param datatype\nthe declared type of the property\n@param valueType\na string to denote the type of value"
] | [
"Check if the right-hand side type may be assigned to the left-hand side\ntype following the Java generics rules.\n@param lhsType the target type\n@param rhsType the value type that should be assigned to the target type\n@return true if rhs is assignable to lhs",
"Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return",
"visibility increased for testing",
"generate a message for loglevel ERROR\n\n@param pObject the message Object",
"Add a metadata profile.\n@see #loadProfile",
"No need to expose. Client side work.",
"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",
"The range of velocities that a particle generated from this emitter can have.\n@param minV Minimum velocity that a particle can have\n@param maxV Maximum velocity that a particle can have",
"Given a BSON document, remove any forbidden fields and return the document. If no changes are\nmade, the original document reference is returned. If changes are made, a cloned copy of the\ndocument with the changes will be returned.\n\n@param document the document from which to remove forbidden fields\n\n@return a BsonDocument without any forbidden fields."
] |
public DbProduct getProduct(final String name) {
final DbProduct dbProduct = repositoryHandler.getProduct(name);
if(dbProduct == null){
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
.entity("Product " + name + " does not exist.").build());
}
return dbProduct;
} | [
"Returns a product regarding its name\n\n@param name String\n@return DbProduct"
] | [
"Generate an ordered set of column definitions from an ordered set of column names.\n\n@param columns column definitions\n@param order column names\n@return ordered set of column definitions",
"Sets the locale for which the property should be read.\n\n@param locale the locale for which the property should be read.",
"Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges",
"Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager",
"Log an audit record of this operation.",
"Retrieve a work week which applies to this date.\n\n@param date target date\n@return work week, or null if none match this date",
"Executes the given xpath and returns the result with the type specified.",
"Checks if is file exist.\n\n@param filePath\nthe file path\n@return true, if is file exist",
"Bilinear interpolation of ARGB values.\n@param x the X interpolation parameter 0..1\n@param y the y interpolation parameter 0..1\n@param rgb array of four ARGB values in the order NW, NE, SW, SE\n@return the interpolated value"
] |
public void fit( double samplePoints[] , double[] observations ) {
// Create a copy of the observations and put it into a matrix
y.reshape(observations.length,1,false);
System.arraycopy(observations,0, y.data,0,observations.length);
// reshape the matrix to avoid unnecessarily declaring new memory
// save values is set to false since its old values don't matter
A.reshape(y.numRows, coef.numRows,false);
// set up the A matrix
for( int i = 0; i < observations.length; i++ ) {
double obs = 1;
for( int j = 0; j < coef.numRows; j++ ) {
A.set(i,j,obs);
obs *= samplePoints[i];
}
}
// process the A matrix and see if it failed
if( !solver.setA(A) )
throw new RuntimeException("Solver failed");
// solver the the coefficients
solver.solve(y,coef);
} | [
"Computes the best fit set of polynomial coefficients to the provided observations.\n\n@param samplePoints where the observations were sampled.\n@param observations A set of observations."
] | [
"Given the byte buffer containing album art, build an actual image from it for easy rendering.\n\n@return the newly-created image, ready to be drawn",
"Assigns retention policy with givenID to the enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@return info about created assignment.",
"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",
"Add the final assignment of the property to the partial value object's source code.",
"ensures that the first invocation of a date seeking\nrule is captured",
"Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids",
"Add a listener to be invoked when the checked button changes in this group.\n@param listener\n@param <T>\n@return",
"EXecutes command to given container returning the inspection object as well. This method does 3 calls to\ndockerhost. Create, Start and Inspect.\n\n@param containerId\nto execute command.",
"Checks the hour, minute and second are equal."
] |
public static Integer parseInteger(String value) throws ParseException
{
Integer result = null;
if (value.length() > 0 && value.indexOf(' ') == -1)
{
if (value.indexOf('.') == -1)
{
result = Integer.valueOf(value);
}
else
{
Number n = DatatypeConverter.parseDouble(value);
result = Integer.valueOf(n.intValue());
}
}
return result;
} | [
"Parse a string representation of an Integer value.\n\n@param value string representation\n@return Integer value"
] | [
"Checks given permissions are needed to show rationale.\n\n@return returns true if one of the permission is needed to show rationale.",
"Adds a new point.\n\n@param point a point\n@return this for chaining",
"Executes the API action \"wbsetlabel\" for the given parameters.\n@param id\nthe id of the entity to be edited; if used, the site and title\nparameters must be null\n@param site\nwhen selecting an entity by title, the site key for the title,\ne.g., \"enwiki\"; if used, title must also be given but id must\nbe null\n@param title\nstring used to select an entity by title; if used, site must\nalso be given but id must be null\n@param newEntity\nused for creating a new entity of a given type; the value\nindicates the intended entity type; possible values include\n\"item\" and \"property\"; if used, the parameters id, site, and\ntitle must be null\n@param language\nthe language code for the label\n@param value\nthe value of the label to set. Set it to null to remove the label.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the label as returned by the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Add an individual class to the map file.\n\n@param loader jar file class loader\n@param jarEntry jar file entry\n@param writer XML stream writer\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException",
"Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registry",
"Rotate the specified photo. The only allowed values for degrees are 90, 180 and 270.\n\n@param photoId\nThe photo ID\n@param degrees\nThe degrees to rotate (90, 170 or 270)",
"Perform a normal scan",
"Creates the style definition used for a rectangle element based on the given properties of the rectangle\n@param x The X coordinate of the rectangle.\n@param y The Y coordinate of the rectangle.\n@param width The width of the rectangle.\n@param height The height of the rectangle.\n@param stroke Should there be a stroke around?\n@param fill Should the rectangle be filled?\n@return The resulting element style definition.",
"Called recursively to renumber child task IDs.\n\n@param parentTask parent task instance\n@param currentID current task ID\n@return updated current task ID"
] |
public Collection<Size> getSizes(String photoId, boolean sign) throws FlickrException {
SizeList<Size> sizes = new SizeList<Size>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_SIZES);
parameters.put("photo_id", photoId);
Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element sizesElement = response.getPayload();
sizes.setIsCanBlog("1".equals(sizesElement.getAttribute("canblog")));
sizes.setIsCanDownload("1".equals(sizesElement.getAttribute("candownload")));
sizes.setIsCanPrint("1".equals(sizesElement.getAttribute("canprint")));
NodeList sizeNodes = sizesElement.getElementsByTagName("size");
for (int i = 0; i < sizeNodes.getLength(); i++) {
Element sizeElement = (Element) sizeNodes.item(i);
Size size = new Size();
size.setLabel(sizeElement.getAttribute("label"));
size.setWidth(sizeElement.getAttribute("width"));
size.setHeight(sizeElement.getAttribute("height"));
size.setSource(sizeElement.getAttribute("source"));
size.setUrl(sizeElement.getAttribute("url"));
size.setMedia(sizeElement.getAttribute("media"));
sizes.add(size);
}
return sizes;
} | [
"Get the available sizes of a Photo.\n\nThe boolean toggle allows to (api-)sign the call.\n\nThis way the calling user can retrieve sizes for <b>his own</b> private photos.\n\n@param photoId\nThe photo ID\n@param sign\ntoggle to allow optionally signing the call (Authenticate)\n@return A collection of {@link Size}\n@throws FlickrException"
] | [
"Returns the filename of the resource with extension.\n\n@return Filename of the GVRAndroidResource. May return null if the\nresource is not associated with any file",
"Sets divider padding for axis. If axis does not match the orientation, it has no effect.\n@param padding\n@param axis {@link Axis}",
"Generates a usable test specification for a given test definition\nUses the first bucket as the fallback value\n\n@param testDefinition a {@link TestDefinition}\n@return a {@link TestSpecification} which corresponding to given test definition.",
"Remove the realm name block.\n\n@see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String)",
"Returns the version document of the given document, if any; returns null otherwise.\n@param document the document to get the version from.\n@return the version of the given document, if any; returns null otherwise.",
"Returns the dot product of this vector and v1.\n\n@param v1\nright-hand vector\n@return dot product",
"Given the comma separated list of properties as a string, splits it\nmultiple strings\n\n@param paramValue Concatenated string\n@param type Type of parameter ( to throw exception )\n@return List of string properties",
"Calculate the color using the supplied angle.\n\n@param angle The selected color's position expressed as angle (in rad).\n\n@return The ARGB value of the color on the color wheel at the specified\nangle.",
"If the belief its a count of some sort his counting its increased by one.\n\n@param bName\n- the name of the belief count."
] |
public synchronized boolean undoRoleMappingRemove(final Object removalKey) {
HashMap<String, RoleMappingImpl> newRoles = new HashMap<String, RoleMappingImpl>(roleMappings);
RoleMappingImpl toRestore = removedRoles.remove(removalKey);
if (toRestore != null && newRoles.containsKey(toRestore.getName()) == false) {
newRoles.put(toRestore.getName(), toRestore);
roleMappings = Collections.unmodifiableMap(newRoles);
return true;
}
return false;
} | [
"Undo a prior removal using the supplied undo key.\n\n@param removalKey - The key returned from the call to removeRoleMapping.\n@return true if the undo was successful, false otherwise."
] | [
"Convert an object to a set of maps.\n\n@param mapper the object mapper\n@param source the source object\n@return set",
"Tests correctness. Try\nfrom=1000, to=10000\nfrom=200, to=1000\nfrom=16, to=1000\nfrom=1000, to=Integer.MAX_VALUE",
"Writes the results of the processing to a CSV file.",
"Main entry point to read criteria data.\n\n@param properties project properties\n@param data criteria data block\n@param dataOffset offset of the data start within the larger data block\n@param entryOffset offset of start node for walking the tree\n@param prompts optional list to hold prompts\n@param fields optional list of hold fields\n@param criteriaType optional array representing criteria types\n@return first node of the criteria",
"Use this API to add route6.",
"Adds a constructor for the proxy for each constructor declared by the base\nbean type.\n\n@param proxyClassType the Javassist class for the proxy\n@param initialValueBytecode",
"Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>",
"Gets the value of a global editor configuration parameter.\n\n@param cms the CMS context\n@param editor the editor name\n@param param the name of the parameter\n\n@return the editor parameter value",
"Moves the elements contained in \"band\" in the Y axis \"yOffset\"\n@param yOffset\n@param band"
] |
public static final Double parsePercent(String value)
{
return value == null ? null : Double.valueOf(Double.parseDouble(value) * 100.0);
} | [
"Parse a percent complete value.\n\n@param value sting representation of a percent complete value.\n@return Double instance"
] | [
"Fills in the element with the InputValues for input\n\n@param element the node element\n@param input the input data",
"Compute costs.",
"Returns the names of the involved fields when post processing.\n\n@return the names of the involved fields",
"Sets the maximum time to wait before a call to getConnection is timed out.\n\nSetting this to zero is similar to setting it to Long.MAX_VALUE\n\n@param connectionTimeout\n@param timeUnit the unit of the connectionTimeout argument",
"Sets the target translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining",
"returns an array containing values for all the Objects attribute\n@throws PersistenceBrokerException if there is an erros accessing obj field values",
"Use this API to add cmppolicylabel resources.",
"Remove a key for all language versions. If a descriptor is present, the key is only removed in the descriptor.\n\n@param key the key to remove.\n@return <code>true</code> if removing was successful, <code>false</code> otherwise.",
"Get the set of metadata providers that can offer metadata for tracks loaded from the specified media.\n\n@param sourceMedia the media whose metadata providers are desired, or {@code null} to get the set of\nmetadata providers that can offer metadata for all media.\n\n@return any registered metadata providers that reported themselves as supporting tracks from that media"
] |
private void writePredecessors(Task task)
{
List<Relation> relations = task.getPredecessors();
for (Relation mpxj : relations)
{
RelationshipType xml = m_factory.createRelationshipType();
m_project.getRelationship().add(xml);
xml.setLag(getDuration(mpxj.getLag()));
xml.setObjectId(Integer.valueOf(++m_relationshipObjectID));
xml.setPredecessorActivityObjectId(mpxj.getTargetTask().getUniqueID());
xml.setSuccessorActivityObjectId(mpxj.getSourceTask().getUniqueID());
xml.setPredecessorProjectObjectId(PROJECT_OBJECT_ID);
xml.setSuccessorProjectObjectId(PROJECT_OBJECT_ID);
xml.setType(RELATION_TYPE_MAP.get(mpxj.getType()));
}
} | [
"Writes task predecessor links to a PM XML file.\n\n@param task MPXJ Task instance"
] | [
"Emit an enum event with parameters supplied.\n\nThis will invoke all {@link SimpleEventListener} bound to the specific\nenum value and all {@link SimpleEventListener} bound to the enum class\ngiven the listeners has the matching argument list.\n\nFor example, given the following enum definition:\n\n```java\npublic enum UserActivity {LOGIN, LOGOUT}\n```\n\nWe have the following simple event listener methods:\n\n```java\n{@literal @}OnEvent\npublic void handleUserActivity(UserActivity, User user) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGIN)\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGOUT)\npublic void logUserLogout(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` method:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGIN, user, System.currentTimeMills());\n```\n\nThe `handleUserActivity` is not invoked because\n\n* The method parameter `(UserActivity, User, long)` does not match the declared argument list `(UserActivity, User)`\n\nWhile the following code will invoke both `handleUserActivity` and `logUserLogout` methods:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGOUT, user);\n```\n\nThe `logUserLogin` method will not be invoked because\n\n1. the method is bound to `UserActivity.LOGIN` enum value specifically, while `LOGOUT` is triggered\n2. the method has a `long timestamp` in the argument list and it is not passed to `eventBus.emit`\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener",
"Get components list for current instance\n@return components",
"Reads a markdown link.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link.",
"Process the deployment root for the manifest.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"Helper method to synchronously invoke a callback\n\n@param call",
"Reverses all the TransitionControllers managed by this TransitionManager",
"Add an accessory to be handled and advertised by this root. Any existing Homekit connections\nwill be terminated to allow the clients to reconnect and see the updated accessory list. When\nusing this for a bridge, the ID of the accessory must be greater than 1, as that ID is reserved\nfor the Bridge itself.\n\n@param accessory to advertise and handle.",
"Resolve the server registry.\n\n@param mgmtVersion the mgmt version\n@param subsystems the subsystems\n@return the transformer registry",
"Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise"
] |
private void processCalendars() throws IOException
{
CalendarReader reader = new CalendarReader(m_data.getTableData("Calendars"));
reader.read();
for (MapRow row : reader.getRows())
{
processCalendar(row);
}
m_project.setDefaultCalendar(m_calendarMap.get(reader.getDefaultCalendarUUID()));
} | [
"Extract calendar data."
] | [
"Replaces an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.",
"Returns all categories that are direct children of the current main category.\n\n@return all categories that are direct children of the current main category.",
"Translate a Wikimedia language code to its preferred value\nif this code is deprecated, or return it untouched if the string\nis not a known deprecated Wikimedia language code\n\n@param wikimediaLanguageCode\nthe language code as used by Wikimedia\n@return\nthe preferred language code corresponding to the original language code",
"This ensures that we are able to use the default preference from JSDK, to check basically if we are in Android or Not\n@param preference\n@throws BackingStoreException",
"Set the timeout for idle connections. Voldemort client caches all\nconnections to the Voldemort server. This setting allows the a connection\nto be dropped, if it is idle for more than this time.\n\nThis could be useful in the following cases 1) Voldemort client is not\ndirectly connected to the server and is connected via a proxy or\nfirewall. The Proxy or firewall could drop the connection silently. If\nthe connection is dropped, then client will see operations fail with a\ntimeout. Setting this property enables the Voldemort client to tear down\nthe connection before a firewall could drop it. 2) Voldemort server\ncaches the connection and each connection has an associated memory cost.\nSetting this property on all clients, enable the clients to prune the\nconnections and there by freeing up the server connections.\n\nthrows IllegalArgumentException if the timeout is less than 10 minutes.\n\nCurrently it can't be set below 10 minutes to avoid the racing risk of\ncontention between connection checkout and selector trying to close it.\nThis is intended for low throughput scenarios.\n\n@param idleConnectionTimeout\nzero or negative number to disable the feature ( default -1)\ntimeout\n@param unit {@link TimeUnit}\n@return ClientConfig object for chained set\n\nthrows {@link IllegalArgumentException} if the timeout is greater\nthan 0, but less than 10 minutes.",
"Delete a module\n\n@param moduleId String",
"Performs a delete operation with the specified composite request object\n\n@param deleteRequestObject Composite request object containing the key to\ndelete\n@return true if delete was successful. False otherwise",
"Return a new client that may be cached or not. Given properties are always use when not cached, and only used at creation time for\ncached clients.\n\n@param name\nif null, default client. Otherwise, helpful to retrieve cached clients later.\n@param p\na set of properties. Implementation specific. Unknown properties are silently ignored.\n@param cached\nif false, the client will not be cached and subsequent calls with the same name will return different objects.",
"Returns number of dependencies layers in the image.\n\n@param imageContent\n@return\n@throws IOException"
] |
public OAuth1RequestToken getRequestToken(String callbackUrl) {
String callback = (callbackUrl != null) ? callbackUrl : OUT_OF_BOUND_AUTH_METHOD;
OAuth10aService service = new ServiceBuilder(apiKey)
.apiSecret(sharedSecret)
.callback(callback)
.build(FlickrApi.instance());
try {
return service.getRequestToken();
} catch (IOException | InterruptedException | ExecutionException e) {
throw new FlickrRuntimeException(e);
}
} | [
"Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website."
] | [
"this method will be invoked after methodToBeInvoked is invoked",
"Get string value of flow context for current instance\n@return string value of flow context",
"Sets the yearly absolute date.\n\n@param date yearly absolute date",
"Retrieves the task mode.\n\n@return task mode",
"Use this API to unset the properties of sslparameter resource.\nProperties that need to be unset are specified in args array.",
"Retrieve a flag value.\n\n@param index flag index (1-20)\n@return flag value",
"Awaits at most 5 minutes until all pods meets the given predicate.\n\n@param filter used to wait to detect that a pod is up and running.",
"Deletes a redirect by id\n\n@param id redirect ID",
"get TypeSignature given the signature\n\n@param typeSignature\n@param useInternalFormFullyQualifiedName\nif true, fqn in parameterizedTypeSignature must be in the form\n'java/lang/Thread'. If false fqn must be of the form\n'java.lang.Thread'\n@return"
] |
public void setPatternScheme(final boolean isWeekDayBased) {
if (isWeekDayBased ^ (null != m_model.getWeekDay())) {
removeExceptionsOnChange(new Command() {
public void execute() {
if (isWeekDayBased) {
m_model.setWeekDay(getPatternDefaultValues().getWeekDay());
m_model.setWeekOfMonth(getPatternDefaultValues().getWeekOfMonth());
} else {
m_model.setWeekDay(null);
m_model.setWeekOfMonth(null);
}
m_model.setMonth(getPatternDefaultValues().getMonth());
m_model.setDayOfMonth(getPatternDefaultValues().getDayOfMonth());
m_model.setInterval(getPatternDefaultValues().getInterval());
onValueChange();
}
});
}
} | [
"Set the pattern scheme.\n@param isWeekDayBased flag, indicating if the week day based scheme should be set."
] | [
"Disable all overrides for a specified path\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client",
"Use this API to fetch aaapreauthenticationpolicy_aaaglobal_binding resources of given name .",
"Gets an iterable of all the groups in the enterprise that are starting with the given name string.\n@param api the API connection to be used when retrieving the groups.\n@param name the name prefix of the groups. If the groups need to searched by full name that has spaces,\nthen the parameter string should have been wrapped with \"\".\n@return an iterable containing info about all the groups.",
"Each string item rendering requires the border and a space on both sides.\n\n12 3 12 3 12 34\n+----- +-------- +------+\nabc venkat last\n\n@param colCount\n@param colMaxLenList\n@param data\n@return",
"Populate the container, converting raw data into Java types.\n\n@param field custom field to which these values belong\n@param values raw value data\n@param descriptions raw description data",
"Manually set the breaker to be reset and ready for use. This\nis only useful after a manual trip otherwise the breaker will\ntrip automatically again if the service is still unavailable.\nJust like a real breaker. WOOT!!!",
"Add a '<=' clause so the column must be less-than or equals-to the value.",
"Set an enterprise duration value.\n\n@param index duration index (1-30)\n@param value duration value",
"Removes a value from the list.\n\n@param list the list\n@param value value to remove"
] |
public static boolean updatingIndexNecessesary(CmsObject cms) {
// Set request to the offline project.
setCmsOfflineProject(cms);
// Check whether the spellcheck index directories are empty.
// If they are, the index has to be built obviously.
if (isSolrSpellcheckIndexDirectoryEmpty()) {
return true;
}
// Compare the most recent date of a dictionary with the oldest timestamp
// that determines when an index has been built.
long dateMostRecentDictionary = getMostRecentDate(cms);
long dateOldestIndexWrite = getOldestIndexDate(cms);
return dateMostRecentDictionary > dateOldestIndexWrite;
} | [
"Checks whether a built of the indices is necessary.\n@param cms The appropriate CmsObject instance.\n@return true, if the spellcheck indices have to be rebuilt, otherwise false"
] | [
"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",
"Checks if the name of the file follows the version-n format\n\n@param versionDir The directory\n@return Returns true if the name is correct, else false",
"Read general project properties.",
"Load resource content from given path into variable with\ntype specified by `spec`.\n\n@param resourcePath the resource path\n@param spec {@link BeanSpec} specifies the return value type\n@return the resource content in a specified type or `null` if resource not found\n@throws UnexpectedException if return value type not supported",
"This method extracts data for a single resource from a Phoenix file.\n\n@param phoenixResource resource data\n@return Resource instance",
"Converts the key to the format in which it is stored for searching\n\n@param key Byte array of the key\n@return The format stored in the index file",
"Gets the value of the ppvItem 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 ppvItem property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetPPVItem().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link PPVItemsType.PPVItem }",
"Concatenate the arrays.\n\n@param array First array.\n@param array2 Second array.\n@return Concatenate between first and second array.",
"Returns the compact records for all users that are members of the team.\n\n@param team Globally unique identifier for the team.\n@return Request object"
] |
protected void writePropertiesToLog(Logger logger, Level level) {
writeToLog(logger, level, getMapAsString(this.properties, separator), null);
if (this.exception != null) {
writeToLog(this.logger, Level.ERROR, "Error:", this.exception);
}
} | [
"Write 'properties' map to given log in given level - with pipe separator between each entry\nWrite exception stack trace to 'logger' in 'error' level, if not empty\n@param logger\n@param level - of logging"
] | [
"Loads the leap second rules from a URL, often in a jar file.\n\n@param url the jar file to load, not null\n@throws Exception if an error occurs",
"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",
"Sets the publish queue shutdown time.\n\n@param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code>",
"Calculate the finish variance.\n\n@return finish variance",
"Throws an IllegalStateException when the given value is not true.",
"Use this API to update autoscaleprofile resources.",
"when divisionPrefixLen is null, isAutoSubnets has no effect",
"General API\n-> compile each of supplied files\n-> recompile any required types for which we have an incomplete principle structure",
"Reads a single byte from the input stream."
] |
protected static int calculateShift(int minimumValue, int maximumValue) {
int shift = 0;
int value = 1;
while (value < minimumValue && value < maximumValue) {
value <<= 1;
shift++;
}
return shift;
} | [
"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)"
] | [
"This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type",
"Handle a change in the weeks of month.\n@param week the changed weeks checkbox's internal value.\n@param value the new value of the changed checkbox.",
"Determines whether the current object on the specified level has a specific property, and if so, processes the\ntemplate\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"",
"Creates an upload session to create a new version of a file in chunks.\nThis will first verify that the version can be created and then open a session for uploading pieces of the file.\n@param fileSize the size of the file that will be uploaded.\n@return the created upload session instance.",
"If the Authtoken was already created in a separate program but not saved to file.\n\n@param authToken\n@param tokenSecret\n@param username\n@return\n@throws IOException",
"Support the range subscript operator for CharSequence with IntRange\n\n@param text a CharSequence\n@param range an IntRange\n@return the subsequence CharSequence\n@since 1.0",
"Implements get by delegating to getAll.",
"Creates a replica of the node with the new partitions list\n\n@param node The node whose replica we are creating\n@param partitionsList The new partitions list\n@return Replica of node with new partitions list",
"Modifies the \"msgCount\" belief\n\n@param int - the number to add or remove"
] |
public static Trajectory addPositionNoise(Trajectory t, double sd){
CentralRandomNumberGenerator r = CentralRandomNumberGenerator.getInstance();
Trajectory newt = new Trajectory(t.getDimension());
for(int i = 0; i < t.size(); i++){
newt.add(t.get(i));
for(int j = 1; j <= t.getDimension(); j++){
switch (j) {
case 1:
newt.get(i).setX(newt.get(i).x + r.nextGaussian()*sd);
break;
case 2:
newt.get(i).setY(newt.get(i).y + r.nextGaussian()*sd);
break;
case 3:
newt.get(i).setZ(newt.get(i).z + r.nextGaussian()*sd);
break;
default:
break;
}
}
}
return newt;
} | [
"Adds position noise to the trajectories\n@param t\n@param sd\n@return trajectory with position noise"
] | [
"Post an artifact to the Grapes server\n\n@param artifact The artifact to post\n@param user The user posting the information\n@param password The user password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Looks for sequences of integer lists and combine them into one big sequence",
"Parses the result and returns the failure description.\n\n@param result the result of executing an operation\n\n@return the failure description if defined, otherwise a new undefined model node\n\n@throws IllegalArgumentException if the outcome of the operation was successful",
"Sets a custom configuration attribute.\n@param attributeName the attribute name. Names starting with\n{@link #JDBC_PROPERTY_NAME_PREFIX} will be used (without the prefix) by the\nConnectionFactory when creating connections from DriverManager\n(not used for external DataSource connections). Names starting with\n{@link #DBCP_PROPERTY_NAME_PREFIX} to Commons DBCP (if used, also without prefix).\n@param attributeValue the attribute value",
"Checks anonymous fields.\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",
"Returns whether the values of this division grouping contain the prefix block for the given prefix length\n\n@param prefixLength\n@return",
"Populate a resource assignment.\n\n@param record MPX record\n@param assignment resource assignment\n@throws MPXJException",
"Transfer the data from the inputStream to the outputStream. Then close both streams.",
"Removes from this set all of its elements that are contained in the specified members array\n@param members the members to remove\n@return the number of members actually removed"
] |
protected Class getClassCacheEntry(String name) {
if (name == null) return null;
synchronized (classCache) {
return classCache.get(name);
}
} | [
"gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeClassCacheEntry(String)\n@see #setClassCacheEntry(Class)\n@see #clearCache()"
] | [
"Create the index and associate it with all project models in the Application",
"Use this API to update nsconfig.",
"Returns the complete task record for a single task.\n\n@param task The task to get.\n@return Request object",
"Cancel the pause operation",
"The grammar elements that may occur at the given offset.",
"Parses a single query facet item with query and label.\n@param prefix path to the query facet item (with trailing '/').\n@return the query facet item.",
"So that we get these packages caught Java class analysis.",
"Uses an IdentityMap to make sure we don't recurse infinitely on the same object in a cyclic object model.\nProxies\n@param obj\n@return",
"Read the given source byte array, then overwrite this buffer's contents\n\n@param src source byte array\n@param srcOffset offset in source byte array to read from\n@param destOffset offset in this buffer to read to\n@param length max number of bytes to read\n@return the number of bytes read"
] |
public void setLabel(String label) {
int ix = lstSizes.indexOf(label);
if (ix != -1) {
setLabel(ix);
}
} | [
"Set the String-representation of size.\n\nLike: Square, Thumbnail, Small, Medium, Large, Original.\n\n@param label"
] | [
"Tries to stop the JLAN server and return after it is stopped, but will also return if the thread hasn't stopped after MAX_SHUTDOWN_WAIT_MILLIS.",
"EAP 7.0",
"Gets the project name for a favorite entry.\n\n@param cms the CMS context\n@param entry the favorite entry\n@return the project name for the favorite entry\n@throws CmsException if something goes wrong",
"Remove any overrides for an endpoint on the default profile, client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise",
"Compute the offset for the item in the layout based on the offsets of neighbors\nin the layout. The other offsets are not patched. If neighbors offsets have not\nbeen computed the offset of the item will not be set.\n@return true if the item fits the container, false otherwise",
"Returns the active logged in user.",
"Prints the data for a single class to the given stream. This will be a\nsingle line in CSV.\n\n@param out\nthe output to write to\n@param classRecord\nthe class record to write\n@param entityIdValue\nthe item id that this class record belongs to",
"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.",
"This method is used to automatically generate a value\nfor the Outline Number field of this task.\n\n@param parent Parent Task"
] |
public static Field[] getDeclaredFieldsInHierarchy(Class<?> clazz) {
if (clazz.isPrimitive()) {
throw new IllegalArgumentException("Primitive types not supported.");
}
List<Field> result = new ArrayList<Field>();
while (true) {
if (clazz == Object.class) {
break;
}
result.addAll(Arrays.asList(clazz.getDeclaredFields()));
clazz = clazz.getSuperclass();
}
return result.toArray(new Field[result.size()]);
} | [
"Returns an array of all declared fields in the given class and all\nsuper-classes."
] | [
"Assigns a retention policy to all items with a given metadata template, optionally matching on fields.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param templateID the ID of the metadata template to assign the policy to.\n@param filter optional fields to match against in the metadata template.\n@return info about the created assignment.",
"Sets the class loader to be used on serialization operations, for data\nstored in the specified fqn and child nodes. Note that if another class\nloader is set for a specific child node tree, the cache will use instead\nthat class loader.\n\n@param regionFqn\n@param classLoader",
"An endpoint to compile an array of soy templates to JavaScript.\n\nThis endpoint is a preferred way of compiling soy templates to JavaScript but it requires a user to compose a url\non their own or using a helper class TemplateUrlComposer, which calculates checksum of a file and puts this in url\nso that whenever a file changes, after a deployment a JavaScript, url changes and a new hash is appended to url, which enforces\ngetting of new compiles JavaScript resource.\n\nInvocation of this url may throw two types of http exceptions:\n1. notFound - usually when a TemplateResolver cannot find a template with an associated name\n2. error - usually when there is a permission error and a user is not allowed to compile a template into a JavaScript\n\n@param hash - some unique number that should be used when we are caching this resource in a browser and we use http cache headers\n@param templateFileNames - an array of template names, e.g. client-words,server-time, which may or may not contain extension\ncurrently three modes are supported - soy extension, js extension and no extension, which is preferred\n@param disableProcessors - whether the controller should run registered outputProcessors after the compilation is complete.\n@param request - HttpServletRequest\n@param locale - locale\n@return response entity, which wraps a compiled soy to JavaScript files.\n@throws IOException - io error",
"Modifies the belief referenced by bName parameter.\n\n@param bName\n- the name of the belief to update.\n@param value\n- the new value for the belief",
"Prep for a new connection\n@return if stats are enabled, return the nanoTime when this connection was requested.\n@throws SQLException",
"Format event to string buffer.\n\n@param sbuf\nstring buffer to receive formatted event, may not be null.\n@param event\nevent to format, may not be null.",
"Writes an activity to a PM XML file.\n\n@param mpxj MPXJ Task instance",
"Get EditMode based on os and mode\n\n@return edit mode",
"Delete a module\n\n@param moduleId String"
] |
private void userInfoInit() {
boolean first = true;
userId = null;
userLocale = null;
userName = null;
userOrganization = null;
userDivision = null;
if (null != authentications) {
for (Authentication auth : authentications) {
userId = combine(userId, auth.getUserId());
userName = combine(userName, auth.getUserName());
if (first) {
userLocale = auth.getUserLocale();
first = false;
} else {
if (null != auth.getUserLocale() &&
(null == userLocale || !userLocale.equals(auth.getUserLocale()))) {
userLocale = null;
}
}
userOrganization = combine(userOrganization, auth.getUserOrganization());
userDivision = combine(userDivision, auth.getUserDivision());
}
}
// now calculate the "id" for this context, this should be independent of the data order, so sort
Map<String, List<String>> idParts = new HashMap<String, List<String>>();
if (null != authentications) {
for (Authentication auth : authentications) {
List<String> auths = new ArrayList<String>();
for (BaseAuthorization ba : auth.getAuthorizations()) {
auths.add(ba.getId());
}
Collections.sort(auths);
idParts.put(auth.getSecurityServiceId(), auths);
}
}
StringBuilder sb = new StringBuilder();
List<String> sortedKeys = new ArrayList<String>(idParts.keySet());
Collections.sort(sortedKeys);
for (String key : sortedKeys) {
if (sb.length() > 0) {
sb.append('|');
}
List<String> auths = idParts.get(key);
first = true;
for (String ak : auths) {
if (first) {
first = false;
} else {
sb.append('|');
}
sb.append(ak);
}
sb.append('@');
sb.append(key);
}
id = sb.toString();
} | [
"Calculate UserInfo strings."
] | [
"2-D Forward Discrete Cosine Transform.\n\n@param data Data.",
"Determines total number of partition-stores moved across zones.\n\n@return number of cross zone partition-store moves",
"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.",
"Detailed request to track additional data about PUT, GET and GET_ALL\n\n@param timeNS The time in nanoseconds that the operation took to complete\n@param numEmptyResponses For GET and GET_ALL, how many keys were no values found\n@param valueBytes Total number of bytes across all versions of values' bytes\n@param keyBytes Total number of bytes in the keys\n@param getAllAggregatedCount Total number of keys returned for getAll calls",
"If this address section is equivalent to the mask for a CIDR prefix block, it returns that prefix length.\nOtherwise, it returns null.\nA CIDR network mask is an address with all 1s in the network section and then all 0s in the host section.\nA CIDR host mask is an address with all 0s in the network section and then all 1s in the host section.\nThe prefix length is the length of the network section.\n\nAlso, keep in mind that the prefix length returned by this method is not equivalent to the prefix length used to construct this object.\nThe prefix length used to construct indicates the network and host section of this address.\nThe prefix length returned here indicates the whether the value of this address can be used as a mask for the network and host\nsection of any other address. Therefore the two values can be different values, or one can be null while the other is not.\n\nThis method applies only to the lower value of the range if this section represents multiple values.\n\n@param network whether to check for a network mask or a host mask\n@return the prefix length corresponding to this mask, or null if there is no such prefix length",
"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",
"Test for equality.\n@param obj1 the first object\n@param obj2 the second object\n@return true if both are null or the two objects are equal",
"Use this API to fetch appfwprofile_cookieconsistency_binding resources of given name .",
"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"
] |
public Date getTime(Integer type)
{
Date result = null;
byte[] item = m_map.get(type);
if (item != null)
{
result = MPPUtility.getTime(item, 0);
}
return (result);
} | [
"Retrieves a timestamp from the property data.\n\n@param type Type identifier\n@return timestamp"
] | [
"Prints a stores xml to a file.\n\n@param outputDirName\n@param fileName\n@param list of storeDefs",
"Goes through all the RO Stores in the plan and swaps it\n\n@param swappedStoreNames Names of stores already swapped\n@param useSwappedStoreNames Swap only the previously swapped stores (\nHappens during error )",
"Copies file from a resource to a local temp file\n\n@param sourceResource\n@return Absolute filename of the temp file\n@throws Exception",
"2-D Forward Discrete Hartley Transform.\n\n@param data Data.",
"Set new front facing rotation\n@param rotation",
"Print a duration value.\n\n@param value Duration instance\n@return string representation of a duration",
"Compares two avro strings which contains single store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content",
"Reads a combined date and time value expressed in tenths of a minute.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value",
"Set the amount of offset between child objects and parent.\n@param axis {@link Axis}\n@param offset"
] |
private String getRequestBody(ServletRequest request) throws IOException {
final StringBuilder sb = new StringBuilder();
String line = request.getReader().readLine();
while (null != line) {
sb.append(line);
line = request.getReader().readLine();
}
return sb.toString();
} | [
"Returns the body of the request. This method is used to read posted JSON data.\n\n@param request The request.\n\n@return String representation of the request's body.\n\n@throws IOException in case reading the request fails"
] | [
"Returns all entries in no particular order.",
"Retrieves the formatted parent WBS value.\n\n@return formatted parent WBS value",
"Check the variable name and if not set, set it with the singleton variable being on the top of the stack.",
"Use this API to fetch all the rsskeytype resources that are configured on netscaler.",
"Makes a DocumentReaderAndWriter based on the flags the CRFClassifier\nwas constructed with. Will create the flags.readerAndWriter and\ninitialize it with the CRFClassifier's flags.",
"Use this API to fetch responderhtmlpage resource of given name .",
"orientation state factory method",
"Creates a Span that covers an exact row. String parameters will be encoded as UTF-8",
"This method retrieves ONLY the ROOT actions"
] |
protected void layoutGroupFooterLabels(DJGroup djgroup, JRDesignGroup jgroup, int x, int y, int width, int height) {
//List footerVariables = djgroup.getFooterVariables();
DJGroupLabel label = djgroup.getFooterLabel();
//if (label == null || footerVariables.isEmpty())
//return;
//PropertyColumn col = djgroup.getColumnToGroupBy();
JRDesignBand band = LayoutUtils.getBandFromSection((JRDesignSection) jgroup.getGroupFooterSection());
// log.debug("Adding footer group label for group " + djgroup);
/*DJGroupVariable lmvar = findLeftMostColumn(footerVariables);
AbstractColumn lmColumn = lmvar.getColumnToApplyOperation();
int width = lmColumn.getPosX().intValue() - col.getPosX().intValue();
int yOffset = findYOffsetForGroupLabel(band);*/
JRDesignExpression labelExp;
if (label.isJasperExpression()) //a text with things like "$F{myField}"
labelExp = ExpressionUtils.createStringExpression(label.getText());
else if (label.getLabelExpression() != null){
labelExp = ExpressionUtils.createExpression(jgroup.getName() + "_labelExpression", label.getLabelExpression(), true);
} else //a simple text
//labelExp = ExpressionUtils.createStringExpression("\""+ Utils.escapeTextForExpression(label.getText())+ "\"");
labelExp = ExpressionUtils.createStringExpression("\""+ label.getText() + "\"");
JRDesignTextField labelTf = new JRDesignTextField();
labelTf.setExpression(labelExp);
labelTf.setWidth(width);
labelTf.setHeight(height);
labelTf.setX(x);
labelTf.setY(y);
//int yOffsetGlabel = labelTf.getHeight();
labelTf.setPositionType( PositionTypeEnum.FIX_RELATIVE_TO_TOP );
applyStyleToElement(label.getStyle(), labelTf);
band.addElement(labelTf);
} | [
"Creates needed textfields for general label in footer groups.\n@param djgroup\n@param jgroup"
] | [
"Set an enterprise date value.\n\n@param index date index (1-30)\n@param value date value",
"Retrieves state and metrics information for individual client connection.\n\n@param name connection name\n@return connection information",
"Returns the available module names regarding the filters\n\n@param name String\n@param filters FiltersHolder\n@return List<String>",
"Creates the string mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param position\nthe position\n@throws IOException\nSignals that an I/O exception has occurred.",
"Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error",
"Computes the eigenvalues of a 2 by 2 matrix using a faster but more prone to errors method. This\nis the typical method.",
"Handles a key change.\n\n@param event the key change event.\n@param allLanguages <code>true</code> for changing the key for all languages, <code>false</code> if the key should be changed only for the current language.\n@return result, indicating if the key change was successful.",
"Get the FieldDescriptors of the extent based on the FieldDescriptors of the parent.",
"Deletes an object from the database.\nIt must be executed in the context of an open transaction.\nIf the object is not persistent, then ObjectNotPersistent is thrown.\nIf the transaction in which this method is executed commits,\nthen the object is removed from the database.\nIf the transaction aborts,\nthen the deletePersistent operation is considered not to have been executed,\nand the target object is again in the database.\n@param\tobject\tThe object to delete."
] |
private void captureEye(GVRScreenshotCallback callback, GVRRenderTarget renderTarget, GVRViewManager.EYE eye, boolean useMultiview) {
if (null == callback) {
return;
}
readRenderResult(renderTarget,eye,useMultiview);
returnScreenshotToCaller(callback, mReadbackBufferWidth, mReadbackBufferHeight);
} | [
"capture screenshot of an eye"
] | [
"Saves messages to a xmlvfsbundle file.\n\n@throws CmsException thrown if writing to the file fails.",
"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",
"Produces an IPv4 address section from any sequence of bytes in this IPv6 address section\n\n@param startIndex the byte index in this section to start from\n@param endIndex the byte index in this section to end at\n@throws IndexOutOfBoundsException\n@return\n\n@see #getEmbeddedIPv4AddressSection()\n@see #getMixedAddressSection()",
"create logs with given partition number\n\n@param topic the topic name\n@param partitions partition number\n@param forceEnlarge enlarge the partition number of log if smaller than runtime\n@return the partition number of the log after enlarging",
"Method to build Integration flow for IMAP Idle configuration.\n@param urlName Mail source URL.\n@return Integration Flow object IMAP IDLE.",
"Use this API to fetch all the appfwsignatures resources that are configured on netscaler.",
"Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException",
"Return any feedback messages and errors that were generated - but\nsuppressed - during the interpolation process. Since unresolvable\nexpressions will be left in the source string as-is, this feedback is\noptional, and will only be useful for debugging interpolation problems.\n\n@return a {@link List} that may be interspersed with {@link String} and\n{@link Throwable} instances.",
"This method writes predecessor data to an MSPDI file.\nWe have to deal with a slight anomaly in this method that is introduced\nby the MPX file format. It would be possible for someone to create an\nMPX file with both the predecessor list and the unique ID predecessor\nlist populated... which means that we must process both and avoid adding\nduplicate predecessors. Also interesting to note is that MSP98 populates\nthe predecessor list, not the unique ID predecessor list, as you might\nexpect.\n\n@param xml MSPDI task data\n@param mpx MPX task data"
] |
public static boolean sameNetwork(int prefixLength, InetAddress address1, InetAddress address2) {
if (logger.isDebugEnabled()) {
logger.debug("Comparing address " + address1.getHostAddress() + " with " + address2.getHostAddress() + ", prefixLength=" + prefixLength);
}
long prefixMask = 0xffffffffL & (-1 << (32 - prefixLength));
return (addressToLong(address1) & prefixMask) == (addressToLong(address2) & prefixMask);
} | [
"Checks whether two internet addresses are on the same subnet.\n\n@param prefixLength the number of bits within an address that identify the network\n@param address1 the first address to be compared\n@param address2 the second address to be compared\n\n@return true if both addresses share the same network bits"
] | [
"Retrieves the avatar of a user as an InputStream.\n\n@return InputStream representing the user avater.",
"Sets the invalid values for the TextBox\n@param invalidValues\n@param isCaseSensitive\n@param invalidValueErrorMessage",
"Obtain the profile name associated with a profile ID\n\n@param id ID of profile\n@return Name of corresponding profile",
"Animate de-selection of visible views and clear\nselected set.",
"Try to build an default PBKey for convenience PB create method.\n\n@return PBKey or <code>null</code> if default key was not declared in\nmetadata",
"Return true if the processor of the node is currently being executed.\n\n@param processorGraphNode the node to test.",
"Apply all attributes on the given context, hereby existing entries are preserved.\n\n@param context the context to be applied, not null.\n@return this Builder, for chaining\n@see #importContext(AbstractContext, boolean)",
"Get a subset of the attributes of the provided class. An attribute is each public field in the class\nor super class.\n\n@param classToInspect the class to inspect\n@param filter a predicate that returns true when a attribute should be kept in resulting\ncollection.",
"Returns true if the ASTNode is a declaration of a closure, either as a declaration\nor a field.\n@param expression\nthe target expression\n@return\nas described"
] |
private Map<String, String> generateCommonConfigPart() {
Map<String, String> result = new HashMap<>();
if (m_category != null) {
result.put(CONFIGURATION_CATEGORY, m_category);
}
// append 'only leafs' to configuration
if (m_onlyLeafs) {
result.put(CONFIGURATION_ONLYLEAFS, null);
}
// append 'property' to configuration
if (m_property != null) {
result.put(CONFIGURATION_PROPERTY, m_property);
}
// append 'selectionType' to configuration
if (m_selectiontype != null) {
result.put(CONFIGURATION_SELECTIONTYPE, m_selectiontype);
}
return result;
} | [
"Helper to generate the common configuration part for client-side and server-side widget.\n@return the common configuration options as map"
] | [
"Loads the configuration from file \"OBJ.properties\". If the system\nproperty \"OJB.properties\" is set, then the configuration in that file is\nloaded. Otherwise, the file \"OJB.properties\" is tried. If that is also\nunsuccessful, then the configuration is filled with default values.",
"Writes the data collected about classes to a file.",
"once we're on ORM 5",
"Returns the tags that were root in the definition files. These serve as entry point shortcuts when browsing the graph. We could reduce this to\njust fewer as the root tags may be connected through parents=\"...\".",
"Returns the chunk id for the file name\n\n@param fileName The file name\n@return Chunk id",
"Populate the expanded exceptions list based on the main exceptions list.\nWhere we find recurring exception definitions, we generate individual\nexceptions for each recurrence to ensure that we account for them correctly.",
"When we execute a single statement we only need the corresponding Row with the result.\n\n@param results a list of {@link StatementResult}\n@return the result of a single query",
"Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color",
"Adds a step to the steps.\n\n@param name {@link String} name of the step\n@param robot {@link String} name of the robot used by the step.\n@param options {@link Map} extra options required for the step."
] |
private void logUnexpectedStructure()
{
if (m_log != null)
{
m_log.println("ABORTED COLUMN - unexpected structure: " + m_currentColumn.getClass().getSimpleName() + " " + m_currentColumn.getName());
}
} | [
"Log unexpected column structure."
] | [
"Get range around median containing specified percentage of values.\n@param values Values.\n@param percent Values percentage around median.\n@return Returns the range which containes specifies percentage of values.",
"Use this API to fetch filtered set of dospolicy resources.\nset the filter parameter values in filtervalue object.",
"Compute the proportional padding for all items in the cache\n@param cache Cache data set\n@return the uniform padding amount",
"Use this API to fetch nsacl6 resources of given names .",
"Takes a String and converts it to a Date\n\n@param dateString the date\n@return Date denoted by dateString",
"Sets the replacement var map.\n\n@param replacementVarMap\nthe replacement var map\n@return the parallel task builder",
"Creates the operation to add a resource.\n\n@param address the address of the operation to add.\n@param properties the properties to set for the resource.\n\n@return the operation.",
"Remove a named object",
"Specifies the angle of the effect.\n\n@param angle the angle of the effect.\n@angle"
] |
public static boolean any(Object self, Closure closure) {
BooleanClosureWrapper bcw = new BooleanClosureWrapper(closure);
for (Iterator iter = InvokerHelper.asIterator(self); iter.hasNext();) {
if (bcw.call(iter.next())) return true;
}
return false;
} | [
"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"
] | [
"Visit this and all child nodes.\n\n@param visitor The visitor to use.",
"Recycles the Renderer getting it from the tag associated to the renderer root view. This view\nis not used with RecyclerView widget.\n\n@param convertView that contains the tag.\n@param content to be updated in the recycled renderer.\n@return a recycled renderer.",
"Returns a File object whose path is the expected user directory.\nDoes not create or check for existence.\n@param prefix\n@param suffix\n@param parent\n@return",
"Use this API to unset the properties of systemuser resources.\nProperties that need to be unset are specified in args array.",
"Compress contiguous partitions into format \"e-i\" instead of\n\"e, f, g, h, i\". This helps illustrate contiguous partitions within a\nzone.\n\n@param cluster\n@param zoneId\n@return pretty string of partitions per zone",
"This method is called to format a currency value.\n\n@param value numeric value\n@return currency value",
"Use this API to fetch all the vridparam resources that are configured on netscaler.",
"Add a calendar node.\n\n@param parentNode parent node\n@param calendar calendar",
"Writes OWL declarations for all basic vocabulary elements used in the\ndump.\n\n@throws RDFHandlerException"
] |
protected float computeUniformPadding(final CacheDataSet cache) {
float axisSize = getViewPortSize(getOrientationAxis());
float totalPadding = axisSize - cache.getTotalSize();
float uniformPadding = totalPadding > 0 && cache.count() > 1 ?
totalPadding / (cache.count() - 1) : 0;
return uniformPadding;
} | [
"Compute the proportional padding for all items in the cache\n@param cache Cache data set\n@return the uniform padding amount"
] | [
"Creates and start an engine representing the node named as the given parameter.\n\n@param name\nname of the node, as present in the configuration (case sensitive)\n@param handler\ncan be null. A set of callbacks hooked on different engine life cycle events.\n@return an object allowing to stop the engine.",
"Get the ver\n\n@param id\n@return",
"Use this API to fetch all the appfwprofile resources that are configured on netscaler.",
"Log column data.\n\n@param column column data",
"Sets the columns width by reading some report options like the\nprintableArea and useFullPageWidth.\ncolumns with fixedWidth property set in TRUE will not be modified",
"Gets a list of any comments on this file.\n\n@return a list of comments on this file.",
"Appends the GROUP BY clause for the Query\n@param groupByFields\n@param buf",
"Returns an array with the width of the longest word per column calculated from the given table.\nDefault padding will be added per column.\nPadding for individual columns will be added if defined.\n@param rows the table rows for calculations\n@param colNumbers number of columns in the table\n@return array with width of longest word for each column, null if input table was null",
"Get the bone index for the bone with the given name.\n\n@param bonename string identifying the bone whose index you want\n@return 0 based bone index or -1 if bone with that name is not found."
] |
public static Set<String> listLinks(OperationContext context, PathAddress overlayAddress) {
Resource overlayResource = context.readResourceFromRoot(overlayAddress);
if (overlayResource.hasChildren(DEPLOYMENT)) {
return overlayResource.getChildrenNames(DEPLOYMENT);
}
return Collections.emptySet();
} | [
"Returns all the deployment runtime names associated with an overlay.\n\n@param context the current OperationContext.\n@param overlayAddress the address for the averlay.\n@return all the deployment runtime names associated with an overlay."
] | [
"Gets the JsonObject representation of the Field Operation.\n@param fieldOperation represents the template update operation\n@return the json object",
"This is a temporary measure until we have a type-safe solution for\nretrieving serializers from a SerializerFactory. It avoids warnings all\nover the codebase while making it easy to verify who calls it.",
"sorts are a bit more awkward and need a helper...",
"Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list",
"Extract site path, base name and locale from the resource opened with the editor.",
"Clone a widget info map considering what may be copied to the client.\n\n@param widgetInfo widget info map\n@return cloned copy including only records which are not {@link ServerSideOnlyInfo}",
"Reopen the associated static logging stream. Set to null to redirect to System.out.",
"Perform construction.\n\n@param callbackHandler",
"Transposes an individual block inside a block matrix."
] |
public static <T> DatabaseTableConfig<T> fromReader(BufferedReader reader) throws SQLException {
DatabaseTableConfig<T> config = new DatabaseTableConfig<T>();
boolean anything = false;
while (true) {
String line;
try {
line = reader.readLine();
} catch (IOException e) {
throw SqlExceptionUtil.create("Could not read DatabaseTableConfig from stream", e);
}
if (line == null) {
break;
}
// we do this so we can support multiple class configs per file
if (line.equals(CONFIG_FILE_END_MARKER)) {
break;
}
// we do this so we can support multiple class configs per file
if (line.equals(CONFIG_FILE_FIELDS_START)) {
readFields(reader, config);
continue;
}
// skip empty lines or comments
if (line.length() == 0 || line.startsWith("#") || line.equals(CONFIG_FILE_START_MARKER)) {
continue;
}
String[] parts = line.split("=", -2);
if (parts.length != 2) {
throw new SQLException("DatabaseTableConfig reading from stream cannot parse line: " + line);
}
readTableField(config, parts[0], parts[1]);
anything = true;
}
// if we got any config lines then we return the config
if (anything) {
return config;
} else {
// otherwise we return null for none
return null;
}
} | [
"Load a table configuration in from a text-file reader.\n\n@return A config if any of the fields were set otherwise null if we reach EOF."
] | [
"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",
"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",
"Infer the type of and create a new output variable using the results from the right side of the equation.\nIf the type is already known just return that.",
"Use picasso to render the video thumbnail into the thumbnail widget using a temporal\nplaceholder.\n\n@param video to get the rendered thumbnail.",
"Read a Synchro time from an input stream.\n\n@param is input stream\n@return Date instance",
"Starts the scenario with the given method and arguments.\nDerives the description from the method name.\n@param method the method that started the scenario\n@param arguments the test arguments with their parameter names",
"Returns true if the addon depends on reporting.",
"Return collection of path Ids in priority order\n\n@param profileId ID of profile\n@return collection of path Ids in priority order",
"Get all views from the list content\n@return list of views currently visible"
] |
public void setOffset(float offset, final Axis axis) {
if (!equal(mOffset.get(axis), offset)) {
mOffset.set(offset, axis);
if (mContainer != null) {
mContainer.onLayoutChanged(this);
}
}
} | [
"Set the amount of offset between child objects and parent.\n@param axis {@link Axis}\n@param offset"
] | [
"The default field facets.\n\n@param categoryConjunction flag, indicating if category selections in the facet should be \"AND\" combined.\n@return the default field facets.",
"Returns the finish date for this resource assignment.\n\n@return finish date",
"static expansion helpers",
"Close the Closeable. Logging a warning if any problems occur.\n\n@param c the thing to close",
"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",
"Process field aliases.",
"Creates an empty block style definition.\n@return",
"Filter for public tweets on these languages.\n\n@param languages\nValid BCP 47 (http://tools.ietf.org/html/bcp47) language identifiers,\nand may represent any of the languages listed on Twitter's advanced search page\n(https://twitter.com/search-advanced), or \"und\" if no language could be detected.\nThese strings should NOT be url-encoded.\n@return this",
"OR operation which takes the previous clause and the next clause and OR's them together."
] |
private StepFormatter.Formatting<?, ?> getFormatting( Annotation[] annotations, Set<Class<?>> visitedTypes,
Annotation originalAnnotation, String parameterName ) {
List<StepFormatter.Formatting<?, ?>> foundFormatting = Lists.newArrayList();
Table tableAnnotation = null;
for( Annotation annotation : annotations ) {
try {
if( annotation instanceof Format ) {
Format arg = (Format) annotation;
foundFormatting.add( new StepFormatter.ArgumentFormatting( ReflectionUtil.newInstance( arg.value() ), arg.args() ) );
} else if( annotation instanceof Table ) {
tableAnnotation = (Table) annotation;
} else if( annotation instanceof AnnotationFormat ) {
AnnotationFormat arg = (AnnotationFormat) annotation;
foundFormatting.add( new StepFormatter.ArgumentFormatting(
new StepFormatter.AnnotationBasedFormatter( arg.value().newInstance(), originalAnnotation ) ) );
} else {
Class<? extends Annotation> annotationType = annotation.annotationType();
if( !visitedTypes.contains( annotationType ) ) {
visitedTypes.add( annotationType );
StepFormatter.Formatting<?, ?> formatting = getFormatting( annotationType.getAnnotations(), visitedTypes,
annotation, parameterName );
if( formatting != null ) {
foundFormatting.add( formatting );
}
}
}
} catch( Exception e ) {
throw Throwables.propagate( e );
}
}
if( foundFormatting.size() > 1 ) {
Formatting<?, ?> innerFormatting = Iterables.getLast( foundFormatting );
foundFormatting.remove( innerFormatting );
ChainedFormatting<?> chainedFormatting = new StepFormatter.ChainedFormatting<Object>( (ObjectFormatter<Object>) innerFormatting );
for( StepFormatter.Formatting<?, ?> formatting : Lists.reverse( foundFormatting ) ) {
chainedFormatting.addFormatting( (StepFormatter.Formatting<?, String>) formatting );
}
foundFormatting.clear();
foundFormatting.add( chainedFormatting );
}
if( tableAnnotation != null ) {
ObjectFormatter<?> objectFormatter = foundFormatting.isEmpty()
? DefaultFormatter.INSTANCE
: foundFormatting.get( 0 );
return getTableFormatting( annotations, parameterName, tableAnnotation, objectFormatter );
}
if( foundFormatting.isEmpty() ) {
return null;
}
return foundFormatting.get( 0 );
} | [
"Recursively searches for formatting annotations.\n\n@param visitedTypes used to prevent an endless loop\n@param parameterName"
] | [
"Gets the JVM memory usage.\n\n@return the JVM memory usage",
"Generates the body of a toString method that uses a StringBuilder.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\noptional, we have no choice but to track the separators at runtime, but if any of them will\nalways be present, we can actually do the hard work at compile time. Specifically, we can pick\nthe first such and output it without a comma; any property before it will have a comma\n<em>appended</em>, and any property after it will have a comma <em>prepended</em>. This gives\nus the right number of commas in the right places in all circumstances.\n\n<p>As well as keeping track of whether we are <b>prepending commas</b> yet (initially false),\nwe also keep track of whether we have just finished an if-then block for an optional property,\nor if we are in the <b>middle of an append chain</b>, and if so, whether we are in the\n<b>middle of a string literal</b>. This lets us output the fewest literals and statements,\nmuch as a mildly compulsive programmer would when writing the same code.",
"Returns the value of the identified field as a Boolean.\n@param fieldName the name of the field\n@return the value of the field as a Boolean",
"Tries to load a the bundle for a given locale, also loads the backup\nlocales with the same language.\n\n@param baseName the raw bundle name, without locale qualifiers\n@param locale the locale\n@param wantBase whether a resource bundle made only from the base name\n(with no locale information attached) should be returned.\n@return the resource bundle if it was loaded, otherwise the backup",
"Return a set of all the Declaration matching the DeclarationFilter of the.\nLinker.\n\n@return a set of all the Declaration matching the DeclarationFilter of the\nLinker.",
"Start the rendering of the scalebar.",
"Write a single resource.\n\n@param mpxj Resource instance",
"Calls the provided closure for a \"page\" of rows from the table represented by this DataSet.\nA page is defined as starting at a 1-based offset, and containing a maximum number of rows.\n\n@param offset the 1-based offset for the first row to be processed\n@param maxRows the maximum number of rows to be processed\n@param closure called for each row with a GroovyResultSet\n@throws SQLException if a database access error occurs\n@see groovy.sql.Sql#eachRow(String, java.util.List, int, int, groovy.lang.Closure)",
"Wrap an operation's parameters in a simple encapsulating object\n@param operation the operation\n@param messageHandler the message handler\n@param attachments the attachments\n@return the encapsulating object"
] |
protected void postConnection(ConnectionHandle handle, long statsObtainTime){
handle.renewConnection(); // mark it as being logically "open"
// Give an application a chance to do something with it.
if (handle.getConnectionHook() != null){
handle.getConnectionHook().onCheckOut(handle);
}
if (this.pool.closeConnectionWatch){ // a debugging tool
this.pool.watchConnection(handle);
}
if (this.pool.statisticsEnabled){
this.pool.statistics.addCumulativeConnectionWaitTime(System.nanoTime()-statsObtainTime);
}
} | [
"After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime"
] | [
"Returns a color for a given absolute number that is to be shown on the\nmap.\n\n@param value\n@return",
"Return a logger associated with a particular class name.",
"Returns the URL of the class file where the given class has been loaded from.\n\n@throws IllegalArgumentException\nif failed to determine.\n@since 2.24",
"Read the relationships for an individual GanttProject task.\n\n@param gpTask GanttProject task",
"use this method to construct the ChainingIterator\niterator by iterator.",
"Propagate onNoPick events to listeners\n@param picker GVRPicker which generated the event",
"Helper method to check if log4j is already configured",
"Get a property as a int or null.\n\n@param key the property name",
"get the bean property type\n\n@param clazz\n@param propertyName\n@param originalType\n@return"
] |
public static List<String> getSelectOptionValues(CmsObject cms, String rootPath, boolean allRemoved) {
try {
cms = OpenCms.initCmsObject(cms);
cms.getRequestContext().setSiteRoot("");
CmsADEConfigData adeConfig = OpenCms.getADEManager().lookupConfiguration(cms, rootPath);
if (adeConfig.parent() != null) {
adeConfig = adeConfig.parent();
}
List<CmsSelectWidgetOption> options = getFormatterOptionsStatic(cms, adeConfig, rootPath, allRemoved);
List<CmsSelectWidgetOption> typeOptions = getTypeOptionsStatic(cms, adeConfig, allRemoved);
options.addAll(typeOptions);
List<String> result = new ArrayList<String>(options.size());
for (CmsSelectWidgetOption o : options) {
result.add(o.getValue());
}
return result;
} catch (CmsException e) {
// should never happen
LOG.error(e.getLocalizedMessage(), e);
return null;
}
} | [
"Returns all values that can be selected in the widget.\n@param cms the current CMS object\n@param rootPath the root path to the currently edited xml file (sitemap config)\n@param allRemoved flag, indicating if all inheritedly available formatters should be disabled\n@return all values that can be selected in the widget."
] | [
"Used to apply or update the watermark for the item.\n@param itemUrl url template for the item.\n@param imprint the value must be \"default\", as custom watermarks is not yet supported.\n@return the watermark associated with the item.",
"Transform the operation into something the proxy controller understands.\n\n@param identity the server identity\n@return the transformed operation",
"Processes the template for all extents of the current class.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Get the values for a particular configuration property\n\n@param name - name of the property\n@return All values encountered or null",
"Use this API to fetch all the Interface resources that are configured on netscaler.",
"Determines the accessor method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name",
"Prints some basic documentation about this program.",
"Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.",
"Convert a URL Encoded name back to the original form.\n@param name the name to URL urlDecode.\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the name in original form.\n@throws UnsupportedEncodingException if the encoding is not supported."
] |
protected void copyStream(File outputDirectory,
InputStream stream,
String targetFileName) throws IOException
{
File resourceFile = new File(outputDirectory, targetFileName);
BufferedReader reader = null;
Writer writer = null;
try
{
reader = new BufferedReader(new InputStreamReader(stream, ENCODING));
writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(resourceFile), ENCODING));
String line = reader.readLine();
while (line != null)
{
writer.write(line);
writer.write('\n');
line = reader.readLine();
}
writer.flush();
}
finally
{
if (reader != null)
{
reader.close();
}
if (writer != null)
{
writer.close();
}
}
} | [
"Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFileName The file to write the stream contents to.\n@throws IOException If the stream cannot be copied."
] | [
"Exchanges the initial fully-formed messages which establishes the transaction context for queries to\nthe dbserver.\n\n@throws IOException if there is a problem during the exchange",
"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",
"Command line method to walk the directories provided on the command line\nand print out their contents\n\n@param args Directory names",
"Merge the two maps.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n<p>\nIf a key exists in the left and right operands, the value in the right operand is preferred.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@throws IllegalArgumentException - when a right operand key exists in the left operand.\n@since 2.15",
"Returns the comma separated list of available scopes\n\n@return String",
"Creates a new InternetPrintWriter for given charset encoding.\n\n@param outputStream the wrapped output stream.\n@param charset the charset.\n@return a new InternetPrintWriter.",
"Adds a handler for a mouse type event on the map.\n\n@param obj The object that the event should be registered on.\n@param type Type of the event to register against.\n@param h Handler that will be called when the event occurs.",
"Recursively loads the metadata for this node",
"Log a warning for the resource at the provided address and the given attributes. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attributes attributes we are warning about"
] |
public CurrencyQueryBuilder setCurrencyCodes(String... codes) {
return set(CurrencyQuery.KEY_QUERY_CURRENCY_CODES, Arrays.asList(codes));
} | [
"Sets the currency code, or the regular expression to select codes.\n\n@param codes the currency codes or code expressions, not null.\n@return the query for chaining."
] | [
"Moves a particular enum option to be either before or after another specified enum option in the custom field.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"Creates a new instance from the given configuration file.\n\n@throws IOException if failed to load the configuration from the specified file",
"Connects to the comm port and starts send and receive threads.\n@param serialPortName the port name to open\n@throws SerialInterfaceException when a connection error occurs.",
"Sets the replacement var map node specific.\n\n@param replacementVarMapNodeSpecific\nthe replacement var map node specific\n@return the parallel task builder",
"Determines whether the given type is an array type.\n\n@param type the given type\n@return true if the given type is a subclass of java.lang.Class or implements GenericArrayType",
"Send get request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws URISyntaxException the uri syntax exception\n@throws IOException the io exception",
"Find and return the appropriate getter method for field.\n\n@return Get method or null (or throws IllegalArgumentException) if none found.",
"This method returns the value of the product under the specified model and other information in a key-value map.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model A model used to evaluate the product.\n@return The values of the product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Use this API to unset the properties of nsconfig resource.\nProperties that need to be unset are specified in args array."
] |
@NonNull
@Override
public Loader<SortedList<FtpFile>> getLoader() {
return new AsyncTaskLoader<SortedList<FtpFile>>(getContext()) {
@Override
public SortedList<FtpFile> loadInBackground() {
SortedList<FtpFile> sortedList = new SortedList<>(FtpFile.class, new SortedListAdapterCallback<FtpFile>(getDummyAdapter()) {
@Override
public int compare(FtpFile lhs, FtpFile rhs) {
if (lhs.isDirectory() && !rhs.isDirectory()) {
return -1;
} else if (rhs.isDirectory() && !lhs.isDirectory()) {
return 1;
} else {
return lhs.getName().compareToIgnoreCase(rhs.getName());
}
}
@Override
public boolean areContentsTheSame(FtpFile oldItem, FtpFile newItem) {
return oldItem.getName().equals(newItem.getName());
}
@Override
public boolean areItemsTheSame(FtpFile item1, FtpFile item2) {
return item1.getName().equals(item2.getName());
}
});
if (!ftp.isConnected()) {
// Connect
try {
ftp.connect(server, port);
ftp.setFileType(FTP.ASCII_FILE_TYPE);
ftp.enterLocalPassiveMode();
ftp.setUseEPSVwithIPv4(false);
if (!(loggedIn = ftp.login(username, password))) {
ftp.logout();
Log.e(TAG, "Login failed");
}
} catch (IOException e) {
if (ftp.isConnected()) {
try {
ftp.disconnect();
} catch (IOException ignored) {
}
}
Log.e(TAG, "Could not connect to server.");
}
}
if (loggedIn) {
try {
// handle if directory does not exist. Fall back to root.
if (mCurrentPath == null || !mCurrentPath.isDirectory()) {
mCurrentPath = getRoot();
}
sortedList.beginBatchedUpdates();
for (FTPFile f : ftp.listFiles(mCurrentPath.getPath())) {
FtpFile file;
if (f.isDirectory()) {
file = new FtpDir(mCurrentPath, f.getName());
} else {
file = new FtpFile(mCurrentPath, f.getName());
}
if (isItemVisible(file)) {
sortedList.add(file);
}
}
sortedList.endBatchedUpdates();
} catch (IOException e) {
Log.e(TAG, "IOException: " + e.getMessage());
}
}
return sortedList;
}
/**
* Handles a request to start the Loader.
*/
@Override
protected void onStartLoading() {
super.onStartLoading();
// handle if directory does not exist. Fall back to root.
if (mCurrentPath == null || !mCurrentPath.isDirectory()) {
mCurrentPath = getRoot();
}
forceLoad();
}
};
} | [
"Get a loader that lists the files in the current path,\nand monitors changes."
] | [
"Validates an operation against its description provider\n\n@param operation The operation to validate\n@throws IllegalArgumentException if the operation is not valid",
"Retrieve the correct index for the supplied Table instance.\n\n@param table Table instance\n@return index",
"Processes one of the menu responses that jointly constitute the track metadata, updating our\nfields accordingly.\n\n@param item the menu response to be considered",
"Sets name, status, start time and title to specified step\n\n@param step which will be changed",
"Compare the supplied plaintext password to a hashed password.\n\n@param passwd Plaintext password.\n@param hashed scrypt hashed password.\n\n@return true if passwd matches hashed value.",
"Throws an IllegalArgumentException when the given value is not true.\n@param value the value to assert if true\n@param message the message to display if the value is false\n@return the value",
"Read a list of fixed size blocks using an instance of the supplied reader class.\n\n@param readerClass reader class\n@return list of blocks",
"Get the service name of a top-level deployment unit.\n\n@param name the simple name of the deployment\n@param phase the deployment phase\n@return the service name",
"Deletes the given directory.\n\n@param directory The directory to delete."
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.