query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static base_responses add(nitro_service client, nsip6 resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
nsip6 addresources[] = new nsip6[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new nsip6();
addresources[i].ipv6address = resources[i].ipv6address;
addresources[i].scope = resources[i].scope;
addresources[i].type = resources[i].type;
addresources[i].vlan = resources[i].vlan;
addresources[i].nd = resources[i].nd;
addresources[i].icmp = resources[i].icmp;
addresources[i].vserver = resources[i].vserver;
addresources[i].telnet = resources[i].telnet;
addresources[i].ftp = resources[i].ftp;
addresources[i].gui = resources[i].gui;
addresources[i].ssh = resources[i].ssh;
addresources[i].snmp = resources[i].snmp;
addresources[i].mgmtaccess = resources[i].mgmtaccess;
addresources[i].restrictaccess = resources[i].restrictaccess;
addresources[i].dynamicrouting = resources[i].dynamicrouting;
addresources[i].hostroute = resources[i].hostroute;
addresources[i].ip6hostrtgw = resources[i].ip6hostrtgw;
addresources[i].metric = resources[i].metric;
addresources[i].vserverrhilevel = resources[i].vserverrhilevel;
addresources[i].ospf6lsatype = resources[i].ospf6lsatype;
addresources[i].ospfarea = resources[i].ospfarea;
addresources[i].state = resources[i].state;
addresources[i].map = resources[i].map;
addresources[i].ownernode = resources[i].ownernode;
addresources[i].td = resources[i].td;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add nsip6 resources."
] | [
"Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.",
"Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value",
"Handles the response of the getVersion request.\n@param incomingMessage the response message to process.",
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler.",
"Set up server for report directory.",
"Get a handler based on its class\n@param clazz The class of the Handler to return.\nIf multiple Handlers exist, the first one is returned.\n@param <E> The class of the handler to return.\n@return The handler matching the class name.",
"Takes a list of Strings and combines them into a single comma-separated\nString.\n@param strings The Strings to combine.\n@return The combined, comma-separated, String.",
"Generic version of getting value by key from the JobContext of current thread\n@param key the key\n@param clz the val class\n@param <T> the val type\n@return the value",
"Copies from buffer to our internal strBufferIndex, expanding the internal buffer if necessary\n@param offset offset in the buffer to start copying from\n@param length length to copy"
] |
public static base_responses create(nitro_service client, sslfipskey resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslfipskey createresources[] = new sslfipskey[resources.length];
for (int i=0;i<resources.length;i++){
createresources[i] = new sslfipskey();
createresources[i].fipskeyname = resources[i].fipskeyname;
createresources[i].modulus = resources[i].modulus;
createresources[i].exponent = resources[i].exponent;
}
result = perform_operation_bulk_request(client, createresources,"create");
}
return result;
} | [
"Use this API to create sslfipskey resources."
] | [
"Updates the template with the specified id.\n\n@param id id of the template to update\n@param options a Map of options to update/add.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Apply an XMLDSig onto the passed document.\n\n@param aPrivateKey\nThe private key used for signing. May not be <code>null</code>.\n@param aCertificate\nThe certificate to be used. May not be <code>null</code>.\n@param aDocument\nThe document to be signed. The signature will always be the first\nchild element of the document element. The document may not contains\nany disg:Signature element. This element is inserted manually.\n@throws Exception\nIn case something goes wrong\n@see #createXMLSignature(X509Certificate)",
"Returns true if\n- includeTags is not empty and tag is in includeTags\n- includeTags is empty and tag is not in excludeTags\n@param tags Hint tags\n@param includeTags Include tags\n@param excludeTags Exclude tags\n@return has tag match",
"Finds and sets up the Listeners in the given rootView.\n\n@param rootView a View to traverse looking for listeners.\n@return the list of refinement attributes found on listeners.",
"Set the names of six images in the zip file. The default names of the six\nimages are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\", \"posz.png\",\nand \"negz.png\". If the names of the six images in the zip file are\ndifferent to the default ones, this function must be called before load\nthe zip file.\n\n@param nameArray\nAn array containing six strings which are names of images\ncorresponding to +x, -x, +y, -y, +z, and -z faces of the cube\nmap texture respectively.",
"Computes the likelihood of the random draw\n\n@return The likelihood.",
"Set a Java classname path to ignore when printing stack traces\n@param classToIgnoreInTraces The class name (with packages, etc) to ignore.\n@return this",
"Should only called on a column that is being set to null.\n\nReturns the most outer embeddable containing {@code column} that is entirely null.\nReturn null otherwise i.e. not embeddable.\n\nThe implementation lazily compute the embeddable state and caches it.\nThe idea behind the lazy computation is that only some columns will be set to null\nand only in some situations.\nThe idea behind caching is that an embeddable contains several columns, no need to recompute its state.",
"Add the list with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The list of all packages to add."
] |
public static onlinkipv6prefix get(nitro_service service, String ipv6prefix) throws Exception{
onlinkipv6prefix obj = new onlinkipv6prefix();
obj.set_ipv6prefix(ipv6prefix);
onlinkipv6prefix response = (onlinkipv6prefix) obj.get_resource(service);
return response;
} | [
"Use this API to fetch onlinkipv6prefix resource of given name ."
] | [
"Retrieve a boolean field.\n\n@param type field type\n@return field data",
"Retrieve any resource field aliases defined in the MPP file.\n\n@param map index to field map\n@param data resource field name alias data",
"Refactor the method into public CXF utility and reuse it from CXF instead copy&paste",
"Use this API to fetch all the ntpserver resources that are configured on netscaler.",
"Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}.",
"FOR internal use. This method was called after the external transaction was completed.\n\n@see javax.transaction.Synchronization",
"response simple String\n\n@param response\n@param obj",
"Set the classpath for loading the driver.\n\n@param classpath the classpath",
"Extract the parameters from a method using the Jmx annotation if present,\nor just the raw types otherwise\n\n@param m The method to extract parameters from\n@return An array of parameter infos"
] |
private int getBeliefCount() {
Integer count = (Integer)introspector.getBeliefBase(ListenerMockAgent.this).get(Definitions.RECEIVED_MESSAGE_COUNT);
if (count == null) count = 0; // Just in case, not really sure if this is necessary.
return count;
} | [
"Returns the \"msgCount\" belief\n\n@return int - the count"
] | [
"Commits the working copy.\n\n@param commitMessage@return The commit info upon successful operation.\n@throws IOException On IO of SVN failure",
"Acquires a write lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait.",
"Parse a version String and add the components to a properties object.\n\n@param version the version to parse",
"Similar to masking, checks that the range resulting from the bitwise or is contiguous.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException",
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response",
"Registers all custom Externalizer implementations that Hibernate OGM needs into an Infinispan CacheManager\nconfiguration.\n\n@see ExternalizerIds\n@param cfg the Serialization section of a GlobalConfiguration builder",
"Main executable method of Crawljax CLI.\n\n@param args\nthe arguments.",
"Append field with quotes and escape characters added in the key, if required.\nThe value is added without quotes and any escape characters.\n\n@return this",
"Build a stack trace for this path. This can be used in generating more meaningful exceptions\nwhile using Crawljax in conjunction with JUnit for example.\n\n@return a array of StackTraceElements denoting the steps taken by this path. The first\nelement [0] denotes the last {@link Eventable} on this path while the last item\ndenotes the first {@link Eventable} executed."
] |
public void addFile(File file) {
String name = "file";
files.put(normalizeDuplicateName(name), file);
} | [
"Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded."
] | [
"Adds a new child widget to the panel, attaching its Element to the\nspecified container Element.\n\n@param child the child widget to be added\n@param container the element within which the child will be contained",
"This method processes any extended attributes associated with a resource.\n\n@param xml MSPDI resource instance\n@param mpx MPX resource instance",
"Get the value of the specified column.\n\n@param columnName the name of the column\n@return the corresponding value of the column, {@code null} if the column does not exist in the row key",
"A final cluster ought to be a super set of current cluster. I.e.,\nexisting node IDs ought to map to same server, but partition layout can\nhave changed and there may exist new nodes.\n\n@param currentCluster\n@param finalCluster",
"Checks if a newly created action wants to write output to stdout, and\nlogs a warning if other actions are doing the same.\n\n@param newAction\nthe new action to be checked",
"Type variables are not supported.\n\n@param value\n@return the type",
"Validate that the overlay exists. If it doesn't exist, throws an\nexception if not in batch mode or if failInBatch is true. In batch mode,\nwe could be in the case that the overlay doesn't exist yet.",
"Extract the generic type from the given Class object.\n@param clazz the Class to check\n@param source the expected raw source type (can be {@code null})\n@param typeIndex the index of the actual type argument\n@param nestingLevel the nesting level of the target type\n@param currentLevel the current nested level\n@return the generic type as Class, or {@code null} if none",
"Convert a drawable object into a Bitmap.\n@param drawable Drawable to extract a Bitmap from.\n@return A Bitmap created from the drawable parameter."
] |
public void fire(TestCaseStartedEvent event) {
//init root step in parent thread if needed
stepStorage.get();
TestCaseResult testCase = testCaseStorage.get();
event.process(testCase);
synchronized (TEST_SUITE_ADD_CHILD_LOCK) {
testSuiteStorage.get(event.getSuiteUid()).getTestCases().add(testCase);
}
notifier.fire(event);
} | [
"Process TestCaseStartedEvent. New testCase will be created and added\nto suite as child.\n\n@param event to process"
] | [
"Combines adjacent blocks of the same type.",
"Converts a JSON patch path to a JSON property name.\nCurrently the metadata API only supports flat maps.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the JSON property name.",
"Configure all UI elements in the exceptions panel.",
"Add new control at the end of control bar with specified touch listener.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param properties JSON control specific properties\n@param listener touch listener",
"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",
"orientation state factory method",
"helper method to set the TranslucentNavigationFlag\n\n@param on",
"Add a Renderer instance as prototype.\n\n@param renderer to use as prototype.\n@return the current RendererBuilder instance.",
"Parser for forecast\n\n@param feed\n@return"
] |
public void setOutlineCode(int index, String value)
{
set(selectField(TaskFieldLists.CUSTOM_OUTLINE_CODE, index), value);
} | [
"Set an outline code value.\n\n@param index outline code index (1-10)\n@param value outline code value"
] | [
"Gets the string representation of the path to the current JSON element.\n\n@param key the leaf key",
"Use this API to fetch dnspolicy_dnspolicylabel_binding resources of given name .",
"Takes a model and an SCXMLFrontier and decomposes the Frontier into a Map of Strings to Strings\nThese strings can be sent over a network to get a Frontier past a 'gap'\n\n@param frontier the Frontier\n@param modelText the model\n@return the map of strings representing a decomposition",
"Adds an audio source to the audio manager.\nAn audio source cannot be played unless it is\nadded to the audio manager. A source cannot be\nadded twice.\n@param audioSource audio source to add",
"Split a module Id to get the module version\n@param moduleId\n@return String",
"Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"url\"\n@param jsonObject of Link\n@return String",
"Computes the p=2 norm. If A is a matrix then the induced norm is computed. This\nimplementation is faster, but more prone to buffer overflow or underflow problems.\n\n@param A Matrix or vector.\n@return The norm.",
"Reset hard on HEAD.\n\n@throws GitAPIException",
"Send message to socket's output stream.\n\n@param messageToSend message to send.\n\n@return {@code true} if message was sent successfully, {@code false} otherwise."
] |
protected final void setParentNode(final DiffNode parentNode)
{
if (this.parentNode != null && this.parentNode != parentNode)
{
throw new IllegalStateException("The parent of a node cannot be changed, once it's set.");
}
this.parentNode = parentNode;
} | [
"Sets the parent node.\n\n@param parentNode The parent of this node. May be null, if this is a root node."
] | [
"Use this API to fetch nstrafficdomain_bridgegroup_binding resources of given name .",
"Adds an individual alias. It will be merged with the current\nlist of aliases, or added as a label if there is no label for\nthis item in this language yet.\n\n@param alias\nthe alias to add",
"Retrieves a CodePage instance. Defaults to ANSI.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Sets the set of site filters based on the given string.\n\n@param filters\ncomma-separates list of site keys, or \"-\" to filter all site\nlinks",
"Adds the basic sentence.\n\n@param s the s\n@throws ParseException the parse exception",
"Escape a value to be HTML friendly.\n@param value the Object value.\n@return the HTML-escaped String, or <null> if the value is null.",
"Applies the > operator to each element in A. Results are stored in a boolean matrix.\n\n@param A Input matrx\n@param value value each element is compared against\n@param output (Optional) Storage for results. Can be null. Is reshaped.\n@return Boolean matrix with results",
"Get the MonetaryAmount implementation class.\n\n@return the implementation class of the containing amount instance, never null.\n@see MonetaryAmount#getContext()",
"Resolve the boot updates and register at the local HC.\n\n@param controller the model controller\n@param callback the completed callback\n@throws Exception for any error"
] |
@Deprecated public Duration getDuration(String calendarName, Date startDate, Date endDate) throws MPXJException
{
ProjectCalendar calendar = getCalendarByName(calendarName);
if (calendar == null)
{
throw new MPXJException(MPXJException.CALENDAR_ERROR + ": " + calendarName);
}
return (calendar.getDuration(startDate, endDate));
} | [
"This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar.\nThe name of the calendar to be used is passed as an argument.\n\n@param calendarName name of the calendar to use\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object\n@throws MPXJException normally when no Standard calendar is available\n@deprecated use calendar.getDuration(startDate, endDate)"
] | [
"Non-blocking call that will throw any Exceptions in the traditional\nmanner on access\n\n@param key\n@param value\n@return",
"We need to make sure the terms are of the right type, otherwise they will not be serialized correctly.",
"Creates a code location URL from a file path\n\n@param filePath the file path\n@return A URL created from File\n@throws InvalidCodeLocation if URL creation fails",
"Initializes the fields on the changes file with the values of the specified\nbinary package control file.\n\n@param packageControlFile",
"Set the classpath for loading the driver using the classpath reference.\n\n@param r reference to the classpath",
"Process the timephased resource assignment data to work out the\nsplit structure of the task.\n\n@param task parent task\n@param timephasedComplete completed resource assignment work\n@param timephasedPlanned planned resource assignment work",
"Write calendar exceptions.\n\n@param records list of ProjectCalendars\n@throws IOException",
"After cluster management operations, i.e. reset quota and recover quota\nenforcement settings",
"The document field must not exist in the list provided\n@param rhs The argument - one or more values\n@return PredicateExpression: $nin rhs"
] |
private <T> RequestBuilder doPrepareRequestBuilderImpl(
ResponseReader responseReader, String methodName, RpcStatsContext statsContext,
String requestData, AsyncCallback<T> callback) {
if (getServiceEntryPoint() == null) {
throw new NoServiceEntryPointSpecifiedException();
}
RequestCallback responseHandler = doCreateRequestCallback(responseReader,
methodName, statsContext, callback);
ensureRpcRequestBuilder();
rpcRequestBuilder.create(getServiceEntryPoint());
rpcRequestBuilder.setCallback(responseHandler);
// changed code
rpcRequestBuilder.setSync(isSync(methodName));
// changed code
rpcRequestBuilder.setContentType(RPC_CONTENT_TYPE);
rpcRequestBuilder.setRequestData(requestData);
rpcRequestBuilder.setRequestId(statsContext.getRequestId());
return rpcRequestBuilder.finish();
} | [
"Configures a RequestBuilder to send an RPC request.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a RequestBuilder object that is ready to have its\n{@link RequestBuilder#send()} method invoked."
] | [
"Accessor method used to retrieve a Float object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Returns an attribute's map value from this JAR's manifest's main section.\nThe attributes string value will be split on whitespace into map entries, and each entry will be split on '=' to get the key-value pair.\nThe returned map may be safely modified.\n\n@param name the attribute's name",
"Use this API to fetch all the tmtrafficaction resources that are configured on netscaler.",
"Write a Date attribute.\n\n@param name attribute name\n@param value attribute value",
"Use this API to flush cacheobject.",
"Add columns to be returned by the SELECT query. If no columns are selected then all columns are returned by\ndefault. For classes with id columns, the id column is added to the select list automagically. This can be called\nmultiple times to add more columns to select.\n\n<p>\n<b>WARNING:</b> If you specify any columns to return, then any foreign-collection fields will be returned as null\n<i>unless</i> their {@link ForeignCollectionField#columnName()} is also in the list.\n</p>",
"Read the parameters on initialization.\n\n@see org.apache.solr.update.processor.UpdateRequestProcessorFactory#init(org.apache.solr.common.util.NamedList)",
"Use this API to fetch statistics of cmppolicylabel_stats resource of given name .",
"Obtains a local date in Coptic 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 Coptic local date, not null\n@throws DateTimeException if unable to create the date"
] |
public static boolean containsAtLeastOneNonBlank(List<String> list){
for(String str : list){
if(StringUtils.isNotBlank(str)){
return true;
}
}
return false;
} | [
"Check that a list allowing null and empty item contains at least one element that is\nnot blank.\n@param list can't be null\n@return"
] | [
"Creates the tcpClient with proper handler.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception",
"Removes all documents from the collection that match the given query filter. If no documents\nmatch, the collection is not modified.\n\n@param filter the query filter to apply the the delete operation\n@return the result of the remove many operation",
"Retrieves list of inbox messages based on given userId\n@param userId String userid\n@return ArrayList of {@link CTMessageDAO}",
"Sets whether an individual list value is selected.\n\n@param value the value of the item to be selected or unselected\n@param selected <code>true</code> to select the item",
"Infer app name from scan package\n\n@param packageName\nthe package name\n@return\napp name inferred from the package name",
"Look at the comments on cluster variable to see why this is problematic",
"This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file",
"Filter the URI based on a regular expression.\nCan be combined with an additional file-extension filter.",
"Sets in-place the right child with the same first byte.\n\n@param b next byte of child suffix.\n@param child child node."
] |
public static String getStatusForItem(Long lastActivity) {
if (lastActivity.longValue() < CmsSessionsTable.INACTIVE_LIMIT) {
return CmsVaadinUtils.getMessageText(Messages.GUI_MESSAGES_BROADCAST_COLS_STATUS_ACTIVE_0);
}
return CmsVaadinUtils.getMessageText(Messages.GUI_MESSAGES_BROADCAST_COLS_STATUS_INACTIVE_0);
} | [
"Gets the status text from given session.\n\n@param lastActivity miliseconds since last activity\n@return status string"
] | [
"Use this API to count dnszone_domain_binding resources configued on NetScaler.",
"Retrieves all file version retentions matching given filters as an Iterable.\n@param api the API connection to be used by the resource.\n@param filter filters for the query stored in QueryFilter object.\n@param fields the fields to retrieve.\n@return an iterable contains information about all file version retentions matching given filter.",
"Transforms a single configuration file using the given transformation source.\n\n@param file the configuration file\n@param transformSource the transform soruce\n\n@throws TransformerConfigurationException -\n@throws IOException -\n@throws SAXException -\n@throws TransformerException -\n@throws ParserConfigurationException -",
"Adds the specified list of objects at the end of the array.\n\n@param collection The objects to add at the end of the array.",
"Validates for non-conflicting roles",
"Read data for an individual task.\n\n@param row task data from database\n@param task Task instance",
"Find Flickr Places information by Place ID.\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link #getInfo(String, String)} instead.\n@param placeId\n@return A Location\n@throws FlickrException",
"Given a key and a list of steal infos give back a list of stealer node\nids which will steal this.\n\n@param key Byte array of key\n@param stealerNodeToMappingTuples Pairs of stealer node id to their\ncorresponding [ partition - replica ] tuples\n@param cluster Cluster metadata\n@param storeDef Store definitions\n@return List of node ids",
"We have identified that we have a zip file. Extract the contents into\na temporary directory and process.\n\n@param stream schedule data\n@return ProjectFile instance"
] |
public static bridgetable[] get(nitro_service service) throws Exception{
bridgetable obj = new bridgetable();
bridgetable[] response = (bridgetable[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the bridgetable resources that are configured on netscaler."
] | [
"Sets the queue.\n\n@param queue the new queue",
"Use this API to fetch all the lbsipparameters resources that are configured on netscaler.",
"Set the color at \"index\" to \"color\". Entries are interpolated linearly from\nthe existing entries at \"firstIndex\" and \"lastIndex\" to the new entry.\nfirstIndex < index < lastIndex must hold.\n@param index the position to set\n@param firstIndex the position of the first color from which to interpolate\n@param lastIndex the position of the second color from which to interpolate\n@param color the color to set",
"Clear the mask for a new selection",
"Returns true if the information in this link should take\nprecedence over the information in the other link.",
"Reads the given text stream and compressed its content.\n\n@param stream The input stream\n@return A byte array containing the GZIP-compressed content of the stream\n@throws IOException If an error ocurred",
"Gets the estimated time remaining in milliseconds based upon the total number of work units, the start time, and how many units have been done\nso far.\n\nThis should not be called before any work units have been done.",
"Prepare the document before rendering.\n\n@param outputStream output stream to render to, null if only for layout\n@param format format\n@throws DocumentException oops\n@throws IOException oops\n@throws PrintingException oops",
"Determines the number bytes required to store a variable length\n\n@param i length of Bytes\n@return number of bytes needed"
] |
@Override
protected void denyImportDeclaration(ImportDeclaration importDeclaration) {
LOG.debug("CXFImporter destroy a proxy for " + importDeclaration);
ServiceRegistration serviceRegistration = map.get(importDeclaration);
serviceRegistration.unregister();
// set the importDeclaration has unhandled
super.unhandleImportDeclaration(importDeclaration);
map.remove(importDeclaration);
} | [
"Destroy the proxy & update the map containing the registration ref.\n\n@param importDeclaration"
] | [
"Returns the comma separated list of available scopes\n\n@return String",
"Return the command line argument\n\n@return \" --server-groups=\" plus a comma-separated list\nof selected server groups. Return empty String if none selected.",
"Entry point with no system exit",
"Add a plugin path\n\n@param model\n@param add\n@return\n@throws Exception",
"create a HTTP POST request.\n\n@return {@link HttpConnection}",
"Gets the crouton's layout parameters, constructing a default if necessary.\n\n@return the layout parameters",
"Removes the duplicate node list.\n\n@param list\nthe list\n@return the int",
"Gets fully-qualified name of a table or sequence.\n\n@param localName local table name.\n@param params params.\n@return fully-qualified table name.",
"Get MultiJoined ClassDescriptors\n@param cld"
] |
public static void logBeforeExit(ExitLogger logger) {
try {
if (logged.compareAndSet(false, true)) {
logger.logExit();
}
} catch (Throwable ignored){
// ignored
}
} | [
"Invokes the exit logger if and only if no ExitLogger was previously invoked.\n@param logger the logger. Cannot be {@code null}"
] | [
"Enter information into the hidden input field.\n\n@param input The input to enter into the hidden field.",
"Decomposes the matrix using the QR algorithm. Care was taken to minimize unnecessary memory copying\nand cache skipping.\n\n@param orig The matrix which is being decomposed. Not modified.\n@return true if it decomposed the matrix or false if an error was detected. This will not catch all errors.",
"Configure all UI elements in the exceptions panel.",
"Creates a project shared with the given team.\n\nReturns the full record of the newly created project.\n\n@param team The team to create the project in.\n@return Request object",
"Create a new DirectByteBuffer from a given address and size.\nThe returned DirectByteBuffer does not release the memory by itself.\n\n@param addr\n@param size\n@param att object holding the underlying memory to attach to the buffer.\nThis will prevent the garbage collection of the memory area that's\nassociated with the new <code>DirectByteBuffer</code>\n@return",
"Filter on a search term. Can be course name, code or full ID. Must be at least 3 characters\n@param searchTerm Search term to filter by\n@return This object to allow adding more options",
"Iterates over the elements of an iterable collection of items, starting\nfrom a specified startIndex, and returns the index of the last item that\nmatches the condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return an integer that is the index of the last matched object or -1 if no match was found\n@since 1.5.2",
"Use this API to fetch all the systemeventhistory resources that are configured on netscaler.\nThis uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources.",
"If the resource has ordered child types, those child types will be stored in the attachment. If there are no\nordered child types, this method is a no-op.\n\n@param resourceAddress the address of the resource\n@param resource the resource which may or may not have ordered children."
] |
private void disableTalkBack() {
GVRSceneObject[] sceneObjects = mGvrContext.getMainScene().getWholeSceneObjects();
for (GVRSceneObject sceneObject : sceneObjects) {
if (sceneObject instanceof GVRAccessiblityObject)
if (((GVRAccessiblityObject) sceneObject).getTalkBack() != null)
((GVRAccessiblityObject) sceneObject).getTalkBack().setActive(false);
}
} | [
"find all accessibility object and set active false for enable talk back."
] | [
"Creates a householder reflection.\n\n(I-gamma*v*v')*x = tau*e1\n\n<p>NOTE: Same as cs_house in csparse</p>\n@param x (Input) Vector x (Output) Vector v. Modified.\n@param xStart First index in X that is to be processed\n@param xEnd Last + 1 index in x that is to be processed.\n@param gamma (Output) Storage for computed gamma\n@return variable tau",
"Sets the position of a UIObject",
"Sets the path to the script file to load and loads the script.\n\n@param filePath path to script file\n@throws IOException if the script cannot be read.\n@throws GVRScriptException if a script processing error occurs.",
"Queries database meta data to check for the existence of\nspecific tables.",
"Uploads files from the given file input fields.<p<\n\n@param fields the set of names of fields containing the files to upload\n@param filenameCallback the callback to call with the resulting map from field names to file paths\n@param errorCallback the callback to call with an error message",
"Get a date range that correctly handles the case where the end time\nis midnight. In this instance the end time should be the start of the\nnext day.\n\n@param hours calendar hours\n@param start start date\n@param end end date",
"Returns an URI which represents the statement rank in a triple.\n\n@param rank\n@return",
"Return the association as cached in the entry state.\n\n@param collectionRole the role of the association\n@return the cached association",
"Reads a quoted string value from the request."
] |
public String convert(BufferedImage image, boolean favicon) {
// Reset statistics before anything
statsArray = new int[12];
// Begin the timer
dStart = System.nanoTime();
// Scale the image
image = scale(image, favicon);
// The +1 is for the newline characters
StringBuilder sb = new StringBuilder((image.getWidth() + 1) * image.getHeight());
for (int y = 0; y < image.getHeight(); y++) {
// At the end of each line, add a newline character
if (sb.length() != 0) sb.append("\n");
for (int x = 0; x < image.getWidth(); x++) {
//
Color pixelColor = new Color(image.getRGB(x, y), true);
int alpha = pixelColor.getAlpha();
boolean isTransient = alpha < 0.1;
double gValue = isTransient ? 250 : ((double) pixelColor.getRed() * 0.2989 + (double) pixelColor.getBlue() * 0.5870 + (double) pixelColor.getGreen() * 0.1140) / ((double)alpha / (double)250);
final char s = gValue < 130 ? darkGrayScaleMap(gValue) : lightGrayScaleMap(gValue);
sb.append(s);
}
}
imgArray = sb.toString().toCharArray();
dEnd = System.nanoTime();
return sb.toString();
} | [
"The main conversion method.\n@param image A BufferedImage containing the image that needs to be converted\n@param favicon When ico is true it will convert ico file into 16 x 16 size\n@return A string containing the ASCII version of the original image."
] | [
"Processes the template for all foreignkeys of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Builds the path for a closed arc, returning a PolygonOptions that can be\nfurther customised before use.\n\n@param center\n@param start\n@param end\n@param arcType Pass in either ArcType.CHORD or ArcType.ROUND\n@return PolygonOptions with the paths element populated.",
"Stops this progress bar.",
"set the specified object at index\n\n@param object The object to add at the end of the array.",
"Closes the connection to the dbserver. This instance can no longer be used after this action.",
"Specify the Artifact for which the condition should search for.\n\n@param artifact\n@return",
"Retrieves the default calendar for this project based on the calendar name\ngiven in the project properties. If a calendar of this name cannot be found, then\nthe first calendar listed for the project will be returned. If the\nproject contains no calendars, then a default calendar is added.\n\n@return default projectCalendar instance",
"Ends the transition",
"Check, if all values used for calculating the series for a specific pattern are valid.\n@return <code>null</code> if the pattern is valid, a suitable error message otherwise."
] |
public static vpnglobal_auditnslogpolicy_binding[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
vpnglobal_auditnslogpolicy_binding obj = new vpnglobal_auditnslogpolicy_binding();
options option = new options();
option.set_filter(filter);
vpnglobal_auditnslogpolicy_binding[] response = (vpnglobal_auditnslogpolicy_binding[]) obj.getfiltered(service, option);
return response;
} | [
"Use this API to fetch filtered set of vpnglobal_auditnslogpolicy_binding resources.\nset the filter parameter values in filtervalue object."
] | [
"Plots a list of charts in matrix with 2 columns.\n@param charts",
"Checks if a given number is in the range of a byte.\n\n@param number\na number which should be in the range of a byte (positive or negative)\n\n@see java.lang.Byte#MIN_VALUE\n@see java.lang.Byte#MAX_VALUE\n\n@return number as a byte (rounding might occur)",
"Updates event definitions for all throwing events.\n@param def Definitions",
"Sets the time warp.\n\n@param l the new time warp",
"Type variables are not supported.\n\n@param value\n@return the type",
"Gets display duration for specified frame.\n\n@param n int index of frame.\n@return delay in milliseconds.",
"Checks String to see if the parameter is null.\n@param paramValue Object that will be checked if null.\n@return this.true if the parameter that is being checked is not null",
"Unmarshal test suite from given file.",
"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."
] |
public static <T extends EObject> IScope scopeFor(Iterable<? extends T> elements,
final Function<T, QualifiedName> nameComputation, IScope outer) {
return new SimpleScope(outer,scopedElementsFor(elements, nameComputation));
} | [
"creates a scope using the passed function to compute the names and sets the passed scope as the parent scope"
] | [
"Invokes a closure passing it a new Sql instance created from the given JDBC connection URL.\nThe created connection will be closed if required.\n\n@param url a database url of the form\n<code>jdbc:<em>subprotocol</em>:<em>subname</em></code>\n@param c the Closure to call\n@see #newInstance(String)\n@throws SQLException if a database access error occurs",
"If the not a bitmap itself, this will read the file's meta data.\n\n@param resources {@link android.content.Context#getResources()}\n@return Point where x = width and y = height",
"Returns a pretty printed string of nodes that host specific \"hot\"\npartitions, where hot is defined as following a contiguous run of\npartitions of some length in another zone.\n\n@param cluster The cluster to analyze\n@param hotContiguityCutoff cutoff below which a contiguous run is not\nhot.\n@return pretty string of hot partitions",
"Return an artifact regarding its gavc\n\n@param gavc String\n@return DbArtifact",
"Utility method used to convert an arbitrary Number into an Integer.\n\n@param value Number instance\n@return Integer instance",
"Convenience method that returns the attribute value for the specified attribute name.\n\n@param attributeName the name of the attribute\n@return the value of the attribute or null if no such attribute exists\n@since 1.9.0",
"Sends a user a password reset email for the given email.\n\n@param email the email of the user.\n@return A {@link Task} that completes when the reqest request completes/fails.",
"Check if values in the column \"property\" are written to the bundle files.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle files.",
"In-place scaling of a row in A\n\n@param alpha scale factor\n@param A matrix\n@param row which row in A"
] |
public boolean matches(PathElement pe) {
return pe.key.equals(key) && (isWildcard() || pe.value.equals(value));
} | [
"Determine whether the given element matches this element.\nAn element matches this element when keys are equal, values are equal\nor this element value is a wildcard.\n@param pe the element to check\n@return {@code true} if the element matches"
] | [
"Cache key calculation.\n@param sql\n@param resultSetType\n@param resultSetConcurrency\n@return cache key",
"Use this API to add sslcertkey resources.",
"Get the sub registry for the servers.\n\n@param range the version range\n@return the sub registry",
"Generates a change event for a local replacement of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param document the replacement document.\n@return a change event for a local replacement of a document in the given namespace referring\nto the given document _id.",
"Use this API to add sslcertkey resources.",
"Consumes the next character in the request, checking that it matches the\nexpected one. This method should be used when the",
"Determine the target type for the generic return type of the given method,\nwhere formal type variables are declared on the given class.\n@param method the method to introspect\n@param clazz the class to resolve type variables against\n@return the corresponding generic parameter or return type\n@see #resolveReturnTypeForGenericMethod",
"Specify the Artifact for which the condition should search for.\n\n@param artifact\n@return",
"Use this API to fetch all the aaaparameter resources that are configured on netscaler."
] |
private ProjectFile handleMDBFile(InputStream stream) throws Exception
{
File file = InputStreamHelper.writeStreamToTempFile(stream, ".mdb");
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=" + file.getCanonicalPath();
Set<String> tableNames = populateTableNames(url);
if (tableNames.contains("MSP_PROJECTS"))
{
return readProjectFile(new MPDDatabaseReader(), file);
}
if (tableNames.contains("EXCEPTIONN"))
{
return readProjectFile(new AstaDatabaseReader(), file);
}
return null;
}
finally
{
FileHelper.deleteQuietly(file);
}
} | [
"We have identified that we have an MDB file. This could be a Microsoft Project database\nor an Asta database. Open the database and use the table names present to determine\nwhich type this is.\n\n@param stream schedule data\n@return ProjectFile instance"
] | [
"Filter event if word occurs in wordsToFilter.\n\n@param event the event\n@return true, if successful",
"Extract resource group from a resource ID string.\n@param id the resource ID string\n@return the resource group name",
"Builds the path for an open arc based on a PolylineOptions.\n\n@param center\n@param start\n@param end\n@return PolylineOptions with the paths element populated.",
"Initialize the random generator with a seed.",
"Deploys application reading resources from specified URLs\n\n@param applicationName to configure in cluster\n@param urls where resources are read\n@return the name of the application\n@throws IOException",
"Use this API to unset the properties of snmpalarm resources.\nProperties that need to be unset are specified in args array.",
"Determine the target type for the generic return type of the given method,\nwhere formal type variables are declared on the given class.\n@param method the method to introspect\n@param clazz the class to resolve type variables against\n@return the corresponding generic parameter or return type\n@see #resolveReturnTypeForGenericMethod",
"Convert an array of bytes into an array of ints. 4 bytes from the\ninput data map to a single int in the output data.\n@param bytes The data to read from.\n@return An array of 32-bit integers constructed from the data.\n@since 1.1",
"Call the appropriate handler for handling the httprequest. 404 if path is not found. 405 if path is found but\nhttpMethod does not match what's configured.\n\n@param request instance of {@code HttpRequest}\n@param responder instance of {@code HttpResponder} to handle the request."
] |
public void addOrderedChildResourceTypes(PathAddress resourceAddress, Resource resource) {
Set<String> orderedChildTypes = resource.getOrderedChildTypes();
if (orderedChildTypes.size() > 0) {
orderedChildren.put(resourceAddress, resource.getOrderedChildTypes());
}
} | [
"If the resource has ordered child types, those child types will be stored in the attachment. If there are no\nordered child types, this method is a no-op.\n\n@param resourceAddress the address of the resource\n@param resource the resource which may or may not have ordered children."
] | [
"helper method to activate or deactivate a specific flag\n\n@param bits\n@param on",
"Returns an encrypted token combined with answer.",
"Use this API to fetch all the nspbr6 resources that are configured on netscaler.",
"Put the given value to the appropriate id in the stack, using the version\nof the current list node identified by that id.\n\n@param id\n@param element element to set\n@return element that was replaced by the new element\n@throws ObsoleteVersionException when an update fails",
"Initialization method.\n\n@param t1\n@param t2",
"Converts an object to an XML file.\n\n@param object The object to convert.\n@param fileName The filename where to save it to.\n@throws FileNotFoundException On error.",
"This method lists all resources defined in the file.\n\n@param file MPX file",
"Use this API to update clusternodegroup resources.",
"Attempts to insert a colon so that a value without a colon can\nbe parsed."
] |
public ApiResponse<TokenInfoSuccessResponse> tokenInfoWithHttpInfo() throws ApiException {
com.squareup.okhttp.Call call = tokenInfoValidateBeforeCall(null, null);
Type localVarReturnType = new TypeToken<TokenInfoSuccessResponse>(){}.getType();
return apiClient.execute(call, localVarReturnType);
} | [
"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 add nsip6.",
"Drops a driver from the DriverManager's list.",
"Bounds are calculated locally, can use any filter, but slower than native.\n\n@param filter\nfilter which needs to be applied\n@return the bounds of the specified features\n@throws LayerException\noops",
"Skip to the next matching short value.\n\n@param buffer input data array\n@param offset start offset into the input array\n@param value value to match\n@return offset of matching pattern",
"Helper method to synchronously invoke a callback\n\n@param call",
"Restores a trashed folder back to its original location.\n@param folderID the ID of the trashed folder.\n@return info about the restored folder.",
"Use this API to fetch appfwprofile_excluderescontenttype_binding resources of given name .",
"Associate the specified value with the specified key in this map.\nIf the map previously contained a mapping for this key, the old\nvalue is replaced and returned.\n\n@param key the key with which the value is to be associated\n@param value the value to be associated with this key\n@return the value previously mapped to the key, or null",
"Use this API to add autoscaleprofile resources."
] |
public Duration getBaselineDuration()
{
Object result = getCachedValue(TaskField.BASELINE_DURATION);
if (result == null)
{
result = getCachedValue(TaskField.BASELINE_ESTIMATED_DURATION);
}
if (!(result instanceof Duration))
{
result = null;
}
return (Duration) result;
} | [
"The Baseline Duration field shows the original span of time planned\nto complete a task.\n\n@return - duration string"
] | [
"Generate the global CSS style for the whole document.\n@return the CSS code used in the generated document header",
"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",
"Return the most appropriate log type. This should _never_ return null.",
"A document that is paused no longer has remote updates applied to it.\nAny local updates to this document cause it to be thawed. An example of pausing a document\nis when a conflict is being resolved for that document and the handler throws an exception.\n\n@param isPaused whether or not this config is frozen",
"Flattens an option into its value or else null, which is not great but is usually more convenient in Java.\n@param option Optional value -- either Some(T) or None\n@param <T> Any type\n@return The value inside the option, or else null",
"Helper method to create a Dao object without having to define a class. Dao classes are supposed to be convenient\nbut if you have a lot of classes, they can seem to be a pain.\n\n<p>\n<b>NOTE:</b> You should use {@link DaoManager#createDao(ConnectionSource, DatabaseTableConfig)} instead of this\nmethod so you won't have to create the DAO multiple times.\n</p>",
"Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity",
"Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard",
"Determines the offset code of a forward contract from a schedule. Rounds the average period length to full months.\n\n@param schedule The schedule.\n@return The offset code as String"
] |
public Reply getReplyInfo(String topicId, String replyId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_REPLIES_GET_INFO);
parameters.put("topic_id", topicId);
parameters.put("reply_id", replyId);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element replyElement = response.getPayload();
return parseReply(replyElement);
} | [
"Get info for a given topic reply\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@param replyId\nUnique identifier of a reply for a given topic {@link Reply}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getInfo.html\">API Documentation</a>"
] | [
"Figures out the correct class loader to use for a proxy for a given bean",
"Sets the site root.\n\n@param siteRoot the site root",
"Draw a rectangular boundary with this color and linewidth.\n\n@param rect\nrectangle\n@param color\ncolor\n@param linewidth\nline width",
"of the unbound provider (",
"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.",
"Show only the following channels.\n@param channels The names of the channels to show.\n@return this",
"GetJob helper - String predicates are all created the same way, so this factors some code.",
"Parses the configuration node and provides a pipeline configuration without any extensions marked for loading.\nThe configuration node is supposed to conform to the pipeline configuration JSON schema.\n\n<p>The caller is supposed to use the methods from the builder to add/find extension classes that will be used in\nthe analysis.\n\n<p>Note that the returned pipeline configuration might not contain all the extensions available in\nthe classloader depending on the include/exclude filters in the configuration.\n\n@param json the configuration node\n@return a pipeline configuration parsed from the configuration\n@see Builder#build()",
"Returns the value associated with the given key, if any.\n\n@return the value associated with the given key, or <Code>null</Code>\nif the key maps to no value"
] |
public String getUserProfile(String userId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_USER_PROFILE);
parameters.put("user_id", userId);
Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element payload = response.getPayload();
return payload.getAttribute("url");
} | [
"Get the URL for the user's profile.\n\n@param userId\nThe user ID\n@return The URL\n@throws FlickrException"
] | [
"Resolves the gav using the resolver. If the gav corresponds to the project artifact and is an unresolved version\nfor a RELEASE or LATEST, the gav is resolved such it a release not newer than the project version is found that\noptionally corresponds to the provided version regex, if provided.\n\n<p>If the gav exactly matches the current project, the file of the artifact is found on the filesystem in\ntarget directory and the resolver is ignored.\n\n@param project the project to restrict by, if applicable\n@param gav the gav to resolve\n@param versionRegex the optional regex the version must match to be considered.\n@param resolver the version resolver to use\n@return the resolved artifact matching the criteria.\n@throws VersionRangeResolutionException on error\n@throws ArtifactResolutionException on error",
"Write exceptions into the format used by MSPDI files from\nProject 2007 onwards.\n\n@param calendar parent calendar\n@param exceptions list of exceptions",
"Initialize elements of the panel displayed for the deactivated widget.",
"Bessel function of the second kind, of order 0.\n\n@param x Value.\n@return Y0 value.",
"Rebuild logging systems with updated mode\n@param newMode log mode",
"Orders first by word, then by lemma, then by tag.\n\n@param wordLemmaTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)",
"Stops the processing and prints the final time.",
"Set trimmed value.\n\n@param t Trimmed value.",
"Get the Attribute metadata for an MBean by name.\n@return the {@link Map} of {@link String} attribute names to {@link MBeanAttributeInfo} values."
] |
public static base_response update(nitro_service client, route6 resource) throws Exception {
route6 updateresource = new route6();
updateresource.network = resource.network;
updateresource.gateway = resource.gateway;
updateresource.vlan = resource.vlan;
updateresource.weight = resource.weight;
updateresource.distance = resource.distance;
updateresource.cost = resource.cost;
updateresource.advertise = resource.advertise;
updateresource.msr = resource.msr;
updateresource.monitor = resource.monitor;
updateresource.td = resource.td;
return updateresource.update_resource(client);
} | [
"Use this API to update route6."
] | [
"Renumbers all entity unique IDs.",
"Executes a given SPARQL query and returns a stream with the result in\nJSON format.\n\n@param query\n@return\n@throws IOException",
"Processes the template if the current object on the specified level has a non-empty name.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"",
"Creates the tables according to the schema files.\n\n@throws PlatformException If some error occurred",
"Create users for the given array of addresses. The passwords will be set to the email addresses.\n\n@param greenMail Greenmail instance to create users for\n@param addresses Addresses",
"Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass",
"Generates a Map of query parameters for Module regarding the filters\n\n@return Map<String, Object>",
"Parse the given projection.\n\n@param projection The projection string.\n@param longitudeFirst longitudeFirst",
"Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build.\n@throws IOException\n@throws InterruptedException"
] |
public BoxUser.Info getInfo(String... fields) {
URL url;
if (fields.length > 0) {
String queryString = new QueryStringBuilder().appendParam("fields", fields).toString();
url = USER_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), queryString, this.getID());
} else {
url = USER_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
}
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObject.readFrom(response.getJSON());
return new Info(jsonObject);
} | [
"Gets information about this user.\n@param fields the optional fields to retrieve.\n@return info about this user."
] | [
"We have obtained metadata for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this metadata\n@param data the metadata which we received",
"Copy a single named resource from the classpath to the output directory.\n@param outputDirectory The destination directory for the copied resource.\n@param resourceName The filename of the resource.\n@param targetFileName The name of the file created in {@literal outputDirectory}.\n@throws IOException If the resource cannot be copied.",
"Moves the given row down.\n\n@param row the row to move",
"Read JdbcConnectionDescriptors from the given repository file.\n\n@see #mergeConnectionRepository",
"Get the max extent as a envelop object.",
"Fill the attributes in the processor.\n\n@param processors The processors\n@param initialAttributes The attributes\n@see RequireAttributes\n@see ProvideAttributes",
"XER files can contain multiple projects when there are cross-project dependencies.\nAs the UniversalProjectReader is designed just to read a single project, we need\nto select one project from those available in the XER file.\nThe original project selected for export by the user will have its \"export flag\"\nset to true. We'll return the first project we find where the export flag is\nset to true, otherwise we'll just return the first project we find in the file.\n\n@param stream schedule data\n@return ProjectFile instance",
"Called on mouse down in the caption area, begins the dragging loop by\nturning on event capture.\n\n@see DOM#setCapture\n@see #continueDragging\n@param event the mouse down event that triggered dragging",
"Processes a runtime procedure argument tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the procedure as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the procedure\"\[email protected] name=\"field-ref\" optional=\"true\" description=\"Identifies the field that provides the value\nif a runtime argument; if not set, then null is used\"\[email protected] name=\"name\" optional=\"false\" description=\"The identifier of the argument tag\"\[email protected] name=\"return\" optional=\"true\" description=\"Whether this is a return value (if a runtime argument)\"\nvalues=\"true,false\"\[email protected] name=\"value\" optional=\"false\" description=\"The value if a constant argument\""
] |
@Override
public DiscordianDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"Obtains a local date in Discordian calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Discordian era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Discordian local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code DiscordianEra}"
] | [
"Gets the health memory.\n\n@return the health memory",
"main class entry point.",
"Create an error image should an error occur while fetching a WMS map.\n\n@param width image width\n@param height image height\n@param e exception\n@return error image\n@throws java.io.IOException oops",
"Locks the bundle file that contains the translation for the provided locale.\n@param l the locale for which the bundle file should be locked.\n@throws CmsException thrown if locking fails.",
"Deletes specified entity clearing all its properties and deleting all its outgoing links.\n\n@param entity to delete.",
"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.",
"Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.",
"Returns the bounding sphere of the vertices.\n@param sphere destination array to get bounding sphere.\nThe first entry is the radius, the next\nthree are the center.\n@return radius of bounding sphere or 0.0 if no vertices",
"Mark root of this task task group depends on the given task group's root.\nThis ensure this task group's root get picked for execution only after the completion\nof all tasks in the given group.\n\n@param dependencyTaskGroup the task group that this task group depends on"
] |
public static double StdDev( int[] values, double mean ){
double stddev = 0;
double diff;
int hits;
int total = 0;
// for all values
for ( int i = 0, n = values.length; i < n; i++ )
{
hits = values[i];
diff = (double) i - mean;
// accumulate std.dev.
stddev += diff * diff * hits;
// accumalate total
total += hits;
}
return ( total == 0 ) ? 0 : Math.sqrt( stddev / (total - 1) );
} | [
"Calculate standart deviation.\n@param values Values.\n@param mean Mean.\n@return Standart deviation."
] | [
"Examines the list of variables for any unknown variables and throws an exception if one is found",
"Enable or disable the default blank validator.",
"Send a kill signal to all running instances and return as soon as the signal is sent.",
"Called to update the cached formats when something changes.",
"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",
"delete topic never used\n\n@param topic topic name\n@param password password\n@return number of partitions deleted\n@throws IOException if an I/O error",
"Reads resource data from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"Write the auxiliary RDF data for encoding the given value.\n\n@param value\nthe value to write\n@param resource\nthe (subject) URI to use to represent this value in RDF\n@throws RDFHandlerException",
"Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array."
] |
public List<StepCandidate> prioritise(String stepAsText, List<StepCandidate> candidates) {
return prioritisingStrategy.prioritise(stepAsText, candidates);
} | [
"Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}."
] | [
"Returns the y-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the y coordinate",
"Sets name, status, start time and title to specified step\n\n@param step which will be changed",
"Handles the response of the getVersion request.\n@param incomingMessage the response message to process.",
"Return the list of corporate GroupId prefix configured for an organization.\n\n@param organizationId String Organization name\n@return Response A list of corporate groupId prefix in HTML or JSON",
"Populate a sorted list of custom fields to ensure that these fields\nare written to the file in a consistent order.",
"Return all Clients for a profile\n\n@param profileId ID of profile clients belong to\n@return collection of the Clients found\n@throws Exception exception",
"Use this API to fetch wisite_binding resource of given name .",
"Get the rate types set.\n\n@return the rate types set, or an empty array, but never null.",
"Set the permission for who may view the geo data associated with a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe id of the photo to set permissions for.\n@param perms\nPermissions, who can see the geo data of this photo\n@throws FlickrException"
] |
public void setLabels(Collection<LabelType> labels) {
this.labels.clear();
if (labels != null) {
this.labels.addAll(labels);
}
} | [
"Removes all currently assigned labels for this Datum then adds all\nof the given Labels."
] | [
"Checks if the DPI value is already set for GeoServer.",
"Adds a parameter to the MIMEType.\n\n@param name name of parameter\n@param value value of parameter\n@return returns a new instance with the parameter set",
"Returns an array of all the singular values in A sorted in ascending order\n\n@param A Matrix. Not modified.\n@return singular values",
"Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name",
"Removes the specified list of members from the project. Returns the updated project record.\n\n@param project The project to remove members from.\n@return Request object",
"Performs a put operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key and\nvalue\n@return Version of the value for the successful put",
"Prints some basic documentation about this program.",
"Process start.\n\n@param endpoint the endpoint\n@param eventType the event type",
"Finds \"Y\" coordinate value in which more elements could be added in the band\n@param band\n@return"
] |
public Collection<V> put(K key, Collection<V> collection) {
return map.put(key, collection);
} | [
"Replaces current Collection mapped to key with the specified Collection.\nUse carefully!"
] | [
"Modify a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder",
"Sets a request header with the given name and value. If a header with the\nspecified name has already been set then the new value overwrites the\ncurrent value.\n\n@param header the name of the header\n@param value the value of the header\n\n@throws NullPointerException if header or value are null\n@throws IllegalArgumentException if header or value are the empty string",
"Copies entries in the source map to target map.\n\n@param source source map\n@param target target map",
"Pretty print a progress update after each batch complete.\n\n@param batchCount current batch\n@param numBatches total number of batches\n@param partitionStoreCount partition stores migrated\n@param numPartitionStores total number of partition stores to migrate\n@param totalTimeMs total time, in milliseconds, of execution thus far.",
"OR operation which takes the previous clause and the next clause and OR's them together.",
"Use this API to update aaaparameter.",
"Creates the event for endpoint with specific type.\n\n@param endpoint the endpoint\n@param type the type\n@return the event",
"Sets a client option per-request\n\n@param key Option name\n@param value Option value\n@return The request itself",
"Checks the foreignkeys of all references in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid"
] |
private void lockAndRegisterReferences(ClassDescriptor cld, Object sourceObject, int lockMode, List registeredObjects) throws LockNotGrantedException
{
if (implicitLocking)
{
Iterator i = cld.getObjectReferenceDescriptors(true).iterator();
while (i.hasNext())
{
ObjectReferenceDescriptor rds = (ObjectReferenceDescriptor) i.next();
Object refObj = rds.getPersistentField().get(sourceObject);
if (refObj != null)
{
boolean isProxy = ProxyHelper.isProxy(refObj);
RuntimeObject rt = isProxy ? new RuntimeObject(refObj, this, false) : new RuntimeObject(refObj, this);
if (!registrationList.contains(rt.getIdentity()))
{
lockAndRegister(rt, lockMode, registeredObjects);
}
}
}
}
} | [
"we only use the registrationList map if the object is not a proxy. During the\nreference locking, we will materialize objects and they will enter the registered for\nlock map."
] | [
"Find a given range object in a list of ranges by a value in that range. Does a binary\nsearch over the ranges but instead of checking for equality looks within the range.\nTakes the array size as an option in case the array grows while searching happens\n@param <T> Range type\n@param ranges data list\n@param value value in the list\n@param arraySize the max search index of the list\n@return search result of range\nTODO: This should move into SegmentList.scala",
"Returns true if\n- includeTags is not empty and tag is in includeTags\n- includeTags is empty and tag is not in excludeTags\n@param tags Hint tags\n@param includeTags Include tags\n@param excludeTags Exclude tags\n@return has tag match",
"Performs spellchecking using Solr and returns the spellchecking results using JSON.\n\n@param res The HttpServletResponse object.\n@param servletRequest The ServletRequest object.\n@param cms The CmsObject object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user\n@throws IOException if writing the response fails",
"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",
"Use this API to add vpnsessionaction.",
"Lock a file lazily, if a value that should be written to the file has changed.\n@param propertyId the table column in which the value has changed (e.g., KEY, TRANSLATION, ...)\n@throws CmsException thrown if locking fails.",
"Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array.",
"Extract calendar data from the file.\n\n@throws SQLException",
"Handles a complete record at a time, stores it in a form ready for\nfurther processing.\n\n@param record record to be processed\n@return flag indicating if this is the last record in the file to be processed\n@throws MPXJException"
] |
public Collection<Group> getPublicGroups(String userId) throws FlickrException {
List<Group> groups = new ArrayList<Group>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_PUBLIC_GROUPS);
parameters.put("user_id", userId);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element groupsElement = response.getPayload();
NodeList groupNodes = groupsElement.getElementsByTagName("group");
for (int i = 0; i < groupNodes.getLength(); i++) {
Element groupElement = (Element) groupNodes.item(i);
Group group = new Group();
group.setId(groupElement.getAttribute("nsid"));
group.setName(groupElement.getAttribute("name"));
group.setAdmin("1".equals(groupElement.getAttribute("admin")));
group.setEighteenPlus(groupElement.getAttribute("eighteenplus").equals("0") ? false : true);
groups.add(group);
}
return groups;
} | [
"Get a collection of public groups for the user.\n\nThe groups will contain only the members nsid, name, admin and eighteenplus. If you want the whole group-information, you have to call\n{@link com.flickr4java.flickr.groups.GroupsInterface#getInfo(String)}.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The public groups\n@throws FlickrException"
] | [
"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.",
"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",
"Creates the container for a bundle descriptor.\n@return the container for a bundle descriptor.",
"Set the parent from which this week is derived.\n\n@param parent parent week",
"Find out which field in the incoming message contains the payload that is.\ndelivered to the service method.",
"Use this API to add policydataset.",
"Handle content length.\n\n@param event\nthe event",
"Set the weekdays at which the event should take place.\n@param weekDays the weekdays at which the event should take place.",
"Returns true if conversion between the sourceType and targetType can be bypassed.\nMore precisely this method will return true if objects of sourceType can be\nconverted to the targetType by returning the source object unchanged.\n@param sourceType context about the source type to convert from (may be null if source is null)\n@param targetType context about the target type to convert to (required)\n@return true if conversion can be bypassed\n@throws IllegalArgumentException if targetType is null"
] |
public BeanDefinition toInternal(BeanDefinitionInfo beanDefinitionInfo) {
if (beanDefinitionInfo instanceof GenericBeanDefinitionInfo) {
GenericBeanDefinitionInfo genericInfo = (GenericBeanDefinitionInfo) beanDefinitionInfo;
GenericBeanDefinition def = new GenericBeanDefinition();
def.setBeanClassName(genericInfo.getClassName());
if (genericInfo.getPropertyValues() != null) {
MutablePropertyValues propertyValues = new MutablePropertyValues();
for (Entry<String, BeanMetadataElementInfo> entry : genericInfo.getPropertyValues().entrySet()) {
BeanMetadataElementInfo info = entry.getValue();
propertyValues.add(entry.getKey(), toInternal(info));
}
def.setPropertyValues(propertyValues);
}
return def;
} else if (beanDefinitionInfo instanceof ObjectBeanDefinitionInfo) {
ObjectBeanDefinitionInfo objectInfo = (ObjectBeanDefinitionInfo) beanDefinitionInfo;
return createBeanDefinitionByIntrospection(objectInfo.getObject());
} else {
throw new IllegalArgumentException("Conversion to internal of " + beanDefinitionInfo.getClass().getName()
+ " not implemented");
}
} | [
"Convert from a DTO to an internal Spring bean definition.\n\n@param beanDefinitionDto The DTO object.\n@return Returns a Spring bean definition."
] | [
"Delete a server group by id\n\n@param id server group ID",
"Use this API to fetch lbvserver_filterpolicy_binding resources of given name .",
"Use this API to add dnsaaaarec.",
"Set the directory and test that the directory exists and is contained within the Configuration\ndirectory.\n\n@param directory the new directory",
"Create a container in the platform\n\n@param container\nThe name of the container",
"Core write attribute implementation.\n\n@param name attribute name\n@param value attribute value",
"Get a property as a boolean or default value.\n\n@param key the property name\n@param defaultValue the default",
"compares two java files",
"if you have a default, it's automatically optional"
] |
public SerialMessage setValueMessage(int level) {
logger.debug("Creating new message for application command BASIC_SET for node {}", this.getNode().getNodeId());
SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.SendData, SerialMessagePriority.Set);
byte[] newPayload = { (byte) this.getNode().getNodeId(),
3,
(byte) getCommandClass().getKey(),
(byte) BASIC_SET,
(byte) level
};
result.setMessagePayload(newPayload);
return result;
} | [
"Gets a SerialMessage with the BASIC SET command\n@param the level to set.\n@return the serial message"
] | [
"Initialize; cached threadpool is safe as it is releasing resources automatically if idle",
"Start the drag of the pivot object.\n\n@param dragMe Scene object with a rigid body.\n@param relX rel position in x-axis.\n@param relY rel position in y-axis.\n@param relZ rel position in z-axis.\n\n@return Pivot instance if success, otherwise returns null.",
"Returns iban's country code and check digit.\n\n@param iban String\n@return countryCodeAndCheckDigit String",
"This static method calculated the rho of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The rho of the option",
"Creates a new instance from the given configuration file.\n\n@throws IOException if failed to load the configuration from the specified file",
"Read a field from the supplied stream, starting with the tag that identifies the type, and reading enough\nto collect the corresponding value.\n\n@param is the stream on which a type tag is expected to be the next byte, followed by the field value.\n\n@return the field that was found on the stream.\n\n@throws IOException if there is a problem reading the field.",
"Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid",
"Use this API to update nsdiameter.",
"Transits a float propertyId from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self"
] |
public static base_responses add(nitro_service client, dnsaaaarec resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dnsaaaarec addresources[] = new dnsaaaarec[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new dnsaaaarec();
addresources[i].hostname = resources[i].hostname;
addresources[i].ipv6address = resources[i].ipv6address;
addresources[i].ttl = resources[i].ttl;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add dnsaaaarec resources."
] | [
"Standard doclet entry point\n@param root\n@return",
"Use this API to fetch a vpnglobal_binding resource .",
"Creates the full sentence.\n\n@return the mtas CQL parser sentence condition\n@throws ParseException the parse exception",
"private HttpServletResponse headers;",
"Writes the results of the processing to a file.",
"Add an additional compilation unit into the loop\n-> build compilation unit declarations, their bindings and record their results.",
"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",
"Sets in-place the right child with the same first byte.\n\n@param b next byte of child suffix.\n@param child child node.",
"Record a prepare operation timeout.\n\n@param failedOperation the prepared operation"
] |
public Map<String, String> getSitePath() {
if (m_sitePaths == null) {
m_sitePaths = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
public Object transform(Object rootPath) {
if (rootPath instanceof String) {
return getRequestContext().removeSiteRoot((String)rootPath);
}
return null;
}
});
}
return m_sitePaths;
} | [
"Transforms root paths to site paths.\n\n@return lazy map from root paths to site paths.\n\n@see CmsRequestContext#removeSiteRoot(String)"
] | [
"Delete an object.",
"Specify the proxy and the authentication parameters to be used\nto establish the connections to Apple Servers.\n\n<p>Read the <a href=\"http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html\">\nJava Networking and Proxies</a> guide to understand the\nproxies complexity.\n\n@param proxy the proxy object to be used to create connections\n@param proxyUsername a String object representing the username of the proxy server\n@param proxyPassword a String object representing the password of the proxy server\n@return this",
"Parse a string representation of password spec.\n\nA password spec string should be `<trait spec><length spec>`.\n\nWhere \"trait spec\" should be a composition of\n\n* `a` - indicate lowercase letter required\n* `A` - indicate uppercase letter required\n* `0` - indicate digit letter required\n* `#` - indicate special character required\n\n\"length spec\" should be `[min,max]` where `max` can be omitted.\n\nHere are examples of valid \"length spec\":\n\n* `[6,20]` // min length: 6, max length: 20\n* `[8,]` // min length: 8, max length: unlimited\n\nAnd examples of invalid \"length spec\":\n\n* `[8]` // \",\" required after min part\n* `[a,f]` // min and max part needs to be decimal digit(s)\n* `[3,9)` // length spec must be started with `[` and end with `]`\n\n@param spec a string representation of password spec\n@return a {@link PasswordSpec} instance",
"Unlinks a set of dependencies from this task.\n\n@param task The task to remove dependencies from.\n@return Request object",
"Write the domain controller data to an S3 file.\n\n@param data the domain controller data\n@param domainName the name of the directory in the bucket to write the S3 file to\n@throws IOException",
"Add a cause to the backtrace.\n\n@param cause\nthe cause\n@param bTrace\nthe backtrace list",
"Returns the accrued interest of the bond for a given time.\n\n@param time The time of interest as double.\n@param model The model under which the product is valued.\n@return The accrued interest.",
"Set the buttons size.",
"Queries taking longer than this limit to execute are logged.\n@param queryExecuteTimeLimit the limit to set in milliseconds.\n@param timeUnit"
] |
public void onDrawFrame(float frameTime) {
final GVRSceneObject owner = getOwnerObject();
if (owner == null) {
return;
}
final int size = mRanges.size();
final GVRTransform t = getGVRContext().getMainScene().getMainCameraRig().getCenterCamera().getTransform();
for (final Object[] range : mRanges) {
((GVRSceneObject)range[1]).setEnable(false);
}
for (int i = size - 1; i >= 0; --i) {
final Object[] range = mRanges.get(i);
final GVRSceneObject child = (GVRSceneObject) range[1];
if (child.getParent() != owner) {
Log.w(TAG, "the scene object for distance greater than " + range[0] + " is not a child of the owner; skipping it");
continue;
}
final float[] values = child.getBoundingVolumeRawValues();
mCenter.set(values[0], values[1], values[2], 1.0f);
mVector.set(t.getPositionX(), t.getPositionY(), t.getPositionZ(), 1.0f);
mVector.sub(mCenter);
mVector.negate();
float distance = mVector.dot(mVector);
if (distance >= (Float) range[0]) {
child.setEnable(true);
break;
}
}
} | [
"Do not call directly.\n@deprecated"
] | [
"Updates event definitions for all throwing events.\n@param def Definitions",
"Determines whether the given documentation part contains the specified tag with the given parameter having the\ngiven value.\n\n@param doc The documentation part\n@param tagName The tag to be searched for\n@param paramName The parameter that the tag is required to have\n@param paramValue The value of the parameter\n@return boolean Whether the documentation part has the tag and parameter",
"Creates an SslHandler\n\n@param bufferAllocator the buffer allocator\n@return instance of {@code SslHandler}",
"Adds api doc roots from a link. The folder reffered by the link should contain a package-list\nfile that will be parsed in order to add api doc roots to this configuration\n@param packageListUrl",
"Test a given date for being easter sunday.\n\nThe method uses the algorithms sometimes cited as Meeus,Jones, Butcher Gregorian algorithm.\nTaken from http://en.wikipedia.org/wiki/Computus\n\n@param date The date to check.\n@return True, if date is easter sunday.",
"Delete all enabled overrides for a client\n\n@param profileId profile ID of teh client\n@param client_uuid UUID of teh client",
"Cancel a particular download in progress. Returns 1 if the download Id is found else returns 0.\n\n@param downloadId\n@return int",
"Returns the supplied string with any trailing '\\n' removed.",
"This method returns the duplicated certificate mapped to the passed in cert, or\ncreates and returns one if no mapping has yet been performed. If a naked public\nkey has already been mapped that matches the key in the cert, the already mapped\nkeypair will be reused for the mapped cert.\n@param cert\n@return\n@throws CertificateEncodingException\n@throws InvalidKeyException\n@throws CertificateException\n@throws CertificateNotYetValidException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws SignatureException\n@throws KeyStoreException\n@throws UnrecoverableKeyException"
] |
private Object getAttributeRecursively(Object feature, String name) throws LayerException {
if (feature == null) {
return null;
}
// Split up properties: the first and the rest.
String[] properties = name.split(SEPARATOR_REGEXP, 2);
Object tempFeature;
// If the first property is the identifier:
if (properties[0].equals(getFeatureInfo().getIdentifier().getName())) {
tempFeature = getId(feature);
} else {
Entity entity = entityMapper.asEntity(feature);
HibernateEntity child = (HibernateEntity) entity.getChild(properties[0]);
tempFeature = child == null ? null : child.getObject();
}
// Detect if the first property is a collection (one-to-many):
if (tempFeature instanceof Collection<?>) {
Collection<?> features = (Collection<?>) tempFeature;
Object[] values = new Object[features.size()];
int count = 0;
for (Object value : features) {
if (properties.length == 1) {
values[count++] = value;
} else {
values[count++] = getAttributeRecursively(value, properties[1]);
}
}
return values;
} else { // Else first property is not a collection (one-to-many):
if (properties.length == 1 || tempFeature == null) {
return tempFeature;
} else {
return getAttributeRecursively(tempFeature, properties[1]);
}
}
} | [
"A recursive getAttribute method. In case a one-to-many is passed, an array will be returned.\n\n@param feature The feature wherein to search for the attribute\n@param name The attribute's full name. (can be attr1.attr2)\n@return Returns the value. In case a one-to-many is passed along the way, an array will be returned.\n@throws LayerException oops"
] | [
"Try to open a file at the given position.",
"Gets all Checkable widgets in the group\n@return list of Checkable widgets",
"Watches specified IDs in a collection.\n@param ids the ids to watch.\n@return the stream of change events.",
"Complete timing the operation with the given identifier. If you had not previously started a timing operation with this identifier, then this\nwill effectively be a noop.",
"Mark unfinished test cases as interrupted for each unfinished test suite, then write\ntest suite result\n@see #createFakeTestcaseWithWarning(ru.yandex.qatools.allure.model.TestSuiteResult)\n@see #markTestcaseAsInterruptedIfNotFinishedYet(ru.yandex.qatools.allure.model.TestCaseResult)",
"Call batch tasks inside of a connection which may, or may not, have been \"saved\".",
"those could be incorporated with above, but that would blurry everything.",
"Returns the bit at the specified index.\n@param index The index of the bit to look-up (0 is the least-significant bit).\n@return A boolean indicating whether the bit is set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string.",
"a small static helper to set the color to a GradientDrawable null save\n\n@param colorHolder\n@param ctx\n@param gradientDrawable"
] |
public static String fill(int color) {
final String colorCode = Integer.toHexString(color & 0xFFFFFF); // Strip alpha
return FILTER_FILL + "(" + colorCode + ")";
} | [
"This filter permit to return an image sized exactly as requested wherever is its ratio by\nfilling with chosen color the missing parts. Usually used with \"fit-in\" or \"adaptive-fit-in\"\n\n@param color integer representation of color."
] | [
"Print a work contour.\n\n@param value WorkContour instance\n@return work contour value",
"Obtain a connection asynchronously by queueing a request to obtain a connection in a separate thread.\n\nUse as follows:<p>\nFuture<Connection> result = pool.getAsyncConnection();<p>\n... do something else in your application here ...<p>\nConnection connection = result.get(); // get the connection<p>\n\n@return A Future task returning a connection.",
"Bind a prepared statment that represents a call to a procedure or\nuser-defined function.\n\n@param stmt the statement to bind.\n@param cld the class descriptor of the object that triggered the\ninvocation of the procedure or user-defined function.\n@param obj the object that triggered the invocation of the procedure\nor user-defined function.\n@param proc the procedure descriptor that provides information about\nthe arguments that shoudl be passed to the procedure or\nuser-defined function",
"Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string",
"Retrieves a field type from a location in a data block.\n\n@param data data block\n@param offset offset into data block\n@return field type",
"Cut all characters from maxLength and replace it with \"...\"",
"Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided",
"Encodes the given URI path segment with the given encoding.\n@param segment the segment to be encoded\n@param encoding the character encoding to encode to\n@return the encoded segment\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Use this API to fetch appfwprofile_cookieconsistency_binding resources of given name ."
] |
public boolean isActive(int profileId) {
boolean active = false;
PreparedStatement queryStatement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
queryStatement = sqlConnection.prepareStatement(
"SELECT " + Constants.CLIENT_IS_ACTIVE + " FROM " + Constants.DB_TABLE_CLIENT +
" WHERE " + Constants.GENERIC_CLIENT_UUID + "= '-1' " +
" AND " + Constants.GENERIC_PROFILE_ID + "= ? "
);
queryStatement.setInt(1, profileId);
logger.info(queryStatement.toString());
ResultSet results = queryStatement.executeQuery();
if (results.next()) {
active = results.getBoolean(Constants.CLIENT_IS_ACTIVE);
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (queryStatement != null) {
queryStatement.close();
}
} catch (Exception e) {
}
}
return active;
} | [
"Returns true if the default profile for the specified uuid is active\n\n@return true if active, otherwise false"
] | [
"Use this API to fetch the statistics of all audit_stats resources that are configured on netscaler.",
"A specific, existing workspace can be updated by making a PUT request on\nthe URL for that workspace. Only the fields provided in the data block\nwill be updated; any unspecified fields will remain unchanged.\n\nCurrently the only field that can be modified for a workspace is its `name`.\n\nReturns the complete, updated workspace record.\n\n@param workspace The workspace to update.\n@return Request object",
"Gets the favorite entry for a given row.\n\n@param row the widget used to display the favorite\n@return the favorite entry for the widget",
"Create and return a new Violation for this rule and the specified import\n@param sourceCode - the SourceCode\n@param importNode - the ImportNode for the import triggering the violation\n@return a new Violation object",
"Returns this applications' context path.\n@return context path.",
"This method inserts a name value pair into internal storage.\n\n@param field task field\n@param value attribute value",
"Build a URL with Query String and URL Parameters.\n@param base base URL\n@param queryString query string\n@param values URL Parameters\n@return URL",
"Copy the contents of this buffer begginning from the srcOffset to a destination byte array\n@param srcOffset\n@param destArray\n@param destOffset\n@param size",
"Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data"
] |
private void store(final PrintJobStatus printJobStatus) throws JSONException {
JSONObject metadata = new JSONObject();
metadata.put(JSON_REQUEST_DATA, printJobStatus.getEntry().getRequestData().getInternalObj());
metadata.put(JSON_STATUS, printJobStatus.getStatus().toString());
metadata.put(JSON_START_DATE, printJobStatus.getStartTime());
metadata.put(JSON_REQUEST_COUNT, printJobStatus.getRequestCount());
if (printJobStatus.getCompletionDate() != null) {
metadata.put(JSON_COMPLETION_DATE, printJobStatus.getCompletionTime());
}
metadata.put(JSON_ACCESS_ASSERTION, this.assertionPersister.marshal(printJobStatus.getAccess()));
if (printJobStatus.getError() != null) {
metadata.put(JSON_ERROR, printJobStatus.getError());
}
if (printJobStatus.getResult() != null) {
metadata.put(JSON_REPORT_URI, printJobStatus.getResult().getReportURIString());
metadata.put(JSON_FILENAME, printJobStatus.getResult().getFileName());
metadata.put(JSON_FILE_EXT, printJobStatus.getResult().getFileExtension());
metadata.put(JSON_MIME_TYPE, printJobStatus.getResult().getMimeType());
}
this.registry.put(RESULT_METADATA + printJobStatus.getReferenceId(), metadata);
} | [
"Store the data of a print job in the registry.\n\n@param printJobStatus the print job status"
] | [
"May have to be changed to let multiple touch",
"Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"copy\"\n@param jsonObject of Link\n@return String",
"Print formatted string in the center of 80 chars line, left and right padded.\n\n@param format\nThe string format pattern\n@param args\nThe string format arguments",
"Calculates the column width according to its type.\n@param _property the property.\n@return the column width.",
"Notifies that a content item is removed.\n\n@param position the position.",
"This internal method is used to convert from a Date instance to an\ninteger representing the number of minutes past midnight.\n\n@param date date instance\n@return minutes past midnight as an integer",
"Retrieves the table structure for an Asta PP file. Subclasses determine the exact contents of the structure\nfor a specific version of the Asta PP file.\n\n@return PP file table structure",
"Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list",
"Returns the index of the given name.\n\n@param name The name of the index (null or empty string for the default index)\n@return The index def or <code>null</code> if it does not exist"
] |
public static String replaceAll(final CharSequence self, final CharSequence regex, final CharSequence replacement) {
return self.toString().replaceAll(regex.toString(), replacement.toString());
} | [
"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 the alias of the entity and the path to the relationship it will return the alias\nof the component.\n\n@param entityAlias the alias of the entity\n@param propertyPathWithoutAlias the path to the property without the alias\n@return the alias the relationship or null",
"This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance",
"Generates a change event for a local update of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param update the update specifier.\n@return a change event for a local update of a document in the given namespace referring\nto the given document _id.",
"Check that all nodes in the new cluster have a corresponding entry in\nstoreRepository and innerStores. add a NodeStore if not present, is\nneeded as with rebalancing we can add new nodes on the fly.",
"Retrieve a Synchro Duration from an input stream.\n\n@param is input stream\n@return Duration instance",
"Tells you if the expression is true, which can be true or Boolean.TRUE.\n@param expression\nexpression\n@return\nas described",
"Obtains a local date in Ethiopic 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 Ethiopic local date, not null\n@throws DateTimeException if unable to create the date",
"Issue the database statements to drop the table associated with a class.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param dataClass\nThe class for which a table will be dropped.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.",
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added"
] |
public Operation.Info create( char op , Variable input ) {
switch( op ) {
case '\'':
return Operation.transpose(input, managerTemp);
default:
throw new RuntimeException("Unknown operation " + op);
}
} | [
"Create a new instance of a single input function from an operator character\n@param op Which operation\n@param input Input variable\n@return Resulting operation"
] | [
"is there a faster algorithm out there? This one is a bit sluggish",
"Use this API to update nsacl6 resources.",
"In-place scaling of a column in A\n\n@param alpha scale factor\n@param A matrix\n@param col which row in A",
"Check if the object has a property with the key.\n\n@param key key to check for.",
"We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException",
"Enter information into the hidden input field.\n\n@param input The input to enter into the hidden field.",
"Generates a schedule based on some meta data. The schedule generation\nconsiders short periods. Date rolling is ignored.\n\n@param referenceDate The date which is used in the schedule to internally convert dates to doubles, i.e., the date where t=0.\n@param startDate The start date of the first period.\n@param frequency The frequency.\n@param maturity The end date of the last period.\n@param daycountConvention The daycount convention.\n@param shortPeriodConvention If short period exists, have it first or last.\n@return The corresponding schedule\n@deprecated Will be removed in version 2.3",
"Sets name, status, start time and title to specified step\n\n@param step which will be changed",
"You should use the server's time here. Otherwise you might get unexpected results.\n\nThe typical use case is:\n\n\n<pre>\nHTTPResponse response = ....\nHTTPRequest request = createRequest();\nrequest = request.conditionals(new Conditionals().ifModifiedSince(response.getLastModified());\n</pre>\n\n@param time the time to check.\n@return the conditionals with the If-Modified-Since date set."
] |
public static void setSourceLevelUrisWithoutCopy(final ResourceSet resourceSet, final Set<URI> uris) {
final SourceLevelURIsAdapter adapter = SourceLevelURIsAdapter.findOrCreateAdapter(resourceSet);
adapter.sourceLevelURIs = uris;
} | [
"Installs the given set of URIs as the source level URIs. Does not copy the given\nset but uses it directly."
] | [
"Sets the timewarp setting from a numeric string\n\n@param timewarp a numeric string containing the number of milliseconds since the epoch",
"Used to ensure that the general footer label will be at the same Y position as the variables in the band.\n@param band\n@return",
"Sets the stream for a resource.\nThis function allows you to provide a stream that is already open to\nan existing resource. It will throw an exception if that resource\nalready has an open stream.\n@param s InputStream currently open stream to use for I/O.",
"Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup the SMTP setup.",
"Retrieves the yearly absolute date.\n\n@param data recurrence data\n@return yearly absolute date",
"Converts the results to CSV data.\n\n@return the CSV data",
"Get a state handler for a given patching artifact.\n\n@param artifact the patching artifact\n@param <P>\n@param <S>\n@return the state handler, {@code null} if there is no handler registered for the given artifact",
"Updates the image information.",
"Add all headers in a header multimap.\n\n@param headers a multimap of headers.\n@return the interceptor instance itself."
] |
public static int getPercentage(String percentage) {
if (isNotEmpty(percentage) && isNumeric(percentage)) {
int p = Integer.parseInt(percentage);
return p;
} else {
return 0;
}
} | [
"Takes a numeric string value and converts it to a integer between 0 and 100.\n\nreturns 0 if the string is not numeric.\n\n@param percentage - A numeric string value\n@return a integer between 0 and 100"
] | [
"Use this API to clear bridgetable.",
"Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments",
"Change contrast of the image\n\n@param contrast default is 0, pos values increase contrast, neg. values decrease contrast",
"Checks that locking and update-lock are only used for fields of TIMESTAMP or INTEGER type.\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",
"Update the anchor based on arcore best knowledge of the world\n\n@param scale",
"Creates a random diagonal matrix where the diagonal elements are selected from a uniform\ndistribution that goes from min to max.\n\n@param N Dimension of the matrix.\n@param min Minimum value of a diagonal element.\n@param max Maximum value of a diagonal element.\n@param rand Random number generator.\n@return A random diagonal matrix.",
"Output method that sends a subscription confirmation for the subscriber to avoid DoS attacks, or false subscription.\n\n@param sr\n@return True case the subscription was confirmed, or False otherwise\n@throws org.ow2.chameleon.fuchsia.push.base.hub.exception.SubscriptionOriginVerificationException",
"Adds two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the sum of specified complex numbers.",
"Check if the provided manifestPath is correct.\nSet the manifest and imagePath in case of the correct manifest.\n@param manifestPath\n@param candidateImagePath\n@param dependenciesClient\n@param listener\n@return true if found the correct manifest\n@throws IOException"
] |
public void processPick(boolean touched, MotionEvent event)
{
mPickEventLock.lock();
mTouched = touched;
mMotionEvent = event;
doPick();
mPickEventLock.unlock();
} | [
"Scans the scene graph to collect picked items\nand generates appropriate pick and touch events.\nThis function is called by the cursor controller\ninternally but can also be used to funnel a\nstream of Android motion events into the picker.\n@see #pickObjects(GVRScene, float, float, float, float, float, float)\n@param touched true if the \"touched\" button is pressed.\nWhich button indicates touch is controller dependent.\n@param event Android MotionEvent which caused the pick\n@see IPickEvents\n@see ITouchEvents"
] | [
"Get the element at the index as a json object.\n\n@param i the index of the object to access",
"Add a range to an exception, ensure that we don't try to add null ranges.\n\n@param exception target exception\n@param start exception start\n@param finish exception finish",
"Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS strike",
"Reads a data block and adds it to the list of blocks.\n\n@param text RTF data\n@param offset current offset\n@param length next block length\n@param blocks list of blocks\n@return next offset",
"Toggle between single events and series.\n@param isSeries flag, indicating if we want a series of events.",
"Sets the underlying read timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#readTimeout(long, TimeUnit)",
"submit the adminClient after usage is completed.\nBehavior is undefined, if checkin is called with objects not retrieved\nfrom checkout.\n\n@param client AdminClient retrieved from checkout",
"Append field with quotes and escape characters added, if required.\n\n@return this",
"Use this API to fetch the statistics of all lbvserver_stats resources that are configured on netscaler."
] |
public static void addService(final ServiceTarget serviceTarget, final Bootstrap.Configuration configuration,
final ControlledProcessState processState, final BootstrapListener bootstrapListener,
final RunningModeControl runningModeControl, final AbstractVaultReader vaultReader, final ManagedAuditLogger auditLogger,
final DelegatingConfigurableAuthorizer authorizer, final ManagementSecurityIdentitySupplier securityIdentitySupplier,
final SuspendController suspendController) {
// Install Executor services
final ThreadGroup threadGroup = new ThreadGroup("ServerService ThreadGroup");
final String namePattern = "ServerService Thread Pool -- %t";
final ThreadFactory threadFactory = doPrivileged(new PrivilegedAction<ThreadFactory>() {
public ThreadFactory run() {
return new JBossThreadFactory(threadGroup, Boolean.FALSE, null, namePattern, null, null);
}
});
// TODO determine why QueuelessThreadPoolService makes boot take > 35 secs
// final QueuelessThreadPoolService serverExecutorService = new QueuelessThreadPoolService(Integer.MAX_VALUE, false, new TimeSpec(TimeUnit.SECONDS, 5));
// serverExecutorService.getThreadFactoryInjector().inject(threadFactory);
final boolean forDomain = ProcessType.DOMAIN_SERVER == getProcessType(configuration.getServerEnvironment());
final ServerExecutorService serverExecutorService = new ServerExecutorService(threadFactory, forDomain);
serviceTarget.addService(MANAGEMENT_EXECUTOR, serverExecutorService)
.addAliases(Services.JBOSS_SERVER_EXECUTOR, ManagementRemotingServices.SHUTDOWN_EXECUTOR_NAME) // Use this executor for mgmt shutdown for now
.install();
final ServerScheduledExecutorService serverScheduledExecutorService = new ServerScheduledExecutorService(threadFactory);
serviceTarget.addService(JBOSS_SERVER_SCHEDULED_EXECUTOR, serverScheduledExecutorService)
.addAliases(JBOSS_SERVER_SCHEDULED_EXECUTOR)
.addDependency(MANAGEMENT_EXECUTOR, ExecutorService.class, serverScheduledExecutorService.executorInjector)
.install();
final CapabilityRegistry capabilityRegistry = configuration.getCapabilityRegistry();
ServerService service = new ServerService(configuration, processState, null, bootstrapListener, new ServerDelegatingResourceDefinition(),
runningModeControl, vaultReader, auditLogger, authorizer, securityIdentitySupplier, capabilityRegistry, suspendController);
ExternalManagementRequestExecutor.install(serviceTarget, threadGroup, EXECUTOR_CAPABILITY.getCapabilityServiceName(), service.getStabilityMonitor());
ServiceBuilder<?> serviceBuilder = serviceTarget.addService(Services.JBOSS_SERVER_CONTROLLER, service);
serviceBuilder.addDependency(DeploymentMountProvider.SERVICE_NAME,DeploymentMountProvider.class, service.injectedDeploymentRepository);
serviceBuilder.addDependency(ContentRepository.SERVICE_NAME, ContentRepository.class, service.injectedContentRepository);
serviceBuilder.addDependency(Services.JBOSS_SERVICE_MODULE_LOADER, ServiceModuleLoader.class, service.injectedModuleLoader);
serviceBuilder.addDependency(Services.JBOSS_EXTERNAL_MODULE_SERVICE, ExternalModuleService.class,
service.injectedExternalModuleService);
serviceBuilder.addDependency(PATH_MANAGER_CAPABILITY.getCapabilityServiceName(), PathManager.class, service.injectedPathManagerService);
if (configuration.getServerEnvironment().isAllowModelControllerExecutor()) {
serviceBuilder.addDependency(MANAGEMENT_EXECUTOR, ExecutorService.class, service.getExecutorServiceInjector());
}
if (configuration.getServerEnvironment().getLaunchType() == ServerEnvironment.LaunchType.DOMAIN) {
serviceBuilder.addDependency(HostControllerConnectionService.SERVICE_NAME, ControllerInstabilityListener.class,
service.getContainerInstabilityInjector());
}
serviceBuilder.install();
} | [
"Add this service to the given service target.\n@param serviceTarget the service target\n@param configuration the bootstrap configuration"
] | [
"Returns a valid DisplayMetrics object\n\n@param context valid context\n@return DisplayMetrics object",
"Get a list of collaborators that are allowed access to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return list of collaborators",
"Create a new instance of a single input function from an operator character\n@param op Which operation\n@param input Input variable\n@return Resulting operation",
"Shows the given step.\n\n@param step the step",
"package for testing purpose",
"Populates a calendar exception instance.\n\n@param record MPX record\n@param calendar calendar to which the exception will be added\n@throws MPXJException",
"Returns a flag indicating if also expired resources should be found.\n@return A flag indicating if also expired resources should be found.",
"Try to fire a given event on the Browser.\n\n@param eventable the eventable to fire\n@return true iff the event is fired",
"Use this API to fetch sslcipher resources of given names ."
] |
public static void printToFile(String filename, String message) {
printToFile(new File(filename), message, false);
} | [
"Prints to a file. If the file does not exist, rewrites the file;\ndoes not append."
] | [
"Parse a duration value.\n\n@param value duration value\n@return Duration instance",
"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",
"Generate and return the list of statements to drop a database table.",
"Update properties for a specific client id\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@param active - true false depending on if the client should be active\n@param reset - true to reset the state of a client(clears settings for all paths and disables the client)\n@return\n@throws Exception",
"Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid",
"Returns the intersection of sets s1 and s2.",
"set the textColor of the ColorHolder to an drawable\n\n@param ctx\n@param drawable",
"Checks if two claims are equivalent in the sense that they have the same\nmain snak and the same qualifiers, but possibly in a different order.\n\n@param claim1\n@param claim2\n@return true if claims are equivalent",
"Compares this value with the specified object for order. Returns a negative\ninteger, zero, or a positive integer as this value is less than, equal to, or\ngreater than the specified value.\n@param other Another Rational value.\n@return A negative integer, zero, or a positive integer as this value is less\nthan, equal to, or greater than the specified value."
] |
public T findById(Object id) throws RowNotFoundException, TooManyRowsException {
return findWhere(eq(idColumn.getColumnName(), id)).getSingleResult();
} | [
"Finds an entity given its primary key.\n\n@throws RowNotFoundException\nIf no such object was found.\n@throws TooManyRowsException\nIf more that one object was returned for the given ID."
] | [
"Description accessor provided for JSON serialization only.",
"Checks the constraints on this class.\n\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Trim and append a file separator to the string",
"Use this API to fetch a vpnglobal_authenticationsamlpolicy_binding resources.",
"Add profile to database, return collection of profile data. Called when 'enter' is hit in the UI\ninstead of 'submit' button\n\n@param model\n@param name\n@return\n@throws Exception",
"Set a proxy for REST-requests.\n\n@param proxyHost\n@param proxyPort",
"Grab random holiday from the equivalence class that falls between the two dates\n\n@param earliest the earliest date parameter as defined in the model\n@param latest the latest date parameter as defined in the model\n@return a holiday that falls between the dates",
"Draw a rectangle's interior with this color.\n\n@param rect rectangle\n@param color colour",
"Determines whether the given array only contains unbounded type variables or Object.class.\n\n@param types the given array of types\n@return true if and only if the given array only contains unbounded type variables or Object.class"
] |
public void addColumn(String columnName, boolean searchable, boolean orderable,
String searchValue) {
this.columns.add(new Column(columnName, "", searchable, orderable,
new Search(searchValue, false)));
} | [
"Add a new column\n\n@param columnName the name of the column\n@param searchable whether the column is searchable or not\n@param orderable whether the column is orderable or not\n@param searchValue if any, the search value to apply"
] | [
"Retrieve list of assignment extended attributes.\n\n@return list of extended attributes",
"The quick way to detect for a tier of devices.\nThis method detects for devices which are likely to be capable\nof viewing CSS content optimized for the iPhone,\nbut may not necessarily support JavaScript.\nExcludes all iPhone Tier devices.\n@return detection of any device in the 'Rich CSS' Tier",
"Resets the calendar",
"Returns the List value of the field.\n\n@return the List value of the field. It returns a reference of the value if the type is <code>LIST</code>, if\nthe type is <code>LIST_MAP</code> it returns a copy of the value.\n@throws IllegalArgumentException if the value cannot be converted to List.",
"Uploads a new file to this folder with custom upload parameters.\n\n@param uploadParams the custom upload parameters.\n@return the uploaded file's info.",
"Ensures that no more than maxContiguousPartitionsPerZone partitions are\ncontiguous within a single zone.\n\nMoves the necessary partitions to break up contiguous runs from each zone\nto some other random zone/node. There is some chance that such random\nmoves could result in contiguous partitions in other zones.\n\n@param nextCandidateCluster cluster metadata\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return Return updated cluster metadata.",
"Retrieve the value of a single-valued parameter.\n\n@param key\n@param defaultValue\n@param cnx",
"Updates the information about this weblink with any info fields that have been modified locally.\n\n<p>The only fields that will be updated are the ones that have been modified locally. For example, the following\ncode won't update any information (or even send a network request) since none of the info's fields were\nchanged:</p>\n\n<pre>BoxWebLink webLink = new BoxWebLink(api, id);\nBoxWebLink.Info info = webLink.getInfo();\nwebLink.updateInfo(info);</pre>\n\n@param info the updated info.",
"IS NULL predicate\n@param value the value for which to check\n@return a {@link LuaCondition} instance"
] |
public static base_responses clear(nitro_service client, gslbldnsentries resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
gslbldnsentries clearresources[] = new gslbldnsentries[resources.length];
for (int i=0;i<resources.length;i++){
clearresources[i] = new gslbldnsentries();
}
result = perform_operation_bulk_request(client, clearresources,"clear");
}
return result;
} | [
"Use this API to clear gslbldnsentries resources."
] | [
"Use this API to clear Interface resources.",
"Adds the index input to list.\n\n@param name the name\n@param in the in\n@param postingsFormatName the postings format name\n@return the string\n@throws IOException Signals that an I/O exception has occurred.",
"Creates a temporary folder using the given prefix to generate its name.\n@param prefix the prefix string to be used in generating the directory's name; may be <i>null</i>\n@return the <code>File</code> to the newly created folder\n@throws IOException",
"Compute the offset for the item in the layout cache\n@return true if the item fits the container, false otherwise",
"Returns the editable columns for the provided edit mode.\n@param mode the edit mode.\n@return the editable columns for the provided edit mode.",
"Retrieve the FeatureSource object from the data store.\n\n@return An OpenGIS FeatureSource object;\n@throws LayerException\noops",
"Utility method to register a proxy has a Service in OSGi.",
"Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content",
"Add statistics about a created map.\n\n@param mapContext the\n@param mapValues the"
] |
@Override
public SuggestionsInterface getSuggestionsInterface() {
if (suggestionsInterface == null) {
suggestionsInterface = new SuggestionsInterface(apiKey, sharedSecret, transport);
}
return suggestionsInterface;
} | [
"Get the SuggestionsInterface.\n\n@return The SuggestionsInterface"
] | [
"Process a compilation unit already parsed and build.",
"Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.",
"The max possible width can be calculated doing the sum of of the inner cells and its totals\n@param crosstabColumn\n@return",
"Wrapper functions with no bounds checking are used to access matrix internals",
"Sets the parent node.\n\n@param parentNode The parent of this node. May be null, if this is a root node.",
"Puts a new document in the service. The generate key is globally unique.\n\n@param document document\n@return key unique key to reference the document",
"remove an objects entry from the object registry",
"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",
"Use this API to fetch statistics of appfwpolicy_stats resource of given name ."
] |
public static void checkRequired(OptionSet options, String opt) throws VoldemortException {
List<String> opts = Lists.newArrayList();
opts.add(opt);
checkRequired(options, opts);
} | [
"Checks if the required option exists.\n\n@param options OptionSet to checked\n@param opt Required option to check\n@throws VoldemortException"
] | [
"Disposes resources created to service this connection context",
"Cut the message content to the configured length.\n\n@param event the event",
"Bessel function of order 0.\n\n@param x Value.\n@return J0 value.",
"Process the given batch of files and pass the results back to the listener as each file is processed.",
"Open the store with the version directory specified. If null is specified\nwe open the directory with the maximum version\n\n@param versionDir Version Directory to open. If null, we open the max\nversioned / latest directory",
"Returns true if the predicate is true for all pixels in the image.\n\n@param predicate a predicate function that accepts 3 parameters - the x,y coordinate and the pixel at that coordinate\n@return true if f holds for at least one pixel",
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modified cluster metadata.",
"Generic version of getting value by key from the JobContext of current thread\n@param key the key\n@param clz the val class\n@param <T> the val type\n@return the value",
"generate a prepared INSERT-Statement for the Class\ndescribed by cld.\n\n@param cld the ClassDescriptor"
] |
public static boolean sameLists(String list1, String list2)
{
return new CommaListIterator(list1).equals(new CommaListIterator(list2));
} | [
"Compares the two comma-separated lists.\n\n@param list1 The first list\n@param list2 The second list\n@return <code>true</code> if the lists are equal"
] | [
"Parses a tag formatted as defined by the HTTP standard.\n\n@param httpTag The HTTP tag string; if it starts with 'W/' the tag will be\nmarked as weak and the data following the 'W/' used as the tag;\notherwise it should be surrounded with quotes (e.g.,\n\"sometag\").\n\n@return A new tag instance.\n\n@see <a\nhref=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11\">HTTP\nEntity Tags</a>",
"This method writes extended attribute data for a task.\n\n@param xml MSPDI task\n@param mpx MPXJ task",
"Start a timer of the given string name for the current thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked",
"Meant to execute assertions in tests only\n@return a read-only view of the map containing the relations between entities",
"Ask the specified player for the specified artwork from the specified media slot, first checking if we have a\ncached copy.\n\n@param artReference uniquely identifies the desired artwork\n@param trackType the kind of track that owns the artwork\n\n@return the artwork, if it was found, or {@code null}\n\n@throws IllegalStateException if the ArtFinder is not running",
"This implementation checks whether a File can be opened,\nfalling back to whether an InputStream can be opened.\nThis will cover both directories and content resources.",
"Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields.",
"Parse the string representation of a timestamp.\n\n@param value string representation\n@return Java representation",
"Refresh this context with the specified configuration locations.\n\n@param configLocations\nlist of configuration resources (see implementation for specifics)\n@throws GeomajasException\nindicates a problem with the new location files (see cause)"
] |
public void reportError(NodeT faulted, Throwable throwable) {
faulted.setPreparer(true);
String dependency = faulted.key();
for (String dependentKey : nodeTable.get(dependency).dependentKeys()) {
DAGNode<DataT, NodeT> dependent = nodeTable.get(dependentKey);
dependent.lock().lock();
try {
dependent.onFaultedResolution(dependency, throwable);
if (dependent.hasAllResolved()) {
queue.add(dependent.key());
}
} finally {
dependent.lock().unlock();
}
}
} | [
"Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault"
] | [
"Use this API to fetch csvserver_appflowpolicy_binding resources of given name .",
"Creates a map of identifiers or page titles to documents retrieved via\nthe API URL\n\n@param properties\nparameter setting for wbgetentities\n@return map of document identifiers or titles to documents retrieved via\nthe API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\nif we encounter network issues or HTTP 500 errors from Wikibase",
"Add a new download. The download will start automatically once the download manager is\nready to execute it and connectivity is available.\n\n@param request the parameters specifying this download\n@return an ID for the download, unique across the application. This ID is used to make future\ncalls related to this download.\n@throws IllegalArgumentException",
"Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler.",
"Creates an option to deploy existing content to the runtime for each deployment\n\n@param deployments a set of deployments to deploy\n\n@return the deploy operation",
"Registers Jersey HeaderDelegateProviders for the specified TinyTypes.\n\n@param head a TinyType\n@param tail other TinyTypes\n@throws IllegalArgumentException when a non-TinyType is given",
"Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions.",
"Copy a patch element\n\n@param entry the patch entry\n@param patchId the patch id for the element\n@param modifications the element modifications\n@return the new patch element",
"Handles the response of the SendData request.\n@param incomingMessage the response message to process."
] |
public static final BigInteger printWorkUnits(TimeUnit value)
{
int result;
if (value == null)
{
value = TimeUnit.HOURS;
}
switch (value)
{
case MINUTES:
{
result = 1;
break;
}
case DAYS:
{
result = 3;
break;
}
case WEEKS:
{
result = 4;
break;
}
case MONTHS:
{
result = 5;
break;
}
case YEARS:
{
result = 7;
break;
}
default:
case HOURS:
{
result = 2;
break;
}
}
return (BigInteger.valueOf(result));
} | [
"Print work units.\n\n@param value TimeUnit instance\n@return work units value"
] | [
"Creates and returns a GVRSceneObject with the specified mesh attributes.\n\n@param vertices the vertex positions of that make up the mesh. (x1, y1, z1, x2, y2, z2, ...)\n@param velocities the velocity attributes for each vertex. (vx1, vy1, vz1, vx2, vy2, vz2...)\n@param particleTimeStamps the spawning times of each vertex. (t1, 0, t2, 0, t3, 0 ..)\n\n@return The GVRSceneObject with this mesh.",
"add a single Object to the Collection. This method is used during reading Collection elements\nfrom the database. Thus it is is save to cast anObject to the underlying element type of the\ncollection.",
"Pretty prints a task list of rebalancing tasks.\n\n@param infos list of rebalancing tasks (RebalancePartitionsInfo)\n@return pretty-printed string",
"Get the inactive overlay directories.\n\n@return the inactive overlay directories",
"To use main report datasource. There should be nothing else in the detail band\n@param preSorted\n@return",
"Calculate the summed conditional likelihood of this data by summing\nconditional estimates.",
"This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance",
"Provisions a new user in an enterprise.\n@param api the API connection to be used by the created user.\n@param login the email address the user will use to login.\n@param name the name of the user.\n@return the created user's info.",
"A smoothed step function. A cubic function is used to smooth the step between two thresholds.\n@param a the lower threshold position\n@param b the upper threshold position\n@param x the input parameter\n@return the output value"
] |
protected String sp_createSequenceQuery(String sequenceName, long maxKey)
{
return "insert into " + SEQ_TABLE_NAME + " ("
+ SEQ_NAME_STRING + "," + SEQ_ID_STRING +
") values ('" + sequenceName + "'," + maxKey + ")";
} | [
"Insert syntax for our special table\n@param sequenceName\n@param maxKey\n@return sequence insert statement"
] | [
"Generates an organization regarding the parameters.\n\n@param name String\n@return Organization",
"Flatten a list of test suite results into a collection of results grouped by test class.\nThis method basically strips away the TestNG way of organising tests and arranges\nthe results by test class.",
"Adds tags to the If-Match header.\n\n@param tag the tag to add, may be null. This means the same as adding {@link Tag#ALL}\n@throws IllegalArgumentException if ALL is supplied more than once, or you add a null tag more than once.\n@return a new Conditionals object with the If-Match tag added.",
"waits for all async mutations that were added before this was called to be flushed. Does not\nwait for async mutations added after call.",
"Formats a vertex using it's properties. Debugging purposes.",
"Determine the target type for the generic return type of the given method,\nwhere formal type variables are declared on the given class.\n@param method the method to introspect\n@param clazz the class to resolve type variables against\n@return the corresponding generic parameter or return type\n@see #resolveReturnTypeForGenericMethod",
"Creates the box tree for the PDF file.\n@param dim",
"Read configuration from zookeeper",
"Delete an index with the specified name and type in the given design document.\n\n@param indexName name of the index\n@param designDocId ID of the design doc (the _design prefix will be added if not present)\n@param type type of the index, valid values or \"text\" or \"json\""
] |
public static vrid6 get(nitro_service service, Long id) throws Exception{
vrid6 obj = new vrid6();
obj.set_id(id);
vrid6 response = (vrid6) obj.get_resource(service);
return response;
} | [
"Use this API to fetch vrid6 resource of given name ."
] | [
"This method is called from the task class each time an attribute\nis added, ensuring that all of the attributes present in each task\nrecord are present in the resource model.\n\n@param field field identifier",
"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",
"Set the offsets in the compressed data area for each mip-map level.\n@param offsets array of offsets",
"Read the header from the Phoenix file.\n\n@param stream input stream\n@return raw header data",
"Counts additional occurrences of a property as the main property of\nstatements.\n\n@param usageStatistics\nstatistics object where count is stored\n@param property\nthe property to count\n@param count\nthe number of times to count the property",
"request token from GCM",
"Add filters to the tree.\n\n@param parentNode parent tree node\n@param filters list of filters",
"Creates a sorted list that contains the items of the given iterable. The resulting list is in ascending order,\naccording to the natural ordering of the elements in the iterable.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List)\n@see #sort(Iterable, Comparator)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List)",
"Redirect standard streams so that the output can be passed to listeners."
] |
public static GlobalParameter create(DbConn cnx, String key, String value)
{
QueryResult r = cnx.runUpdate("globalprm_insert", key, value);
GlobalParameter res = new GlobalParameter();
res.id = r.getGeneratedId();
res.key = key;
res.value = value;
return res;
} | [
"Create a new GP entry in the database. No commit performed."
] | [
"This method extracts resource data from a GanttProject file.\n\n@param ganttProject parent node for resources",
"Use this API to fetch filtered set of appqoepolicy resources.\nset the filter parameter values in filtervalue object.",
"Creates a Resque backtrace from a Throwable's stack trace. Includes\ncauses.\n\n@param t\nthe Exception to use\n@return a list of strings that represent how the exception's stacktrace\nappears.",
"This method only overrides properties that are specific from Cube like await strategy or before stop events.\n\n@param overrideDockerCompositions\nthat contains information to override.",
"Checks the day, month and year are equal.",
"Get the list of active tasks from the server.\n\n@return List of tasks\n@see <a href=\"https://console.bluemix.net/docs/services/Cloudant/api/active_tasks.html\">\nActive tasks</a>",
"Checks if a Zip is valid navigating through the entries\n\n@param file File to validate\n@throws IOException I/O Error",
"Refactor the method into public CXF utility and reuse it from CXF instead copy&paste",
"Stop interpolating playback position for all active players."
] |
public StateVertex crawlIndex() {
LOG.debug("Setting up vertex of the index page");
if (basicAuthUrl != null) {
browser.goToUrl(basicAuthUrl);
}
browser.goToUrl(url);
// Run url first load plugin to clear the application state
plugins.runOnUrlFirstLoadPlugins(context);
plugins.runOnUrlLoadPlugins(context);
StateVertex index = vertexFactory.createIndex(url.toString(), browser.getStrippedDom(),
stateComparator.getStrippedDom(browser), browser);
Preconditions.checkArgument(index.getId() == StateVertex.INDEX_ID,
"It seems some the index state is crawled more than once.");
LOG.debug("Parsing the index for candidate elements");
ImmutableList<CandidateElement> extract = candidateExtractor.extract(index);
plugins.runPreStateCrawlingPlugins(context, extract, index);
candidateActionCache.addActions(extract, index);
return index;
} | [
"This method calls the index state. It should be called once per crawl in order to setup the\ncrawl.\n\n@return The initial state."
] | [
"Orders first by word, then by lemma, then by tag.\n\n@param wordLemmaTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)",
"Read filename from spec.",
"Use this API to disable Interface resources of given names.",
"Send a beat announcement to all registered master listeners.\n\n@param beat the beat sent by the tempo master",
"Synthesize and forward a KeyEvent to the library.\n\nThis call is made from the native layer.\n\n@param code id of the button\n@param action integer representing the action taken on the button",
"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",
"Returns the connection count by key specified in this registry\n\nNote it might count connections that are closed but not removed from registry yet\n\n@param key\nthe key\n@return connection count by key",
"Creates a new block box from the given element with the given parent. No style is assigned to the resulting box.\n@param parent The parent box in the tree of boxes.\n@param n The element that this box belongs to.\n@param replaced When set to <code>true</code>, a replaced block box will be created. Otherwise, a normal non-replaced block will be created.\n@return The new block box.",
"Get information about this database.\n\n@return DbInfo encapsulating the database info\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/database.html#getting-database-details\"\ntarget=\"_blank\">Databases - read</a>"
] |
private static Map<String, List<String>> getOrCreateProtocolHeader(
Message message) {
Map<String, List<String>> headers = CastUtils.cast((Map<?, ?>) message
.get(Message.PROTOCOL_HEADERS));
if (headers == null) {
headers = new HashMap<String, List<String>>();
message.put(Message.PROTOCOL_HEADERS, headers);
}
return headers;
} | [
"Gets the or create protocol header.\n\n@param message the message\n@return the message headers map"
] | [
"Create a handful of default currencies to keep Primavera happy.",
"disables the responses for a given pathname and user id\n\n@param model\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"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",
"Opens a file from the volume. The filePath is relative to the\ndefaultPath.\n\n@param filePath\nFile path of the resource to open.\n\n@throws IOException",
"object -> xml\n\n@param object\n@param childClass",
"Updates the style of the field label according to the field value if the\nfield value is empty - null or \"\" - removes the label 'active' style else\nwill add the 'active' style to the field label.",
"Adds format information to eval.",
"Build all combinations of graph structures for generic event stubs of a maximum length\n@param length Maximum number of nodes in each to generate\n@return All graph combinations of specified length or less",
"Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value"
] |
public PBKey getPBKey()
{
if (pbKey == null)
{
this.pbKey = new PBKey(this.getJcdAlias(), this.getUserName(), this.getPassWord());
}
return pbKey;
} | [
"Return a key to identify the connection descriptor."
] | [
"Remove a partition from the node provided\n\n@param node The node from which we're removing the partition\n@param donatedPartition The partitions to remove\n@return The new node without the partition",
"Creates a non-binary media type with the given type, subtype, and UTF-8 encoding\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}",
"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.",
"Attach a metadata cache file to a particular player media slot, so the cache will be used instead of querying\nthe player for metadata. This supports operation with metadata during shows where DJs are using all four player\nnumbers and heavily cross-linking between them.\n\nIf the media is ejected from that player slot, the cache will be detached.\n\n@param slot the media slot to which a meta data cache is to be attached\n@param file the metadata cache to be attached\n\n@throws IOException if there is a problem reading the cache file\n@throws IllegalArgumentException if an invalid player number or slot is supplied\n@throws IllegalStateException if the metadata finder is not running",
"Associate an input stream with the operation. Closing the input stream\nis the responsibility of the caller.\n\n@param in the input stream. Cannot be {@code null}\n@return a builder than can be used to continue building the operation",
"Insert a new value prior to the index location in the existing value array,\nincreasing the field length accordingly.\n@param index - where the new values in an SFVec2f object will be placed in the array list\n@param newValue - the new x, y value for the array list",
"Delete the given file in a separate thread\n\n@param file The file to delete",
"Gets the element view.\n\n@return the element view",
"Set the color resources used in the progress animation from color resources.\nThe first color will also be the color of the bar that grows in response\nto a user swipe gesture.\n\n@param colorResIds"
] |
public void addEmailStats(final InternetAddress[] recipients, final boolean storageUsed) {
this.storageUsed = storageUsed;
for (InternetAddress recipient: recipients) {
emailDests.add(recipient.getAddress());
}
} | [
"Add statistics about sent emails.\n\n@param recipients The list of recipients.\n@param storageUsed If a remote storage was used."
] | [
"Constructs and sets the layout parameters to have some gravity.\n\n@param gravity the gravity of the Crouton\n@return <code>this</code>, for chaining.\n@see android.view.Gravity",
"Not exposed directly - the Query object passed as parameter actually contains results...",
"Populates a Map instance representing the IDs and names of\nprojects available in the current file.\n\n@param is input stream used to read XER file\n@return Map instance containing ID and name pairs\n@throws MPXJException",
"Use this API to add ntpserver resources.",
"Removes CRs but returns LFs",
"Get image parent ID from imageID on the current agent.\n\n@param imageID\n@return",
"New SOAP client uses new SOAP service.",
"Find and return the appropriate setter method for field.\n\n@return Set method or null (or throws IllegalArgumentException) if none found.",
"performs an INSERT operation against RDBMS.\n@param obj The Object to be inserted as a row of the underlying table.\n@param cld ClassDescriptor providing mapping information."
] |
public void check(ReferenceDescriptorDef refDef, String checkLevel) throws ConstraintException
{
ensureClassRef(refDef, checkLevel);
checkProxyPrefetchingLimit(refDef, checkLevel);
} | [
"Checks the given reference descriptor.\n\n@param refDef The reference descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated"
] | [
"Initialize all components of this URI builder with the components of the given URI.\n@param uri the URI\n@return this UriComponentsBuilder",
"Verify that cluster is congruent to store def wrt zones.",
"Keep track of this handle tied to which thread so that if the thread is terminated\nwe can reclaim our connection handle. We also\n@param c connection handle to track.",
"Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under",
"Return a string that ensures that no line is longer then 512 characters\nand lines are broken according to manifest specification.\n\n@param input The buffer containing the content that should be made safe\n@param newline The string to use to create newlines (usually \"\\n\" or\n\"\\r\\n\")\n@return The string with no longer lines then 512, ready to be read again\nby {@link MergeableManifest2}.",
"This method must be called on the stop of the component. Stop the directory monitor and unregister all the\ndeclarations.",
"Checks if the given AnnotatedType is sensible, otherwise provides warnings.",
"Find container env.\n\n@param ctx the container context\n@param dump the exception dump\n@return valid container or null",
"Gets the positive integer.\n\n@param number the number\n@return the positive integer"
] |
private static void listSlack(ProjectFile file)
{
for (Task task : file.getTasks())
{
System.out.println(task.getName() + " Total Slack=" + task.getTotalSlack() + " Start Slack=" + task.getStartSlack() + " Finish Slack=" + task.getFinishSlack());
}
} | [
"List the slack values for each task.\n\n@param file ProjectFile instance"
] | [
"Use this API to delete route6 resources.",
"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=\"...\".",
"Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.",
"Returns the corresponding module resolved service name for the given module.\n\nThe module resolved service is basically a latch that prevents the module from being loaded\nuntil all the transitive dependencies that it depends upon have have their module spec services\ncome up.\n\n@param identifier The module identifier\n@return The service name of the ModuleSpec service",
"Returns an HTML table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.",
"Read relationship data from a PEP file.",
"Hide multiple channels. All other channels will be unaffected.\n@param channels The channels to hide",
"Performs a similar transform on A-pI",
"Process encoded payload.\n\n@throws IOException Signals that an I/O exception has occurred."
] |
private void loadLibraryFromStream(String libname, InputStream is) {
try {
File tempfile = createTempFile(libname);
OutputStream os = new FileOutputStream(tempfile);
logger.debug("tempfile.getPath() = " + tempfile.getPath());
long savedTime = System.currentTimeMillis();
// Leo says 8k block size is STANDARD ;)
byte buf[] = new byte[8192];
int len;
while ((len = is.read(buf)) > 0) {
os.write(buf, 0, len);
}
os.flush();
InputStream lock = new FileInputStream(tempfile);
os.close();
double seconds = (double) (System.currentTimeMillis() - savedTime) / 1e3;
logger.debug("Copying took " + seconds + " seconds.");
logger.debug("Loading library from " + tempfile.getPath() + ".");
System.load(tempfile.getPath());
lock.close();
} catch (IOException io) {
logger.error("Could not create the temp file: " + io.toString() + ".\n");
} catch (UnsatisfiedLinkError ule) {
logger.error("Couldn't load copied link file: " + ule.toString() + ".\n");
throw ule;
}
} | [
"Load a system library from a stream. Copies the library to a temp file\nand loads from there.\n\n@param libname name of the library (just used in constructing the library name)\n@param is InputStream pointing to the library"
] | [
"Obtain newline-delimited headers from request\n\n@param request HttpServletRequest to scan\n@return newline-delimited headers",
"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",
"Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler.",
"Remove the listener active in this session.\n\n@param listenerId the id of the listener to remove",
"Remove a previously registered requirement for a capability.\n\n@param requirementRegistration the requirement. Cannot be {@code null}\n@see #registerAdditionalCapabilityRequirement(org.jboss.as.controller.capability.registry.RuntimeRequirementRegistration)",
"creates a scope using the passed function to compute the names and sets the passed scope as the parent scope",
"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.",
"Use this API to fetch vpnsessionpolicy_aaauser_binding resources of given name .",
"Retrieves the calendar used for this resource assignment.\n\n@return ProjectCalendar instance"
] |
public OpenShiftAssistantTemplate parameter(String name, String value) {
parameterValues.put(name, value);
return this;
} | [
"Stores template parameters for OpenShiftAssistantTemplate.\n\n@param name template parameter name\n@param value template parameter value"
] | [
"Helper function to find the beat grid section in a rekordbox track analysis file.\n\n@param anlzFile the file that was downloaded from the player\n\n@return the section containing the beat grid",
"Use this API to fetch all the route6 resources that are configured on netscaler.\nThis uses route6_args which is a way to provide additional arguments while fetching the resources.",
"Retrieves the task mode.\n\n@return task mode",
"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.",
"Create the image elements for the banners tha goes into the\ntitle and header bands depending on the case",
"Return the discount factor within a given model context for a given maturity.\n@param model The model used as a context (not required for this class).\n@param maturity The maturity in terms of ACT/365 daycount form this curve reference date. Note that this parameter might get rescaled to a different time parameter.\n@see net.finmath.marketdata.model.curves.DiscountCurveInterface#getDiscountFactor(net.finmath.marketdata.model.AnalyticModelInterface, double)",
"Pushes a class type onto the stack from the string representation This can\nalso handle primitives\n\n@param b the bytecode\n@param classType the type descriptor for the class or primitive to push.\nThis will accept both the java.lang.Object form and the\nLjava/lang/Object; form",
"commit all envelopes against the current broker",
"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"
] |
public void signIn(String key, WebSocketConnection connection) {
ConcurrentMap<WebSocketConnection, WebSocketConnection> bag = ensureConnectionList(key);
bag.put(connection, connection);
} | [
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)"
] | [
"Get a property as a int or null.\n\n@param key the property name",
"Adds a data set to IIM file.\n\n@param ds\ndata set id (see constants in IIM class)\n@param value\ndata set value. Null values are silently ignored.\n@throws SerializationException\nif value can't be serialized by data set's serializer\n@throws InvalidDataSetException\nif data set isn't defined",
"Writes the specified double to the stream, formatted according to the format specified in the constructor.\n\n@param d the double to write to the stream\n@return this writer\n@throws IOException if an I/O error occurs",
"The documentation for InputStream.skip indicates that it can bail out early, and not skip\nthe requested number of bytes. I've encountered this in practice, hence this helper method.\n\n@param stream InputStream instance\n@param skip number of bytes to skip",
"We have received notification that a device is no longer on the network, so clear out all its waveforms.\n\n@param announcement the packet which reported the device’s disappearance",
"Prepares all files added for tus uploads.\n\n@param assemblyUrl the assembly url affiliated with the tus upload.\n@throws IOException when there's a failure with file retrieval.\n@throws ProtocolException when there's a failure with tus upload.",
"Checks if maintenance mode is enabled for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@return true if maintenance mode is enabled",
"Initializes the type and validates it",
"Retrieves the constructor that is used by OJB to create instances of the given collection proxy\nclass.\n\n@param proxyClass The proxy class\n@param baseType The required base type of the proxy class\n@param typeDesc The type of collection proxy\n@return The constructor"
] |
private void ensureReferencedPKs(ModelDef modelDef, ReferenceDescriptorDef refDef) throws ConstraintException
{
String targetClassName = refDef.getProperty(PropertyHelper.OJB_PROPERTY_CLASS_REF);
ClassDescriptorDef targetClassDef = modelDef.getClass(targetClassName);
ensurePKsFromHierarchy(targetClassDef);
} | [
"Ensures that the primary keys required by the given reference are present in the referenced class.\n\n@param modelDef The model\n@param refDef The reference\n@throws ConstraintException If there is a conflict between the primary keys"
] | [
"Create a Count-Query for QueryBySQL\n\n@param aQuery\n@return The count query",
"Return all methods for a list of groupIds\n\n@param groupIds array of group IDs\n@param filters array of filters to apply to method selection\n@return collection of Methods found\n@throws Exception exception",
"Load the InstalledIdentity configuration based on the module.path\n\n@param installedImage the installed image\n@param productConfig the product config\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the available layers\n@throws IOException",
"Find and read the cache format entry in a metadata cache file.\n\n@return the content of the format entry, or {@code null} if none was found\n\n@throws IOException if there is a problem reading the file",
"Returns the context the view is running in, through which it can\naccess the current theme, resources, etc.\n\n@return The view's Context.",
"Parses a string of space delimited command line parameters and returns a\nlist of parameters which doesn't contain any special quoting either for\nvalues or whole parameter.\n\n@param param string containing a list\n@return the list",
"Updates the template with the specified id.\n\n@param id id of the template to update\n@param options a Map of options to update/add.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Returns an attribute's list value from a non-main section of this JAR's manifest.\nThe attributes string value will be split on whitespace into the returned list.\nThe returned list may be safely modified.\n\n@param section the manifest's section\n@param name the attribute's name",
"Checks all data sets in a given record for constraint violations.\n\n@param record\nIIM record (1,2,3, ...) to check\n\n@return list of constraint violations, empty set if IIM file is valid"
] |
public static <T extends Spin<?>> T S(Object input, DataFormat<T> format) {
return SpinFactory.INSTANCE.createSpin(input, format);
} | [
"Creates a spin wrapper for a data input of a given data format.\n\n@param input the input to wrap\n@param format the data format of the input\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')"
] | [
"Retrieve a node list based on an XPath expression.\n\n@param document XML document to process\n@param expression compiled XPath expression\n@return node list",
"Convert Collection to Set\n@param collection Collection\n@return Set",
"Merge a subtree.\n\n@param targetRegistry the target registry\n@param subTree the subtree",
"Execute pull docker image on agent\n\n@param launcher\n@param imageTag\n@param username\n@param password\n@param host\n@return\n@throws IOException\n@throws InterruptedException",
"Writes a resource's cost rate tables.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource",
"Returns with an iterable of URIs that points to all elements that are\nreferenced by the argument or vice-versa.\n\n@return an iterable of URIs that are referenced by the argument or the\nother way around.",
"Throws an IllegalArgumentException when the given value is not false.\n@param value the value to assert if false\n@param message the message to display if the value is false\n@return the value",
"Build the key for the TableAlias based on the path and the hints\n@param aPath\n@param hintClasses\n@return the key for the TableAlias",
"Checks if the last argument matches the vararg type.\n@param params\n@param args\n@return -1 if no match, 0 if the last argument is exactly the vararg type and 1 if of an assignable type"
] |
public static boolean isPropertyAllowed(Class defClass, String propertyName)
{
HashMap props = (HashMap)_properties.get(defClass);
return (props == null ? true : props.containsKey(propertyName));
} | [
"Checks whether the property of the given name is allowed for the model element.\n\n@param defClass The class of the model element\n@param propertyName The name of the property\n@return <code>true</code> if the property is allowed for this type of model elements"
] | [
"Creates an immutable list that consists of the elements in the given array. A copy of the given array is used which means\nthat any modifications to the given array will not affect the immutable list.\n\n@param elements the given array of elements\n@return an immutable list",
"Read resource assignment data from a PEP file.",
"Changes to a new sub-view and stores a report to be displayed by that subview.<p<\n\n@param newState the new state\n@param thread the report thread which should be displayed in the sub view\n@param label the label to display for the report",
"Uniformly random numbers",
"Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.\nThis uses dnsnsecrec_args which is a way to provide additional arguments while fetching the resources.",
"Removes a filter from this project file.\n\n@param filterName The name of the filter",
"Throws an IllegalStateException when the given value is not true.",
"Use this API to fetch appfwprofile_safeobject_binding resources of given name .",
"Finds binding for a type in the given injector and, if not found,\nrecurses to its parent\n\n@param injector\nthe current Injector\n@param type\nthe Class representing the type\n@return A boolean flag, <code>true</code> if binding found"
] |
public PhotoList<Photo> search(SearchParameters params, int perPage, int page) throws FlickrException {
PhotoList<Photo> photos = new PhotoList<Photo>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_SEARCH);
parameters.putAll(params.getAsParameters());
if (perPage > 0) {
parameters.put("per_page", "" + perPage);
}
if (page > 0) {
parameters.put("page", "" + page);
}
Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element photosElement = response.getPayload();
photos.setPage(photosElement.getAttribute("page"));
photos.setPages(photosElement.getAttribute("pages"));
photos.setPerPage(photosElement.getAttribute("perpage"));
photos.setTotal(photosElement.getAttribute("total"));
NodeList photoNodes = photosElement.getElementsByTagName("photo");
for (int i = 0; i < photoNodes.getLength(); i++) {
Element photoElement = (Element) photoNodes.item(i);
photos.add(PhotoUtils.createPhoto(photoElement));
}
return photos;
} | [
"Search for photos which match the given search parameters.\n\n@param params\nThe search parameters\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return A PhotoList\n@throws FlickrException"
] | [
"Use this API to fetch all the dbdbprofile resources that are configured on netscaler.",
"Displays a localized warning.\n@param caption the caption of the warning.\n@param description the description of the warning.",
"Use this context as prototype for a new mutable builder. The new builder is\npre-populated with the current settings of this context instance.",
"Queues up a callback to be removed and invoked on the next change event.",
"Handles the file deletions.\n\n@param cms the CMS context to use\n@param toDelete the resources to delete\n\n@throws CmsException if something goes wrong",
"Internal method which is called when the user has finished editing the title.\n\n@param box the text box which has been edited",
"Use this API to update route6 resources.",
"Checks if a parameter exists. If it exists, it is left untouched. If it doesn't, it is created. Only works for parameters which key\nis unique. Must be called from within an open transaction.",
"Sets the alias. Empty String is regarded as null.\n@param alias The alias to set"
] |
public static String groupFromResourceId(String id) {
return (id != null) ? ResourceId.fromString(id).resourceGroupName() : null;
} | [
"Extract resource group from a resource ID string.\n@param id the resource ID string\n@return the resource group name"
] | [
"Detach any script file from a scriptable target.\n\n@param target The scriptable target.",
"Here the lambda in the implicit step is determined dynamically. At first\nit selects zeros to quickly reveal singular values that are zero or close to zero.\nThen it computes it using a Wilkinson shift.",
"Use this API to fetch servicegroup_lbmonitor_binding resources of given name .",
"Initialize the container for the current application deployment\n\n@param deploymentManager\n@param deploymentServices",
"Unlink the specified reference from this object.\nMore info see OJB doc.\n\n@param obj Object with reference\n@param ord the ObjectReferenceDescriptor of the reference\n@param insert flag signals insert operation",
"Detach a connection from a key.\n\n@param key\nthe key\n@param connection\nthe connection",
"Set to array.\n@param injectionProviders\nset of providers\n@return array of providers",
"Get the list of store names from a list of store definitions\n\n@param list\n@param ignoreViews\n@return list of store names",
"return currently-loaded Proctor instance, throwing IllegalStateException if not loaded"
] |
private void deliverAlbumArtUpdate(int player, AlbumArt art) {
if (!getAlbumArtListeners().isEmpty()) {
final AlbumArtUpdate update = new AlbumArtUpdate(player, art);
for (final AlbumArtListener listener : getAlbumArtListeners()) {
try {
listener.albumArtChanged(update);
} catch (Throwable t) {
logger.warn("Problem delivering album art update to listener", t);
}
}
}
} | [
"Send an album art update announcement to all registered listeners."
] | [
"Used by dataformats if they need to load a class\n\n@param classname the name of the\n@param dataFormat\n@return",
"Handles Multi Instance Encapsulation message. Decapsulates\nan Application Command message and handles it using the right\ninstance.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing.",
"Generates a schedule based on some meta data. The schedule generation\nconsiders short periods. Date rolling is ignored.\n\n@param referenceDate The date which is used in the schedule to internally convert dates to doubles, i.e., the date where t=0.\n@param startDate The start date of the first period.\n@param frequency The frequency.\n@param maturity The end date of the last period.\n@param daycountConvention The daycount convention.\n@param shortPeriodConvention If short period exists, have it first or last.\n@return The corresponding schedule\n@deprecated Will be removed in version 2.3",
"Runs the command session.\nCreate the Shell, then run this method to listen to the user,\nand the Shell will invoke Handler's methods.\n@throws java.io.IOException when can't readLine() from input.",
"Construct a Libor index for a given curve and schedule.\n\n@param forwardCurveName\n@param schedule\n@return The Libor index or null, if forwardCurveName is null.",
"Given a filesystem and path to a node, gets all the files which belong to\na partition and replica type\n\nWorks only for {@link ReadOnlyStorageFormat.READONLY_V2}\n\n@param fs Underlying filesystem\n@param path The node directory path\n@param partitionId The partition id for which we get the files\n@param replicaType The replica type\n@return Returns list of files of this partition, replicaType\n@throws IOException",
"Send a master changed announcement to all registered master listeners.\n\n@param update the message announcing the new tempo master",
"Process a text-based PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance",
"Use this API to fetch dnsnsecrec resources of given names ."
] |
public AwsServiceClient withCodecRegistry(@Nonnull final CodecRegistry codecRegistry) {
return new AwsServiceClientImpl(proxy.withCodecRegistry(codecRegistry), dispatcher);
} | [
"Create a new AwsServiceClient instance with a different codec registry.\n\n@param codecRegistry the new {@link CodecRegistry} for the client.\n@return a new AwsServiceClient instance with the different codec registry"
] | [
"Execute blocking for a prepared result.\n\n@param operation the operation to execute\n@param client the protocol client\n@return the prepared operation\n@throws IOException\n@throws InterruptedException",
"Put everything smaller than days at 0\n@param cal calendar to be cleaned",
"Removes all the given tags from the document.\n\n@param dom the document object.\n@param tagName the tag name, examples: script, style, meta\n@return the changed dom.",
"Processes the template for all collection definitions of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"get the underlying wrapped connection\n@return OTMConnection raw connection to the OTM.",
"Get the nearest scale.\n\n@param zoomLevels the list of Zoom Levels.\n@param tolerance the tolerance to use when considering if two values are equal. For example if\n12.0 == 12.001. The tolerance is a percentage.\n@param zoomLevelSnapStrategy the strategy to use for snapping to the nearest zoom level.\n@param geodetic snap to geodetic scales.\n@param paintArea the paint area of the map.\n@param dpi the DPI.",
"Method handle a change on the cluster members set\n@param event",
"Send post request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws IOException the io exception",
"LV morphology helper functions"
] |
public static void sendTextEmail(String to, String from, String subject, String msg, final ServerSetup setup) {
sendMimeMessage(createTextEmail(to, from, subject, msg, setup));
} | [
"Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup the SMTP setup."
] | [
"Get the art available for all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the album art associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the ArtFinder is not running",
"Return the par FRA rate for a given curve.\n\n@param model A given model.\n@return The par FRA rate.",
"Create an object of the given type using a constructor that matches the\nsupplied arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception",
"Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path",
"Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise.",
"Gets the path used for the results of XSLT Transforms.",
"If this Aztec Code symbol is part of a series of Aztec Code symbols appended in a structured format,\nthis method sets the unique message ID for the series. Values may not contain spaces and must contain\nonly printable ASCII characters. Message IDs are optional.\n\n@param messageId the unique message ID for the series that this symbol is part of",
"Use this API to add vpnsessionaction.",
"Sets the bit at the specified index.\n@param index The index of the bit to set (0 is the least-significant bit).\n@param set A boolean indicating whether the bit should be set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string."
] |
public void populateContainer(Class<? extends FieldType> type, FieldContainer container, Integer id, byte[][] fixedData, Var2Data varData)
{
//System.out.println(container.getClass().getSimpleName()+": " + id);
for (FieldItem item : m_map.values())
{
if (item.getType().getClass().equals(type))
{
//System.out.println(item.m_type);
Object value = item.read(id, fixedData, varData);
//System.out.println(item.m_type.getClass().getSimpleName() + "." + item.m_type + ": " + value);
container.set(item.getType(), value);
}
}
} | [
"Given a container, and a set of raw data blocks, this method extracts\nthe field data and writes it into the container.\n\n@param type expected type\n@param container field container\n@param id entity ID\n@param fixedData fixed data block\n@param varData var data block"
] | [
"Creates a resource key defined as a child of key defined by enumeration value.\n@see #key(Enum)\n@see #child(String)\n@param enumValue the enumeration value defining the parent key\n@param key the child id\n@return the resource key",
"Start the host controller services.\n\n@throws Exception",
"Obtains a local date in Symmetry010 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 Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date",
"Compare two integers, accounting for null values.\n\n@param n1 integer value\n@param n2 integer value\n@return comparison result",
"This method recursively descends the directory structure, dumping\ndetails of any files it finds to the output file.\n\n@param pw Output PrintWriter\n@param dir DirectoryEntry to dump\n@param prefix prefix used to identify path to this object\n@param showData flag indicating if data is dumped, or just structure\n@param hex set to true if hex output is required\n@param indent indent used if displaying structure only\n@throws Exception Thrown on file read errors",
"Gets the persistence broker used by this indirection handler.\nIf no PBKey is available a runtime exception will be thrown.\n\n@return a PersistenceBroker",
"Read JdbcConnectionDescriptors from this InputStream.\n\n@see #mergeConnectionRepository",
"Add the string representation of the given object to this sequence immediately. That is, all the trailing\nwhitespace of this sequence will be ignored and the string is appended directly after the last segment that\ncontains something besides whitespace. The given indentation will be prepended to each line except the first one\nif the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.",
"Locates the services in the context classloader of the current thread.\n\n@param serviceType the type of the services to locate\n@param <X> the type of the service\n@return the service type loader"
] |
public VectorClock incremented(int nodeId, long time) {
VectorClock copyClock = this.clone();
copyClock.incrementVersion(nodeId, time);
return copyClock;
} | [
"Get new vector clock based on this clock but incremented on index nodeId\n\n@param nodeId The id of the node to increment\n@return A vector clock equal on each element execept that indexed by\nnodeId"
] | [
"Parse parameters from this request using HTTP.\n\n@param req The ServletRequest containing all request parameters.\n@param cms The OpenCms object.\n@return CmsSpellcheckingRequest object that contains parsed parameters.",
"Gets the Java subclass of GVRShader which implements\nthis shader type.\n@param ctx GVRContext shader is associated with\n@return GVRShader class implementing the shader type",
"Throws one RendererException if the content parent or layoutInflater are null.",
"Handles incoming Application Command Request.\n@param incomingMessage the request message to process.",
"Uninstall current location collection client.\n\n@return true if uninstall was successful",
"Write a string field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Update database schema\n\n@param migrationPath path to migrations",
"Sets the size of the matrix being decomposed, declares new memory if needed,\nand sets all helper functions to their initial value.",
"Keep track of this handle tied to which thread so that if the thread is terminated\nwe can reclaim our connection handle. We also\n@param c connection handle to track."
] |
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"
] | [
"The fields returned by default. Typically the output is done via display formatters and hence nearly no\nfield is necessary. Returning all fields might cause performance problems.\n\n@return the default return fields.",
"Get list of replies\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A reply object\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html\">API Documentation</a>",
"Close the Closeable. Logging a warning if any problems occur.\n\n@param c the thing to close",
"Clears the collection and uses the iterator to run through the dao and delete all of the items in the collection\nfrom the associated database table. This is different from removing all of the elements in the table since this\niterator is across just one item's foreign objects.",
"Use this API to delete snmpmanager.",
"Find a Constructor on the given type that matches the given arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a Constructor from the given type that matches the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments",
"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.",
"Try to delegate the responsibility of sending slops to master\n\n@param node The node that slop should eventually be pushed to\n@return true if master accept the responsibility; false if master does\nnot accept",
"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."
] |
private Set<String> populateTableNames(String url) throws SQLException
{
Set<String> tableNames = new HashSet<String>();
Connection connection = null;
ResultSet rs = null;
try
{
connection = DriverManager.getConnection(url);
DatabaseMetaData dmd = connection.getMetaData();
rs = dmd.getTables(null, null, null, null);
while (rs.next())
{
tableNames.add(rs.getString("TABLE_NAME").toUpperCase());
}
}
finally
{
if (rs != null)
{
rs.close();
}
if (connection != null)
{
connection.close();
}
}
return tableNames;
} | [
"Open a database and build a set of table names.\n\n@param url database URL\n@return set containing table names"
] | [
"Start a timer of the given string name for the current thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked",
"Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object",
"Resolves the base directory. If the system property is set that value will be used. Otherwise the path is\nresolved from the home directory.\n\n@param name the system property name\n@param dirName the directory name relative to the base directory\n\n@return the resolved base directory",
"Shortcut for mapping an arbitrary observable to void, using the IO scheduler.\n@param fromObservable the source observable\n@return a void-emitting observable",
"Add a new column\n\n@param columnName the name of the column\n@param searchable whether the column is searchable or not\n@param orderable whether the column is orderable or not\n@param searchValue if any, the search value to apply",
"Reduce the given value to the nearest smaller 1 significant digit number starting with 1, 2 or 5.\n\n@param value the value to find a nice number for.\n@param scaleUnit the unit of the value.\n@param lockUnits if set, the values are not scaled to a \"nicer\" unit.",
"Enter information into the hidden input field.\n\n@param input The input to enter into the hidden field.",
"Writes the details of a recurring exception.\n\n@param mpxjException source MPXJ calendar exception\n@param xmlException target MSPDI exception",
"Scans all Forge addons for classes accepted by given filter.\n\nTODO: Could be refactored - scan() is almost the same."
] |
@RequestMapping(value = "/api/scripts", method = RequestMethod.POST)
public
@ResponseBody
Script addScript(Model model,
@RequestParam(required = true) String name,
@RequestParam(required = true) String script) throws Exception {
return ScriptService.getInstance().addScript(name, script);
} | [
"Add a new script\n\n@param model\n@param name\n@param script\n@return\n@throws Exception"
] | [
"Returns the Class object of the Event implementation.",
"Add a module to a module tree\n\n@param module\n@param tree",
"This method only overrides properties that are specific from Cube like await strategy or before stop events.\n\n@param overrideDockerCompositions\nthat contains information to override.",
"read offsets before given time\n\n@param offsetRequest the offset request\n@return offsets before given time",
"Executed read-resource-description and returns access-control info.\nReturns null in case there was any kind of problem.\n\n@param client\n@param address\n@return",
"Set the classpath for loading the driver using the classpath reference.\n\n@param r reference to the classpath",
"Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if\nthe users are not already members of the project they will also become members as a result of this operation.\nReturns the updated project record.\n\n@param project The project to add followers to.\n@return Request object",
"Evaluates an EL.\n\n@param vars the variables to be available for the evaluation.\n@param el the EL string to evaluate.\n@param returnType the class the EL evaluates to.\n@return the evaluated EL as an instance of the specified return type.\n@throws ELEvalException if the EL could not be evaluated.",
"Sets the position of a UIObject"
] |
synchronized ArrayList<CTMessageDAO> getMessages(String userId){
final String tName = Table.INBOX_MESSAGES.getName();
Cursor cursor;
ArrayList<CTMessageDAO> messageDAOArrayList = new ArrayList<>();
try{
final SQLiteDatabase db = dbHelper.getWritableDatabase();
cursor= db.rawQuery("SELECT * FROM "+tName+" WHERE " + USER_ID + " = ? ORDER BY " + KEY_CREATED_AT+ " DESC", new String[]{userId});
if(cursor != null) {
while(cursor.moveToNext()){
CTMessageDAO ctMessageDAO = new CTMessageDAO();
ctMessageDAO.setId(cursor.getString(cursor.getColumnIndex(_ID)));
ctMessageDAO.setJsonData(new JSONObject(cursor.getString(cursor.getColumnIndex(KEY_DATA))));
ctMessageDAO.setWzrkParams(new JSONObject(cursor.getString(cursor.getColumnIndex(WZRKPARAMS))));
ctMessageDAO.setDate(cursor.getLong(cursor.getColumnIndex(KEY_CREATED_AT)));
ctMessageDAO.setExpires(cursor.getLong(cursor.getColumnIndex(EXPIRES)));
ctMessageDAO.setRead(cursor.getInt(cursor.getColumnIndex(IS_READ)));
ctMessageDAO.setUserId(cursor.getString(cursor.getColumnIndex(USER_ID)));
ctMessageDAO.setTags(cursor.getString(cursor.getColumnIndex(TAGS)));
ctMessageDAO.setCampaignId(cursor.getString(cursor.getColumnIndex(CAMPAIGN)));
messageDAOArrayList.add(ctMessageDAO);
}
cursor.close();
}
return messageDAOArrayList;
}catch (final SQLiteException e){
getConfigLogger().verbose("Error retrieving records from " + tName, e);
return null;
} catch (JSONException e) {
getConfigLogger().verbose("Error retrieving records from " + tName, e.getMessage());
return null;
} finally {
dbHelper.close();
}
} | [
"Retrieves list of inbox messages based on given userId\n@param userId String userid\n@return ArrayList of {@link CTMessageDAO}"
] | [
"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",
"Gets the aggregate result count summary. only list the counts for brief\nunderstanding\n\n@return the aggregate result count summary",
"Closes the server socket. No new clients are accepted afterwards.",
"Use this API to update cachecontentgroup.",
"Call when you are done with the client\n\n@throws Exception",
"Walks from the most outer embeddable to the most inner one\nlook for all columns contained in these embeddables\nand exclude the embeddables that have a non null column\nbecause of caching, the algorithm is only run once per column parameter",
"Adds each forbidden substring, checking that it's not null.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif a forbidden substring is null",
"Create an IPv6 mixed address using the given ipv6 segments and using this address for the embedded IPv4 segments\n\n@param segs\n@return",
"Write exceptions in the format used by MSPDI files prior to Project 2007.\n\n@param dayList list of calendar days\n@param exceptions list of exceptions"
] |
private void writeNewLineIndent() throws IOException
{
if (m_pretty)
{
if (!m_indent.isEmpty())
{
m_writer.write('\n');
m_writer.write(m_indent);
}
}
} | [
"Write a new line and indent."
] | [
"create partitions in the broker\n\n@param topic topic name\n@param partitionNum partition numbers\n@param enlarge enlarge partition number if broker configuration has\nsetted\n@return partition number in the broker\n@throws IOException if an I/O error occurs",
"Use this API to unset the properties of protocolhttpband resource.\nProperties that need to be unset are specified in args array.",
"Set the duration option.\n@param value the duration option to set ({@link EndType} as string).",
"A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field.\n\nReturns an empty data record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"Log a message with a throwable at the provided level.",
"FOR internal use. This method was called before the external transaction was completed.\n\nThis method was called by the JTA-TxManager before the JTA-tx prepare call. Within this method\nwe prepare odmg for commit and pass all modified persistent objects to DB and release/close the used\nconnection. We have to close the connection in this method, because the TxManager does prepare for commit\nafter this method and all used DataSource-connections have to be closed before.\n\n@see javax.transaction.Synchronization",
"This method extracts byte arrays from the embedded object data\nand converts them into RTFEmbeddedObject instances, which\nit then adds to the supplied list.\n\n@param offset offset into the RTF document\n@param text RTF document\n@param objects destination for RTFEmbeddedObject instances\n@return new offset into the RTF document",
"Factory method that builds the appropriate matcher for @match tags",
"Get the collection of the server groups\n\n@return Collection of active server groups"
] |
public void setSize(int size) {
if (size != MaterialProgressDrawable.LARGE && size != MaterialProgressDrawable.DEFAULT) {
return;
}
final DisplayMetrics metrics = getResources().getDisplayMetrics();
if (size == MaterialProgressDrawable.LARGE) {
mCircleHeight = mCircleWidth = (int) (CIRCLE_DIAMETER_LARGE * metrics.density);
} else {
mCircleHeight = mCircleWidth = (int) (CIRCLE_DIAMETER * metrics.density);
}
// force the bounds of the progress circle inside the circle view to
// update by setting it to null before updating its size and then
// re-setting it
mCircleView.setImageDrawable(null);
mProgress.updateSizes(size);
mCircleView.setImageDrawable(mProgress);
} | [
"One of DEFAULT, or LARGE."
] | [
"Gets the Searcher for a given variant.\n\n@param variant an identifier to differentiate this Searcher from eventual others.\n@return the corresponding Searcher instance.\n@throws IllegalStateException if no searcher was {@link #create(Searchable) created} before for this {@code variant}.",
"Updates the internal list of dates and fires a value change if necessary.\n\n@param dates the dates to set.",
"Redirect standard streams so that the output can be passed to listeners.",
"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",
"Remove a handler from the list\n@param toRemove The handler to remove. Any handler object that\nmatches this class will be removed.\n@return true if this handler was in the list.",
"Use this API to fetch vpnvserver_authenticationsamlpolicy_binding resources of given name .",
"Use this API to rename a cmppolicylabel resource.",
"Only call with monitor for 'this' held",
"Use this API to fetch appfwprofile_denyurl_binding resources of given name ."
] |
public PathAddress append(List<PathElement> additionalElements) {
final ArrayList<PathElement> newList = new ArrayList<PathElement>(pathAddressList.size() + additionalElements.size());
newList.addAll(pathAddressList);
newList.addAll(additionalElements);
return pathAddress(newList);
} | [
"Create a new path address by appending more elements to the end of this address.\n\n@param additionalElements the elements to append\n@return the new path address"
] | [
"Write all state items to the log file.\n\n@param fileRollEvent the event to log",
"Retrieve a work field.\n\n@param type field type\n@return Duration instance",
"Invoke the operation.\n@param parameterMap the {@link Map} of parameter names to value arrays.\n@return the {@link Object} return value from the operation.\n@throws JMException Java Management Exception",
"Returns the next index of the argument by decrementing 1 from the possibly parsed number\n\n@param description this String will be searched from the start for a number\n@param defaultIndex this will be returned if the match does not succeed\n@return the parsed index or the defaultIndex",
"This method retrieves ONLY the ROOT actions",
"Update max.\n\n@param n the n\n@param c the c",
"Preloads a sound file.\n\n@param soundFile path/name of the file to be played.",
"Update the selection state of the item\n@param dataIndex data set index\n@param select if it is true the item is marked as selected, otherwise - unselected\n@return true if the selection state has been changed successfully, otherwise - false",
"return the squared area of the triangle defined by the half edge hedge0\nand the point at the head of hedge1.\n\n@param hedge0\n@param hedge1\n@return"
] |
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"
] | [
"Use this API to clear nsconfig.",
"Sets the final transform of the bone during animation.\n\n@param finalTransform The transform matrix representing\nthe bone's pose after computing the skeleton.",
"Ensures that every path starts and ends with a slash character.\n\n@param scriptPath the scriptPath that needs to be normalized\n@return a path with leading and trailing slash",
"Use this API to delete route6.",
"Fills the Boyer Moore \"bad character array\" for the given pattern",
"Answer the real ClassDescriptor for anObj\nie. aCld may be an Interface of anObj, so the cld for anObj is returned",
"Gets the first value for the key.\n\n@param key the key to check for the value\n\n@return the value or {@code null} if the key is not found or the value was {@code null}",
"Returns list of files matches filters in specified directories\n\n@param directories which will using to find files\n@param fileFilter file filter\n@param dirFilter directory filter\n@return list of files matches filters in specified directories",
"Requests the cue list for a specific track ID, given a dbserver connection to a player that has already\nbeen set up.\n\n@param rekordboxId the track of interest\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved cue list, or {@code null} if none was available\n@throws IOException if there is a communication problem"
] |
public static int[] randomPermutation(int size) {
Random r = new Random();
int[] result = new int[size];
for (int j = 0; j < size; j++) {
result[j] = j;
}
for (int j = size - 1; j > 0; j--) {
int k = r.nextInt(j);
int temp = result[j];
result[j] = result[k];
result[k] = temp;
}
return result;
} | [
"Create a random permutation of the numbers 0, ..., size - 1.\n\nsee Algorithm P, D.E. Knuth: The Art of Computer Programming, Vol. 2, p. 145"
] | [
"Get a timer of the given string name and todos for the current thread. If\nno such timer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return timer",
"Set ViewPort visibility of the object.\n\n@see ViewPortVisibility\n@param viewportVisibility\nThe ViewPort visibility of the object.\n@return {@code true} if the ViewPort visibility was changed, {@code false} if it\nwasn't.",
"Add a row to the table. We have a limited understanding of the way\nBtrieve handles outdated rows, so we use what we think is a version number\nto try to ensure that we only have the latest rows.\n\n@param primaryKeyColumnName primary key column name\n@param map Map containing row data",
"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",
"Returns true if the string is a valid Java full qualified class name.\n\n@param str the string to be examined\n@return true if str is a valid Java Fqcn",
"Renames this folder.\n\n@param newName the new name of the folder.",
"Obtain the ID associated with a profile name\n\n@param profileName profile name\n@return ID of profile",
"Remove the nodes representing the entity and the embedded elements attached to it.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values of the key identifying the entity to remove",
"Keep a cache of items files associated with classification in order to improve performance."
] |
public static Type[] getActualTypeArguments(Class<?> clazz) {
Type type = Types.getCanonicalType(clazz);
if (type instanceof ParameterizedType) {
return ((ParameterizedType) type).getActualTypeArguments();
} else {
return EMPTY_TYPES;
}
} | [
"Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments"
] | [
"A specific, existing tag can be deleted by making a DELETE request\non the URL for that tag.\n\nReturns an empty data record.\n\n@param tag The tag to delete.\n@return Request object",
"Retrieve a table by name.\n\n@param name table name\n@return Table instance",
"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!!!",
"Return the position of an element inside an array\n\n@param array the array where it looks for an element\n@param element the element to find in the array\n@param <T> the type of elements in the array\n@return the position of the element if it's found in the array, -1 otherwise",
"Read leaf tasks attached to the WBS.\n\n@param id initial WBS ID",
"Deletes and publishes resources with ID conflicts.\n\n@param cms the CMS context to use\n@param module the module\n@param conflictingIds the conflicting ids\n@throws CmsException if something goes wrong\n@throws Exception if something goes wrong",
"Reset a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked",
"Changes to a new sub-view and stores a report to be displayed by that subview.<p<\n\n@param newState the new state\n@param thread the report thread which should be displayed in the sub view\n@param label the label to display for the report",
"Returns an iterable containing the items in this folder sorted by name and direction.\n@param sort the field to sort by, can be set as `name`, `id`, and `date`.\n@param direction the direction to display the item results.\n@param fields the fields to retrieve.\n@return an iterable containing the items in this folder."
] |
public boolean hasUniqueLongOption(String optionName) {
if(hasLongOption(optionName)) {
for(ProcessedOption o : getOptions()) {
if(o.name().startsWith(optionName) && !o.name().equals(optionName))
return false;
}
return true;
}
return false;
} | [
"not start with another option name"
] | [
"Get string value of flow context for current instance\n@return string value of flow context",
"Main executable method of Crawljax CLI.\n\n@param args\nthe arguments.",
"Use this API to update ipv6.",
"Operators which affect the variables to its left and right",
"This filter adds rounded corners to the image using the specified color as the background.\n\n@param radiusInner amount of pixels to use as radius.\n@param radiusOuter specifies the second value for the ellipse used for the radius. Use 0 for\nno value.\n@param color fill color for clipped region.",
"Core write attribute implementation.\n\n@param name attribute name\n@param value attribute value",
"Resets the state of the scope.\nUseful for automation testing when we want to reset the scope used to install test modules.",
"Notify our own event listeners of a Z-Wave event.\n@param event the event to send.",
"Writes the details of a recurring exception.\n\n@param mpxjException source MPXJ calendar exception\n@param xmlException target MSPDI exception"
] |
public void addChildTask(Task child)
{
child.m_parent = this;
m_children.add(child);
setSummary(true);
if (getParentFile().getProjectConfig().getAutoOutlineLevel() == true)
{
child.setOutlineLevel(Integer.valueOf(NumberHelper.getInt(getOutlineLevel()) + 1));
}
} | [
"This method is used to associate a child task with the current\ntask instance. It has been designed to\nallow the hierarchical outline structure of tasks in an MPX\nfile to be updated once all of the task data has been read.\n\n@param child child task"
] | [
"Get a View that displays the data at the specified\nposition in the data set. In this case, if we are at\nthe end of the list and we are still in append mode, we\nask for a pending view and return it, plus kick off the\nbackground task to append more data to the wrapped\nadapter.\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",
"Copies a classworlds file to a temporary location either on the local filesystem or on a slave depending on the\nnode type.\n\n@return The path of the classworlds.conf file",
"Adds an access constraint to the set used with the attribute\n@param accessConstraint the constraint\n@return a builder that can be used to continue building the attribute definition",
"Determine how many forked JVMs to use.",
"Helper method to track storage operations & time via StreamingStats.\n\n@param startNs",
"Updates this BoxJSONObject using the information in a JSON object.\n@param jsonObject the JSON object containing updated information.",
"Use this API to rename a cmppolicylabel resource.",
"Loads the data from the database. Override this method if the objects\nshall be loaded in a specific way.\n\n@return The loaded data",
"Propagates node table of given DAG to all of it ancestors."
] |
public final void cancelOld(
final long starttimeThreshold, final long checkTimeThreshold, final String message) {
final CriteriaBuilder builder = getSession().getCriteriaBuilder();
final CriteriaUpdate<PrintJobStatusExtImpl> update =
builder.createCriteriaUpdate(PrintJobStatusExtImpl.class);
final Root<PrintJobStatusExtImpl> root = update.from(PrintJobStatusExtImpl.class);
update.where(builder.and(
builder.equal(root.get("status"), PrintJobStatus.Status.WAITING),
builder.or(
builder.lessThan(root.get("entry").get("startTime"), starttimeThreshold),
builder.and(builder.isNotNull(root.get("lastCheckTime")),
builder.lessThan(root.get("lastCheckTime"), checkTimeThreshold))
)
));
update.set(root.get("status"), PrintJobStatus.Status.CANCELLED);
update.set(root.get("error"), message);
getSession().createQuery(update).executeUpdate();
} | [
"Cancel old waiting jobs.\n\n@param starttimeThreshold threshold for start time\n@param checkTimeThreshold threshold for last check time\n@param message the error message"
] | [
"Gets the path used for the results of XSLT Transforms.",
"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",
"commit all envelopes against the current broker",
"Use this API to clear route6.",
"Finds the parent address, everything before the last address part.\n\n@param address the address to get the parent\n\n@return the parent address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty",
"Searches for a declared method with a given name. If the class declares multiple methods with the given name,\nthere is no guarantee as of which methods is returned. Null is returned if the class does not declare a method\nwith the given name.\n@param clazz the given class\n@param methodName the given method name\n@return method method with the given name declared by the given class or null if no such method exists",
"Chooses the ECI mode most suitable for the content of this symbol.",
"Converts plan text into anonymous text. Preserves upper case, lower case,\npunctuation, whitespace and digits while making the text unreadable.\n\n@param oldText text to replace\n@param replacements map of find/replace pairs",
"This is more expensive.\n\n@param key key whose presence in this map is to be tested.\n@return <tt>true</tt> if this map contains a mapping for the specified\nkey."
] |
public static int[] getTileScreenSize(double[] worldSize, double scale) {
int screenWidth = (int) Math.round(scale * worldSize[0]);
int screenHeight = (int) Math.round(scale * worldSize[1]);
return new int[] { screenWidth, screenHeight };
} | [
"Calculate the screen size of a tile. Normally the screen size is expressed in pixels and should therefore be\nintegers, but for the sake of accuracy we try to keep a double value as long as possible.\n\n@param worldSize\nThe width and height of a tile in the layer's world coordinate system.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile screen width and the second value is\nthe tile screen height."
] | [
"Creates a new capsule\n\n@param mode the capsule mode, or {@code null} for the default mode\n@param wrappedJar a path to a capsule JAR that will be launched (wrapped) by the empty capsule in {@code jarFile}\nor {@code null} if no wrapped capsule is wanted\n@return the capsule.",
"Calculate the child size along the axis and measure the offset inside the\nlayout container\n@param dataIndex of child in Container\n@return true item fits the container, false - otherwise",
"Returns a new intern odmg-transaction for the current database.",
"Sets the default pattern values dependent on the provided start date.\n@param startDate the date, the default values are determined with.",
"Implements the AAD Algorithm\n@return HashMap where the key is the internal index of the random variable with respect to which the partial derivative was computed. This key then gives access to the actual derivative.",
"The documentation for InputStream.skip indicates that it can bail out early, and not skip\nthe requested number of bytes. I've encountered this in practice, hence this helper method.\n\n@param stream InputStream instance\n@param skip number of bytes to skip",
"Compress a directory into a zip file\n\n@param dir Directory\n@param zipFile ZIP file to create\n@throws IOException I/O Error",
"Helper method to lookup a DAO if it has already been associated with the class. Otherwise this returns null.",
"Send an empty request using a standard HTTP connection."
] |
public final ProcessorDependencyGraph getProcessorGraph() {
if (this.processorGraph == null) {
synchronized (this) {
if (this.processorGraph == null) {
final Map<String, Class<?>> attcls = new HashMap<>();
for (Map.Entry<String, Attribute> attribute: this.attributes.entrySet()) {
attcls.put(attribute.getKey(), attribute.getValue().getValueType());
}
this.processorGraph = this.processorGraphFactory.build(this.processors, attcls);
}
}
}
return this.processorGraph;
} | [
"Get the processor graph to use for executing all the processors for the template.\n\n@return the processor graph."
] | [
"Returns the site path for the edited bundle file.\n\n@return the site path for the edited bundle file.",
"Returns a collection of all profiles\n\n@return Collection of all Profiles\n@throws Exception exception",
"Set the model used by the right table.\n\n@param model table model",
"You should call this method from your activity onRequestPermissionsResult.\n\n@param requestCode The request code passed in requestPermissions(android.app.Activity, String[], int)\n@param permissions The requested permissions. Never null.\n@param grantResults The grant results for the corresponding permissions which is either\nPERMISSION_GRANTED or PERMISSION_DENIED. Never null.",
"Resamples a trajectory\n@param t Trajectory to resample\n@param n Resample rate\n@return Returns a resampled trajectory which contains every n'th position of t",
"Log unexpected column structure.",
"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.",
"Returns a count of in-window events.\n\n@return the the count of in-window events.",
"Returns the default jdbc type for the given java type.\n\n@param javaType The qualified java type\n@return The default jdbc type"
] |
public static clusternodegroup get(nitro_service service, String name) throws Exception{
clusternodegroup obj = new clusternodegroup();
obj.set_name(name);
clusternodegroup response = (clusternodegroup) obj.get_resource(service);
return response;
} | [
"Use this API to fetch clusternodegroup resource of given name ."
] | [
"Start listening for device announcements and keeping track of the DJ Link devices visible on the network.\nIf already listening, has no effect.\n\n@throws SocketException if the socket to listen on port 50000 cannot be created",
"Asta Powerproject assigns an explicit calendar for each task. This method\nis used to find the most common calendar and use this as the default project\ncalendar. This allows the explicitly assigned task calendars to be removed.",
"Apply the matching client UUID for the request\n\n@param httpServletRequest\n@param history",
"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",
"Reads a single resource from a ConceptDraw PROJECT file.\n\n@param resource ConceptDraw PROJECT resource",
"Returns the list of nodes which match the expression xpathExpr in the Document dom.\n\n@param dom the Document to search in\n@param xpathExpr the xpath query\n@return the list of nodes which match the query\n@throws XPathExpressionException On error.",
"Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened",
"Checks if Docker Machine is installed by running docker-machine and inspect the result.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n\n@return true if it is installed, false otherwise.",
"Invoke the operation.\n@param parameterMap the {@link Map} of parameter names to value arrays.\n@return the {@link Object} return value from the operation.\n@throws JMException Java Management Exception"
] |
public boolean start(SensorManager sensorManager) {
// Already started?
if (accelerometer != null) {
return true;
}
accelerometer = sensorManager.getDefaultSensor(
Sensor.TYPE_ACCELEROMETER);
// If this phone has an accelerometer, listen to it.
if (accelerometer != null) {
this.sensorManager = sensorManager;
sensorManager.registerListener(this, accelerometer,
SensorManager.SENSOR_DELAY_FASTEST);
}
return accelerometer != null;
} | [
"Starts listening for shakes on devices with appropriate hardware.\n\n@return true if the device supports shake detection."
] | [
"Resolves the POM for the specified parent.\n\n@param parent the parent coordinates to resolve, must not be {@code null}\n@return The source of the requested POM, never {@code null}\n@since Apache-Maven-3.2.2 (MNG-5639)",
"this class loader interface can be used by other plugins to lookup\nresources from the bundles. A temporary class loader interface is set\nduring other configuration loading as well\n\n@return ClassLoaderInterface (BundleClassLoaderInterface)",
"Read all resource assignments from a GanttProject project.\n\n@param gpProject GanttProject project",
"Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.",
"Gets a collection of all the email aliases for this user.\n\n<p>Note that the user's primary login email is not included in the collection of email aliases.</p>\n\n@return a collection of all the email aliases for this user.",
"visibility increased for testing",
"Use this API to fetch all the lbroute resources that are configured on netscaler.",
"This sets the variable with the given name to the given value. If there is already a variable with the same name in the top-most stack frame,\nwe will combine them here.\n\nThis helps in the case of multiple conditions tied together with \"or\" or \"and\".",
"Returns the port as configured by the system variables, fallback is the default port value\n\n@param portIdentifier - SYS_*_PORT defined in Constants\n@return"
] |
public static int forceCleanup(Thread t)
{
int i = 0;
for (Map.Entry<ConnectionPool, Set<ConnPair>> e : conns.entrySet())
{
for (ConnPair c : e.getValue())
{
if (c.thread.equals(t))
{
try
{
// This will in turn remove it from the static Map.
c.conn.getHandler().invoke(c.conn, Connection.class.getMethod("close"), null);
}
catch (Throwable e1)
{
e1.printStackTrace();
}
i++;
}
}
}
return i;
} | [
"Called by the engine to trigger the cleanup at the end of a payload thread."
] | [
"Use this API to fetch filtered set of appfwlearningsettings resources.\nset the filter parameter values in filtervalue object.",
"Operators which affect the variables to its left and right",
"Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"url\"\n@param jsonObject of Link\n@return String",
"Returns the list of nodes which match the expression xpathExpr in the Document dom.\n\n@param dom the Document to search in\n@param xpathExpr the xpath query\n@return the list of nodes which match the query\n@throws XPathExpressionException On error.",
"Send message to all connections labeled with tag specified.\n\n@param message the message to be sent\n@param tag the string that tag the connections to be sent\n@param excludeSelf specify whether the connection of this context should be send\n@return this context",
"Use this API to fetch all the nslimitselector resources that are configured on netscaler.",
"Returns the ReportModel with given name.",
"Tries to load the custom error page at the given rootPath.\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param rootPath the VFS root path to the error page resource\n@return a flag, indicating if the error page could be loaded",
"Notifies that multiple header items are inserted.\n\n@param positionStart the position.\n@param itemCount the item count."
] |
public boolean isAlive(Connection conn)
{
try
{
return con != null ? !con.isClosed() : false;
}
catch (SQLException e)
{
log.error("IsAlive check failed, running connection was invalid!!", e);
return false;
}
} | [
"Check if underlying connection was alive."
] | [
"Remove duplicate Strings from the given array. Also sorts the array, as\nit uses a TreeSet.\n\n@param array the String array\n@return an array without duplicates, in natural sort order",
"Used to NOT the next clause specified.",
"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",
"Clears out the statement handles.\n@param internalClose if true, close the inner statement handle too.",
"makes object obj persistent to the Objectcache under the key oid.",
"Assembles an avro format string of single store config from store\nproperties\n\n@param props Store properties\n@return String in avro format that contains single store configs",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"Generates timephased actual costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost",
"Extracts the nullity of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The nullity of the decomposed matrix."
] |
Subsets and Splits