query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
private Integer getIntegerTimeInMinutes(Date date)
{
Integer result = null;
if (date != null)
{
Calendar cal = DateHelper.popCalendar(date);
int time = cal.get(Calendar.HOUR_OF_DAY) * 60;
time += cal.get(Calendar.MINUTE);
DateHelper.pushCalendar(cal);
result = Integer.valueOf(time);
}
return (result);
} | [
"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"
] | [
"Execute the transactional flow - catch only specified exceptions\n\n@param input Initial data input\n@param classes Exception types to catch\n@return Try that represents either success (with result) or failure (with errors)",
"Make a WMS getLayer request and return the image read from the server.\n\n@param wmsLayerParam the wms request parameters\n@param commonURI the uri to use for the requests (excepting parameters of course.)\n@param imageSize the size of the image to request\n@param dpi the dpi of the image to request\n@param angle the angle of the image to request\n@param bounds the area and projection of the request on the world.",
"Use this API to clear bridgetable.",
"The ARP is additional request parameters, which must be sent once\nreceived after any HTTP call. This is sort of a proxy for cookies.\n\n@return A JSON object containing the ARP key/values. Can be null.",
"Make a composite filter from the given sub-filters using AND to combine filters.",
"Gets the a singleton reference to the SPIProvider returned by the SPIProviderResolver\nretrieved using the default server integration classloader.\n\n@return this class instance",
"use this method to construct the ChainingIterator\niterator by iterator.",
"Checks the preconditions for creating a new RequireSubStr processor with a List of Strings.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif requiredSubStrings or one of its elements is null\n@throws IllegalArgumentException\nif requiredSubStrings is empty",
"Print units.\n\n@param value units value\n@return units value"
] |
private Object getValue(FieldType field, byte[] block)
{
Object result = null;
switch (block[0])
{
case 0x07: // Field
{
result = getFieldType(block);
break;
}
case 0x01: // Constant value
{
result = getConstantValue(field, block);
break;
}
case 0x00: // Prompt
{
result = getPromptValue(field, block);
break;
}
}
return result;
} | [
"Retrieves the value component of a criteria expression.\n\n@param field field type\n@param block block data\n@return field value"
] | [
"Build resolution context in which message will be discovered and built\n@param components resolution components, used to identify message bundle\n@param messageParams message parameters will be substituted in message and used in pattern matching\n@since 3.1\n@return immutable resolution context instance for given parameters",
"Revisit message to set their item ref to a item definition\n@param def Definitions",
"Return the list of module that uses the targeted artifact\n\n@param gavc String\n@param filters FiltersHolder\n@return List<DbModule>",
"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.",
"Generates a vector clock with the provided values\n\n@param serverIds servers in the clock\n@param clockValue value of the clock for each server entry\n@param timestamp ts value to be set for the clock\n@return",
"Removes elements from begin to end from the list, inclusive. Returns a new list which\nis composed of the removed elements",
"Returns iterable with all folder assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all folder assignments.",
"Gets the numeric codes. Setting it to -1 search for currencies that have no numeric code.\n\n@return the query for chaining.",
"Returns a flag represented as a String, indicating if\nthe supplied day is a working day.\n\n@param mpxjCalendar MPXJ ProjectCalendar instance\n@param day Day instance\n@return boolean flag as a string"
] |
public Object getObjectByIdentity(Identity id)
throws PersistenceBrokerException
{
checkOpen();
ObjectEnvelope envelope = objectEnvelopeTable.getByIdentity(id);
if (envelope != null)
{
return (envelope.needsDelete() ? null : envelope.getObject());
}
else
{
return getBroker().getObjectByIdentity(id);
}
} | [
"Get object by identity. First lookup among objects registered in the\ntransaction, then in persistent storage.\n@param id The identity\n@return The object\n@throws PersistenceBrokerException"
] | [
"Compress contiguous partitions into format \"e-i\" instead of\n\"e, f, g, h, i\". This helps illustrate contiguous partitions within a\nzone.\n\n@param cluster\n@param zoneId\n@return pretty string of partitions per zone",
"Finds the first Field with given field name in the Class and in its super classes.\n\n@param type The Class type\n@param fieldName The field name to get\n@return an {@code Optional}. Use isPresent() to find out if the field name was found.",
"Return the number of arguments associated with the specified option.\nThe return value includes the actual option.\nWill return 0 if the option is not supported.",
"Reads the bundle descriptor, sets m_desc and m_descContent.\n@throws CmsXmlException thrown when unmarshalling fails.\n@throws CmsException thrown when reading the resource fails or several bundle descriptors for the bundle exist.",
"Modifies the belief referenced by bName parameter.\n\n@param bName\n- the name of the belief to update.\n@param value\n- the new value for the belief",
"Save page to log\n\n@return address of this page after save",
"Read a Synchro time from an input stream.\n\n@param is input stream\n@return Date instance",
"This method is called to format a relation.\n\n@param relation relation instance\n@return formatted relation instance",
"Retrieves list of inbox messages based on given userId\n@param userId String userid\n@return ArrayList of {@link CTMessageDAO}"
] |
public static String join(Iterable<?> iterable, String separator) {
if (iterable != null) {
StringBuilder buf = new StringBuilder();
Iterator<?> it = iterable.iterator();
char singleChar = separator.length() == 1 ? separator.charAt(0) : 0;
while (it.hasNext()) {
buf.append(it.next());
if (it.hasNext()) {
if (singleChar != 0) {
// More efficient
buf.append(singleChar);
} else {
buf.append(separator);
}
}
}
return buf.toString();
} else {
return "";
}
} | [
"Joins the given iterable objects using the given separator into a single string.\n\n@return the joined string or an empty string if iterable is null"
] | [
"Sets the specified long attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Builds IMAP envelope String from pre-parsed data.",
"Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder",
"Adds a step to the steps.\n\n@param name {@link String} name of the step\n@param robot {@link String} name of the robot used by the step.\n@param options {@link Map} extra options required for the step.",
"Returns the first product found in the vector of calibration products\nwhich matches the given symbol, where symbol is the String set in\nthe calibrationSpecs.\n\n@param symbol A given symbol string.\n@return The product associated with that symbol.",
"Returns the logger name that should be used in the log manager.\n\n@param name the name of the logger from the resource\n\n@return the name of the logger",
"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",
"Convert a floating point date to a LocalDateTime.\n\nNote: This method currently performs a rounding to the next second.\n\nIf referenceDate is null, the method returns null.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param floatingPointDate The value to the time offset \\( t \\).\n@return The date resulting from adding Math.round(fixingTime*SECONDS_PER_DAY) seconds to referenceDate, where one day has SECONDS_PER_DAY seconds and SECONDS_PER_DAY is a constant 365*24*60*60",
"Checks to see if the submatrix has its boundaries along inner blocks.\n\n@param blockLength Size of an inner block.\n@param A Submatrix.\n@return If it is block aligned or not."
] |
public void edit(Note note) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_EDIT);
parameters.put("note_id", note.getId());
Rectangle bounds = note.getBounds();
if (bounds != null) {
parameters.put("note_x", String.valueOf(bounds.x));
parameters.put("note_y", String.valueOf(bounds.y));
parameters.put("note_w", String.valueOf(bounds.width));
parameters.put("note_h", String.valueOf(bounds.height));
}
String text = note.getText();
if (text != null) {
parameters.put("note_text", text);
}
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
} | [
"Update a note.\n\n@param note\nThe Note to update\n@throws FlickrException"
] | [
"Finish service initialization.\n\n@throws GeomajasException oops",
"For the given service name return list of endpoint references currently\nregistered at the service locator server endpoints.\n\n@param serviceName\nthe name of the service for which to get the endpoints, must\nnot be <code>null</code>\n@return EndpointReferenceListType encapsulate list of endpoint references\nor <code>null</code>",
"Returns iban length for the specified country.\n\n@param countryCode {@link org.iban4j.CountryCode}\n@return the length of the iban for the specified country.",
"returns an Array with an Objects CURRENT locking VALUES , BRJ\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Returns the boolean value of the specified property.\n\n@param name The name of the property\n@param defaultValue The value to use if the property is not set or not a boolean\n@return The value",
"replace the counter for K1-index o by new counter c",
"Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value",
"Use this API to unset the properties of nsip6 resource.\nProperties that need to be unset are specified in args array.",
"Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived"
] |
protected Boolean parseOptionalBooleanValue(final String path) {
final I_CmsXmlContentValue value = m_xml.getValue(path, m_locale);
if (value == null) {
return null;
} else {
final String stringValue = value.getStringValue(null);
try {
final Boolean boolValue = Boolean.valueOf(stringValue);
return boolValue;
} catch (final NumberFormatException e) {
LOG.info(Messages.get().getBundle().key(Messages.LOG_OPTIONAL_BOOLEAN_MISSING_1, path), e);
return null;
}
}
} | [
"Helper to read an optional Boolean value.\n@param path The XML path of the element to read.\n@return The Boolean value stored in the XML, or <code>null</code> if the value could not be read."
] | [
"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",
"Function to perform backward activation",
"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.",
"Construct an InterestRateSwapLegProductDescriptor from a node in a FIPXML file.\n\n@param leg The node containing the leg.\n@param forwardCurveName Forward curve name form outside the node.\n@param discountCurveName Discount curve name form outside the node.\n@param daycountConvention Daycount convention from outside the node.\n@return Descriptor of the swap leg.",
"Assign arguments to the statement.\n\n@return The statement passed in or null if it had to be closed on error.",
"Use this API to fetch autoscaleaction resource of given name .",
"This method extracts calendar data from a Planner file.\n\n@param project Root node of the Planner file",
"Log column data.\n\n@param column column data",
"Reads timephased assignment data.\n\n@param calendar current calendar\n@param assignment assignment data\n@param type flag indicating if this is planned or complete work\n@return list of timephased resource assignment instances"
] |
public MaterialSection getSectionByTitle(String title) {
for(MaterialSection section : sectionList) {
if(section.getTitle().equals(title)) {
return section;
}
}
for(MaterialSection section : bottomSectionList) {
if(section.getTitle().equals(title))
return section;
}
return null;
} | [
"Get a setted section knowing his title\n\nN.B. this search only into section list and bottom section list.\n@param title is the title of the section\n@return the section with title or null if the section is not founded"
] | [
"Creates PollingState from the json string.\n\n@param serializedPollingState polling state as json string\n@param <ResultT> the result that the poll operation produces\n@return the polling state",
"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",
"Reverses all the TransitionControllers managed by this TransitionManager",
"Notification that boot has completed successfully and the configuration history should be updated",
"makes a deep clone of the object, using reflection.\n@param toCopy the object you want to copy\n@return",
"Get a list of referrers from a given domain to a collection.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionReferrers.html\"",
"Generate a report about the targeted module dependencies\n\n@param moduleId String\n@param filters FiltersHolder\n@return DependencyReport",
"For each node, checks if the store exists and then verifies that the remote schema\nmatches the new one. If the remote store doesn't exist, it creates it.",
"Check type.\n\n@param type the type\n@return the boolean"
] |
public void moveUp(I_CmsEditableGroupRow row) {
int index = m_container.getComponentIndex(row);
if (index > 0) {
m_container.removeComponent(row);
m_container.addComponent(row, index - 1);
}
updateButtonBars();
} | [
"Moves the given row up.\n\n@param row the row to move"
] | [
"Gets an app client by its client app id if it has been initialized; throws if none can be\nfound.\n\n@param clientAppId the client app id of the app client to get.\n@return the app client associated with the client app id.",
"Install the installation manager service.\n\n@param serviceTarget\n@return the service controller for the installed installation manager",
"A factory method for users that need to report success without actually running any analysis. The returned\nresult will be successful, but will not contain the actual configurations of extensions.\n\n@return a \"fake\" successful analysis result",
"Use this API to fetch sslcertkey_sslvserver_binding resources of given name .",
"Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color",
"add converter at given index. The index can be changed during conversion\nif canReorder is true\n\n@param index\n@param converter",
"Add a collaborator to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param collaborator Username of the collaborator to add. This is usually in the form of \"[email protected]\".",
"This method formats a time unit.\n\n@param timeUnit time unit instance\n@return formatted time unit instance",
"Convert a method name into a property name.\n\n@param method target method\n@return property name"
] |
protected static void statistics(int from, int to) {
// check that primes contain no accidental errors
for (int i=0; i<primeCapacities.length-1; i++) {
if (primeCapacities[i] >= primeCapacities[i+1]) throw new RuntimeException("primes are unsorted or contain duplicates; detected at "+i+"@"+primeCapacities[i]);
}
double accDeviation = 0.0;
double maxDeviation = - 1.0;
for (int i=from; i<=to; i++) {
int primeCapacity = nextPrime(i);
//System.out.println(primeCapacity);
double deviation = (primeCapacity - i) / (double)i;
if (deviation > maxDeviation) {
maxDeviation = deviation;
System.out.println("new maxdev @"+i+"@dev="+maxDeviation);
}
accDeviation += deviation;
}
long width = 1 + (long)to - (long)from;
double meanDeviation = accDeviation/width;
System.out.println("Statistics for ["+ from + ","+to+"] are as follows");
System.out.println("meanDeviation = "+(float)meanDeviation*100+" %");
System.out.println("maxDeviation = "+(float)maxDeviation*100+" %");
} | [
"Tests correctness."
] | [
"Returns the parsed story from the given text\n\n@param configuration the Configuration used to run story\n@param storyAsText the story text\n@param storyId the story Id, which will be returned as story path\n@return The parsed Story",
"Determines how many primary partitions each node within each zone should\nhave. The list of integers returned per zone is the same length as the\nnumber of nodes in that zone.\n\n@param nextCandidateCluster\n@param targetPartitionsPerZone\n@return A map of zoneId to list of target number of partitions per node\nwithin zone.",
"Computes eigenvalues only\n\n@return",
"Restores a trashed folder to a new location with a new name.\n@param folderID the ID of the trashed folder.\n@param newName an optional new name to give the folder. This can be null to use the folder's original name.\n@param newParentID an optional new parent ID for the folder. This can be null to use the folder's original\nparent.\n@return info about the restored folder.",
"Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key",
"Uncompresses the textual contents in the given map and and writes them to the files\ndenoted by the keys of the map.\n\n@param dir The base directory into which the files will be written\n@param contents The map containing the contents indexed by the filename\n@throws IOException If an error occurred",
"Adds the specified serie column to the dataset with custom label expression.\n\n@param column the serie column\n@param labelExpression column the custom label expression",
"Convert raw value as read from the MPP file into a Java type.\n\n@param type MPP value type\n@param value raw value data\n@return Java object",
"Execute JavaScript in the browser.\n\n@param code The code to execute.\n@return The return value of the JavaScript.\n@throws CrawljaxException when javascript execution failed."
] |
private boolean isSatisfied() {
if(pipelineData.getZonesRequired() != null) {
return ((pipelineData.getSuccesses() >= required) && (pipelineData.getZoneResponses()
.size() >= (pipelineData.getZonesRequired() + 1)));
} else {
return pipelineData.getSuccesses() >= required;
}
} | [
"Checks whether every property except 'preferred' is satisfied\n\n@return"
] | [
"Get parent digest of an image.\n\n@param digest\n@param host\n@return",
"Use this API to fetch lbvserver_scpolicy_binding resources of given name .",
"Sets the replacement var map node specific.\n\n@param replacementVarMapNodeSpecific\nthe replacement var map node specific\n@return the parallel task builder",
"Formats a date or a time according to the local conventions.\n\nSince ReadablePartials don't support all fields, we fill in any blanks\nneeded for formatting by using the epoch (1970-01-01T00:00:00Z).\n\nSee {@link android.text.format.DateUtils#formatDateTime} for full docs.\n\n@param context the context is required only if the time is shown\n@param time a point in time\n@param flags a bit mask of formatting options\n@return a string containing the formatted date/time.",
"Clean up the environment object for the given storage engine",
"exposed only for tests",
"Set the values using the specified Properties object.\n\n@param properties Properties object containing specific property values\nfor the RESTClient config\n\nNote: We're using the same property names as that in ClientConfig\nfor backwards compatibility.",
"Are both Id's the same?\n\n@param otherElement the other element to compare\n@return true if id == otherElement.id",
"Notification that a state transition failed.\n\n@param state the failed transition"
] |
private void allInput(List<FileModel> vertices, GraphRewrite event, ParameterStore store)
{
if (StringUtils.isBlank(getInputVariablesName()) && this.filenamePattern == null)
{
FileService fileModelService = new FileService(event.getGraphContext());
for (FileModel fileModel : fileModelService.findAll())
{
vertices.add(fileModel);
}
}
} | [
"Generating the input vertices is quite complex. Therefore there are multiple methods that handles the input vertices\nbased on the attribute specified in specific order. This method generates all the vertices if there is no other way how to handle\nthe input."
] | [
"Obtains a local date in Julian calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Julian local date, not null\n@throws DateTimeException if unable to create the date",
"Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream\nproperly.\n\n@param out target archive.\n@param source file to be added.\n@param fileSize size of the file (which is known in most cases).\n@throws IOException in case of any issues with underlying store.",
"Parses the resource String id and get back the int res id\n@param context\n@param id String resource id\n@return int resource id",
"Read calendar data from a PEP file.",
"Returns a list of all the eigenvalues",
"Tests the string edit distance function.",
"Checks if is single position prefix.\n\n@param fieldInfo\nthe field info\n@param prefix\nthe prefix\n@return true, if is single position prefix\n@throws IOException\nSignals that an I/O exception has occurred.",
"Attach a component to this scene object.\n\nEach scene object has a list of components that may\nbe attached to it. Only one component of a particular type\ncan be attached. Components are retrieved based on their type.\n\n@return true if component is attached, false if a component of that class is already attached.\n@param component component to attach.\n@see GVRSceneObject#detachComponent(long)\n@see GVRSceneObject#getComponent(long)",
"Query a player to determine the port on which its database server is running.\n\n@param announcement the device announcement with which we detected a new player on the network."
] |
private void processDeferredRelationship(DeferredRelationship dr) throws MPXJException
{
String data = dr.getData();
Task task = dr.getTask();
int length = data.length();
if (length != 0)
{
int start = 0;
int end = 0;
while (end != length)
{
end = data.indexOf(m_delimiter, start);
if (end == -1)
{
end = length;
}
populateRelation(dr.getField(), task, data.substring(start, end).trim());
start = end + 1;
}
}
} | [
"This method processes a single deferred relationship list.\n\n@param dr deferred relationship list data\n@throws MPXJException"
] | [
"Get the collection of public contacts for the specified user ID.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The Collection of Contact objects\n@throws FlickrException",
"Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name .",
"Specify additional query parameters to be passed to the filter function.\n\n@param queryParams map of key-value parameters\n@return this Replication instance to set more options or trigger the replication",
"Returns true if the given document should be included in the\nserialization.\n\n@param itemDocument\nthe document to check\n@return true if the document should be serialized",
"Uncompresses the given textual content and writes it to the given file.\n\n@param file The file to write to\n@param compressedContent The content\n@throws IOException If an error occurred",
"Call with pathEntries lock taken",
"Use this API to fetch dnsview_binding resource of given name .",
"Checks that a field exists and contains a non-null value.\n@param fieldName the name of the field to check existence/value of.\n@return true if the field exists in the result set and has a non-null value; false otherwise.",
"Given a block of data representing completed work, this method will\nretrieve a set of TimephasedWork instances which represent\nthe day by day work carried out for a specific resource assignment.\n\n@param calendar calendar on which date calculations are based\n@param resourceAssignment resource assignment\n@param data completed work data block\n@return list of TimephasedWork instances"
] |
public ParallelTaskBuilder setTargetHostsFromJsonPath(String jsonPath,
String sourcePath, HostsSourceType sourceType)
throws TargetHostsLoadException {
this.targetHosts = targetHostBuilder.setTargetHostsFromJsonPath(jsonPath, sourcePath,
sourceType);
return this;
} | [
"Sets the target hosts from json path.\n\n@param jsonPath\nthe json path\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception"
] | [
"Creates instance of the entity class. This method is called to create the object\ninstances when returning query results.",
"Handles an initial response from a PUT or PATCH operation response by polling the status of the operation\nasynchronously, once the operation finishes emits the final response.\n\n@param observable the initial observable from the PUT or PATCH operation.\n@param resourceType the java.lang.reflect.Type of the resource.\n@param <T> the return type of the caller.\n@return the observable of which a subscription will lead to a final response.",
"Pop the record number from the front of the list, and parse it to ensure that\nit is a valid integer.\n\n@param list MPX record",
"Send a master changed announcement to all registered master listeners.\n\n@param update the message announcing the new tempo master",
"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",
"Log error information",
"Returns whether this subnet or address has alphabetic digits when printed.\n\nNote that this method does not indicate whether any address contained within this subnet has alphabetic digits,\nonly whether the subnet itself when printed has alphabetic digits.\n\n@return whether the section has alphabetic digits when printed.",
"Will start the HiveServer.\n\n@param testConfig Specific test case properties. Will be merged with the HiveConf of the context\n@param hiveVars HiveVars to pass on to the HiveServer for this session",
"Returns a flag indicating if also unreleased resources should be found.\n@return A flag indicating if also unreleased resources should be found."
] |
public static boolean isTypeManagedBeanOrDecoratorOrInterceptor(AnnotatedType<?> annotatedType) {
Class<?> javaClass = annotatedType.getJavaClass();
return !javaClass.isEnum() && !Extension.class.isAssignableFrom(javaClass)
&& Reflections.isTopLevelOrStaticNestedClass(javaClass) && !Reflections.isParameterizedTypeWithWildcard(javaClass)
&& hasSimpleCdiConstructor(annotatedType);
} | [
"Indicates if the type is a simple Web Bean\n\n@param clazz The type to inspect\n@return True if simple Web Bean, false otherwise"
] | [
"Shut down the input manager.\n\nAfter this call, GearVRf will not be able to access IO devices.",
"Set the specular intensity of the light.\n\nThis designates the color of the specular reflection.\nIt is multiplied by the material specular color to derive\nthe hue of the specular reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code specular_intensity} to control the specular intensity.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)",
"a helper method to enable the keyboardUtil for a specific activity\nor disable it. note this will cause some frame drops because of the\nlistener.\n\n@param activity\n@param enable",
"Use this API to fetch nsacl6 resource of given name .",
"Sets the time warp.\n\n@param l the new time warp",
"Retrieve a list of the available P3 project names from a directory.\n\n@param directory directory containing P3 files\n@return list of project names",
"Return true if the two connections seem to one one connection under the covers.",
"Add a '>=' clause so the column must be greater-than or equals-to the value.",
"This method extracts calendar data from a Phoenix file.\n\n@param phoenixProject Root node of the Phoenix file"
] |
void setState(final WidgetState.State state) {
Log.d(TAG, "setState(%s): state is %s, setting to %s", mWidget.getName(), mState, state);
if (state != mState) {
final WidgetState.State nextState = getNextState(state);
Log.d(TAG, "setState(%s): next state '%s'", mWidget.getName(), nextState);
if (nextState != mState) {
Log.d(TAG, "setState(%s): setting state to '%s'", mWidget.getName(), nextState);
setCurrentState(false);
mState = nextState;
setCurrentState(true);
}
}
} | [
"Sets current state\n@param state new state"
] | [
"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",
"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",
"Prints to a file. If the file does not exist, rewrites the file;\ndoes not append.",
"Get the Operation metadata for a single operation on an MBean by name.\n@param operationName the Operation name (can be URL-encoded).\n@return the {@link MBeanOperationInfo} for the operation.\n@throws OperationNotFoundException Method was not found\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Abort and close the transaction.\nCalling abort abandons all persistent object modifications and releases the\nassociated locks.\nIf transaction is not in progress a TransactionNotInProgressException is thrown",
"Set the gamma levels.\n@param rGamma the gamma level for the red channel\n@param gGamma the gamma level for the blue channel\n@param bGamma the gamma level for the green channel\n@see #getGamma",
"Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided",
"Returns the list of colliders attached to scene objects that are\nvisible from the viewpoint of the camera.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is picking against particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n\nThe hit location returned is the world position of the scene object center.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@return A list of {@link org.gearvrf.GVRPicker.GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link org.gearvrf.GVRPicker.GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6",
"creates a scope using the passed function to compute the names and sets the passed scope as the parent scope"
] |
synchronized void removeEvents(Table table) {
final String tName = table.getName();
try {
final SQLiteDatabase db = dbHelper.getWritableDatabase();
db.delete(tName, null, null);
} catch (final SQLiteException e) {
getConfigLogger().verbose("Error removing all events from table " + tName + " Recreating DB");
deleteDB();
} finally {
dbHelper.close();
}
} | [
"Removes all events from table\n\n@param table the table to remove events"
] | [
"Appends the accumulated words to the resulting words. Trailing whitespace is removed because of the\npostprocessing that inserts custom whitespace\n\n@param currentWords is the {@link StringBuilder} of the accumulated words\n@param formattedWords is the list that is being appended to",
"Resolves current full path with .yml and .yaml extensions\n\n@param fullpath\nwithout extension.\n\n@return Path of existing definition or null",
"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.",
"Add the provided document to the cache.",
"Bean types of a session bean.",
"Get the object responsible for printing to the correct output format.\n\n@param specJson the request json from the client",
"Records the result of updating a server.\n\n@param server the id of the server. Cannot be <code>null</code>\n@param response the result of the updates",
"Checks if a given number is in the range of a double.\n\n@param number\na number which should be in the range of a double (positive or negative)\n\n@see java.lang.Double#MIN_VALUE\n@see java.lang.Double#MAX_VALUE\n\n@return number as a double",
"Removes the row with the specified key from this association.\n\n@param key the key of the association row to remove"
] |
public static void setIndex(Matcher matcher, int idx) {
int count = getCount(matcher);
if (idx < -count || idx >= count) {
throw new IndexOutOfBoundsException("index is out of range " + (-count) + ".." + (count - 1) + " (index = " + idx + ")");
}
if (idx == 0) {
matcher.reset();
} else if (idx > 0) {
matcher.reset();
for (int i = 0; i < idx; i++) {
matcher.find();
}
} else if (idx < 0) {
matcher.reset();
idx += getCount(matcher);
for (int i = 0; i < idx; i++) {
matcher.find();
}
}
} | [
"Set the position of the given Matcher to the given index.\n\n@param matcher a Matcher\n@param idx the index number\n@since 1.0"
] | [
"Returns the naming context.",
"Gets the progress from response.\n\n@param myResponse\nthe my response\n@return the progress from response",
"Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag.",
"Creates a code location URL from a class\n\n@param codeLocationClass the class\n@return A URL created from Class\n@throws InvalidCodeLocation if URL creation fails",
"Record the checkout queue length\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param queueLength The number of entries in the \"synchronous\" checkout\nqueue.",
"Creates a rectangular matrix which is zero except along the diagonals.\n\n@param numRows Number of rows in the matrix.\n@param numCols NUmber of columns in the matrix.\n@return A matrix with diagonal elements equal to one.",
"Samples without replacement from a collection.\n\n@param c\nThe collection to be sampled from\n@param n\nThe number of samples to take\n@return a new collection with the sample",
"Converts a time in UTC to a gwt Date object which is in the timezone of\nthe current browser.\n\n@return The Date corresponding to the time, adjusted for the timezone of\nthe current browser. null if the specified time is null or\nrepresents a negative number.",
"Gets the info for a running build\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param buildId the unique identifier of the build"
] |
private LinkedList<TimephasedWork> readTimephasedAssignment(ProjectCalendar calendar, Project.Assignments.Assignment assignment, int type)
{
LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>();
for (TimephasedDataType item : assignment.getTimephasedData())
{
if (NumberHelper.getInt(item.getType()) != type)
{
continue;
}
Date startDate = item.getStart();
Date finishDate = item.getFinish();
// Exclude ranges which don't have a start and end date.
// These seem to be generated by Synchro and have a zero duration.
if (startDate == null && finishDate == null)
{
continue;
}
Duration work = DatatypeConverter.parseDuration(m_projectFile, TimeUnit.MINUTES, item.getValue());
if (work == null)
{
work = Duration.getInstance(0, TimeUnit.MINUTES);
}
else
{
work = Duration.getInstance(NumberHelper.round(work.getDuration(), 2), TimeUnit.MINUTES);
}
TimephasedWork tra = new TimephasedWork();
tra.setStart(startDate);
tra.setFinish(finishDate);
tra.setTotalAmount(work);
result.add(tra);
}
return result;
} | [
"Reads timephased assignment data.\n\n@param calendar current calendar\n@param assignment assignment data\n@param type flag indicating if this is planned or complete work\n@return list of timephased resource assignment instances"
] | [
"Update the id field of the object in the database.",
"Checks to see if a handler is disabled\n\n@param handlerName the name of the handler to enable.",
"Determines the address for the host being used.\n\n@param client the client used to communicate with the server\n\n@return the address of the host\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to determine the host name fails",
"Use this API to add cachecontentgroup.",
"Remove a variable in the top variables layer.",
"Reads the categories for the given resource.\n\n@param cms the {@link CmsObject} used for reading the categories.\n@param resource the resource for which the categories should be read.\n@return the categories assigned to the given resource.",
"Retrieve a finish date.\n\n@param data byte array\n@param offset offset into byte array\n@return finish date",
"Set keyboard done listener to detect when the user click \"DONE\" on his keyboard\n\n@param listener IntlPhoneInputListener",
"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"
] |
public double getValueAsPrice(double evaluationTime, AnalyticModel model) {
ForwardCurve forwardCurve = model.getForwardCurve(forwardCurveName);
DiscountCurve discountCurve = model.getDiscountCurve(discountCurveName);
DiscountCurve discountCurveForForward = null;
if(forwardCurve == null && forwardCurveName != null && forwardCurveName.length() > 0) {
// User might like to get forward from discount curve.
discountCurveForForward = model.getDiscountCurve(forwardCurveName);
if(discountCurveForForward == null) {
// User specified a name for the forward curve, but no curve was found.
throw new IllegalArgumentException("No curve of the name " + forwardCurveName + " was found in the model.");
}
}
double value = 0.0;
for(int periodIndex=0; periodIndex<schedule.getNumberOfPeriods(); periodIndex++) {
double fixingDate = schedule.getFixing(periodIndex);
double paymentDate = schedule.getPayment(periodIndex);
double periodLength = schedule.getPeriodLength(periodIndex);
/*
* We do not count empty periods.
* Since empty periods are an indication for a ill-specified product,
* it might be reasonable to throw an illegal argument exception instead.
*/
if(periodLength == 0) {
continue;
}
double forward = 0.0;
if(forwardCurve != null) {
forward += forwardCurve.getForward(model, fixingDate, paymentDate-fixingDate);
}
else if(discountCurveForForward != null) {
/*
* Classical single curve case: using a discount curve as a forward curve.
* This is only implemented for demonstration purposes (an exception would also be appropriate :-)
*/
if(fixingDate != paymentDate) {
forward += (discountCurveForForward.getDiscountFactor(fixingDate) / discountCurveForForward.getDiscountFactor(paymentDate) - 1.0) / (paymentDate-fixingDate);
}
}
double discountFactor = paymentDate > evaluationTime ? discountCurve.getDiscountFactor(model, paymentDate) : 0.0;
double payoffUnit = discountFactor * periodLength;
double effektiveStrike = strike;
if(isStrikeMoneyness) {
effektiveStrike += getATMForward(model, true);
}
VolatilitySurface volatilitySurface = model.getVolatilitySurface(volatiltiySufaceName);
if(volatilitySurface == null) {
throw new IllegalArgumentException("Volatility surface not found in model: " + volatiltiySufaceName);
}
if(volatilitySurface.getQuotingConvention() == QuotingConvention.VOLATILITYLOGNORMAL) {
double volatility = volatilitySurface.getValue(model, fixingDate, effektiveStrike, VolatilitySurface.QuotingConvention.VOLATILITYLOGNORMAL);
value += AnalyticFormulas.blackScholesGeneralizedOptionValue(forward, volatility, fixingDate, effektiveStrike, payoffUnit);
}
else {
// Default to normal volatility as quoting convention
double volatility = volatilitySurface.getValue(model, fixingDate, effektiveStrike, VolatilitySurface.QuotingConvention.VOLATILITYNORMAL);
value += AnalyticFormulas.bachelierOptionValue(forward, volatility, fixingDate, effektiveStrike, payoffUnit);
}
}
return value / discountCurve.getDiscountFactor(model, evaluationTime);
} | [
"Returns the value of this product under the given model.\n\n@param evaluationTime Evaluation time.\n@param model The model.\n@return Value of this product und the given model."
] | [
"Formats a double value.\n\n@param number numeric value\n@return Double instance",
"read message from file\n\n@param readOffset offset in this channel(file);not the message offset\n@param size max data size\n@return messages sharding data with file log\n@throws IOException reading file failed",
"Takes an object and converts it to a string.\n\n@param mapper the object mapper\n@param object the object to convert\n@return json string",
"Convenience wrapper for message parameters\n@param params\n@return",
"Returns sql statement used in this prepared statement together with the parameters.\n@param sql base sql statement\n@param logParams parameters to print out\n@return returns printable statement",
"Mbeans for SLOP_UPDATE",
"Prints a stores xml to a file.\n\n@param outputDirName\n@param fileName\n@param list of storeDefs",
"Deletes an entity by its primary key.\n\n@param id\nPrimary key of the entity.",
"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."
] |
public void deleteById(String id) {
if (idToVersion.containsKey(id)) {
String version = idToVersion.remove(id);
expirationVersion.remove(version);
versionToItem.remove(version);
if (collectionCachePath != null
&& !collectionCachePath.resolve(version).toFile().delete()) {
log.debug("couldn't delete " + version);
}
}
} | [
"Delete by id.\n\n@param id the id"
] | [
"Use this API to fetch aaauser_aaagroup_binding resources of given name .",
"Set the values using the specified Properties object.\n\n@param properties Properties object containing specific property values\nfor the RESTClient config\n\nNote: We're using the same property names as that in ClientConfig\nfor backwards compatibility.",
"Extracts the column from the matrix a.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column.",
"Sets the path name for this ID\n\n@param pathId ID of path\n@param pathName Name of path",
"Invokes a function defined in the script.\n\n@param funcName\nThe function name.\n@param params\nThe parameter array.\n@return\nA boolean value representing whether the function is\nexecuted correctly. If the function cannot be found, or\nparameters don't match, {@code false} is returned.",
"Method used as dynamical parameter converter",
"judge if an point in the area or not\n\n@param point\n@param area\n@param offsetRatio\n@return",
"Initializes unspecified sign properties using available defaults\nand global settings.",
"Reads a row of a CSV file and populates the bean, using the supplied name mapping to map column values to the\nappropriate fields. If processors are supplied then they are used, otherwise the raw String values will be used.\n\n@param bean\nthe bean to populate\n@param nameMapping\nthe name mapping array\n@param processors\nthe (optional) cell processors\n@return the populated bean, or null if EOF was reached\n@throws IllegalArgumentException\nif nameMapping.length != number of CSV columns read\n@throws IOException\nif an I/O error occurred\n@throws NullPointerException\nif bean or nameMapping are null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif there was a general exception while reading/processing\n@throws SuperCsvReflectionException\nif there was an reflection exception while mapping the values to the bean"
] |
public ForeignkeyDef getForeignkey(String name, String tableName)
{
String realName = (name == null ? "" : name);
ForeignkeyDef def = null;
for (Iterator it = getForeignkeys(); it.hasNext();)
{
def = (ForeignkeyDef)it.next();
if (realName.equals(def.getName()) &&
def.getTableName().equals(tableName))
{
return def;
}
}
return null;
} | [
"Returns the foreignkey to the specified table.\n\n@param name The name of the foreignkey\n@param tableName The name of the referenced table\n@return The foreignkey def or <code>null</code> if it does not exist"
] | [
"Sets the alert sound to be played.\n\nPassing {@code null} disables the notification sound.\n\n@param sound the file name or song name to be played\nwhen receiving the notification\n@return this",
"Term value.\n\n@param term\nthe term\n@return the string",
"Generates timephased actual costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost",
"Get photos from the user's contacts.\n\nThis method requires authentication with 'read' permission.\n\n@param count\nThe number of photos to return\n@param justFriends\nSet to true to only show friends photos\n@param singlePhoto\nSet to true to get a single photo\n@param includeSelf\nSet to true to include self\n@return The Collection of photos\n@throws FlickrException",
"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",
"Calculate the determinant.\n\n@return Determinant.",
"Create a new photoset.\n\n@param title\nThe photoset title\n@param description\nThe photoset description\n@param primaryPhotoId\nThe primary photo id\n@return The new Photset\n@throws FlickrException",
"Creates a color item that represents a color field fond for a track.\n\n@param colorId the key of the color as found in the database\n@param label the corresponding color label as found in the database (or sent in the dbserver message)\n\n@return the color metadata field",
"Create a style from a list of rules.\n\n@param styleRules the rules"
] |
private OJBIterator getRsIteratorFromQuery(Query query, ClassDescriptor cld, RsIteratorFactory factory)
throws PersistenceBrokerException
{
query.setFetchSize(1);
if (query instanceof QueryBySQL)
{
if(logger.isDebugEnabled()) logger.debug("Creating SQL-RsIterator for class ["+cld.getClassNameOfObject()+"]");
return factory.createRsIterator((QueryBySQL) query, cld, this);
}
if (!cld.isExtent() || !query.getWithExtents())
{
// no extents just use the plain vanilla RsIterator
if(logger.isDebugEnabled()) logger.debug("Creating RsIterator for class ["+cld.getClassNameOfObject()+"]");
return factory.createRsIterator(query, cld, this);
}
if(logger.isDebugEnabled()) logger.debug("Creating ChainingIterator for class ["+cld.getClassNameOfObject()+"]");
ChainingIterator chainingIter = new ChainingIterator();
// BRJ: add base class iterator
if (!cld.isInterface())
{
if(logger.isDebugEnabled()) logger.debug("Adding RsIterator for class ["+cld.getClassNameOfObject()+"] to ChainingIterator");
chainingIter.addIterator(factory.createRsIterator(query, cld, this));
}
Iterator extents = getDescriptorRepository().getAllConcreteSubclassDescriptors(cld).iterator();
while (extents.hasNext())
{
ClassDescriptor extCld = (ClassDescriptor) extents.next();
// read same table only once
if (chainingIter.containsIteratorForTable(extCld.getFullTableName()))
{
if(logger.isDebugEnabled()) logger.debug("Skipping class ["+extCld.getClassNameOfObject()+"]");
}
else
{
if(logger.isDebugEnabled()) logger.debug("Adding RsIterator of class ["+extCld.getClassNameOfObject()+"] to ChainingIterator");
// add the iterator to the chaining iterator.
chainingIter.addIterator(factory.createRsIterator(query, extCld, this));
}
}
return chainingIter;
} | [
"Get an extent aware RsIterator based on the Query\n\n@param query\n@param cld\n@param factory the Factory for the RsIterator\n@return OJBIterator"
] | [
"Add new control at the end of control bar with specified touch listener, control label and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param label the control label\n@param listener touch listener",
"Removes the given row.\n\n@param row the row to remove",
"Validate ipv4 address with regular expression\n\n@param ip\naddress for validation\n\n@return true valid ip address, false invalid ip address",
"If you want to stop recorded events from being sent to the server, use this method to set the SDK instance to offline.\nOnce offline, events will be recorded and queued locally but will not be sent to the server until offline is disabled.\nCalling this method again with offline set to false will allow events to be sent to server and the SDK instance will immediately attempt to send events that have been queued while offline.\n\n@param value boolean, true sets the sdk offline, false sets the sdk back online",
"Initializes custom prefix for all junit4 properties. This must be consistent\nacross all junit4 invocations if done from the same classpath. Use only when REALLY needed.",
"Readable yyyyMMdd int representation of a day, which is also sortable.",
"Use this API to enable clusterinstance of given name.",
"Parses the comma delimited address into model nodes.\n\n@param profileName the profile name for the domain or {@code null} if not a domain\n@param inputAddress the address.\n\n@return a collection of the address nodes.",
"Used to determine if the current method should be ignored.\n\n@param name method name\n@return true if the method should be ignored"
] |
public boolean isInBounds(int row, int col) {
return row >= 0 && col >= 0 && row < mat.getNumRows() && col < mat.getNumCols();
} | [
"Returns true of the specified matrix element is valid element inside this matrix.\n\n@param row Row index.\n@param col Column index.\n@return true if it is a valid element in the matrix."
] | [
"Exchanges the final messages which politely report our intention to disconnect from the dbserver.",
"Apply the necessary rotation to the transform so that it is in front of\nthe camera.\n\n@param transform The transform to modify.",
"Removes all items from the list box.",
"Removes the duplicate node list.\n\n@param list\nthe list\n@return the int",
"Runs the shell script for committing and optionally pushing the changes in the module.\n@return exit code of the script.",
"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",
"Passes the Socket's InputStream and OutputStream to the closure. The\nstreams will be closed after the closure returns, even if an exception\nis thrown.\n\n@param socket a Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.2",
"Read leaf tasks attached to the WBS.\n\n@param id initial WBS ID",
"Creates an upload session to create a new version of a file in chunks.\nThis will first verify that the version can be created and then open a session for uploading pieces of the file.\n@param fileSize the size of the file that will be uploaded.\n@return the created upload session instance."
] |
public String urlDecode(String s) {
if (s == null || s.isEmpty()) {
return s;
}
return URL.decodeQueryString(s);
} | [
"URLDecode a string\n@param s\n@return"
] | [
"Use this API to fetch nd6ravariables resource of given name .",
"Returns a matrix of StatisticsMatrix type so that SimpleMatrix functions create matrices\nof the correct type.",
"Compiles the allowable actions for a file or folder.\n\n@param cms the current CMS context\n@param file the resource for which we want the allowable actions\n\n@return the allowable actions for the given resource",
"Get the column name from the indirection table.\n@param mnAlias\n@param path",
"Add a new subsystem to a given registry.\n\n@param registry the registry\n@param name the subsystem name\n@param version the version",
"This method retrieves a double of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required double data",
"Build a Count-Query based on aQuery\n@param aQuery\n@return The count query",
"Use this API to fetch policydataset_value_binding resources of given name .",
"Mark content as obsolete. If content was already marked for obsolescenceTimeout ms then it is removed.\n\n@param ref the content refrence to be marked as obsolete.\n\n@return true if the content refrence is removed, fale otherwise."
] |
@SuppressWarnings("unchecked")
public static <T> void defaultHandleContextMenuForMultiselect(
Table table,
CmsContextMenu menu,
ItemClickEvent event,
List<I_CmsSimpleContextMenuEntry<Collection<T>>> entries) {
if (!event.isCtrlKey() && !event.isShiftKey()) {
if (event.getButton().equals(MouseButton.RIGHT)) {
Collection<T> oldValue = ((Collection<T>)table.getValue());
if (oldValue.isEmpty() || !oldValue.contains(event.getItemId())) {
table.setValue(new HashSet<Object>(Arrays.asList(event.getItemId())));
}
Collection<T> selection = (Collection<T>)table.getValue();
menu.setEntries(entries, selection);
menu.openForTable(event, table);
}
}
} | [
"Simple context menu handler for multi-select tables.\n\n@param table the table\n@param menu the table's context menu\n@param event the click event\n@param entries the context menu entries"
] | [
"Initialize the version properties map from the gradle.properties file, and the additional properties from the\ngradle.properties file.",
"Notifies that an existing header item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.",
"Retrieve the most recent storepoint.\n\n@param phoenixProject project data\n@return Storepoint instance",
"Use this API to fetch all the lbvserver resources that are configured on netscaler.",
"Accessor method to retrieve a Boolean instance.\n\n@param field the index number of the field to be retrieved\n@param falseText locale specific text representing false\n@return the value of the required field",
"Extract a Class from the given Type.",
"Returns a vector from the PCA's basis.\n\n@param which Which component's vector is to be returned.\n@return Vector from the PCA basis.",
"Multiplied a transpose orthogonal matrix Q by the specified rotator. This is used\nto update the U and V matrices. Updating the transpose of the matrix is faster\nsince it only modifies the rows.\n\n\n@param Q Orthogonal matrix\n@param m Coordinate of rotator.\n@param n Coordinate of rotator.\n@param c cosine of rotator.\n@param s sine of rotator.",
"Use this API to fetch all the vrid6 resources that are configured on netscaler."
] |
private void addException(ProjectCalendar mpxjCalendar, net.sf.mpxj.ganttproject.schema.Date date)
{
String year = date.getYear();
if (year == null || year.isEmpty())
{
// In order to process recurring exceptions using MPXJ, we need a start and end date
// to constrain the number of dates we generate.
// May need to pre-process the tasks in order to calculate a start and finish date.
// TODO: handle recurring exceptions
}
else
{
Calendar calendar = DateHelper.popCalendar();
calendar.set(Calendar.YEAR, Integer.parseInt(year));
calendar.set(Calendar.MONTH, NumberHelper.getInt(date.getMonth()));
calendar.set(Calendar.DAY_OF_MONTH, NumberHelper.getInt(date.getDate()));
Date exceptionDate = calendar.getTime();
DateHelper.pushCalendar(calendar);
ProjectCalendarException exception = mpxjCalendar.addCalendarException(exceptionDate, exceptionDate);
// TODO: not sure how NEUTRAL should be handled
if ("WORKING_DAY".equals(date.getType()))
{
exception.addRange(ProjectCalendarWeek.DEFAULT_WORKING_MORNING);
exception.addRange(ProjectCalendarWeek.DEFAULT_WORKING_AFTERNOON);
}
}
} | [
"Add a single exception to a calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param date calendar exception"
] | [
"Stores the gathered usage statistics about term uses by language to a CSV\nfile.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use",
"Process the given batch of files and pass the results back to the listener as each file is processed.",
"Removes all children",
"Get an interpolated value for a given argument x.\n\n@param x The abscissa at which the interpolation should be performed.\n@return The interpolated value (ordinate).",
"Transfer the ownership of an application to another user.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param to Username of the person to transfer the app to. This is usually in the form of \"[email protected]\".",
"Create a text message that will be stored in the database. Must be called inside a transaction.",
"Subtracts vector v1 from v2 and places the result in this vector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector",
"Creates instance of the entity class. This method is called to create the object\ninstances when returning query results.",
"Acquire the exclusive lock allowing the acquisition to be interrupted.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@throws InterruptedException - if the acquiring thread is interrupted.\n@throws IllegalArgumentException if {@code permit} is null."
] |
private void writeResources() throws IOException
{
writeAttributeTypes("resource_types", ResourceField.values());
m_writer.writeStartList("resources");
for (Resource resource : m_projectFile.getResources())
{
writeFields(null, resource, ResourceField.values());
}
m_writer.writeEndList();
} | [
"This method writes resource data to a JSON file."
] | [
"Adds a patch operation.\n@param op the operation type. Must be add, replace, remove, or test.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value to be set.",
"Sets all padding for all cells in the row to the same value.\n@param padding new padding for top, bottom, left, and right, ignored if smaller than 0\n@return this to allow chaining",
"Sets the target translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator",
"If a given x is into an interval of the partition, this method returns the reference point of the corresponding interval.\nIf the given x is not contained in any interval of the partition, this method returns x.\n\n@param x The point of interest.\n@return The discretized value.",
"Set the week day the event should take place.\n@param dayString the day as string.",
"Use this API to fetch authenticationnegotiatepolicy_binding resource of given name .",
"Gets an exception reporting an unexpected XML attribute.\n\n@param reader a reference to the stream reader.\n@param index the attribute index.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.",
"Given an AVRO serializer definition, validates if all the avro schemas\nare valid i.e parseable.\n\n@param avroSerDef",
"Add an index on the given collection and field\n\n@param collection the collection to use for the index\n@param field the field to use for the index\n@param asc the sorting direction. <code>true</code> to sort ascending; <code>false</code> to sort descending\n@param background iff <code>true</code> the index is created in the background"
] |
public PlacesList<Place> placesForUser(int placeType, String woeId, String placeId, String threshold, Date minUploadDate, Date maxUploadDate,
Date minTakenDate, Date maxTakenDate) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
PlacesList<Place> placesList = new PlacesList<Place>();
parameters.put("method", METHOD_PLACES_FOR_USER);
parameters.put("place_type", intPlaceTypeToString(placeType));
if (placeId != null) {
parameters.put("place_id", placeId);
}
if (woeId != null) {
parameters.put("woe_id", woeId);
}
if (threshold != null) {
parameters.put("threshold", threshold);
}
if (minUploadDate != null) {
parameters.put("min_upload_date", Long.toString(minUploadDate.getTime() / 1000L));
}
if (maxUploadDate != null) {
parameters.put("max_upload_date", Long.toString(maxUploadDate.getTime() / 1000L));
}
if (minTakenDate != null) {
parameters.put("min_taken_date", ((DateFormat) SearchParameters.MYSQL_DATE_FORMATS.get()).format(minTakenDate));
}
if (maxTakenDate != null) {
parameters.put("max_taken_date", ((DateFormat) SearchParameters.MYSQL_DATE_FORMATS.get()).format(maxTakenDate));
}
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element placesElement = response.getPayload();
NodeList placesNodes = placesElement.getElementsByTagName("place");
placesList.setPage("1");
placesList.setPages("1");
placesList.setPerPage("" + placesNodes.getLength());
placesList.setTotal("" + placesNodes.getLength());
for (int i = 0; i < placesNodes.getLength(); i++) {
Element placeElement = (Element) placesNodes.item(i);
placesList.add(parsePlace(placeElement));
}
return placesList;
} | [
"Return a list of the top 100 unique places clustered by a given placetype for a user.\n\n@param placeType\nUse Type-constants at {@link Place}\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null.\n@param placeId\nA Flickr Places ID. Optional, can be null.\n@param threshold\nThe minimum number of photos that a place type must have to be included. If the number of photos is lowered then the parent place type for\nthat place will be used. Optional, can be null.\n@param minUploadDate\nOptional, can be null.\n@param maxUploadDate\nOptional, can be null.\n@param minTakenDate\nOptional, can be null.\n@param maxTakenDate\nOptional, can be null.\n@return A PlacesList\n@throws FlickrException"
] | [
"Convenience method dispatches the specified event to the source appender,\nwhich will result in the custom event data being appended to the new file.\n\n@param customLoggingEvent\nThe custom Log4J event to be appended.",
"This method retrieves ONLY the ROOT actions",
"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",
"Computes the product of the diagonal elements. For a diagonal or triangular\nmatrix this is the determinant.\n\n@param T A matrix.\n@return product of the diagonal elements.",
"Builds the table for the database results.\n\n@param results the database results\n@return the table",
"Obtains a Symmetry454 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry454 local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Returns an integer array that contains the default values for all the\ntexture parameters.\n\n@return an integer array that contains the default values for all the\ntexture parameters.",
"Return the numeric distance value in degrees.\n\n@return the degrees",
"If you have priorities based on enums, this is the recommended prioritizer to use as it will prevent\nstarvation of low priority items\n\n@param groupClass\n@return"
] |
protected void destroyConnection(ConnectionHandle conn) {
postDestroyConnection(conn);
conn.setInReplayMode(true); // we're dead, stop attempting to replay anything
try {
conn.internalClose();
} catch (SQLException e) {
logger.error("Error in attempting to close connection", e);
}
} | [
"Physically close off the internal connection.\n@param conn"
] | [
"Determines the prefix of an accessor method based on an accessor method name.\n\n@param methodName\nan accessor method name\n@return the resulting prefix",
"Determine if a job name and job type are valid.\n@param jobName the name of the job\n@param jobType the class of the job\n@throws IllegalArgumentException if the name or type are invalid",
"Scans the given token global token stream for a list of sub-token\nstreams representing those portions of the global stream that\nmay contain date time information\n\n@param stream\n@return",
"Obtains a Ethiopic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Get a property as a string or throw an exception.\n\n@param key the property name",
"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",
"Checks if is single position prefix.\n\n@param fieldInfo\nthe field info\n@param prefix\nthe prefix\n@return true, if is single position prefix\n@throws IOException\nSignals that an I/O exception has occurred.",
"Consumes the version field from the given input and raises an exception if the record is in a newer version,\nwritten by a newer version of Hibernate OGM.\n\n@param input the input to read from\n@param supportedVersion the type version supported by this version of OGM\n@param externalizedType the type to be unmarshalled\n\n@throws IOException if an error occurs while reading the input",
"Permanently close the ClientRequestExecutor pool. Resources subsequently\nchecked in will be destroyed."
] |
public String getOriginalValue(ParsedCommandLine parsedLine, boolean required) throws CommandFormatException {
String value = null;
if(parsedLine.hasProperties()) {
if(index >= 0) {
List<String> others = parsedLine.getOtherProperties();
if(others.size() > index) {
return others.get(index);
}
}
value = parsedLine.getPropertyValue(fullName);
if(value == null && shortName != null) {
value = parsedLine.getPropertyValue(shortName);
}
}
if(required && value == null && !isPresent(parsedLine)) {
StringBuilder buf = new StringBuilder();
buf.append("Required argument ");
buf.append('\'').append(fullName).append('\'');
buf.append(" is missing.");
throw new CommandFormatException(buf.toString());
}
return value;
} | [
"Returns value as it appeared on the command line with escape sequences\nand system properties not resolved. The variables, though, are resolved\nduring the initial parsing of the command line.\n\n@param parsedLine parsed command line\n@param required whether the argument is required\n@return argument value as it appears on the command line\n@throws CommandFormatException in case the required argument is missing"
] | [
"Convert an Object to a Date, without an Exception",
"replaces the old with the new item. The new item will not be added when the old one is not\nfound.\n\n@param oldObject will be removed\n@param newObject is added only when hte old item is removed",
"Use this API to fetch all the nsdiameter resources that are configured on netscaler.",
"Takes an HTML file, looks for the first instance of the specified insertion point, and\ninserts the diagram image reference and a client side map in that point.",
"Make superclasses method protected??",
"Set the week of month.\n@param weekOfMonthStr the week of month to set.",
"Updates the R matrix to take in account the removed row.",
"Use this API to fetch lbvserver_auditnslogpolicy_binding resources of given name .",
"Use this API to enable clusterinstance resources of given names."
] |
public final void visitChildren(final Visitor visitor)
{
for (final DiffNode child : children.values())
{
try
{
child.visit(visitor);
}
catch (final StopVisitationException e)
{
return;
}
}
} | [
"Visit all child nodes but not this one.\n\n@param visitor The visitor to use."
] | [
"Patch provided by Avril Kotzen ([email protected])\nDB2 handles TINYINT (for mapping a byte).",
"Add SQL to handle a unique=true field. THis is not for uniqueCombo=true.",
"Convert a field value to something suitable to be stored in the database.",
"Access the customInfo of a message using this accessor. The CustomInfo\nmap will be automatically created and stored in the event if it is not yet present\n\n@param message\n@return",
"Adds a variable to the end of the token list\n@param variable Variable which is to be added\n@return The new Token created around variable",
"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",
"Calculates the local translation and rotation for a bone.\nAssumes WorldRot and WorldPos have been calculated for the bone.",
"Does not mutate the TestMatrix.\nVerifies that the test matrix contains all the required tests and that\neach required test is valid.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@param requiredTests a {@link Map} of required test. The {@link TestSpecification} would be verified\n@param functionMapper a given el {@link FunctionMapper}\n@param providedContext a {@link Map} containing variables describing the context in which the request is executing. These will be supplied to verifying all rules.\n@param dynamicTests a {@link Set} of dynamic tests determined by filters.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test.",
"Either a single file extension or a comma-separated list of extensions for which the language\nshall be registered."
] |
public static TaskField getMpxjField(int value)
{
TaskField result = null;
if (value >= 0 && value < MPX_MPXJ_ARRAY.length)
{
result = MPX_MPXJ_ARRAY[value];
}
return (result);
} | [
"Retrieve an instance of the TaskField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return TaskField instance"
] | [
"Gets a color formatted as an integer with ARGB ordering.\n\n@param json {@link JSONObject} to get the color from\n@param elementName Name of the color element\n@return An ARGB formatted integer\n@throws JSONException",
"Use this API to unset the properties of nsrpcnode resources.\nProperties that need to be unset are specified in args array.",
"Registers the deployment resources needed.\n\n@param deploymentResourceSupport the deployment resource support\n@param service the service, which may be {@code null}, used to find the resource names that need to be registered",
"Return all valid maturities for a given moneyness.\nUses the fixing times of the fix schedule to determine fractions.\n\n@param moneyness The moneyness as actual offset from par swap rate for which to get the maturities.\n@return The maturities as year fraction from reference date.",
"Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master.",
"Send a get artifacts request\n\n@param hasLicense\n@return list of artifact\n@throws GrapesCommunicationException",
"Processes text as a FreeMarker template. Usually used to process an inner body of a tag.\n\n@param text text of a template.\n@param params map with parameters for processing.\n@param writer writer to write output to.",
"Gets all checked widget indexes in the group. The indexes are counted from 0 to size -1,\nwhere size is the number of Checkable widgets in the group. It does not take into account\nany non-Checkable widgets added to the group widget.\n\n@return list of checked widget indexes",
"Whether this association contains no rows.\n\n@return {@code true} if this association contains no rows, {@code false} otherwise"
] |
public void abort()
{
/*
do nothing if already rolledback
*/
if (txStatus == Status.STATUS_NO_TRANSACTION
|| txStatus == Status.STATUS_UNKNOWN
|| txStatus == Status.STATUS_ROLLEDBACK)
{
log.info("Nothing to abort, tx is not active - status is " + TxUtil.getStatusString(txStatus));
return;
}
// check status of tx
if (txStatus != Status.STATUS_ACTIVE && txStatus != Status.STATUS_PREPARED &&
txStatus != Status.STATUS_MARKED_ROLLBACK)
{
throw new IllegalStateException("Illegal state for abort call, state was '" + TxUtil.getStatusString(txStatus) + "'");
}
if(log.isEnabledFor(Logger.INFO))
{
log.info("Abort transaction was called on tx " + this);
}
try
{
try
{
doAbort();
}
catch(Exception e)
{
log.error("Error while abort transaction, will be skipped", e);
}
// used in managed environments, ignored in non-managed
this.implementation.getTxManager().abortExternalTx(this);
try
{
if(hasBroker() && getBroker().isInTransaction())
{
getBroker().abortTransaction();
}
}
catch(Exception e)
{
log.error("Error while do abort used broker instance, will be skipped", e);
}
}
finally
{
txStatus = Status.STATUS_ROLLEDBACK;
// cleanup things, e.g. release all locks
doClose();
}
} | [
"Abort and close the transaction. Calling abort abandons all persistent\nobject modifications and releases the associated locks. Aborting a\ntransaction does not restore the state of modified transient objects"
] | [
"returns array with length 3 and optional entries version, encoding, standalone",
"Extract data for a single resource.\n\n@param row Synchro resource data",
"Gets the value of the callout property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the callout property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetCallout().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link Callouts.Callout }",
"Transposes an individual block inside a block matrix.",
"Add the string representation of the given object to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param object\nthe appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.",
"Get all parameter keys.\n@return a set of parameter keys",
"Update the state of the picker. If it has an owner, the picker\nwill use that object to derive its position and orientation.\nThe \"active\" state of this controller is used to indicate touch.\nThe cursor position is updated after picking.",
"Use this API to fetch all the nslimitselector resources that are configured on netscaler.",
"Closes the outbound socket binding connection.\n\n@throws IOException"
] |
public String addComment(String photosetId, String commentText) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_ADD_COMMENT);
parameters.put("photoset_id", photosetId);
parameters.put("comment_text", commentText);
// Note: This method requires an HTTP POST request.
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
// response:
// <comment id="97777-12492-72057594037942601" />
Element commentElement = response.getPayload();
return commentElement.getAttribute("id");
} | [
"Add a comment to a photoset. This method requires authentication with 'write' permission.\n\n@param photosetId\nThe id of the photoset to add a comment to.\n@param commentText\nText of the comment\n@return the comment id\n@throws FlickrException"
] | [
"This method retrieves the offset of a given entry in the Var2Data block.\nEach entry can be uniquely located by the identifier of the object to\nwhich the data belongs, and the type of the data.\n\n@param id unique identifier of an entity\n@param type data type identifier\n@return offset of requested item",
"Add server redirect to a profile\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@param groupId group ID\n@return ID of added ServerRedirect\n@throws Exception exception",
"Create a text message that will be stored in the database. Must be called inside a transaction.",
"Generate debug dump of the tree from the scene object.\nIt should include a newline character at the end.\n\n@param sb the {@code StringBuffer} to dump the object.\n@param indent indentation level as number of spaces.",
"Overloads the left shift operator to provide an easy way to append multiple\nobjects as string representations to a String.\n\n@param self a String\n@param value an Object\n@return a StringBuffer built from this string\n@since 1.0",
"returns the bytesize of the give bitmap",
"Registers annotations which will be considered as bean defining annotations.\n\nNOTE - If used along with {@code <trim/>} bean archives and/or with Weld configuration key\n{@code org.jboss.weld.bootstrap.vetoTypesWithoutBeanDefiningAnnotation}, these annotations will be ignored.\n\n@param annotations annotations which will be considered as Bean Defining Annotations.\n@return self",
"Abort an active extern transaction associated with the given PB.",
"Sets the character translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator\n@return this to allow chaining"
] |
public static boolean isClosureDeclaration(ASTNode expression) {
if (expression instanceof DeclarationExpression) {
if (((DeclarationExpression) expression).getRightExpression() instanceof ClosureExpression) {
return true;
}
}
if (expression instanceof FieldNode) {
ClassNode type = ((FieldNode) expression).getType();
if (AstUtil.classNodeImplementsType(type, Closure.class)) {
return true;
} else if (((FieldNode) expression).getInitialValueExpression() instanceof ClosureExpression) {
return true;
}
}
return false;
} | [
"Returns true if the ASTNode is a declaration of a closure, either as a declaration\nor a field.\n@param expression\nthe target expression\n@return\nas described"
] | [
"Fetch the latest versions for cluster metadata",
"Adds a path to the request response table with the specified values\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param pathId ID of path\n@throws Exception exception",
"Validates the input parameters.",
"Forceful cleanup the logs",
"Format the date for the status messages.\n\n@param date the date to format.\n\n@return the formatted date.",
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler.",
"Read the calendar data from a Gantt Designer file.\n\n@param gantt Gantt Designer file.",
"Checks the initialization-method of given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Lift a Java Func4 to a Scala Function4\n\n@param f the function to lift\n\n@returns the Scala function"
] |
@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)"
] | [
"Return a set of all the Declaration matching the DeclarationFilter of the.\nLinker.\n\n@return a set of all the Declaration matching the DeclarationFilter of the\nLinker.",
"Generate the next permutation and return a list containing\nthe elements in the appropriate order.\n@see #nextPermutationAsList(java.util.List)\n@see #nextPermutationAsArray()\n@return The next permutation as a list.",
"Callback when each frame in the indicator animation should be drawn.",
"Returns an entry of kind snippet with the given proposal and label and the prefix from the context, or null if the proposal is not valid.\n@since 2.16",
"Set whether the player holding the waveform is playing, which changes the indicator color to white from red.\nThis method can only be used in situations where the component is tied to a single player, and therefore has\na single playback position.\n\n@param playing if {@code true}, draw the position marker in white, otherwise red\n\n@see #setPlaybackState",
"Loads the configuration from file \"OBJ.properties\". If the system\nproperty \"OJB.properties\" is set, then the configuration in that file is\nloaded. Otherwise, the file \"OJB.properties\" is tried. If that is also\nunsuccessful, then the configuration is filled with default values.",
"Formats a date or a time according to the local conventions.\n\nSince ReadablePartials don't support all fields, we fill in any blanks\nneeded for formatting by using the epoch (1970-01-01T00:00:00Z).\n\nSee {@link android.text.format.DateUtils#formatDateTime} for full docs.\n\n@param context the context is required only if the time is shown\n@param time a point in time\n@param flags a bit mask of formatting options\n@return a string containing the formatted date/time.",
"This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset to position 0 before\ncalling this method and the caller must reset it after the call\nreturns\n@return True if the buffer holds a complete request, false otherwise",
"Aliases variables with an unknown type.\n@param variable The variable being aliased\n@param name Name of the variable"
] |
List<File> getRecursiveThriftFiles(MavenProject project, String outputDirectory, List<File> files) throws IOException {
HashFunction hashFun = Hashing.md5();
File dir = new File(new File(project.getFile().getParent(), "target"), outputDirectory);
if (dir.exists()) {
URI baseDir = getFileURI(dir);
for (File f : findThriftFilesInDirectory(dir)) {
URI fileURI = getFileURI(f);
String relPath = baseDir.relativize(fileURI).getPath();
File destFolder = getResourcesOutputDirectory();
destFolder.mkdirs();
File destFile = new File(destFolder, relPath);
if (!destFile.exists() || (destFile.isFile() && !Files.hash(f, hashFun).equals(Files.hash(destFile, hashFun)))) {
getLog().info(format("copying %s to %s", f.getCanonicalPath(), destFile.getCanonicalPath()));
copyFile(f, destFile);
}
files.add(destFile);
}
}
Map<String, MavenProject> refs = project.getProjectReferences();
for (String name : refs.keySet()) {
getRecursiveThriftFiles(refs.get(name), outputDirectory, files);
}
return files;
} | [
"Walk project references recursively, adding thrift files to the provided list."
] | [
"Removes a metadata provider so it will no longer be consulted to provide metadata for tracks loaded from any\nmedia.\n\n@param provider the metadata provider to remove.",
"Stores a public key mapping.\n@param original\n@param substitute",
"Set the parent from which this week is derived.\n\n@param parent parent week",
"Lookup the Gallery for the specified ID.\n\n@param galleryId\nThe user profile URL\n@return The Gallery\n@throws FlickrException",
"This method writes task data to a Planner file.\n\n@throws JAXBException on xml creation errors",
"Apply a filter to the list of all tasks, and show the results.\n\n@param project project file\n@param filter filter",
"Sets the specified float attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Serialize specified object to directory with specified name. Given output stream will be closed.\n\n@param obj object to serialize\n@return number of bytes written to directory",
"For the given service name return list of endpoint references currently\nregistered at the service locator server endpoints.\n\n@param serviceName\nthe name of the service for which to get the endpoints, must\nnot be <code>null</code>\n@return EndpointReferenceListType encapsulate list of endpoint references\nor <code>null</code>"
] |
private ProjectFile readDatabaseFile(InputStream inputStream) throws MPXJException
{
ProjectReader reader = new AstaDatabaseFileReader();
addListeners(reader);
return reader.read(inputStream);
} | [
"Process a SQLite database PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance"
] | [
"Complete both operations and commands.",
"Use this API to fetch all the nsconfig resources that are configured on netscaler.",
"map a property id. Property id can only be an Integer or String",
"Divide two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the divide of specified complex numbers.",
"Initialize the pattern choice button group.",
"Validates that this string is a valid host name or IP address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws HostNameException",
"Serialize the object JSON. When an error occures return a string with the given error.",
"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",
"Returns the real key object."
] |
private void populateProjectHeader(Record record, ProjectProperties properties) throws MPXJException
{
properties.setProjectTitle(record.getString(0));
properties.setCompany(record.getString(1));
properties.setManager(record.getString(2));
properties.setDefaultCalendarName(record.getString(3));
properties.setStartDate(record.getDateTime(4));
properties.setFinishDate(record.getDateTime(5));
properties.setScheduleFrom(record.getScheduleFrom(6));
properties.setCurrentDate(record.getDateTime(7));
properties.setComments(record.getString(8));
properties.setCost(record.getCurrency(9));
properties.setBaselineCost(record.getCurrency(10));
properties.setActualCost(record.getCurrency(11));
properties.setWork(record.getDuration(12));
properties.setBaselineWork(record.getDuration(13));
properties.setActualWork(record.getDuration(14));
properties.setWork2(record.getPercentage(15));
properties.setDuration(record.getDuration(16));
properties.setBaselineDuration(record.getDuration(17));
properties.setActualDuration(record.getDuration(18));
properties.setPercentageComplete(record.getPercentage(19));
properties.setBaselineStart(record.getDateTime(20));
properties.setBaselineFinish(record.getDateTime(21));
properties.setActualStart(record.getDateTime(22));
properties.setActualFinish(record.getDateTime(23));
properties.setStartVariance(record.getDuration(24));
properties.setFinishVariance(record.getDuration(25));
properties.setSubject(record.getString(26));
properties.setAuthor(record.getString(27));
properties.setKeywords(record.getString(28));
} | [
"Populates the project header.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException"
] | [
"Read an individual GanttProject resource assignment.\n\n@param gpAllocation GanttProject resource assignment.",
"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.",
"This method writes extended attribute data for a resource.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource",
"Add an executable \"post-run\" dependent for this model.\n\n@param executable the executable \"post-run\" dependent\n@return the key to be used as parameter to taskResult(string) method to retrieve result of executing\nthe executable \"post-run\" dependent",
"Add an index on the given collection and field\n\n@param collection the collection to use for the index\n@param field the field to use for the index\n@param asc the sorting direction. <code>true</code> to sort ascending; <code>false</code> to sort descending\n@param background iff <code>true</code> the index is created in the background",
"Print the given values after displaying the provided message.",
"Obtain the profile identifier.\n\n@param profileIdentifier Can be profile ID, or friendly name\n@return\n@throws Exception",
"Creates a copy of a matrix but swaps the rows as specified by the order array.\n\n@param order Specifies which row in the dest corresponds to a row in the src. Not modified.\n@param src The original matrix. Not modified.\n@param dst A Matrix that is a row swapped copy of src. Modified.",
"Set value for given object field.\n\n@param object object to be updated\n@param field field name\n@param value field value\n\n@throws NoSuchMethodException if property writer is not available\n@throws InvocationTargetException if property writer throws an exception\n@throws IllegalAccessException if property writer is inaccessible"
] |
public <T> T get(String key, Class<T> type) {
Object value = this.data.get(key);
if (value != null && type.isAssignableFrom(value.getClass())) {
return (T) value;
}
return null;
} | [
"Access an attribute.\n\n@param type the attribute's type, not {@code null}\n@param key the attribute's key, not {@code null}\n@return the attribute value, or {@code null}."
] | [
"static lifecycle callbacks",
"Creates the full sentence.\n\n@return the mtas CQL parser sentence condition\n@throws ParseException the parse exception",
"Sets the bootstrap URLs used by the different Fat clients inside the\nCoordinator\n\n@param bootstrapUrls list of bootstrap URLs defining which cluster to\nconnect to\n@return modified CoordinatorConfig",
"Get all info for the specified photo.\n\nThe calling user must have permission to view the photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo Id\n@param secret\nThe optional secret String\n@return The Photo\n@throws FlickrException",
"Time since last time the store was swapped\n\n@return Time in milliseconds since the store was swapped",
"Converts a boolean array containing the pixel data in BINARY mode to an\ninteger array with the pixel data in RGB mode.\n\n@param binaryArray pixel binary data\n@return pixel integer data in RGB mode.",
"Get bean manager from portlet context.\n\n@param ctx the portlet context\n@return bean manager if found",
"Adds a classpath source which contains the given resource.\n\nTODO: [GH-213] this is extremely ugly; separate the code required to run on the\nforked JVM into an isolated bundle and either create it on-demand (in temp.\nfiles location?) or locate it in classpath somehow (in a portable way).",
"Updates the statements of the item document identified by the given item\nid. The updates are computed with respect to the current data found\nonline, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged.\n\n@param itemIdValue\nid of the document to be updated\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are IO problems, such as missing network connection"
] |
private void handleSendDataResponse(SerialMessage incomingMessage) {
logger.trace("Handle Message Send Data Response");
if(incomingMessage.getMessageBuffer()[2] != 0x00)
logger.debug("Sent Data successfully placed on stack.");
else
logger.error("Sent Data was not placed on stack due to error.");
} | [
"Handles the response of the SendData request.\n@param incomingMessage the response message to process."
] | [
"Returns the result of the performed spellcheck formatted in JSON.\n\n@param request The CmsSpellcheckingRequest.\n@return JSONObject that contains the result of the performed spellcheck.",
"Convert the server side feature to a DTO feature that can be sent to the client.\n\n@param feature\nThe server-side feature representation.\n@param featureIncludes\nIndicate which aspects of the should be included see {@link VectorLayerService}\n@return Returns the DTO feature.",
"A fairly basic 5-way classifier, that notes digits, and upper\nand lower case, mixed, and non-alphanumeric.\n\n@param s String to find word shape of\n@return Its word shape: a 5 way classification",
"Use this API to unset the properties of nsdiameter resource.\nProperties that need to be unset are specified in args array.",
"Remove any overrides for an endpoint\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise",
"Merge two maps of configuration properties. If the original contains a mapping for the same key, the new mapping is ignored.\n\n@param original\n@param toMerge",
"In the case where the prefix sits at a segment boundary, and the prefix sequence is null - null - 0, this changes to prefix sequence of null - x - 0, where x is segment bit length.\n\nNote: We allow both [null, null, 0] and [null, x, 0] where x is segment length. However, to avoid inconsistencies when doing segment replacements,\nand when getting subsections, in the calling constructor we normalize [null, null, 0] to become [null, x, 0].\nWe need to support [null, x, 0] so that we can create subsections and full addresses ending with [null, x] where x is bit length.\nSo we defer to that when constructing addresses and sections.\nAlso note that in our append/appendNetowrk/insert/replace we have special handling for cases like inserting [null] into [null, 8, 0] at index 2.\nThe straight replace would give [null, 8, null, 0] which is wrong.\nIn that code we end up with [null, null, 8, 0] by doing a special trick:\nWe remove the end of [null, 8, 0] and do an append [null, 0] and we'd remove prefix from [null, 8] to get [null, null] and then we'd do another append to get [null, null, null, 0]\nThe final step is this normalization here that gives [null, null, 8, 0]\n\nHowever, when users construct AddressDivisionGrouping or IPAddressDivisionGrouping, either one is allowed: [null, null, 0] and [null, x, 0].\nSince those objects cannot be further subdivided with getSection/getNetworkSection/getHostSection or grown with appended/inserted/replaced,\nthere are no inconsistencies introduced, we are simply more user-friendly.\nAlso note that normalization of AddressDivisionGrouping or IPAddressDivisionGrouping is really not possible without the address creator objects we use for addresses and sections,\nthat allow us to recreate new segments of the correct type.\n\n@param sectionPrefixBits\n@param segments\n@param segmentBitCount\n@param segmentByteCount\n@param segProducer",
"Helper method to send message on outputStream and account for network\ntime stats.\n\n@param outputStream\n@param message\n@throws IOException",
"Return the area polygon as the only feature in the feature collection.\n\n@param mapAttributes the attributes that this aoi is part of."
] |
public History getHistoryForID(int id) {
History history = null;
PreparedStatement query = null;
ResultSet results = null;
try (Connection sqlConnection = sqlService.getConnection()) {
query = sqlConnection.prepareStatement("SELECT * FROM " + Constants.DB_TABLE_HISTORY +
" WHERE " + Constants.GENERIC_ID + "=?");
query.setInt(1, id);
logger.info("Query: {}", query.toString());
results = query.executeQuery();
if (results.next()) {
history = historyFromSQLResult(results, true, ScriptService.getInstance().getScripts(Constants.SCRIPT_TYPE_HISTORY));
}
query.close();
} catch (Exception e) {
} finally {
try {
if (results != null) {
results.close();
}
} catch (Exception e) {
}
try {
if (query != null) {
query.close();
}
} catch (Exception e) {
}
}
return history;
} | [
"Get history for a specific database ID\n\n@param id ID of history entry\n@return History entry"
] | [
"checkpoint the transaction",
"Use this API to fetch dnspolicylabel resource of given name .",
"decodes the uriFragment\n\n@param res the resource that contains the feature holder\n@param uriFragment the fragment that should be decoded\n@return the decoded information\n@see LazyURIEncoder#encode(EObject, EReference, INode)",
"Returns a row matrix which contains all the elements in A which are flagged as true in 'marked'\n\n@param A Input matrix\n@param marked Input matrix marking elements in A\n@param output Storage for output row vector. Can be null. Will be reshaped.\n@return Row vector with marked elements",
"Output the SQL type for the default value for the type.",
"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",
"append multi clickable SpecialUnit or String\n\n@param specialClickableUnit SpecialClickableUnit\n@param specialUnitOrStrings Unit Or String\n@return",
"Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected",
"Set the face to be culled\n\n@param cullFace\n{@code GVRCullFaceEnum.Back} Tells Graphics API to discard\nback faces, {@code GVRCullFaceEnum.Front} Tells Graphics API\nto discard front faces, {@code GVRCullFaceEnum.None} Tells\nGraphics API to not discard any face\n@param passIndex\nThe rendering pass to set cull face state"
] |
public static base_responses delete(nitro_service client, route6 resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
route6 deleteresources[] = new route6[resources.length];
for (int i=0;i<resources.length;i++){
deleteresources[i] = new route6();
deleteresources[i].network = resources[i].network;
deleteresources[i].gateway = resources[i].gateway;
deleteresources[i].vlan = resources[i].vlan;
deleteresources[i].td = resources[i].td;
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | [
"Use this API to delete route6 resources."
] | [
"Returns the response error stream, handling the case when it contains gzipped data.\n@return gzip decoded (if needed) error stream or null",
"Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value.",
"Retrieve the default mapping between MPXJ resource fields and Primavera resource field names.\n\n@return mapping",
"Generic method to extract Primavera fields and assign to MPXJ fields.\n\n@param map map of MPXJ field types and Primavera field names\n@param row Primavera data container\n@param container MPXJ data contain",
"The Baseline Duration field shows the original span of time planned\nto complete a task.\n\n@return - duration string",
"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)",
"Shuts down the server. Active connections are not affected.",
"Use this API to fetch Interface resource of given name .",
"Static factory method.\n\n@param targetVariable\nthe variable to find the effective {@code putfield} or\n{@code putstatic} instruction for.\n@param controlFlowBlocks\nall control flow blocks of an initialising constructor or\nmethod.\n@return a new instance of this class."
] |
public static String confSetName() {
String profile = SysProps.get(AppConfigKey.PROFILE.key());
if (S.blank(profile)) {
profile = Act.mode().name().toLowerCase();
}
return profile;
} | [
"Return the name of the current conf set\n@return the conf set name"
] | [
"From three tagNames, if one is under sectorTag and one under rowTag, returns the remaining one, which is supposedly the a box label. Otherwise,\nreturns null.",
"Returns the screen height in pixels\n\n@param context is the context to get the resources\n@return the screen height in pixels",
"Sets the specified integer attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"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",
"Get a unique reference to a place where a track is currently loaded in a player.\n\n@param player the player in which the track is loaded\n@param hotCue hot cue number in which the track is loaded, or 0 if it is actively loaded on the playback deck\n\n@return the instance that will always represent a reference to the specified player and hot cue",
"Append the text supplied by the Writer at the end of the File, using a specified encoding.\n\n@param file a File\n@param writer the Writer supplying the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 2.3",
"Returns any events for the given resource ID since the last sync token\n\n@param resource Globally unique identifier for the resource.\n@param sync Sync token provided by a previous call to the events API\n@return Request object",
"Use this API to add dospolicy resources.",
"Creates a new Collaboration Whitelist for a domain.\n@param api the API connection to be used by the resource.\n@param domain the domain to be added to a collaboration whitelist for a Box Enterprise.\n@param direction an enum representing the direction of the collaboration whitelist. Can be set to\ninbound, outbound, or both.\n@return information about the collaboration whitelist created."
] |
@SuppressWarnings("deprecation")
public static boolean dateTimeEquals(java.util.Date d1, java.util.Date d2) {
if (d1 == null || d2 == null) {
return false;
}
return d1.getDate() == d2.getDate()
&& d1.getMonth() == d2.getMonth()
&& d1.getYear() == d2.getYear()
&& d1.getHours() == d2.getHours()
&& d1.getMinutes() == d2.getMinutes()
&& d1.getSeconds() == d2.getSeconds();
} | [
"Checks the second, hour, month, day, month and year are equal."
] | [
"Return the item view type used by the adapter to implement recycle mechanism.\n\n@param content to be rendered.\n@return an integer that represents the renderer inside the adapter.",
"Copy the contents of the given byte array to the given OutputStream.\nLeaves the stream open when done.\n@param in the byte array to copy from\n@param out the OutputStream to copy to\n@throws IOException in case of I/O errors",
"Use this API to save nsconfig.",
"Create a HashSet with the given initial values.\n\n@param values The values\n@param <T> The type.",
"Assign FK value to target object by reading PK values of referenced object.\n\n@param targetObject real (non-proxy) target object\n@param cld {@link ClassDescriptor} of the real target object\n@param rds An {@link ObjectReferenceDescriptor} or {@link CollectionDescriptor}\nassociated with the real object.\n@param referencedObject referenced object or proxy\n@param insert Show if \"linking\" is done while insert or update.",
"Use this API to unset the properties of nsacl6 resource.\nProperties that need to be unset are specified in args array.",
"Backup the current version of the configuration to the versioned configuration history",
"Use this API to add dnspolicylabel resources.",
"Creates the request.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception"
] |
@Override
public boolean deleteObject(GcsFilename filename, long timeoutMillis) throws IOException {
HTTPRequest req = makeRequest(filename, null, DELETE, timeoutMillis);
HTTPResponse resp;
try {
resp = urlfetch.fetch(req);
} catch (IOException e) {
throw createIOException(new HTTPRequestInfo(req), e);
}
switch (resp.getResponseCode()) {
case 204:
return true;
case 404:
return false;
default:
throw HttpErrorHandler.error(new HTTPRequestInfo(req), resp);
}
} | [
"True if deleted, false if not found."
] | [
"Check to see whether a packet starts with the standard header bytes, followed by a known byte identifying it.\nIf so, return the kind of packet that has been recognized.\n\n@param packet a packet that has just been received\n@param port the port on which the packet has been received\n\n@return the type of packet that was recognized, or {@code null} if the packet was not recognized",
"Removes CRs but returns LFs",
"Append the text at the end of the Path.\n\n@param self a Path\n@param text the text to append at the end of the Path\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0",
"Use this API to fetch systemsession resources of given names .",
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler.",
"Adds a command class to the list of supported command classes by this\nendpoint. Does nothing if command class is already added.\n@param commandClass the command class instance to add.",
"Main method of RendererAdapter. This method has the responsibility of update the\nRendererBuilder values and create or recycle a new Renderer. Once the renderer has been\nobtained the RendereBuilder will call the render method in the renderer and will return the\nRenderer root view to the ListView.\n\nIf rRendererBuilder returns a null Renderer this method will throw a\nNullRendererBuiltException.\n\n@param position to render.\n@param convertView to use to recycle.\n@param parent used to inflate views.\n@return view rendered.",
"Counts the packages prefixes appearing in this project and if some of them make more than half of the total of existing packages, this prefix\nis returned. Otherwise, returns null.\n\nThis is just a helper, it isn't something really hard-setting the package. It's something to use if the user didn't specify using\n--mavenize.groupId, and the archive or project name is something insane, like few sencences paragraph (a description) or a number or such.",
"Returns iban length for the specified country.\n\n@param countryCode {@link org.iban4j.CountryCode}\n@return the length of the iban for the specified country."
] |
@Override
@SuppressFBWarnings(value = "UL_UNRELEASED_LOCK", justification = "False positive from FindBugs")
public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContext) {
if (!isActive()) {
throw new ContextNotActiveException();
}
checkContextInitialized();
final BeanStore beanStore = getBeanStore();
if (beanStore == null) {
return null;
}
if (contextual == null) {
throw ContextLogger.LOG.contextualIsNull();
}
BeanIdentifier id = getId(contextual);
ContextualInstance<T> beanInstance = beanStore.get(id);
if (beanInstance != null) {
return beanInstance.getInstance();
} else if (creationalContext != null) {
LockedBean lock = null;
try {
if (multithreaded) {
lock = beanStore.lock(id);
beanInstance = beanStore.get(id);
if (beanInstance != null) {
return beanInstance.getInstance();
}
}
T instance = contextual.create(creationalContext);
if (instance != null) {
beanInstance = new SerializableContextualInstanceImpl<Contextual<T>, T>(contextual, instance, creationalContext, serviceRegistry.get(ContextualStore.class));
beanStore.put(id, beanInstance);
}
return instance;
} finally {
if (lock != null) {
lock.unlock();
}
}
} else {
return null;
}
} | [
"Get the bean if it exists in the contexts.\n\n@return An instance of the bean\n@throws ContextNotActiveException if the context is not active\n@see javax.enterprise.context.spi.Context#get(BaseBean, boolean)"
] | [
"Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class",
"Split string content into list, ignoring matches of the pattern\n@param content String content\n@param ignorePattern Pattern to ignore\n@return list",
"Use this API to fetch dnsnsecrec resource of given name .",
"This method retrieves a byte array of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return byte array containing required data",
"Retrieves a constant value.\n\n@param type field type\n@param block criteria data block\n@return constant value",
"Collection of JRVariable\n\n@param variables\n@return",
"Gets container with alls groups of a certain user.\n\n@param cms cmsobject\n@param user to find groups for\n@param caption caption property\n@param iconProp property\n@param ou ou\n@param propStatus status property\n@param iconProvider the icon provider\n@return Indexed Container",
"Get a list of layer digests from docker manifest.\n\n@param manifestContent\n@return\n@throws IOException",
"Use this API to add onlinkipv6prefix resources."
] |
private String normalizePath(String scriptPath) {
StringBuilder builder = new StringBuilder(scriptPath.length() + 1);
if (scriptPath.startsWith("/")) {
builder.append(scriptPath.substring(1));
} else {
builder.append(scriptPath);
}
if (!scriptPath.endsWith("/")) {
builder.append("/");
}
return builder.toString();
} | [
"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"
] | [
"Delete old jobs.\n\n@param checkTimeThreshold threshold for last check time\n@return the number of jobs deleted",
"This method is used to configure the format pattern.\n\n@param patterns new format patterns",
"Gets an iterable of all the collections for the given user.\n@param api the API connection to be used when retrieving the collections.\n@return an iterable containing info about all the collections.",
"Stops the background stream thread.",
"Convenience method to allow a cause. Grrrr.",
"Sets the columns width by reading some report options like the\nprintableArea and useFullPageWidth.\ncolumns with fixedWidth property set in TRUE will not be modified",
"Determines if a point is inside a box.",
"Use this API to add policydataset.",
"Shuts down a standalone server.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server"
] |
private void highlightSlice(PieModel _Slice) {
int color = _Slice.getColor();
_Slice.setHighlightedColor(Color.argb(
0xff,
Math.min((int) (mHighlightStrength * (float) Color.red(color)), 0xff),
Math.min((int) (mHighlightStrength * (float) Color.green(color)), 0xff),
Math.min((int) (mHighlightStrength * (float) Color.blue(color)), 0xff)
));
} | [
"Calculate the highlight color. Saturate at 0xff to make sure that high values\ndon't result in aliasing.\n\n@param _Slice The Slice which will be highlighted."
] | [
"Request a database sends a list of UUIDs.\n\n@param count The count of UUIDs.",
"Makes http DELETE request\n@param url url to makes request to\n@param params data to add to params field\n@return {@link okhttp3.Response}\n@throws RequestException\n@throws LocalOperationException",
"Renders a time period in human readable form\n\n@param time the time in milliseconds\n@return the time in human readable form",
"Returns an iban with replaced check digit.\n\n@param iban The iban\n@return The iban without the check digit",
"Returns the current version info for a provided remote document.\n@param remoteDocument the remote BSON document from which to extract version info\n@return a DocumentVersionInfo",
"Creates, writes and loads a new keystore and CA root certificate.",
"Process the next event in a given stream.\n@return the fully processed event\n@throws IOException if a stream is in the wrong state, IO errors can be thrown",
"Retrieve and validate the key from the REST request.\n\n@return true if present, false if missing",
"Get the features collection from a GeoJson URL.\n\n@param template the template\n@param geoJsonUrl what to parse\n@return the feature collection"
] |
private Properties parseXML(Document doc, String sectionName) {
int found = -1;
Properties results = new Properties();
NodeList config = null;
if (sectionName == null){
config = doc.getElementsByTagName("default-config");
found = 0;
} else {
config = doc.getElementsByTagName("named-config");
if(config != null && config.getLength() > 0) {
for (int i = 0; i < config.getLength(); i++) {
Node node = config.item(i);
if(node.getNodeType() == Node.ELEMENT_NODE ){
NamedNodeMap attributes = node.getAttributes();
if (attributes != null && attributes.getLength() > 0){
Node name = attributes.getNamedItem("name");
if (name.getNodeValue().equalsIgnoreCase(sectionName)){
found = i;
break;
}
}
}
}
}
if (found == -1){
config = null;
logger.warn("Did not find "+sectionName+" section in config file. Reverting to defaults.");
}
}
if(config != null && config.getLength() > 0) {
Node node = config.item(found);
if(node.getNodeType() == Node.ELEMENT_NODE){
Element elementEntry = (Element)node;
NodeList childNodeList = elementEntry.getChildNodes();
for (int j = 0; j < childNodeList.getLength(); j++) {
Node node_j = childNodeList.item(j);
if (node_j.getNodeType() == Node.ELEMENT_NODE) {
Element piece = (Element) node_j;
NamedNodeMap attributes = piece.getAttributes();
if (attributes != null && attributes.getLength() > 0){
results.put(attributes.item(0).getNodeValue(), piece.getTextContent());
}
}
}
}
}
return results;
} | [
"Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to parse\n@param sectionName which section to extract\n@return Properties map"
] | [
"Returns the default jdbc type for the given java type.\n\n@param javaType The qualified java type\n@return The default jdbc type",
"Finds the magnitude of the largest element in the row\n@param A Complex matrix\n@param row Row in A\n@param col0 First column in A to be copied\n@param col1 Last column in A + 1 to be copied\n@return magnitude of largest element",
"Send a channels on-air update to all registered listeners.\n\n@param audibleChannels holds the device numbers of all channels that can currently be heard in the mixer output",
"Notification that boot has completed successfully and the configuration history should be updated",
"Set a variable in the top variables layer to given \"collection\" of the vertex frames. Can't be reassigned -\nthrows on attempt to reassign.",
"Send a kill signal to all running instances and return as soon as the signal is sent.",
"Stops the currently running animation, if any.\n@see GVRAvatar#start(String)\n@see GVRAnimationEngine#stop(GVRAnimation)",
"Creates the container for a bundle with descriptor.\n@return the container for a bundle with descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails.",
"Creates an element that represents an image drawn at the specified coordinates in the page.\n@param x the X coordinate of the image\n@param y the Y coordinate of the image\n@param width the width coordinate of the image\n@param height the height coordinate of the image\n@param type the image type: <code>\"png\"</code> or <code>\"jpeg\"</code>\n@param resource the image data depending on the specified type\n@return"
] |
public static <T> T withObjectStreams(Socket socket, @ClosureParams(value=SimpleType.class, options={"java.io.ObjectInputStream","java.io.ObjectOutputStream"}) Closure<T> closure) throws IOException {
InputStream input = socket.getInputStream();
OutputStream output = socket.getOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(output);
ObjectInputStream ois = new ObjectInputStream(input);
try {
T result = closure.call(new Object[]{ois, oos});
InputStream temp1 = ois;
ois = null;
temp1.close();
temp1 = input;
input = null;
temp1.close();
OutputStream temp2 = oos;
oos = null;
temp2.close();
temp2 = output;
output = null;
temp2.close();
return result;
} finally {
closeWithWarning(ois);
closeWithWarning(input);
closeWithWarning(oos);
closeWithWarning(output);
}
} | [
"Creates an InputObjectStream and an OutputObjectStream from a Socket, and\npasses them to the closure. The streams will be closed after the closure\nreturns, even if an exception is thrown.\n\n@param socket this Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.0"
] | [
"Constructs a reference of the given type to the given\nreferent. The reference is registered with the queue\nfor later purging.\n\n@param type HARD, SOFT or WEAK\n@param referent the object to refer to\n@param hash the hash code of the <I>key</I> of the mapping;\nthis number might be different from referent.hashCode() if\nthe referent represents a value and not a key",
"Processes graphical indicator definitions for each column.",
"Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0",
"Returns true if the activity is a start milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone",
"Shuts down a standalone server.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server",
"Gets a design document from the database.\n\n@param id the design document id (optionally prefixed with \"_design/\")\n@return {@link DesignDocument}",
"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",
"Export data base contents to a directory using supplied connection.\n\n@param connection database connection\n@param directory target directory\n@throws Exception",
"Creates a copy with verbose mode enabled.\n\n@param serverSetups the server setups.\n@return copies of server setups with verbose mode enabled."
] |
public static String asTime(long time) {
if (time > HOUR) {
return String.format("%.1f h", (time / HOUR));
} else if (time > MINUTE) {
return String.format("%.1f m", (time / MINUTE));
} else if (time > SECOND) {
return String.format("%.1f s", (time / SECOND));
} else {
return String.format("%d ms", time);
}
} | [
"Renders a time period in human readable form\n\n@param time the time in milliseconds\n@return the time in human readable form"
] | [
"Use this API to unset the properties of sslservice resource.\nProperties that need to be unset are specified in args array.",
"Reads data from the SP file.\n\n@return Project File instance",
"Invoked by subclasses; performs actual file roll. Tests to see whether roll\nis necessary have already been performed, so just do it.",
"Send a waveform detail update announcement to all registered listeners.\n\n@param player the player whose waveform detail has changed\n@param detail the new waveform detail, if any",
"Gets a method based on data in the override_db table\n\n@param overrideId ID of override\n@return Method found",
"Turn given source String array into sorted array.\n\n@param array the source array\n@return the sorted array (never <code>null</code>)",
"We will always try to gather as many results as possible and never throw an exception.\n\nTODO: Make MemberResponse hold an exception that we can populate if something bad happens so we always\nget to return something for a member in order to indicate a failure. Getting the result when there\nis an error should throw an exception.\n\n@param execSvc\n@param members\n@param callable\n@param maxWaitTime - a value of 0 indicates forever\n@param unit\n@return",
"Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds",
"Process a module or bundle root.\n\n@param root the root\n@param layers the processed layers\n@param setter the bundle or module path setter\n@throws IOException"
] |
public String lookupUser(String url) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_LOOKUP_USER);
parameters.put("url", url);
Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element payload = response.getPayload();
Element groupnameElement = (Element) payload.getElementsByTagName("username").item(0);
return ((Text) groupnameElement.getFirstChild()).getData();
} | [
"Lookup the username for the specified User URL.\n\n@param url\nThe user profile URL\n@return The username\n@throws FlickrException"
] | [
"read CustomInfo list from table.\n\n@param eventId the event id\n@return the map",
"Runs intermediate check on the Assembly status until it is finished executing,\nthen returns it as a response.\n\n@return {@link AssemblyResponse}\n@throws LocalOperationException if something goes wrong while running non-http operations.\n@throws RequestException if request to Transloadit server fails.",
"at this point definition below is not really needed as it is the same as for 1.1, but it is here as place holder when subsystem parser evolves.",
"Record a prepared operation.\n\n@param identity the server identity\n@param prepared the prepared operation",
"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.",
"Go through all partition IDs and determine which node is \"first\" in the\nreplicating node list for every zone. This determines the number of\n\"zone primaries\" each node hosts.\n\n@return map of nodeId to number of zone-primaries hosted on node.",
"Whether the given column is part of this key family or not.\n\n@return {@code true} if the given column is part of this key, {@code false} otherwise.",
"Read a block of data from the FastTrack file and determine if\nit contains a table definition, or columns.\n\n@param blockIndex index of the current block\n@param startIndex start index of the block in the file\n@param blockLength block length",
"Gets the favorite entries corresponding to the currently displayed favorite widgets.\n\n@return the list of favorite entries"
] |
@Override
public FileModel resolvePayload(GraphRewrite event, EvaluationContext context, WindupVertexFrame payload)
{
checkVariableName(event, context);
if (payload instanceof FileReferenceModel)
{
return ((FileReferenceModel) payload).getFile();
}
if (payload instanceof FileModel)
{
return (FileModel) payload;
}
return null;
} | [
"Set the payload to the fileModel of the given instance even though the variable is not directly referencing it. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing it."
] | [
"Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag.",
"Get the bounding-box containing all features of all layers.",
"Helper method to find Strings of form \"all digits\" and \"digits-comma-digits\"",
"Checks, if the end type is valid for the set pattern type.\n@return a flag, indicating if the end type is valid for the pattern type.",
"Retrieve the default mapping between MPXJ resource fields and Primavera resource field names.\n\n@return mapping",
"Join with another query builder. This will add into the SQL something close to \" INNER JOIN other-table ...\".\nEither the object associated with the current QueryBuilder or the argument QueryBuilder must have a foreign field\nof the other one. An exception will be thrown otherwise.\n\n<p>\n<b>NOTE:</b> This will do combine the WHERE statement of the two query builders with a SQL \"AND\". See\n{@link #joinOr(QueryBuilder)}.\n</p>",
"Get a list of referring domains for a photostream.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotostreamDomains.html\"",
"Creates the next permutation in the sequence.\n\n@return An array containing the permutation. The returned array is modified each time this function is called.",
"Classify the tokens in a String. Each sentence becomes a separate document.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap})."
] |
protected void addStatement(Statement statement, boolean isNew) {
PropertyIdValue pid = statement.getMainSnak().getPropertyId();
// This code maintains the following properties:
// (1) the toKeep structure does not contain two statements with the
// same statement id
// (2) the toKeep structure does not contain two statements that can
// be merged
if (this.toKeep.containsKey(pid)) {
List<StatementWithUpdate> statements = this.toKeep.get(pid);
for (int i = 0; i < statements.size(); i++) {
Statement currentStatement = statements.get(i).statement;
boolean currentIsNew = statements.get(i).write;
if (!"".equals(currentStatement.getStatementId())
&& currentStatement.getStatementId().equals(
statement.getStatementId())) {
// Same, non-empty id: ignore existing statement as if
// deleted
return;
}
Statement newStatement = mergeStatements(statement,
currentStatement);
if (newStatement != null) {
boolean writeNewStatement = (isNew || !newStatement
.equals(statement))
&& (currentIsNew || !newStatement
.equals(currentStatement));
// noWrite: (newS == statement && !isNew)
// || (newS == cur && !curIsNew)
// Write: (newS != statement || isNew )
// && (newS != cur || curIsNew)
statements.set(i, new StatementWithUpdate(newStatement,
writeNewStatement));
// Impossible with default merge code:
// Kept here for future extensions that may choose to not
// reuse this id.
if (!"".equals(statement.getStatementId())
&& !newStatement.getStatementId().equals(
statement.getStatementId())) {
this.toDelete.add(statement.getStatementId());
}
if (!"".equals(currentStatement.getStatementId())
&& !newStatement.getStatementId().equals(
currentStatement.getStatementId())) {
this.toDelete.add(currentStatement.getStatementId());
}
return;
}
}
statements.add(new StatementWithUpdate(statement, isNew));
} else {
List<StatementWithUpdate> statements = new ArrayList<>();
statements.add(new StatementWithUpdate(statement, isNew));
this.toKeep.put(pid, statements);
}
} | [
"Adds one statement to the list of statements to be kept, possibly merging\nit with other statements to be kept if possible. When two existing\nstatements are merged, one of them will be updated and the other will be\nmarked for deletion.\n\n@param statement\nstatement to add\n@param isNew\nif true, the statement should be marked for writing; if false,\nthe statement already exists in the current data and is only\nadded to remove duplicates and avoid unnecessary writes"
] | [
"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",
"Convert a given date to a floating point date using a given reference date.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param date The given date to be associated with the return value \\( T \\).\n@return The value T measuring the distance of reference date and date by ACT/365 with SECONDS_PER_DAY seconds used as the smallest time unit and SECONDS_PER_DAY is a constant 365*24*60*60.",
"Delivers the correct JSON Object for outgoings\n\n@param outgoings\n@throws org.json.JSONException",
"Creates the main component of the editor with all sub-components.\n@return the completely filled main component of the editor.\n@throws IOException thrown if setting the table's content data source fails.\n@throws CmsException thrown if setting the table's content data source fails.",
"Receive an expected number of bytes from the player, logging a warning if we get a different number of them.\n\n@param is the input stream associated with the player metadata socket.\n@param size the number of bytes we expect to receive.\n@param description the type of response being processed, for use in the warning message.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response.",
"Given a protobuf rebalance-partition info, converts it into our\nrebalance-partition info\n\n@param rebalanceTaskInfoMap Proto-buff version of\nRebalanceTaskInfoMap\n@return RebalanceTaskInfo object.",
"Create the index and associate it with all project models in the Application",
"Use this API to fetch all the responderparam resources that are configured on netscaler.",
"Register the given callback as to be executed after request completion.\n\n@param name The name of the bean.\n@param callback The callback of the bean to be executed for destruction."
] |
public <FV> FV getFieldValueIfNotDefault(Object object) throws SQLException {
@SuppressWarnings("unchecked")
FV fieldValue = (FV) extractJavaFieldValue(object);
if (isFieldValueDefault(fieldValue)) {
return null;
} else {
return fieldValue;
}
} | [
"Return the value of field in the data argument if it is not the default value for the class. If it is the default\nthen null is returned."
] | [
"This method retrieves a byte array containing the data at the\ngiven index in the block. If no data is found at the given index\nthis method returns null.\n\n@param index index of the data item to be retrieved\n@return byte array containing the requested data",
"Creates a non-binary text media type with the given subtype and a specified encoding",
"Loads the SPI backing bean.\n\n@return the instance of MonetaryFormatsSingletonSpi to be used by this singleton.",
"get the ArrayTypeSignature corresponding to given generic array type\n\n@param genericArrayType\n@return",
"Determine if the buffer, when expressed as text, matches a fingerprint regular expression.\n\n@param buffer bytes from file\n@param fingerprint fingerprint regular expression\n@return true if the file matches the fingerprint",
"Set the order in which sets are returned for the user.\n\nThis method requires authentication with 'write' permission.\n\n@param photosetIds\nAn array of Ids\n@throws FlickrException",
"Convert an Object of type Class to an Object.",
"Creates and populates a new task relationship.\n\n@param field which task field source of data\n@param sourceTask relationship source task\n@param relationship relationship string\n@throws MPXJException",
"Constructs the path from FQCN, validates writability, and creates a writer."
] |
public void addCollaborator(String appName, String collaborator) {
connection.execute(new SharingAdd(appName, collaborator), apiKey);
} | [
"Add a collaborator to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param collaborator Username of the collaborator to add. This is usually in the form of \"[email protected]\"."
] | [
"Notification that a connection was closed.\n\n@param closed the closed connection",
"Use this API to fetch the statistics of all audit_stats resources that are configured on netscaler.",
"Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list",
"Helper function to bind script bundler to various targets",
"Returns an iterable containing all the enterprise users that matches the filter and specifies which child fields\nto retrieve from the API.\n@param api the API connection to be used when retrieving the users.\n@param filterTerm used to filter the results to only users starting with this string in either the name or the\nlogin. Can be null to not filter the results.\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing all the enterprise users that matches the filter.",
"Helper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry.",
"Closes the window containing the given component.\n\n@param component a component",
"Use this API to add nslimitselector.",
"Save current hostname and reuse it.\n\n@return hostname as String"
] |
private CollectionDescriptorDef cloneCollection(CollectionDescriptorDef collDef, String prefix)
{
CollectionDescriptorDef copyCollDef = new CollectionDescriptorDef(collDef, prefix);
copyCollDef.setOwner(this);
// we remove properties that are only relevant to the class the features are declared in
copyCollDef.setProperty(PropertyHelper.OJB_PROPERTY_IGNORE, null);
Properties mod = getModification(copyCollDef.getName());
if (mod != null)
{
if (!PropertyHelper.toBoolean(mod.getProperty(PropertyHelper.OJB_PROPERTY_IGNORE), false) &&
hasFeature(copyCollDef.getName()))
{
LogHelper.warn(true,
ClassDescriptorDef.class,
"process",
"Class "+getName()+" has a feature that has the same name as its included collection "+
copyCollDef.getName()+" from class "+collDef.getOwner().getName());
}
copyCollDef.applyModifications(mod);
}
return copyCollDef;
} | [
"Clones the given collection.\n\n@param collDef The collection descriptor\n@param prefix A prefix for the name\n@return The cloned collection"
] | [
"Revert all the working copy changes.",
"All address strings are comparable. If two address strings are invalid, their strings are compared.\nOtherwise, address strings are compared according to which type or version of string, and then within each type or version\nthey are compared using the comparison rules for addresses.\n\n@param other\n@return",
"Creates a region from a name and a label.\n\n@param name the uniquely identifiable name of the region\n@param label the label of the region\n@return the newly created region",
"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",
"Returns the bundle descriptor for the bundle with the provided base name.\n@param cms {@link CmsObject} used for searching.\n@param basename the bundle base name, for which the descriptor is searched.\n@return the bundle descriptor, or <code>null</code> if it does not exist or searching fails.",
"Print duration in tenths of minutes.\n\n@param duration Duration instance\n@return duration in tenths of minutes",
"calculate the difference of the two maps, so we know what was added, removed & updated\n@param left\n@param right\n@param onlyOnLeft\n@param onlyOnRight\n@param updated",
"Saves the project file displayed in this panel.\n\n@param file target file\n@param type file type",
"Handles DMR strings in the configuration\n\n@param node the node to create.\n@param name the name for the node.\n@param value the value for the node."
] |
public static wisite_binding[] get(nitro_service service, String sitepath[]) throws Exception{
if (sitepath !=null && sitepath.length>0) {
wisite_binding response[] = new wisite_binding[sitepath.length];
wisite_binding obj[] = new wisite_binding[sitepath.length];
for (int i=0;i<sitepath.length;i++) {
obj[i] = new wisite_binding();
obj[i].set_sitepath(sitepath[i]);
response[i] = (wisite_binding) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"Use this API to fetch wisite_binding resources of given names ."
] | [
"Registers the deployment resources needed.\n\n@param deploymentResourceSupport the deployment resource support\n@param service the service, which may be {@code null}, used to find the resource names that need to be registered",
"Installs the given set of URIs as the source level URIs. Does not copy the given\nset but uses it directly.",
"Private helper function that performs some assignability checks for the\nprovided GenericArrayType.",
"Sets the right padding character for all cells in the row.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining",
"Validates the deployment.\n\n@param isDomain {@code true} if this is a domain server, otherwise {@code false}\n\n@throws MojoDeploymentException if the deployment is invalid",
"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.",
"Set the buttons size.",
"Performs the conversion from standard XPath to xpath with parameterization support.",
"Determine which field the Activity ID has been mapped to.\n\n@param map field map\n@return field"
] |
public static lbvserver[] get(nitro_service service) throws Exception{
lbvserver obj = new lbvserver();
lbvserver[] response = (lbvserver[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the lbvserver resources that are configured on netscaler."
] | [
"Parse representations from a file object response.\n@param jsonObject representations json object in get response for /files/file-id?fields=representations\n@return list of representations",
"Opens a JDBC connection with the given parameters.",
"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.",
"Add an extension to the set of extensions.\n\n@param extension an extension",
"Propagate onMotionOutside events to listeners\n@param MotionEvent Android MotionEvent when nothing is picked",
"Verifies that the received image is identical to the original one.\n@param xopOriginal\n@param xopResponse",
"dispatch to gravity state",
"Helper method that encapsulates the minimum logic for adding jobs to a queue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJsons\na list of jobs serialized as JSON",
"Sets the matrix 'inv' equal to the inverse of the matrix that was decomposed.\n\n@param inv Where the value of the inverse will be stored. Modified."
] |
public void callFunction(String className, String methodName, PluginArguments pluginArgs, Object... args) throws Exception {
Class<?> cls = getClass(className);
ArrayList<Object> newArgs = new ArrayList<>();
newArgs.add(pluginArgs);
com.groupon.odo.proxylib.models.Method m = preparePluginMethod(newArgs, className, methodName, args);
m.getMethod().invoke(cls, newArgs.toArray(new Object[0]));
} | [
"Calls the specified function with the specified arguments. This is used for v2 response overrides\n\n@param className name of class\n@param methodName name of method\n@param pluginArgs plugin arguments\n@param args arguments to supply to function\n@throws Exception exception"
] | [
"We have more input since wait started",
"Auto re-initialize external resourced\nif resources have been already released.",
"Invite a user to an enterprise.\n@param api the API connection to use for the request.\n@param userLogin the login of the user to invite.\n@param enterpriseID the ID of the enterprise to invite the user to.\n@return the invite info.",
"Generates the Base64 encoded SHA-1 hash for content available in the stream.\nIt can be used to calculate the hash of a file.\n@param stream the input stream of the file or data.\n@return the Base64 encoded hash string.",
"a small static helper to set a multi state drawable on a view\n\n@param icon\n@param iconColor\n@param selectedIcon\n@param selectedIconColor\n@param tinted\n@param imageView",
"Invite a user to an enterprise.\n@param api the API connection to use for the request.\n@param userLogin the login of the user to invite.\n@param enterpriseID the ID of the enterprise to invite the user to.\n@return the invite info.",
"Parses the input stream to read the header\n\n@param input data input to read from\n@return the parsed protocol header\n@throws IOException",
"Sets the search scope.\n\n@param cms The current CmsObject object.",
"Creates a new section in a project.\n\nReturns the full record of the newly created section.\n\n@param project The project to create the section in\n@return Request object"
] |
public static <T> IteratorFromReaderFactory<T> getFactory(String delim, Function<String,T> op) {
return new DelimitRegExIteratorFactory<T>(delim, op);
} | [
"Returns a factory that vends DelimitRegExIterators that reads the contents of the\ngiven Reader, splits on the specified delimiter, applies op, then returns the result."
] | [
"Deletes the inbox message for given messageId\n@param messageId String messageId\n@return boolean value based on success of operation",
"Gets the index of the specified value.\n\n@param value the value of the item to be found\n@return the index of the value",
"Provide array of String results from inputOutput MFString field named string.\n@return value of string field",
"Send ourselves \"updates\" about any tracks that were loaded before we started, or before we were requesting\ndetails, since we missed them.",
"Adds a new Token to the end of the linked list",
"OR operation which takes the previous clause and the next clause and OR's them together.",
"Number of failed actions in scheduler",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 4 characters for IPv6 segments and 3 characters for IPv4 segments.",
"Moves our current playback position to the specified beat; this will be reflected in any status and beat packets\nthat we are sending. An incoming value less than one will jump us to the first beat.\n\n@param beat the beat that we should pretend to be playing"
] |
private void processTasks(Gantt gantt)
{
ProjectCalendar calendar = m_projectFile.getDefaultCalendar();
for (Gantt.Tasks.Task ganttTask : gantt.getTasks().getTask())
{
String wbs = ganttTask.getID();
ChildTaskContainer parentTask = getParentTask(wbs);
Task task = parentTask.addTask();
//ganttTask.getB() // bar type
//ganttTask.getBC() // bar color
task.setCost(ganttTask.getC());
task.setName(ganttTask.getContent());
task.setDuration(ganttTask.getD());
task.setDeadline(ganttTask.getDL());
//ganttTask.getH() // height
//ganttTask.getIn(); // indent
task.setWBS(wbs);
task.setPercentageComplete(ganttTask.getPC());
task.setStart(ganttTask.getS());
//ganttTask.getU(); // Unknown
//ganttTask.getVA(); // Valign
task.setFinish(calendar.getDate(task.getStart(), task.getDuration(), false));
m_taskMap.put(wbs, task);
}
} | [
"Read task data from a Gantt Designer file.\n\n@param gantt Gantt Designer file"
] | [
"Adds Editor specific UI components to the toolbar.\n@param context The context that provides access to the toolbar.",
"Use this API to fetch sslciphersuite resources of given names .",
"Boot with the given operations, performing full model and capability registry validation.\n\n@param bootOperations the operations. Cannot be {@code null}\n@param rollbackOnRuntimeFailure {@code true} if the boot should fail if operations fail in the runtime stage\n@return {@code true} if boot was successful\n@throws ConfigurationPersistenceException",
"Get the currently selected opacity.\n\n@return The int value of the currently selected opacity.",
"Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"remove a converted object from the pool\n\n@param converter\n@param sourceObject\n@param destinationType",
"Stops the emulator. Multiple calls are allowed.\n\n@throws DatastoreEmulatorException if the emulator cannot be stopped",
"Mark root of this DAG depends on given DAG's root.\n\n@param dependencyGraph the dependency DAG",
"Adds service locator properties to an endpoint reference.\n@param epr\n@param props"
] |
public static String getCacheDir(Context ctx) {
return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) || (!Environment.isExternalStorageRemovable() && ctx.getExternalCacheDir() != null) ?
ctx.getExternalCacheDir().getPath() : ctx.getCacheDir().getPath();
} | [
"Gets the appropriate cache dir\n\n@param ctx\n@return"
] | [
"Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param diffusionCoefficient Diffusion coefficient\n@param velocity velocity of the active transport",
"Emit information about a single suite and all of its tests.",
"Only call with the read lock held",
"Checks the existence of the directory. If it does not exist, the method creates it.\n\n@param dir the directory to check.\n@throws IOException if fails.",
"Applies the matrices computed from the scene object's\nlinked to the skeleton bones to the current pose.\n@see #applyPose(GVRPose, int)\n@see #setPose(GVRPose)",
"Uninstall current location collection client.\n\n@return true if uninstall was successful",
"get the setter method corresponding to given property",
"Get the element as a boolean.\n\n@param i the index of the element to access",
"Displays a sample model for the report request.\n@return A string describing the structure of a certain report execution"
] |
@Override
public synchronized long skip(final long length) throws IOException {
final long skip = super.skip(length);
this.count += skip;
return skip;
} | [
"Skips the stream over the specified number of bytes, adding the skipped\namount to the count.\n\n@param length the number of bytes to skip\n@return the actual number of bytes skipped\n@throws java.io.IOException if an I/O error occurs\n@see java.io.InputStream#skip(long)"
] | [
"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",
"Executes a given SPARQL query and returns a stream with the result in\nJSON format.\n\n@param query\n@return\n@throws IOException",
"Creates an Odata filter string that can be used for filtering list results by tags.\n\n@param tagName the name of the tag. If not provided, all resources will be returned.\n@param tagValue the value of the tag. If not provided, only tag name will be filtered.\n@return the Odata filter to pass into list methods",
"Returns a string that represents a valid Solr query range.\n\n@param from Lower bound of the query range.\n@param to Upper bound of the query range.\n@return String that represents a Solr query range.",
"Detect and apply waves, now or when the widget is attached.\n\n@param widget target widget to ensure is attached first",
"Check if a column is part of the row key columns.\n\n@param column the name of the column to check\n@return true if the column is one of the row key columns, false otherwise",
"Write a new line and indent.",
"Create a FreeMarkerOperation with the provided furnace instance template path, and varNames.\n\nThe variables in varNames will be provided to the template, and a new ReportModel will be created with these variables attached.",
"Parse a currency symbol position from a string representation.\n\n@param value String representation\n@return CurrencySymbolPosition instance"
] |
private void readExceptions(Project.Calendars.Calendar calendar, ProjectCalendar bc)
{
Project.Calendars.Calendar.Exceptions exceptions = calendar.getExceptions();
if (exceptions != null)
{
for (Project.Calendars.Calendar.Exceptions.Exception exception : exceptions.getException())
{
readException(bc, exception);
}
}
} | [
"Reads any exceptions present in the file. This is only used in MSPDI\nfile versions saved by Project 2007 and later.\n\n@param calendar XML calendar\n@param bc MPXJ calendar"
] | [
"Add statistics about sent emails.\n\n@param recipients The list of recipients.\n@param storageUsed If a remote storage was used.",
"Converts the results to CSV data.\n\n@return the CSV data",
"Use this API to add lbroute.",
"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>",
"Moves the elements contained in \"band\" in the Y axis \"yOffset\"\n@param yOffset\n@param band",
"capture screenshot of an eye",
"Add contents to the deployment and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException",
"Extracts the java class name from the schema info\n\n@param schemaInfo the schema info, a string like: java=java.lang.String\n@return the name of the class extracted from the schema info",
"For each node, checks if the store exists and then verifies that the remote schema\nmatches the new one. If the remote store doesn't exist, it creates it."
] |
protected boolean isMultimedia(File file) {
//noinspection SimplifiableIfStatement
if (isDir(file)) {
return false;
}
String path = file.getPath().toLowerCase();
for (String ext : MULTIMEDIA_EXTENSIONS) {
if (path.endsWith(ext)) {
return true;
}
}
return false;
} | [
"An extremely simple method for identifying multimedia. This\ncould be improved, but it's good enough for this example.\n\n@param file which could be an image or a video\n@return true if the file can be previewed, false otherwise"
] | [
"Retrieves the named calendar. This method will return\nnull if the named calendar is not located.\n\n@param calendarName name of the required calendar\n@return ProjectCalendar instance",
"Creates the default editor state for editing a bundle with descriptor.\n@return the default editor state for editing a bundle with descriptor.",
"This could be a self-extracting archive. If we understand the format, expand\nit and check the content for files we can read.\n\n@param stream schedule data\n@return ProjectFile instance",
"Add a new script\n\n@param model\n@param name\n@param script\n@return\n@throws Exception",
"Use this API to add dnstxtrec resources.",
"Normalize the list of selected categories to fit for the ids of the tree items.",
"Instantiates a new event collector.",
"Lookup a PortComponentMetaData by wsdl-port local part\n\n@param name - the wsdl-port local part\n@return PortComponentMetaData if found, null otherwise",
"Allows direct access to the Undertow.Builder for custom configuration\n\n@param serverConfigurationFunction the serverConfigurationFunction"
] |
public Integer getTextureMagFilter(AiTextureType type, int index) {
checkTexRange(type, index);
Property p = getProperty(PropertyKey.TEX_MAG_FILTER.m_key);
if (null == p || null == p.getData()) {
return (Integer) m_defaults.get(PropertyKey.TEX_MAG_FILTER);
}
Object rawValue = p.getData();
if (rawValue instanceof java.nio.ByteBuffer)
{
java.nio.IntBuffer ibuf = ((java.nio.ByteBuffer) rawValue).asIntBuffer();
return ibuf.get();
}
else
{
return (Integer) rawValue;
}
} | [
"Returns the texture magnification filter\n\nIf missing, defaults to {@link GL_LINEAR }\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture magnification filter"
] | [
"Use this API to unset the properties of systemuser resources.\nProperties that need to be unset are specified in args array.",
"Gets whether the given server can be updated.\n\n@param server the id of the server. Cannot be <code>null</code>\n\n@return <code>true</code> if the server can be updated; <code>false</code>\nif the update should be cancelled\n\n@throws IllegalStateException if this policy is not expecting a request\nto update the given server",
"Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma",
"Converts a date to an instance date bean.\n@return the instance date bean.",
"Use this API to fetch aaauser_binding resource of given name .",
"Calculate the determinant.\n\n@return Determinant.",
"I promise that this is always a collection of HazeltaskTasks",
"Finds the next valid line of words in the stream and extracts them.\n\n@return List of valid words on the line. null if the end of the file has been reached.\n@throws java.io.IOException",
"Adds vector v1 to v2 and places the result in this vector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector"
] |
public static double Sinh(double x, int nTerms) {
if (nTerms < 2) return x;
if (nTerms == 2) {
return x + (x * x * x) / 6D;
} else {
double mult = x * x * x;
double fact = 6;
int factS = 5;
double result = x + mult / fact;
for (int i = 3; i <= nTerms; i++) {
mult *= x * x;
fact *= factS * (factS - 1);
factS += 2;
result += mult / fact;
}
return result;
}
} | [
"compute Sinh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result."
] | [
"Read an element which contains only a single boolean attribute.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@return the boolean value\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.",
"Gets the host-ignore data for a slave host running the given version.\n\n@param major the kernel management API major version\n@param minor the kernel management API minor version\n@param micro the kernel management API micro version\n\n@return the host-ignore data, or {@code null} if there is no matching registration",
"Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise",
"Get the context for the specified photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@return The PhotoContext\n@throws FlickrException",
"Resolve the disposal method for the given producer method. Any resolved\nbeans will be marked as such for the purpose of validating that all\ndisposal methods are used. For internal use.\n\n@param types the types\n@param qualifiers The binding types to match\n@param declaringBean declaring bean\n@return The set of matching disposal methods",
"Use this API to fetch filtered set of appfwlearningsettings resources.\nset the filter parameter values in filtervalue object.",
"Update the lastCheckTime of the given record.\n\n@param id the id\n@param lastCheckTime the new value",
"characters callback.",
"Sets any application-specific custom fields. The values\nare presented to the application and the iPhone doesn't\ndisplay them automatically.\n\nThis can be used to pass specific values (urls, ids, etc) to\nthe application in addition to the notification message\nitself.\n\n@param key the custom field name\n@param value the custom field value\n@return this"
] |
private void readHours(ProjectCalendar calendar, Day day, Integer hours)
{
int value = hours.intValue();
int startHour = 0;
ProjectCalendarHours calendarHours = null;
Calendar cal = DateHelper.popCalendar();
cal.set(Calendar.HOUR_OF_DAY, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
calendar.setWorkingDay(day, false);
while (value != 0)
{
// Move forward until we find a working hour
while (startHour < 24 && (value & 0x1) == 0)
{
value = value >> 1;
++startHour;
}
// No more working hours, bail out
if (startHour >= 24)
{
break;
}
// Move forward until we find the end of the working hours
int endHour = startHour;
while (endHour < 24 && (value & 0x1) != 0)
{
value = value >> 1;
++endHour;
}
cal.set(Calendar.HOUR_OF_DAY, startHour);
Date startDate = cal.getTime();
cal.set(Calendar.HOUR_OF_DAY, endHour);
Date endDate = cal.getTime();
if (calendarHours == null)
{
calendarHours = calendar.addCalendarHours(day);
calendar.setWorkingDay(day, true);
}
calendarHours.addRange(new DateRange(startDate, endDate));
startHour = endHour;
}
DateHelper.pushCalendar(cal);
} | [
"Reads the integer representation of calendar hours for a given\nday and populates the calendar.\n\n@param calendar parent calendar\n@param day target day\n@param hours working hours"
] | [
"Write the text to the Path, using the specified encoding.\n\n@param self a Path\n@param text the text to write to the Path\n@param charset the charset used\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0",
"Does the bitwise conjunction with this address. Useful when subnetting.\n\n@param mask\n@param retainPrefix whether to drop the prefix\n@return\n@throws IncompatibleAddressException",
"Make a composite filter from the given sub-filters using AND to combine filters.",
"Throws an IllegalStateException when the given value is not false.",
"Ping route Ping the ESI routers\n\n@return ApiResponse<String>\n@throws ApiException\nIf fail to call the API, e.g. server error or cannot\ndeserialize the response body",
"Get a setted section knowing his title\n\nN.B. this search only into section list and bottom section list.\n@param title is the title of the section\n@return the section with title or null if the section is not founded",
"a useless object at the top level of the response JSON for no reason at all.",
"Emit information about a single suite and all of its tests.",
"Read all configuration files.\n@return the list with all available configurations"
] |
private static void query(String filename) throws Exception
{
ProjectFile mpx = new UniversalProjectReader().read(filename);
listProjectProperties(mpx);
listResources(mpx);
listTasks(mpx);
listAssignments(mpx);
listAssignmentsByTask(mpx);
listAssignmentsByResource(mpx);
listHierarchy(mpx);
listTaskNotes(mpx);
listResourceNotes(mpx);
listRelationships(mpx);
listSlack(mpx);
listCalendars(mpx);
} | [
"This method performs a set of queries to retrieve information\nfrom the an MPP or an MPX file.\n\n@param filename name of the MPX file\n@throws Exception on file read error"
] | [
"Set the locking values\n@param cld\n@param obj\n@param oldLockingValues",
"Use this API to delete route6 resources.",
"Marks a given list of statements for insertion into the current document.\nInserted statements can have an id if they should update an existing\nstatement, or use an empty string as id if they should be added. The\nmethod removes duplicates and avoids unnecessary modifications by\nchecking the current content of the given document before marking\nstatements for being written.\n\n@param currentDocument\nthe document with the current statements\n@param addStatements\nthe list of new statements to be added",
"Gets the txinfo cache weight\n\n@param conf The FluoConfiguration\n@return The size of the cache value from the property value {@value #TX_INFO_CACHE_WEIGHT} if\nit is set, else the value of the default value {@value #TX_INFO_CACHE_WEIGHT_DEFAULT}",
"Logs all properties",
"Returns all entries in no particular order.",
"Adds an extent relation to the current class definition.\n\n@param attributes The attributes of the tag\n@return An empty string\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"name\" optional=\"false\" description=\"The fully qualified name of the extending\nclass\"",
"Add a BETWEEN clause so the column must be between the low and high parameters.",
"Deletes a path from the filesystem\n\nIf the path is a directory its contents\nwill be recursively deleted before it itself\nis deleted.\n\nNote that removal of a directory is not an atomic-operation\nand so if an error occurs during removal, some of the directories\ndescendants may have already been removed\n\n@throws IOException if an error occurs whilst removing a file or directory"
] |
public static Map<Integer, Integer> getMapOfContiguousPartitions(final Cluster cluster,
int zoneId) {
List<Integer> partitionIds = new ArrayList<Integer>(cluster.getPartitionIdsInZone(zoneId));
Map<Integer, Integer> partitionIdToRunLength = Maps.newHashMap();
if(partitionIds.isEmpty()) {
return partitionIdToRunLength;
}
int lastPartitionId = partitionIds.get(0);
int initPartitionId = lastPartitionId;
for(int offset = 1; offset < partitionIds.size(); offset++) {
int partitionId = partitionIds.get(offset);
if(partitionId == lastPartitionId + 1) {
lastPartitionId = partitionId;
continue;
}
int runLength = lastPartitionId - initPartitionId + 1;
partitionIdToRunLength.put(initPartitionId, runLength);
initPartitionId = partitionId;
lastPartitionId = initPartitionId;
}
int runLength = lastPartitionId - initPartitionId + 1;
if(lastPartitionId == cluster.getNumberOfPartitions() - 1
&& partitionIdToRunLength.containsKey(0)) {
// special case of contiguity that wraps around the ring.
partitionIdToRunLength.put(initPartitionId, runLength + partitionIdToRunLength.get(0));
partitionIdToRunLength.remove(0);
} else {
partitionIdToRunLength.put(initPartitionId, runLength);
}
return partitionIdToRunLength;
} | [
"Determines run length for each 'initial' partition ID. Note that a\ncontiguous run may \"wrap around\" the end of the ring.\n\n@param cluster\n@param zoneId\n@return map of initial partition Id to length of contiguous run of\npartition IDs within the same zone.."
] | [
"This method extracts data for a single calendar from a Phoenix file.\n\n@param calendar calendar data",
"For every String key, it registers the object as a parameter to make it available\nin the report.\n\n@param jd\n@param _parameters",
"returns the values of the orientation tag",
"Attempts to substitute all the found expressions in the input\nwith their corresponding resolved values.\nIf any of the found expressions failed to resolve or\nif the input does not contain any expression, the input is returned as is.\n\n@param input the input string\n@return the input with resolved expressions or the original input in case\nthe input didn't contain any expressions or at least one of the\nexpressions could not be resolved",
"Create an error image.\n\n@param area The size of the image",
"Parse a string representation of a Boolean value.\n\n@param value string representation\n@return Boolean value",
"Hide the following channels.\n@param channels The names of the channels to hide.\n@return this",
"Unmarshals the descriptor content.\n\n@throws CmsXmlException thrown if the XML structure of the descriptor is wrong.\n@throws CmsException thrown if reading the descriptor file fails.",
"Creates a new row representing a rule.\n@param type the type for the rule row, must not be null nor {@link TableRowType#CONTENT} nor {@link TableRowType#UNKNOWN}\n@param style the style for the rule row, must not be null nor {@link TableRowStyle#UNKNOWN}\n@return a new row representing a rule\n@throws {@link NullPointerException} if type or style where null\n@throws {@link IllegalStateException} if type or style where unknown or if type was {@link TableRowType#CONTENT}"
] |
private InputStream getErrorStream() {
InputStream errorStream = this.connection.getErrorStream();
if (errorStream != null) {
final String contentEncoding = this.connection.getContentEncoding();
if (contentEncoding != null && contentEncoding.equalsIgnoreCase("gzip")) {
try {
errorStream = new GZIPInputStream(errorStream);
} catch (IOException e) {
// just return the error stream as is
}
}
}
return errorStream;
} | [
"Returns the response error stream, handling the case when it contains gzipped data.\n@return gzip decoded (if needed) error stream or null"
] | [
"Returns a Pair constructed from X and Y. Convenience method; the\ncompiler will disambiguate the classes used for you so that you\ndon't have to write out potentially long class names.",
"This is the profiles page. this is the 'regular' page when the url is typed in",
"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.",
"Returns the Euclidean distance between this vector and vector v.\n\n@return distance between this vector and v",
"This method is called if the data set has been scrolled.",
"Set whether we should obtain color versions of waveforms and previews when they are available. This will only\naffect waveforms loaded after the setting has been changed. If this changes the setting, and we were running,\nstop and restart in order to flush and reload the correct waveform versions.\n\n@param preferColor if {@code true}, the full-color versions of waveforms will be requested, if {@code false}\nonly the older blue versions will be retrieved",
"Use this API to fetch dnsnsecrec resource of given name .",
"Adds a submodule to the module.\n\n<P>\nINFO: If the module is promoted, all added submodule will be promoted.\n\n@param submodule Module",
"Add the given headers to the given HTTP request.\n@param httpRequest the request to add the headers to\n@param headers the headers to add"
] |
public void addTags(String photoId, String[] tags) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_ADD_TAGS);
parameters.put("photo_id", photoId);
parameters.put("tags", StringUtilities.join(tags, " ", true));
Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
} | [
"Add tags to a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param tags\nThe tags\n@throws FlickrException"
] | [
"Obtains a local date in Symmetry010 calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Symmetry010 era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code IsoEra}",
"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.",
"Returns a description a block of work, or \"exit\" if no more blocks exist\n\n@param name the assigned name of the consumer requesting a block of work\n@return a description a block of work, or \"exit\" if no more blocks exist",
"Adds the scroll position CSS extension to the given component\n\n@param componentContainer the component to extend\n@param scrollBarrier the scroll barrier\n@param barrierMargin the margin\n@param styleName the style name to set beyond the scroll barrier",
"Creates a new Box Developer Edition connection with enterprise token leveraging BoxConfig.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection.",
"Process the response by reporting proper log and feeding failure\ndetectors\n\n@param response\n@param pipeline",
"Retrieve a child record by name.\n\n@param key child record name\n@return child record",
"Performs a get all operation with the specified composite request object\n\n@param requestWrapper Composite request object containing a reference to\nthe Iterable keys\n\n@return Map of the keys to the corresponding versioned values",
"Delete a path recursively.\n@param path a Path pointing to a file or a directory that may not exists anymore.\n@throws IOException"
] |
public static String implodeObjects(Iterable<?> objects) {
StringBuilder builder = new StringBuilder();
boolean first = true;
for (Object o : objects) {
if (first) {
first = false;
} else {
builder.append("|");
}
builder.append(o.toString());
}
return builder.toString();
} | [
"Builds a string that serializes a list of objects separated by the pipe\ncharacter. The toString methods are used to turn objects into strings.\nThis operation is commonly used to build parameter lists for API\nrequests.\n\n@param objects\nthe objects to implode\n@return string of imploded objects"
] | [
"Construct new path by replacing file directory part. No\nfiles are actually modified.\n@param file path to move\n@param target new path directory",
"Writes image files for all data that was collected and the statistics\nfile for all sites.",
"Returns an empty Promotion details in Json\n\n@return String\n@throws IOException",
"Add the set with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The set of all packages to add.",
"Get the target file for misc items.\n\n@param item the misc item\n@return the target location",
"Check if the gravity and orientation are not in conflict one with other.\n@param gravity\n@param orientation\n@return true if orientation and gravity can be applied together, false - otherwise",
"Obtains a International Fixed local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Determine if a CharSequence can be parsed as a Float.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isFloat(String)\n@since 1.8.2",
"This methods enhances the objects loaded by a broker query\nwith a JDO StateManager an brings them under JDO control.\n@param pojos the OJB pojos as obtained by the broker\n@return the collection of JDO PersistenceCapable instances"
] |
public static double SquaredEuclidean(double[] x, double[] y) {
double d = 0.0, u;
for (int i = 0; i < x.length; i++) {
u = x[i] - y[i];
d += u * u;
}
return d;
} | [
"Gets the Square Euclidean distance between two points.\n\n@param x A point in space.\n@param y A point in space.\n@return The Square Euclidean distance between x and y."
] | [
"Sets the target hosts from line by line text.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Given a storedefinition, constructs the xml string to be sent out in\nresponse to a \"schemata\" fetch request\n\n@param storeDefinition\n@return serialized store definition",
"Set the week day.\n@param weekDayStr the week day to set.",
"Loops through all resource roots that have been made available transitively via Class-Path entries, and\nadds them to the list of roots to be processed.",
"Lift a Java Func0 to a Scala Function0\n\n@param f the function to lift\n\n@returns the Scala function",
"Creates a resource key for given enumeration value. By convention,\nresource bundle for enumerations has the name of enumeration class\nand value identifier is the same as enumeration value name.\n@param value the enumeration value\n@return the resource key",
"Configures the configuration selector.",
"Generates the points for an arc based on two bearings from a centre point\nand a radius.\n\n@param center The LatLong point of the center.\n@param startBearing North is 0 degrees, East is 90 degrees, etc.\n@param endBearing North is 0 degrees, East is 90 degrees, etc.\n@param radius In metres\n@return An array of LatLong points in an MVC array representing the arc.\nUsing this method directly you will need to push the centre point onto\nthe array in order to close it, if desired.",
"Gets the date time str concise.\n\n@param d\nthe d\n@return the date time str concise"
] |
public String getPublicConfigValue(String key) throws ConfigurationException {
if (!allProps.containsKey(key)) {
throw new UndefinedPropertyException("The requested config key does not exist.");
}
if (restrictedConfigs.contains(key)) {
throw new ConfigurationException("The requested config key is not publicly available!");
}
return allProps.get(key);
} | [
"This is a generic function for retrieving any config value. The returned value\nis the one the server is operating with, no matter whether it comes from defaults\nor from the user-supplied configuration.\n\nThis function only provides access to configs which are deemed safe to share\npublicly (i.e.: not security-related configs). The list of configs which are\nconsidered off-limit can itself be configured via '{@value #RESTRICTED_CONFIGS}'.\n\n@param key config key for which to retrieve the value.\n@return the value for the requested config key, in String format.\nMay return null if the key exists and its value is explicitly set to null.\n@throws UndefinedPropertyException if the requested key does not exist in the config.\n@throws ConfigurationException if the requested key is not publicly available."
] | [
"Register a new SingleServiceWrapperInterceptor for the bean being\nwrapped, associate it with the PerformanceMonitor and tell it which methods\nto intercept.\n\n@param source An Attribute node from the spring configuration\n@param beanName The name of the bean that this performance monitor is wrapped around\n@param registry The registry where all the spring beans are registered",
"This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file",
"Walk project references recursively, adding thrift files to the provided list.",
"Initializes class data structures and parameters",
"Returns the simple name of the builder class that should be generated for the given type.\n\n<p>This is simply the {@link #BUILDER_SIMPLE_NAME_TEMPLATE} with the original type name\nsubstituted in. (If the original type is nested, its enclosing classes will be included,\nseparated with underscores, to ensure uniqueness.)",
"Process data for an individual calendar.\n\n@param row calendar data",
"Convert gallery name to title key.\n@param gallery gallery name for example \"downloadgallery\"\n@return key as string \"ERR_REASON_NO_DOWNLOADGALLERY_0\"",
"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",
"Use this API to update onlinkipv6prefix resources."
] |
public static final Date parseExtendedAttributeDate(String value)
{
Date result = null;
if (value != null)
{
try
{
result = DATE_FORMAT.get().parse(value);
}
catch (ParseException ex)
{
// ignore exceptions
}
}
return (result);
} | [
"Parse an extended attribute date value.\n\n@param value string representation\n@return date value"
] | [
"Return the number of rows affected.",
"Adds each of the specified followers to the task, if they are not already\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to add followers to.\n@return Request object",
"Gets the a singleton reference to the SPIProvider returned by the SPIProviderResolver\nretrieved using the default server integration classloader.\n\n@return this class instance",
"Find the current layout and extract the activity code order and visibility.\n\n@param phoenixProject phoenix project data",
"a helper method to enable the keyboardUtil for a specific activity\nor disable it. note this will cause some frame drops because of the\nlistener.\n\n@param activity\n@param enable",
"Returns the compact tag records for all tags in the workspace.\n\n@param workspace The workspace or organization to find tags in.\n@return Request object",
"Encodes the given URI scheme with the given encoding.\n@param scheme the scheme to be encoded\n@param encoding the character encoding to encode to\n@return the encoded scheme\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"read broker info for watching topics\n\n@param zkClient the zookeeper client\n@param topics topic names\n@return topic->(brokerid-0,brokerid-1...brokerid2-0,brokerid2-1...)",
"Prepares Artifactory server either from serverID or from ArtifactoryServer.\n\n@param artifactoryServerID\n@param pipelineServer\n@return"
] |
public void setAutoClose(boolean autoClose) {
this.autoClose = autoClose;
if (autoCloseHandlerRegistration != null) {
autoCloseHandlerRegistration.removeHandler();
autoCloseHandlerRegistration = null;
}
if (autoClose) {
autoCloseHandlerRegistration = registerHandler(addValueChangeHandler(event -> close()));
}
} | [
"Enables or disables auto closing when selecting a date."
] | [
"Tries to load a class using the specified ResourceLoader. Returns null if the class is not found.\n@param className\n@param resourceLoader\n@return the loaded class or null if the given class cannot be loaded",
"Pretty prints a task list of rebalancing tasks.\n\n@param infos list of rebalancing tasks (RebalancePartitionsInfo)\n@return pretty-printed string",
"Decode a code from the stream s using huffman table h. Return the symbol or\na negative value if there is an error. If all of the lengths are zero, i.e.\nan empty code, or if the code is incomplete and an invalid code is received,\nthen -9 is returned after reading MAXBITS bits.\n\nFormat notes:\n\n- The codes as stored in the compressed data are bit-reversed relative to\na simple integer ordering of codes of the same lengths. Hence below the\nbits are pulled from the compressed data one at a time and used to\nbuild the code value reversed from what is in the stream in order to\npermit simple integer comparisons for decoding.\n\n- The first code for the shortest length is all ones. Subsequent codes of\nthe same length are simply integer decrements of the previous code. When\nmoving up a length, a one bit is appended to the code. For a complete\ncode, the last code of the longest length will be all zeros. To support\nthis ordering, the bits pulled during decoding are inverted to apply the\nmore \"natural\" ordering starting with all zeros and incrementing.\n\n@param h Huffman table\n@return status code",
"Converts a time in milliseconds to the appropriate x coordinate for drawing something at that time.\n\n@param milliseconds the time at which something should be drawn\n\n@return the component x coordinate at which it should be drawn",
"This method lists all resource assignments defined in the file.\n\n@param file MPX file",
"Map event type enum.\n\n@param eventType the event type\n@return the event type enum",
"Inserts a String value into the mapping of the underlying Bundle, replacing any existing value\nfor the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a String, or null\n@return this bundler instance to chain method calls",
"Add a Renderer instance as prototype.\n\n@param renderer to use as prototype.\n@return the current RendererBuilder instance.",
"Use this API to update vpnsessionaction."
] |
private synchronized void flushData() {
BufferedWriter writer = null;
try {
writer = new BufferedWriter(new FileWriter(new File(this.inputPath)));
for(String key: this.metadataMap.keySet()) {
writer.write(NEW_PROPERTY_SEPARATOR + key.toString() + "]" + NEW_LINE);
writer.write(this.metadataMap.get(key).toString());
writer.write("" + NEW_LINE + "" + NEW_LINE);
}
writer.flush();
} catch(IOException e) {
logger.error("IO exception while flushing data to file backed storage: "
+ e.getMessage());
}
try {
if(writer != null)
writer.close();
} catch(Exception e) {
logger.error("Error while flushing data to file backed storage: " + e.getMessage());
}
} | [
"Flush the in-memory data to the file"
] | [
"Assigns retention policy with givenID to folder or enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param assignTo object representing folder or enterprise to assign policy to.\n@return info about created assignment.",
"Gets the default configuration for Freemarker within Windup.",
"Processes the template for the comma-separated value pairs in an attribute of the current object on the specified level.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"true\" description=\"The name of the attribute containg attributes (defaults to 'attributes')\"\[email protected] name=\"default-right\" optional=\"true\" description=\"The default right value if none is given (defaults to empty value)\"",
"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",
"Method used to create missing timephased data.\n\n@param file project file\n@param assignment resource assignment\n@param timephasedPlanned planned timephased data\n@param timephasedComplete complete timephased data",
"This utility method calculates the difference in working\ntime between two dates, given the context of a task.\n\n@param task parent task\n@param date1 first date\n@param date2 second date\n@param format required format for the resulting duration\n@return difference in working time between the two dates",
"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",
"Cleans the object key.\n\n@param name Name of the object key\n@return The {@link ValidationResult} object containing the object,\nand the error code(if any)",
"Use this API to fetch lbmonitor_binding resource of given name ."
] |
private void writeTasks(List<Task> tasks) throws IOException
{
for (Task task : tasks)
{
writeTask(task);
writeTasks(task.getChildTasks());
}
} | [
"Recursively write tasks.\n\n@param tasks list of tasks\n@throws IOException"
] | [
"Determines if a point is inside a box.",
"Internal initialization.\n@throws ParserConfigurationException",
"Decode '%HH'.",
"Writes and reads the XOP attachment using a CXF JAX-RS Proxy\nThe proxy automatically sets the \"mtom-enabled\" property by checking\nthe CXF EndpointProperty set on the XopAttachment interface.\n\n@throws Exception",
"Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs",
"Use this API to fetch all the auditmessages resources that are configured on netscaler.",
"Convert the holiday format from EquivalenceClassTransformer into a date format\n\n@param holiday the date\n@return a date String in the format yyyy-MM-dd",
"Use this API to change sslcertkey.",
"Sets the day of the month.\n@param day the day to set."
] |
static void initializeExtension(ExtensionRegistry extensionRegistry, String module,
ManagementResourceRegistration rootRegistration,
ExtensionRegistryType extensionRegistryType) {
try {
boolean unknownModule = false;
boolean initialized = false;
for (Extension extension : Module.loadServiceFromCallerModuleLoader(module, Extension.class)) {
ClassLoader oldTccl = WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(extension.getClass());
try {
if (unknownModule || !extensionRegistry.getExtensionModuleNames().contains(module)) {
// This extension wasn't handled by the standalone.xml or domain.xml parsing logic, so we
// need to initialize its parsers so we can display what XML namespaces it supports
extensionRegistry.initializeParsers(extension, module, null);
// AS7-6190 - ensure we initialize parsers for other extensions from this module
// now that we know the registry was unaware of the module
unknownModule = true;
}
extension.initialize(extensionRegistry.getExtensionContext(module, rootRegistration, extensionRegistryType));
} finally {
WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(oldTccl);
}
initialized = true;
}
if (!initialized) {
throw ControllerLogger.ROOT_LOGGER.notFound("META-INF/services/", Extension.class.getName(), module);
}
} catch (ModuleNotFoundException e) {
// Treat this as a user mistake, e.g. incorrect module name.
// Throw OFE so post-boot it only gets logged at DEBUG.
throw ControllerLogger.ROOT_LOGGER.extensionModuleNotFound(e, module);
} catch (ModuleLoadException e) {
// The module is there but can't be loaded. Treat this as an internal problem.
// Throw a runtime exception so it always gets logged at ERROR in the server log with stack trace details.
throw ControllerLogger.ROOT_LOGGER.extensionModuleLoadingFailure(e, module);
}
} | [
"Initialise an extension module's extensions in the extension registry\n\n@param extensionRegistry the extension registry\n@param module the name of the module containing the extensions\n@param rootRegistration The parent registration of the extensions. For a server or domain.xml extension, this will be the root resource registration. For a host.xml extension, this will be the host resource registration\n@param extensionRegistryType The type of the registry"
] | [
"Close a transaction and do all the cleanup associated with it.",
"Register an active operation with a specific operation id.\n\n@param id the operation id\n@param attachment the shared attachment\n@param callback the completed callback\n@return the created active operation\n\n@throws java.lang.IllegalStateException if an operation with the same id is already registered",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"Sets allowed values for attribute\n\n@param allowedValues values that are legal as part in this attribute\n@return a builder that can be used to continue building the attribute definition",
"Read a four byte integer from the data.\n\n@param offset current offset into data block\n@param data data block\n@return int value",
"Print a task type.\n\n@param value TaskType instance\n@return task type value",
"Notifies all listeners that the data is about to be loaded.",
"Tries to load a the bundle for a given locale, also loads the backup\nlocales with the same language.\n\n@param baseName the raw bundle name, without locale qualifiers\n@param locale the locale\n@param wantBase whether a resource bundle made only from the base name\n(with no locale information attached) should be returned.\n@return the resource bundle if it was loaded, otherwise the backup",
"Throws an exception if at least one results directory is missing."
] |
public static void setTime(Calendar calendar, int hourOfDay, int minute, int second, int millisecond) {
calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
calendar.set(Calendar.MINUTE, minute);
calendar.set(Calendar.SECOND, second);
calendar.set(Calendar.MILLISECOND, millisecond);
} | [
"Sets hour, minutes, seconds and milliseconds to the given values. Leaves date info untouched."
] | [
"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",
"Get a string property, or, if no such property is defined, return\nthe given default value\n\n@param props the properties\n@param name the key in the properties\n@param defaultValue the default value if the key not exists\n@return value in the props or defaultValue while name not exist",
"if you don't have an argument, choose the value that is going to be inserted into the map instead\n\n@param commandLineOption specification of the command line options\n@param value the value that is going to be inserted into the map instead of the argument",
"The point that is the GOLDEN_SECTION along the way from a to b.\na may be less or greater than b, you find the point 60-odd percent\nof the way from a to b.\n\n@param a Interval minimum\n@param b Interval maximum\n@return The GOLDEN_SECTION along the way from a to b.",
"Create a new remote proxy controller.\n\n@param client the transactional protocol client\n@param pathAddress the path address\n@param addressTranslator the address translator\n@param targetKernelVersion the {@link ModelVersion} of the kernel management API exposed by the proxied process\n@return the proxy controller",
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"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",
"Sets the target translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining",
"Initial random seed used for shuffling test suites and other sources\nof pseudo-randomness. If not set, any random value is set.\n\n<p>The seed's format is compatible with {@link RandomizedRunner} so that\nseed can be fixed for suites and methods alike."
] |
@SuppressWarnings("WeakerAccess")
public Map<DeckReference, WaveformDetail> getLoadedDetails() {
ensureRunning();
if (!isFindingDetails()) {
throw new IllegalStateException("WaveformFinder is not configured to find waveform details.");
}
// Make a copy so callers get an immutable snapshot of the current state.
return Collections.unmodifiableMap(new HashMap<DeckReference, WaveformDetail>(detailHotCache));
} | [
"Get the waveform details available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the details associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the WaveformFinder is not running or requesting waveform details"
] | [
"Read the header data for a single file.\n\n@param header header data\n@return SynchroTable instance",
"Return true if the connection being released is the one that has been saved.",
"Within a single zone, swaps one random partition on one random node with\nanother random partition on different random node.\n\n@param nextCandidateCluster\n@param zoneId Zone ID within which to shuffle partitions\n@return updated cluster",
"Given a list of typedDependencies, returns true if the node \"node\" is the\ngovernor of a conj relation with a dependent which is not a preposition\n\n@param node\nA node in this GrammaticalStructure\n@param list\nA list of typedDependencies\n@return true If node is the governor of a conj relation in the list with\nthe dep not being a preposition",
"This method computes the eigen vector with the largest eigen value by using the\ndirect power method. This technique is the easiest to implement, but the slowest to converge.\nWorks only if all the eigenvalues are real.\n\n@param A The matrix. Not modified.\n@return If it converged or not.",
"Parse a map of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.",
"Fills the Boyer Moore \"bad character array\" for the given pattern",
"Test the list of TimephasedWork instances to see\nif any of them have been modified.\n\n@param list list of TimephasedWork instances\n@return boolean flag",
"Returns the meta-data for the inverse side of the association represented by the given property on the given\npersister in case it represents the main side of a bi-directional one-to-many or many-to-many association.\n\n@param mainSidePersister persister of the entity hosting the property of interest\n@param propertyIndex index of the property of interest\n@return the meta-data of the inverse side of the specified association or {@code null} if no such meta-data\nexists"
] |
protected boolean isStoredProcedure(String sql)
{
/*
Stored procedures start with
{?= call <procedure-name>[<arg1>,<arg2>, ...]}
or
{call <procedure-name>[<arg1>,<arg2>, ...]}
but also statements with white space like
{ ?= call <procedure-name>[<arg1>,<arg2>, ...]}
are possible.
*/
int k = 0, i = 0;
char c;
while(k < 3 && i < sql.length())
{
c = sql.charAt(i);
if(c != ' ')
{
switch (k)
{
case 0:
if(c != '{') return false;
break;
case 1:
if(c != '?' && c != 'c') return false;
break;
case 2:
if(c != '=' && c != 'a') return false;
break;
}
k++;
}
i++;
}
return true;
} | [
"Check if the specified sql-string is a stored procedure\nor not.\n@param sql The sql query to check\n@return <em>True</em> if the query is a stored procedure, else <em>false</em> is returned."
] | [
"Retrieves the text value for the baseline duration.\n\n@return baseline duration text",
"Add data for a column to this table.\n\n@param column column data",
"Returns the key of the entity targeted by the represented association, retrieved from the given tuple.\n\n@param tuple the tuple from which to retrieve the referenced entity key\n@return the key of the entity targeted by the represented association",
"Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null.",
"Set the occurrences. If the String is invalid, the occurrences will be set to \"-1\" to cause server-side validation to fail.\n@param occurrences the interval to set.",
"Add the line to the content\n\n@param bufferedFileReader The file reader\n@param content The content of the file\n@param line The current read line\n@throws IOException",
"Get random geographical location\n@return 2-Tuple of ints (latitude, longitude)",
"Select the specific vertex and fragment shader to use with this material.\n\nThe shader template is used to generate the sources for the vertex and\nfragment shader based on the material properties only.\nIt will ignore the mesh attributes and all lights.\n\n@param context\nGVRContext\n@param material\nmaterial to use with the shader\n@return ID of vertex/fragment shader set",
"Acquire a permit for a particular node id so as to allow rebalancing\n\n@param nodeId The id of the node for which we are acquiring a permit\n@return Returns true if permit acquired, false if the permit is already\nheld by someone"
] |
public static RebalanceTaskInfoMap encodeRebalanceTaskInfoMap(RebalanceTaskInfo stealInfo) {
return RebalanceTaskInfoMap.newBuilder()
.setStealerId(stealInfo.getStealerId())
.setDonorId(stealInfo.getDonorId())
.addAllPerStorePartitionIds(ProtoUtils.encodeStoreToPartitionsTuple(stealInfo.getStoreToPartitionIds()))
.setInitialCluster(new ClusterMapper().writeCluster(stealInfo.getInitialCluster()))
.build();
} | [
"Given a rebalance-task info, convert it into the protobuf equivalent\n\n@param stealInfo Rebalance task info\n@return Protobuf equivalent of the same"
] | [
"Formats a date or a time range according to the local conventions.\n\nYou should ensure that start/end are in the same timezone; formatDateRange()\ndoesn't handle start/end in different timezones well.\n\nSee {@link android.text.format.DateUtils#formatDateRange} for full docs.\n\n@param context the context is required only if the time is shown\n@param start the start time\n@param end the end time\n@param flags a bit mask of options\n@return a string containing the formatted date/time range",
"Get a TokenizerFactory that does Penn Treebank tokenization.\nThis is now the recommended factory method to use.\n\n@param factory A TokenFactory that determines what form of token is returned by the Tokenizer\n@param options A String specifying options (see the class javadoc for details)\n@param <T> The type of the tokens built by the LexedTokenFactory\n@return A TokenizerFactory that does Penn Treebank tokenization",
"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",
"Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.",
"Compares two avro strings which contains single store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content",
"absolute for advancedJDBCSupport\n@param row",
"Provide array of String results from inputOutput MFString field named string.\n@return value of string field",
"Retrieve the fixed data offset for a specific field.\n\n@param type field type\n@return offset",
"Return a product descriptor for a specific strike.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@param index The index corresponding to the strike grid.\n@return a product descriptor for a specific strike.\n@throws ArrayIndexOutOfBoundsException Thrown if index is out of bound."
] |
public static byte[] decodeBase64(String value) {
int byteShift = 4;
int tmp = 0;
boolean done = false;
final StringBuilder buffer = new StringBuilder();
for (int i = 0; i != value.length(); i++) {
final char c = value.charAt(i);
final int sixBit = (c < 123) ? EncodingGroovyMethodsSupport.TRANSLATE_TABLE[c] : 66;
if (sixBit < 64) {
if (done)
throw new RuntimeException("= character not at end of base64 value"); // TODO: change this exception type
tmp = (tmp << 6) | sixBit;
if (byteShift-- != 4) {
buffer.append((char) ((tmp >> (byteShift * 2)) & 0XFF));
}
} else if (sixBit == 64) {
byteShift--;
done = true;
} else if (sixBit == 66) {
// RFC 2045 says that I'm allowed to take the presence of
// these characters as evidence of data corruption
// So I will
throw new RuntimeException("bad character in base64 value"); // TODO: change this exception type
}
if (byteShift == 0) byteShift = 4;
}
try {
return buffer.toString().getBytes("ISO-8859-1");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("Base 64 decode produced byte values > 255"); // TODO: change this exception type
}
} | [
"Decode the String from Base64 into a byte array.\n\n@param value the string to be decoded\n@return the decoded bytes as an array\n@since 1.0"
] | [
"Use this API to sync gslbconfig.",
"Populate the expanded exceptions list based on the main exceptions list.\nWhere we find recurring exception definitions, we generate individual\nexceptions for each recurrence to ensure that we account for them correctly.",
"Returns a licenses regarding its Id and a fake on if no license exist with such an Id\n\n@param licenseId String\n@return License",
"Returns an URI which represents the statement rank in a triple.\n\n@param rank\n@return",
"Use this API to fetch nsrpcnode resources of given names .",
"Sets the underlying write timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#writeTimeout(long, TimeUnit)",
"returns a collection of Reader LockEntries for object obj.\nIf no LockEntries could be found an empty Vector is returned.",
"Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value",
"Returns a set of beans specialized by this bean. An empty set is returned if this bean does not specialize another beans."
] |
private final String getHeader(Map /* String, String */ headers, String name) {
return (String) headers.get(name.toLowerCase());
} | [
"Returns the header with the specified name from the supplied map. The\nheader lookup is case-insensitive.\n\n@param headers A <code>Map</code> containing the HTTP request headers.\n@param name The name of the header to return.\n@return The value of specified header, or a comma-separated list if there\nwere multiple headers of that name."
] | [
"Populate the model with the object's properties.\n\n@param object object whose properties we're displaying\n@param excludedMethods method names to exclude",
"Send a device found announcement to all registered listeners.\n\n@param announcement the message announcing the new device",
"Gets the current version of the database schema. This version is taken\nfrom the migration table and represent the latest successful entry.\n\n@return the current schema version",
"Replies the elements of the left map without the pairs in the right map.\nIf the pair's values differ from\nthe value within the map, the map entry is not removed.\n\n<p>\nThe difference is an immutable\nsnapshot of the state of the maps at the time this method is called. It\nwill never change, even if the maps change at a later time.\n</p>\n\n<p>\nSince this method uses {@code HashMap} instances internally, the keys of\nthe supplied maps must be well-behaved with respect to\n{@link Object#equals} and {@link Object#hashCode}.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to update.\n@param right the pairs to remove.\n@return the map with the content of the left map except the pairs of the right map.\n@since 2.15",
"This method is used to associate a child task with the current\ntask instance. It has package access, and has been designed to\nallow the hierarchical outline structure of tasks in an MPX\nfile to be constructed as the file is read in.\n\n@param child Child task.\n@param childOutlineLevel Outline level of the child task.",
"gets the first non annotation line number of a node, taking into account annotations.",
"Determine whether the given method is a \"readString\" method.\n\n@see Object#toString()",
"Modifies the \"msgCount\" belief\n\n@param int - the number to add or remove",
"Adds a new Site matcher object to the map of server names.\n\n@param matcher the SiteMatcher of the server\n@param site the site to add"
] |
public JsonNode wbSetAliases(String id, String site, String title,
String newEntity, String language, List<String> add,
List<String> remove, List<String> set,
boolean bot, long baserevid, String summary)
throws IOException, MediaWikiApiErrorException {
Validate.notNull(language,
"Language parameter cannot be null when setting aliases");
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("language", language);
if (set != null) {
if (add != null || remove != null) {
throw new IllegalArgumentException(
"Cannot use parameters \"add\" or \"remove\" when using \"set\" to edit aliases");
}
parameters.put("set", ApiConnection.implodeObjects(set));
}
if (add != null) {
parameters.put("add", ApiConnection.implodeObjects(add));
}
if (remove != null) {
parameters.put("remove", ApiConnection.implodeObjects(remove));
}
JsonNode response = performAPIAction("wbsetaliases", id, site, title, newEntity, parameters, summary, baserevid, bot);
return response;
} | [
"Executes the API action \"wbsetaliases\" for the given parameters.\n\n@param id\nthe id of the entity to be edited; if used, the site and title\nparameters must be null\n@param site\nwhen selecting an entity by title, the site key for the title,\ne.g., \"enwiki\"; if used, title must also be given but id must\nbe null\n@param title\nstring used to select an entity by title; if used, site must\nalso be given but id must be null\n@param newEntity\nused for creating a new entity of a given type; the value\nindicates the intended entity type; possible values include\n\"item\" and \"property\"; if used, the parameters id, site, and\ntitle must be null\n@param language\nthe language code for the label\n@param add\nthe values of the aliases to add. They will be merged with the\nexisting aliases. This parameter cannot be used in conjunction\nwith \"set\".\n@param remove\nthe values of the aliases to remove. Other aliases will be retained.\nThis parameter cannot be used in conjunction with \"set\".\n@param set\nthe values of the aliases to set. This will erase any existing\naliases in this language and replace them by the given list.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException"
] | [
"Read data for an individual task.\n\n@param row task data from database\n@param task Task instance",
"Attempt to reconnect to Redis.\n\n@param jedis\nthe connection to Redis\n@param reconAttempts\nnumber of times to attempt to reconnect before giving up\n@param reconnectSleepTime\ntime in milliseconds to wait between attempts\n@return true if reconnection was successful",
"Appends the given string to the given StringBuilder, replacing '&',\n'<' and '>' by their respective HTML entities.\n\n@param out\nThe StringBuilder to append to.\n@param value\nThe string to append.\n@param offset\nThe character offset into value from where to start",
"This method writes data for an individual calendar to a PM XML file.\n\n@param mpxj ProjectCalander instance",
"Helper method to track storage operations & time via StreamingStats.\n\n@param startNs",
"Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler.",
"Factory method that returns an Identity object created from a serializated representation.\n\n@param anArray The serialized representation\n@return The identity\n@see {@link #serialize}.\n@deprecated",
"Loads the script from a text string.\n@param scriptText text string containing script to execute.\n@param language language (\"js\" or \"lua\")",
"Use this API to delete sslcipher resources of given names."
] |
protected void onNewParentObject(GVRSceneObject parent) {
for (GVRComponent comp : mComponents.values()) {
comp.onNewOwnersParent(parent);
}
} | [
"Called when the scene object gets a new parent.\n\n@param parent New parent of this scene object."
] | [
"Iterates over the contents of an object or collection, and checks whether a\npredicate is valid for at least one element.\n\n@param self the object over which we iterate\n@param closure the closure predicate used for matching\n@return true if any iteration for the object matches the closure predicate\n@since 1.0",
"Obtain collection of profiles\n\n@param model\n@return\n@throws Exception",
"Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque",
"Returns the count of total number of unread inbox messages for the user\n@return int - count of all unread messages",
"Somewhat ad-hoc list of only greek letters that bio people use, partly\nto avoid false positives on short ones.\n@param s String to check for Greek\n@return true iff there is a greek lette embedded somewhere in the String",
"get the underlying wrapped connection\n@return OTMConnection raw connection to the OTM.",
"Responsible for executing file rolls as and when required, in addition to\ndelegating to the super class to perform the actual append operation.\nSynchronized for safety during enforced file roll.\n\n@see org.apache.log4j.WriterAppender#subAppend(org.apache.log4j.spi.LoggingEvent)",
"Deletes an entity by its primary key.\n\n@param id\nPrimary key of the entity.",
"generate a prepared SELECT-Statement for the Class\ndescribed by cld\n@param cld the ClassDescriptor"
] |
public int getFixedDataOffset(FieldType type)
{
int result;
FieldItem item = m_map.get(type);
if (item != null)
{
result = item.getFixedDataOffset();
}
else
{
result = -1;
}
return result;
} | [
"Retrieve the fixed data offset for a specific field.\n\n@param type field type\n@return offset"
] | [
"Defines how messages should be logged. This method can be modified to\nrestrict the logging messages that are shown on the console or to change\ntheir formatting. See the documentation of Log4J for details on how to do\nthis.",
"Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor",
"Sets the last operation response.\n\n@param response the last operation response.",
"Calculate start dates for a daily recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"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",
"Compute costs.",
"Move this rectangle to the specified bottom-left point.\n\n@param rect rectangle to move\n@param x new x origin\n@param y new y origin",
"Use this API to Force clustersync.",
"Get a list of topics from a group.\n\n@param groupId\nUnique identifier of a group returns a list of topics for a given group {@link Group}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A group topic list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html\">API Documentation</a>"
] |
public static void createUsers(GreenMailOperations greenMail, InternetAddress... addresses) {
for (InternetAddress address : addresses) {
greenMail.setUser(address.getAddress(), address.getAddress());
}
} | [
"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"
] | [
"Search for rectangles which have the same width and x position, and\nwhich join together vertically and merge them together to reduce the\nnumber of rectangles needed to describe a symbol.",
"Only one boolean param should be true at a time for this function to return the proper results\n\n@param hostName\n@param enable\n@param disable\n@param remove\n@param isEnabled\n@param exists\n@return\n@throws Exception",
"Get the related tags.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param tag\nThe source tag\n@return A RelatedTagsList object\n@throws FlickrException",
"This method is called to format a date. It will return the null text\nif a null value is supplied.\n\n@param value date value\n@return formatted date value",
"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",
"Returns true if the specified class node is a trait.\n@param cNode a class node to test\n@return true if the classnode represents a trait",
"Apply a filter to the list of all tasks, and show the results.\n\n@param project project file\n@param filter filter",
"from IsoFields in ThreeTen-Backport",
"Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable"
] |
public void execute() {
try {
while(true) {
Event event = null;
try {
event = eventQueue.poll(timeout, unit);
} catch(InterruptedException e) {
throw new InsufficientOperationalNodesException(operation.getSimpleName()
+ " operation interrupted!", e);
}
if(event == null)
throw new VoldemortException(operation.getSimpleName()
+ " returned a null event");
if(event.equals(Event.ERROR)) {
if(logger.isTraceEnabled())
logger.trace(operation.getSimpleName()
+ " request, events complete due to error");
break;
} else if(event.equals(Event.COMPLETED)) {
if(logger.isTraceEnabled())
logger.trace(operation.getSimpleName() + " request, events complete");
break;
}
Action action = eventActions.get(event);
if(action == null)
throw new IllegalStateException("action was null for event " + event);
if(logger.isTraceEnabled())
logger.trace(operation.getSimpleName() + " request, action "
+ action.getClass().getSimpleName() + " to handle " + event
+ " event");
action.execute(this);
}
} finally {
finished = true;
}
} | [
"Process events in the order as they were received.\n\n<p/>\n\nThe overall time to process the events must be within the bounds of the\ntimeout or an {@link InsufficientOperationalNodesException} will be\nthrown."
] | [
"If supported by the WMS server, a parameter \"angle\" can be set on \"customParams\" or \"mergeableParams\".\nIn this case the rotation will be done natively by the WMS.",
"Check if we still need more nodes from the given zone and reduce the\nzoneReplicationFactor count accordingly.\n\n@param requiredRepFactor\n@param zoneId\n@return",
"Sets the bottom padding character for all cells in the table.\n@param paddingBottomChar new padding character, ignored if null\n@return this to allow chaining",
"Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, or the default if the value is null or the key is not part of the map.",
"Validate an RIBean. This includes validating whether two beans specialize\nthe same bean\n\n@param bean the bean to validate\n@param beanManager the current manager\n@param specializedBeans the existing specialized beans",
"This handler will be triggered when search is finish",
"Returns the classDescriptor.\n\n@return ClassDescriptor",
"Validate the Combination filter field in Multi configuration jobs",
"Appends a String to the string representation of this number.\n\n@param value a Number\n@param right a String\n@return a String\n@since 1.0"
] |
public static DMatrixRMaj copyTriangle(DMatrixRMaj src , DMatrixRMaj dst , boolean upper ) {
if( dst == null ) {
dst = new DMatrixRMaj(src.numRows,src.numCols);
} else if( src.numRows != dst.numRows || src.numCols != dst.numCols ) {
throw new IllegalArgumentException("src and dst must have the same dimensions.");
}
if( upper ) {
int N = Math.min(src.numRows,src.numCols);
for( int i = 0; i < N; i++ ) {
int index = i*src.numCols+i;
System.arraycopy(src.data,index,dst.data,index,src.numCols-i);
}
} else {
for( int i = 0; i < src.numRows; i++ ) {
int length = Math.min(i+1,src.numCols);
int index = i*src.numCols;
System.arraycopy(src.data,index,dst.data,index,length);
}
}
return dst;
} | [
"Copies just the upper or lower triangular portion of a matrix.\n\n@param src Matrix being copied. Not modified.\n@param dst Where just a triangle from src is copied. If null a new one will be created. Modified.\n@param upper If the upper or lower triangle should be copied.\n@return The copied matrix."
] | [
"Converts any path into something that can be placed in an Android directory.\n\nTraverses any subdirectories and flattens it all into a single filename. Also\ngets rid of commonly seen illegal characters in tz identifiers, and lower cases\nthe entire thing.\n\n@param path the path to convert\n@return a flat path with no directories (and lower-cased)",
"Use this API to unset the properties of nsacl6 resources.\nProperties that need to be unset are specified in args array.",
"Sets the protocol, hostname and port to connect to.\n\n@param protocol the protocol to use\n@param hostname the host name\n@param port the port\n\n@return the builder",
"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",
"Extracts the row from a matrix.\n@param a Input matrix\n@param row Which row is to be extracted\n@param out output. Storage for the extracted row. If null then a new vector will be returned.\n@return The extracted row.",
"Handling out responce.\n\n@param message\nthe message\n@throws Fault\nthe fault",
"Prepare a batch api request using list of individual reuests.\n@param requests list of api requests that has to be executed in batch.",
"Returns all the dependencies taken into account the artifact of the module that will be removed from the dependencies\n\n@param module Module\n@param producedArtifacts List<String>\n@return Set<Dependency>",
"Read the calendar data from a Gantt Designer file.\n\n@param gantt Gantt Designer file."
] |
private String generateAbbreviatedExceptionMessage(final Throwable throwable) {
final StringBuilder builder = new StringBuilder();
builder.append(": ");
builder.append(throwable.getClass().getCanonicalName());
builder.append(": ");
builder.append(throwable.getMessage());
Throwable cause = throwable.getCause();
while (cause != null) {
builder.append('\n');
builder.append("Caused by: ");
builder.append(cause.getClass().getCanonicalName());
builder.append(": ");
builder.append(cause.getMessage());
// make sure the exception cause is not itself to prevent infinite
// looping
assert (cause != cause.getCause());
cause = (cause == cause.getCause() ? null : cause.getCause());
}
return builder.toString();
} | [
"Method generates abbreviated exception message.\n\n@param message\nOriginal log message\n@param throwable\nThe attached throwable\n@return Abbreviated exception message"
] | [
"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",
"Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFileName The file to write the stream contents to.\n@throws IOException If the stream cannot be copied.",
"Recurses the given folder and adds references to these files to the graph as FileModels.\n\nWe don't set the parent file model in the case of the initial children, as the direct parent is really the archive itself. For example for file\n\"root.zip/pom.xml\" - the parent for pom.xml is root.zip, not the directory temporary directory that happens to hold it.",
"combines all the lists in a collection to a single list",
"Given a HTTPResponce, process it, throwing an error if needed and return a Token for the next\nrequest.",
"Copies the given container page to the provided root path.\n@param originalPage the page to copy\n@param targetPageRootPath the root path of the copy target.\n@throws CmsException thrown if something goes wrong.\n@throws NoCustomReplacementException if a custom replacement is not found for a type which requires it.",
"Use this API to fetch filterpolicy_binding resource of given name .",
"Returns the complete Grapes root URL\n\n@return String",
"Check if the node matches the column values\n\n@param nodeProperties the properties on the node\n@param keyColumnNames the name of the columns to check\n@param keyColumnValues the value of the columns to check\n@return true if the properties of the node match the column names and values"
] |
private static List<Segment> parseSegments(String origPathStr) {
String pathStr = origPathStr;
if (!pathStr.startsWith("/")) {
pathStr = pathStr + "/";
}
List<Segment> result = new ArrayList<>();
for (String segmentStr : PATH_SPLITTER.split(pathStr)) {
Matcher m = SEGMENT_PATTERN.matcher(segmentStr);
if (!m.matches()) {
throw new IllegalArgumentException("Bad aql path: " + origPathStr);
}
Segment segment = new Segment();
segment.attribute = m.group(1);
segment.nodeId = m.groupCount() >= 3 ? m.group(3) : null;
result.add(segment);
}
return result;
} | [
"currently does not support paths with name constrains"
] | [
"Resize the mesh to given size for each axis.\n\n@param mesh Mesh to be resized.\n@param xsize Size for x-axis.\n@param ysize Size for y-axis.\n@param zsize Size fof z-axis.",
"Adds service locator properties to an endpoint reference.\n@param epr\n@param props",
"Loops over cluster and repeatedly tries to break up contiguous runs of\npartitions. After each phase of breaking up contiguous partitions, random\npartitions are selected to move between zones to balance the number of\npartitions in each zone. The second phase may re-introduce contiguous\npartition runs in another zone. Therefore, this overall process is\nrepeated multiple times.\n\n@param nextCandidateCluster\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return updated cluster",
"Run the OnInvariantViolation plugins when an Invariant is violated. Invariant are checked\nwhen the state machine is updated that is when the dom is changed after a click on a\nclickable. When a invariant fails this kind of plugins are executed. Warning the session is\nnot a clone, changing the session can cause strange behaviour of Crawljax.\n\n@param invariant the failed invariants\n@param context the current {@link CrawlerContext} for this crawler.",
"Attempts to return the token from cache. If this is not possible because it is expired or was\nnever assigned, a new token is requested and parallel requests will block on retrieving a new\ntoken. As such no guarantee of maximum latency is provided.\n\nTo avoid blocking the token is refreshed before it's expiration, while parallel requests\ncontinue to use the old token.",
"Attempts to locate the activity type value extracted from an existing P6 schedule.\nIf necessary converts to the form which can be used in the PMXML file.\nReturns \"Resource Dependent\" as the default value.\n\n@param task parent task\n@return activity type",
"Given a Task instance, this task determines if it should be written to the\nPM XML file as an activity or as a WBS item, and calls the appropriate\nmethod.\n\n@param task Task instance",
"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.",
"Convenience method to allow a cause. Grrrr."
] |
public void logout() throws IOException {
if (this.loggedIn) {
Map<String, String> params = new HashMap<>();
params.put("action", "logout");
params.put("format", "json"); // reduce the output
try {
sendJsonRequest("POST", params);
} catch (MediaWikiApiErrorException e) {
throw new IOException(e.getMessage(), e); //TODO: we should throw a better exception
}
this.loggedIn = false;
this.username = "";
this.password = "";
}
} | [
"Logs the current user out.\n\n@throws IOException"
] | [
"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",
"Creates the actual path to the xml file of the module.",
"Ping route Ping the ESI routers\n\n@return ApiResponse<String>\n@throws ApiException\nIf fail to call the API, e.g. server error or cannot\ndeserialize the response body",
"Returns the y-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the y coordinate",
"Find the node corresponding to an entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}\n@return the corresponding node",
"Returns the key for the best matching local-specific property version.\n\n@param propertiesMap the \"raw\" property map\n@param key the name of the property to search for\n@param locale the locale to search for\n\n@return the key for the best matching local-specific property version.",
"Process the given batch of files and pass the results back to the listener as each file is processed.",
"Reads the header data from a block.\n\n@param buffer block data\n@param offset current offset into block data\n@param postHeaderSkipBytes bytes to skip after reading the header\n@return current BlockHeader instance",
"Gets the current instance of plugin manager\n\n@return PluginManager"
] |
public static DMatrixRMaj insideSpan(DMatrixRMaj[] span , double min , double max , Random rand ) {
DMatrixRMaj A = new DMatrixRMaj(span.length,1);
DMatrixRMaj B = new DMatrixRMaj(span[0].getNumElements(),1);
for( int i = 0; i < span.length; i++ ) {
B.set(span[i]);
double val = rand.nextDouble()*(max-min)+min;
CommonOps_DDRM.scale(val,B);
CommonOps_DDRM.add(A,B,A);
}
return A;
} | [
"Creates a random vector that is inside the specified span.\n\n@param span The span the random vector belongs in.\n@param rand RNG\n@return A random vector within the specified span."
] | [
"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.",
"Processes a procedure 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=\"arguments\" optional=\"true\" description=\"The arguments of the procedure as a comma-separated\nlist of names of procedure attribute tags\"\[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=\"include-all-fields\" optional=\"true\" description=\"For insert/update: whether all fields of the current\nclass shall be included (arguments is ignored then)\" values=\"true,false\"\[email protected] name=\"include-pk-only\" optional=\"true\" description=\"For delete: whether all primary key fields\nshall be included (arguments is ignored then)\" values=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the procedure\"\[email protected] name=\"return-field-ref\" optional=\"true\" description=\"Identifies the field that receives the return value\"\[email protected] name=\"type\" optional=\"false\" description=\"The type of the procedure\" values=\"delete,insert,update\"",
"Returns the complete definition of a custom field's metadata.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"Constraint that ensures that the field has a column property. If none is specified, then\nthe name of the field is used.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Sets the left and right frame margin.\n@param frameLeft margin\n@param frameRight margin\n@return this to allow chaining",
"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",
"Prepare a parallel HTTP DELETE Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Add a Opacity bar to the color wheel.\n\n@param bar The instance of the Opacity bar.",
"Append this message to the message set\n@param messages message to append\n@return the written size and first offset\n@throws IOException file write exception"
] |
public void process(InputStream is) throws Exception
{
readHeader(is);
readVersion(is);
readTableData(readTableHeaders(is), is);
} | [
"Extract raw table data from the input stream.\n\n@param is input stream"
] | [
"Clear the mask for a new selection",
"Sets the left padding character for all cells in the row.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining",
"Builds the radio input to set the export and secure property.\n\n@param propName the name of the property to build the radio input for\n\n@return html for the radio input\n\n@throws CmsException if the reading of a property fails",
"Creates and returns a temporary directory for a printing task.",
"Create all the links possible between the DeclarationBinder and all the ImportDeclaration matching the.\nImportDeclarationFilter of the Linker.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder",
"Find out which method to call on the service bean.",
"get specific property value of job.\n\n@param id the id\n@param property the property name/path\n@return the property value",
"Set a friendly name for a client\n\n@param profileId profileId of the client\n@param clientUUID UUID of the client\n@param friendlyName friendly name of the client\n@return return Client object or null\n@throws Exception exception",
"Used by FreeStyle Maven jobs only"
] |
public static String join(Collection<String> s, String delimiter) {
return join(s, delimiter, false);
} | [
"Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String"
] | [
"Adds OPT_P | OPT_PARTITION option to OptionParser, with multiple\narguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Use this API to update csparameter.",
"Method to get the file writer required for the .story files\n\n@param scenarioName\n@param aux_package_path\n@param dest_dir\n@return The file writer that generates the .story files for each test\n@throws BeastException",
"Use this API to fetch aaauser_binding resource of given name .",
"This method returns the value of the product using a Black-Scholes model for the swap rate with the Hunt-Kennedy convexity adjustment.\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve from which the swap rate is calculated. The discount curve, associated with this forward curve is used for discounting this option.\n@param swaprateVolatility The volatility of the log-swaprate.\n@return Value of this product",
"Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler.",
"Handle a \"current till end\" change event.\n@param event the change event.",
"Use this API to fetch all the systemsession resources that are configured on netscaler.",
"Sets the name of the attribute group with which this attribute is associated.\n\n@param attributeGroup the attribute group name. Cannot be an empty string but can be {@code null}\nif the attribute is not associated with a group.\n@return a builder that can be used to continue building the attribute definition"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.