query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static String replaceAll(final CharSequence self, final CharSequence regex, final CharSequence replacement) {
return self.toString().replaceAll(regex.toString(), replacement.toString());
} | [
"Replaces each substring of this CharSequence that matches the given\nregular expression with the given replacement.\n\n@param self a CharSequence\n@param regex the capturing regex\n@param replacement the string to be substituted for each match\n@return the toString() of the CharSequence with content replaced\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceAll(String, String)\n@since 1.8.2"
] | [
"Return all tenors for which data exists.\n\n@return The tenors in months.",
"See if a simple sequence can be used to extract the array. A simple extent is a continuous block from\na min to max index\n\n@return true if it is a simple range or false if not",
"Returns a TypeConverter for a given class.\n\n@param cls The class for which the TypeConverter should be fetched.",
"Specifies the timeout for a network request.\n\n@param timeout The timeout for a network request.\n@param unit The time unit of the specified timeout.\n@return This builder instance.",
"Sets the left and right frame margin.\n@param frameLeft margin\n@param frameRight margin\n@return this to allow chaining",
"Returns a CmsSolrQuery representation of this class.\n@param cms the openCms object.\n@return CmsSolrQuery representation of this class.",
"Sets the category of the notification for iOS8 notification\nactions. See 13 minutes into \"What's new in iOS Notifications\"\n\nPassing {@code null} removes the category.\n\n@param category the name of the category supplied to the app\nwhen receiving the notification\n@return this",
"Turn map into string\n\n@param propMap Map to be converted\n@return",
"Returns whether the division grouping range matches the block of values for its prefix length.\nIn other words, returns true if and only if it has a prefix length and it has just a single prefix."
] |
public static LocalDate getDateFromFloatingPointDate(LocalDate referenceDate, double floatingPointDate) {
if(referenceDate == null) {
return null;
}
return referenceDate.plusDays((int)Math.round(floatingPointDate*365.0));
} | [
"Convert a floating point date to a LocalDate.\n\nNote: This method currently performs a rounding to the next day.\nIn a future extension intra-day time offsets may be considered.\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*365.0) days to referenceDate."
] | [
"Add the elements that all values objects require from the provided values object.\n\n@param sourceValues the values object containing the required elements",
"Allow the given job type to be executed.\n@param jobName the job name as seen\n@param jobType the job type to allow",
"Obtain override ID\n\n@param overrideIdentifier can be the override ID or class name\n@return\n@throws Exception",
"Use this API to fetch all the clusternodegroup resources that are configured on netscaler.",
"Convert an MPXJ Duration instance into an integer duration in minutes\nready to be written to an MPX file.\n\n@param properties project properties, used for duration units conversion\n@param duration Duration instance\n@return integer duration in minutes",
"Appends the given string encoding special HTML characters.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nInput String starting position.\n@param end\nInput String end position.",
"Generated the report.",
"Sets the value associated with the given key; if the the key is one\nof the hashable keys, throws an exception.\n\n@throws HashableCoreMapException Attempting to set the value for an\nimmutable, hashable key.",
"Apply the remote domain model to the local host controller.\n\n@param bootOperations the result of the remote read-domain-model op\n@return {@code true} if the model was applied successfully, {@code false} otherwise"
] |
protected String pauseMsg() throws IOException {
final WorkerStatus status = new WorkerStatus();
status.setRunAt(new Date());
status.setPaused(isPaused());
return ObjectMapperFactory.get().writeValueAsString(status);
} | [
"Create and serialize a WorkerStatus for a pause event.\n\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus"
] | [
"Read an optional Date value form a JSON value.\n@param val the JSON value that should represent the Date as long value in a string.\n@return the Date from the JSON or null if reading the date fails.",
"Set the names of six images in the zip file. The default names of the six\nimages are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\", \"posz.png\",\nand \"negz.png\". If the names of the six images in the zip file are\ndifferent to the default ones, this function must be called before load\nthe zip file.\n\n@param nameArray\nAn array containing six strings which are names of images\ncorresponding to +x, -x, +y, -y, +z, and -z faces of the cube\nmap texture respectively.",
"Use this API to delete nsip6 resources of given names.",
"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.",
"Sets a client option per-request\n\n@param key Option name\n@param value Option value\n@return The request itself",
"Utility method to convert a String to an Integer, and\nhandles null values.\n\n@param value string representation of an integer\n@return int value",
"Calculate the value of a caplet assuming the Black'76 model.\n\n@param forward The forward (spot).\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity\n@param optionStrike The option strike.\n@param periodLength The period length of the underlying forward rate.\n@param discountFactor The discount factor corresponding to the payment date (option maturity + period length).\n@return Returns the value of a caplet under the Black'76 model",
"A specific, existing project can be updated by making a PUT request on the\nURL for that project. Only the fields provided in the `data` block will be\nupdated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated project record.\n\n@param project The project to update.\n@return Request object",
"Registers the transformers for JBoss EAP 7.0.0.\n\n@param subsystemRegistration contains data about the subsystem registration"
] |
public static final BigInteger printTimeUnit(TimeUnit value)
{
return (BigInteger.valueOf(value == null ? TimeUnit.DAYS.getValue() + 1 : value.getValue() + 1));
} | [
"Print time unit.\n\n@param value TimeUnit instance\n@return time unit value"
] | [
"Use this API to unset the properties of clusternodegroup resources.\nProperties that need to be unset are specified in args array.",
"Modify the meta-data for a photoset.\n\n@param photosetId\nThe photoset ID\n@param title\nA new title\n@param description\nA new description (can be null)\n@throws FlickrException",
"Compares two sets of snaks, given by iterators. The method is optimised\nfor short lists of snaks, as they are typically found in claims and\nreferences.\n\n@param snaks1\n@param snaks2\n@return true if the lists are equal",
"This method displays the resource assignments for each resource. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a resource-by-resource basis.\n\n@param file MPX file",
"add a FK column pointing to This Class",
"Returns the value for a given key from the database properties.\n\n@param key the property key\n\n@return the string value for a given key",
"Method to be implemented by the RendererBuilder subtypes. In this method the library user will\ndefine the mapping between content and renderer class.\n\n@param content used to map object to Renderers.\n@return the class associated to the renderer.",
"refresh all primitive typed attributes of a cached instance\nwith the current values from the database.\nrefreshing of reference and collection attributes is not done\nhere.\n@param cachedInstance the cached instance to be refreshed\n@param oid the Identity of the cached instance\n@param cld the ClassDescriptor of cachedInstance",
"Adds service locator properties to an endpoint reference.\n@param epr\n@param props"
] |
public static <T> Object callMethod(Object obj,
Class<T> c,
String name,
Class<?>[] classes,
Object[] args) {
try {
Method m = getMethod(c, name, classes);
return m.invoke(obj, args);
} catch(InvocationTargetException e) {
throw getCause(e);
} catch(IllegalAccessException e) {
throw new IllegalStateException(e);
}
} | [
"Call the named method\n\n@param obj The object to call the method on\n@param c The class of the object\n@param name The name of the method\n@param args The method arguments\n@return The result of the method"
] | [
"detect if WS Addressing feature already enabled.\n\n@param provider the interceptor provider\n@param bus the bus\n@return true, if successful",
"Retrieves the timephased breakdown of the planned overtime work for this\nresource assignment.\n\n@return timephased planned work",
"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",
"returns a Logger.\n\n@param loggerName the name of the Logger\n@return Logger the returned Logger",
"Use this API to fetch all the pqbinding resources that are configured on netscaler.\nThis uses pqbinding_args which is a way to provide additional arguments while fetching the resources.",
"Define the set of extensions.\n\n@param extensions\n@return self",
"Register the given object under the package name of the object's class\nwith the given type name.\n\nthis method using the platform mbean server as returned by\nManagementFactory.getPlatformMBeanServer()\n\n@param typeName The name of the type to register\n@param obj The object to register as an mbean",
"Used to finish up pushing the bulge off the matrix.",
"Get the MonetaryAmount implementation class.\n\n@return the implementation class of the containing amount instance, never null.\n@see MonetaryAmount#getContext()"
] |
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"
] | [
"Fills in the element with the InputValues for input\n\n@param element the node element\n@param input the input data",
"Returns an integer array that contains the current values for all the\ntexture parameters.\n\n@return an integer array that contains the current values for all the\ntexture parameters.",
"See page 385 of Fundamentals of Matrix Computations 2nd",
"Checks that the modified features exist.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Destroys the current session",
"Sets an Integer attribute.\n\n@param key the key, non null.\n@param value the value\n@return the Builder, for chaining.",
"<<<<<< measureUntilFull helper methods",
"Use this API to fetch gslbsite resource of given name .",
"Returns a flag indicating if also expired resources should be found.\n@return A flag indicating if also expired resources should be found."
] |
public DateTimeZone getZone(String id) {
if (id == null) {
return null;
}
Object obj = iZoneInfoMap.get(id);
if (obj == null) {
return null;
}
if (id.equals(obj)) {
// Load zone data for the first time.
return loadZoneData(id);
}
if (obj instanceof SoftReference<?>) {
@SuppressWarnings("unchecked")
SoftReference<DateTimeZone> ref = (SoftReference<DateTimeZone>) obj;
DateTimeZone tz = ref.get();
if (tz != null) {
return tz;
}
// Reference cleared; load data again.
return loadZoneData(id);
}
// If this point is reached, mapping must link to another.
return getZone((String) obj);
} | [
"If an error is thrown while loading zone data, the exception is logged\nto system error and null is returned for this and all future requests.\n\n@param id the id to load\n@return the loaded zone"
] | [
"Validate the header signature.\n\n@param input The input to read the signature from\n@throws IOException If any read problems occur",
"Heat Equation Boundary Conditions",
"Compute the CRC32 of the segment of the byte array given by the\nspecificed size and offset\n\n@param bytes The bytes to checksum\n@param offset the offset at which to begin checksumming\n@param size the number of bytes to checksum\n@return The CRC32",
"The default field facets.\n\n@param categoryConjunction flag, indicating if category selections in the facet should be \"AND\" combined.\n@return the default field facets.",
"Normalize the list of selected categories to fit for the ids of the tree items.",
"Use this API to add authenticationradiusaction resources.",
"Parses the given Reader for PmdRuleSets.\n\n@return The extracted PmdRuleSet - empty in case of problems, never null.",
"Does a query for the object's Id and copies in each of the field values from the database to refresh the data\nparameter.",
"Clones the given collection.\n\n@param collDef The collection descriptor\n@param prefix A prefix for the name\n@return The cloned collection"
] |
@Override
public void start(String[] arguments) {
boolean notStarted = !started.getAndSet(true);
if (notStarted) {
start(new MultiInstanceWorkloadStrategy(factory, name, arguments, endpointRegistry, execService));
}
} | [
"Start the operation by instantiating the first job instance in a separate Thread.\n\n@param arguments {@inheritDoc}"
] | [
"This main method provides an easy command line tool to compare two\nschemas.",
"Determines whether the given array only contains unbounded type variables or Object.class.\n\n@param types the given array of types\n@return true if and only if the given array only contains unbounded type variables or Object.class",
"Generate random time stamps from the current time upto the next one second.\nPassed as texture coordinates to the vertex shader, an unused field is present\nwith every pair passed.\n\n@param totalTime\n@return",
"compute Sinh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"Sets the bit at the specified index.\n@param index The index of the bit to set (0 is the least-significant bit).\n@param set A boolean indicating whether the bit should be set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string.",
"Checks if there's exactly one option that exists among all possible opts.\n\n@param options OptionSet to checked\n@param opt1 Possible required option to check\n@param opt2 Possible required option to check\n@throws VoldemortException",
"Translate the given byte array into a string of 1s and 0s\n\n@param bytes The bytes to translate\n@return The string",
"Registers your facet filters, adding them to this InstantSearch's widgets.\n\n@param filters a List of facet filters.",
"Append Join for SQL92 Syntax"
] |
private void readResources(Document cdp)
{
for (Document.Resources.Resource resource : cdp.getResources().getResource())
{
readResource(resource);
}
} | [
"Reads resource data from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file"
] | [
"Read the relationships for an individual GanttProject task.\n\n@param gpTask GanttProject task",
"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",
"Checks if this service implementation accepts the given resource path.\n@param resourcePath Resource path\n@return true if the implementation matches and the configuration is not invalid.",
"SetLoop will either set the GVRNodeAnimation's Repeat Mode to REPEATED if loop is true.\nor it will set the GVRNodeAnimation's Repeat Mode to ONCE if loop is false\nif loop is set to TRUE, when it was previously FALSE, then start the Animation.\n@param doLoop\n@param gvrContext",
"Sets the permissions associated with this shared link.\n@param permissions the new permissions for this shared link.",
"Processes the most recent dump of the sites table to extract information\nabout registered sites.\n\n@return a Sites objects that contains the extracted information, or null\nif no sites dump was available (typically in offline mode without\nhaving any previously downloaded sites dumps)\n@throws IOException\nif there was a problem accessing the sites table dump or the\ndump download directory",
"Add a dependency to this node.\n\n@param node the dependency to add.",
"Returns the vertex with given ID framed into given interface.",
"Triggers a replication request, blocks while the replication is in progress.\n@return ReplicationResult encapsulating the result"
] |
private static CallSite realBootstrap(Lookup caller, String name, int callID, MethodType type, boolean safe, boolean thisCall, boolean spreadCall) {
// since indy does not give us the runtime types
// we produce first a dummy call site, which then changes the target to one,
// that does the method selection including the the direct call to the
// real method.
MutableCallSite mc = new MutableCallSite(type);
MethodHandle mh = makeFallBack(mc,caller.lookupClass(),name,callID,type,safe,thisCall,spreadCall);
mc.setTarget(mh);
return mc;
} | [
"backing bootstrap method with all parameters"
] | [
"Copied from original SeleniumProxyHandler\nChanged SslRelay to SslListener and getSslRelayOrCreateNew to getSslRelayOrCreateNewOdo\nNo other changes to the function\n\n@param pathInContext\n@param pathParams\n@param request\n@param response\n@throws HttpException\n@throws IOException",
"Check the variable name and if not set, set it with the singleton variable name being on the top of the stack.",
"Use this API to update onlinkipv6prefix resources.",
"this method is basically checking whether we can return \"this\" for getNetworkSection",
"Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards.\n\n@param key\nname of the parameter to add\n@param value\nvalue of the parameter to create\n@return the newly created parameter",
"This method is called to format a percentage value.\n\n@param value numeric value\n@return percentage value",
"Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to process.",
"Add SQL to handle a unique=true field. THis is not for uniqueCombo=true.",
"Creates a resource key with id defined as enumeration value name and bundle specified by given class.\n@param clazz the class owning the bundle\n@param value enumeration value used to define key id\n@return the resource key"
] |
protected void maybeSignalForMoreConnections(ConnectionPartition connectionPartition) {
if (!connectionPartition.isUnableToCreateMoreTransactions()
&& !this.poolShuttingDown &&
connectionPartition.getAvailableConnections()*100/connectionPartition.getMaxConnections() <= this.poolAvailabilityThreshold){
connectionPartition.getPoolWatchThreadSignalQueue().offer(new Object()); // item being pushed is not important.
}
} | [
"Tests if this partition has hit a threshold and signal to the pool watch thread to create new connections\n@param connectionPartition to test for."
] | [
"Creates PollingState from another polling state.\n\n@param other other polling state\n@param result the final result of the LRO\n@param <ResultT> the result that the poll operation produces\n@return the polling state",
"Use this API to fetch responderpolicylabel_responderpolicy_binding resources of given name .",
"Calculates the LatLong position of the end point of a line the specified\ndistance from this LatLong, along the provided bearing, where North is 0,\nEast is 90 etc.\n\n@param bearing The bearing, in degrees, with North as 0, East as 90 etc.\n@param distance The distance in metres.\n@return A new LatLong indicating the end point.",
"Remove an read lock.",
"Checks the orderby attribute.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for orderby is invalid (unknown field or ordering)",
"Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start",
"Update the object in the database.",
"Assigns an element a value based on its index in the internal array..\n\n@param index The matrix element that is being assigned a value.\n@param value The element's new value.",
"Separate from other findNonProgressingOp variant to allow unit testing without needing a mock OperationContext"
] |
private void deliverMasterYieldResponse(int fromPlayer, boolean yielded) {
for (final MasterHandoffListener listener : getMasterHandoffListeners()) {
try {
listener.yieldResponse(fromPlayer, yielded);
} catch (Throwable t) {
logger.warn("Problem delivering master yield response to listener", t);
}
}
} | [
"Send a master handoff yield response to all registered listeners.\n\n@param fromPlayer the device number that is responding to our request that it yield the tempo master role to us\n@param yielded will be {@code true} if we should now be the tempo master"
] | [
"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.",
"Reconnect to the HC.\n\n@return whether the server is still in sync\n@throws IOException",
"Add the set with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The set with all bundles to add.",
"Get a collection of public photos for the specified user ID.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param userId\nThe User ID\n@param extras\nSet of extra-attributes to include (may be null)\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return The PhotoList collection\n@throws FlickrException",
"Check the given JWT\n\n@param jwtString the JSON Web Token\n@return the parsed and verified token or null if token is invalid\n@throws ParseException if the token cannot be parsed",
"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.",
"Invoke an HTTP GET request on a remote host. You must close the InputStream after you are done with.\n\n@param path The request path\n@param parameters The parameters (collection of Parameter objects)\n@return The Response",
"Triggers a replication request, blocks while the replication is in progress.\n@return ReplicationResult encapsulating the result",
"Synchronize the geotools transaction with the platform transaction, if such a transaction is active.\n\n@param featureStore\n@param dataSource"
] |
public static Object instantiate(Class clazz) throws InstantiationException
{
Object result = null;
try
{
result = ClassHelper.newInstance(clazz);
}
catch(IllegalAccessException e)
{
try
{
result = ClassHelper.newInstance(clazz, true);
}
catch(Exception e1)
{
throw new ClassNotPersistenceCapableException("Can't instantiate class '"
+ (clazz != null ? clazz.getName() : "null")
+ "', message was: " + e1.getMessage() + ")", e1);
}
}
return result;
} | [
"create a new instance of class clazz.\nfirst use the public default constructor.\nIf this fails also try to use protected an private constructors.\n@param clazz the class to instantiate\n@return the fresh instance of class clazz\n@throws InstantiationException"
] | [
"Adds the parent package to the java.protocol.handler.pkgs system property.",
"Process an individual work week day.\n\n@param data calendar data\n@param offset current offset into data\n@param week parent week\n@param day current day",
"Constructs credentials for the given account and key file.\n\n@param serviceAccountId service account ID (typically an e-mail address).\n@param privateKeyFile the file name from which to get the private key.\n@param serviceAccountScopes Collection of OAuth scopes to use with the the service\naccount flow or {@code null} if not.\n@return valid credentials or {@code null}",
"Mark root of this DAG depends on given DAG's root.\n\n@param dependencyGraph the dependency DAG",
"Adds an EJB descriptor to the maps\n\n@param ejbDescriptor The EJB descriptor to add",
"Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws IOException on consume error",
"Obtains a British Cutover zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"This method is called to format a relation.\n\n@param relation relation instance\n@return formatted relation instance",
"Uploads a new file to this folder while reporting the progress to a ProgressListener.\n\n@param fileContent a stream containing the contents of the file to upload.\n@param name the name to give the uploaded file.\n@param fileSize the size of the file used for determining the progress of the upload.\n@param listener a listener for monitoring the upload's progress.\n@return the uploaded file's info."
] |
@Override
public void start(String[] arguments) {
boolean notStarted = !started.getAndSet(true);
if (notStarted) {
start(new SingleInstanceWorkloadStrategy(job, name, arguments, endpointRegistry, execService));
}
} | [
"Starts the one and only job instance in a separate Thread. Should be called exactly one time before\nthe operation is stopped.\n\n@param arguments {@inheritDoc}"
] | [
"Process calendar hours.\n\n@param calendar parent calendar\n@param row calendar hours data\n@param dayIndex day index",
"Gathers the pk fields from the hierarchy of the given class, and copies them into the class.\n\n@param classDef The root of the hierarchy\n@throws ConstraintException If there is a conflict between the pk fields",
"Write file creation record.\n\n@throws IOException",
"Sets the left and right frame margin.\n@param frameLeft margin\n@param frameRight margin\n@return this to allow chaining",
"Saves the list of currently displayed favorites.",
"Runs a Story with the given steps factory, applying the given meta\nfilter, and staring from given state.\n\n@param configuration the Configuration used to run story\n@param stepsFactory the InjectableStepsFactory used to created the\ncandidate steps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@param beforeStories the State before running any of the stories, if not\n<code>null</code>\n\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.",
"On complete.\nSave response headers when needed.\n\n@param response\nthe response\n@return the response on single request",
"Write throwable as attachment.\n\n@param throwable to write\n@param title title of attachment\n@return Created {@link ru.yandex.qatools.allure.model.Attachment}",
"Checks if the specified longitude is correct.\n\n@param name the name of the longitude field\n@param longitude the value of the longitude field\n@return the longitude"
] |
public static String getAt(GString text, Range range) {
return getAt(text.toString(), range);
} | [
"Support the range subscript operator for GString\n\n@param text a GString\n@param range a Range\n@return the String of characters corresponding to the provided range\n@since 2.3.7"
] | [
"Does the headset the device is docked into have a dedicated home key\n@return",
"Will auto format the given string to provide support for pickadate.js formats.",
"Remove a DropPasteWorker from the helper.\n@param worker the worker that should be removed",
"Returns the total number of times the app has been launched\n@return Total number of app launches in int",
"Set the row, column, and value\n\n@return this",
"Return an input stream to read the data from the named table.\n\n@param name table name\n@return InputStream instance\n@throws IOException",
"Pushes a basic event.\n\n@param eventName The name of the event",
"Update the descriptor content with values from the editor.\n@throws CmsXmlException thrown if update fails due to a wrong XML structure (should never happen)",
"This method converts a node to text.\n\nLeading and trailing text from hidden tokens (whitespace/comments) is removed. Text from hidden tokens that is\nsurrounded by text from non-hidden tokens is summarized to a single whitespace.\n\nThe preferred use case of this method is to convert the {@link ICompositeNode} that has been created for a data\ntype rule to text.\n\nThis is also the recommended way to convert a node to text if you want to invoke\n{@link org.eclipse.xtext.conversion.IValueConverterService#toValue(String, String, INode)}"
] |
@SuppressWarnings("unchecked")
public <T extends StatementDocument> T nullEdit(T currentDocument)
throws IOException, MediaWikiApiErrorException {
StatementUpdate statementUpdate = new StatementUpdate(currentDocument,
Collections.<Statement>emptyList(), Collections.<Statement>emptyList());
statementUpdate.setGuidGenerator(guidGenerator);
return (T) this.wbEditingAction.wbEditEntity(currentDocument
.getEntityId().getId(), null, null, null, statementUpdate
.getJsonUpdateString(), false, this.editAsBot, currentDocument
.getRevisionId(), null);
} | [
"Performs a null edit on an entity. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param currentDocument\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection"
] | [
"Removes the task from wait q.\n\n@param taskTobeRemoved\nthe task tobe removed\n@return true, if successful",
"Select a List of characters from a CharSequence using a Collection\nto identify the indices to be selected.\n\n@param self a CharSequence\n@param indices a Collection of indices\n@return a String consisting of the characters at the given indices\n@since 1.0",
"Get the primitive attributes for the associated object.\n\n@return attributes for associated objects\n@deprecated replaced by {@link #getAllAttributes()} after introduction of nested associations",
"Renames the current base log file to the roll file name.\n\n@param from\nThe current base log file.\n@param to\nThe backup file.",
"Delete a file ignoring failures.\n\n@param file file to delete",
"Handler for month changes.\n@param event change event.",
"Return the number of ignored or assumption-ignored tests.",
"Get a list of referrers from a given domain to a photo.\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 photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos 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.getPhotoReferrers.html\"",
"returns position of xpath element which match the expression xpath in the String dom.\n\n@param dom the Document to search in\n@param xpath the xpath query\n@return position of xpath element, if fails returns -1"
] |
private void writeCostRateTables(Project.Resources.Resource xml, Resource mpx)
{
//Rates rates = m_factory.createProjectResourcesResourceRates();
//xml.setRates(rates);
//List<Project.Resources.Resource.Rates.Rate> ratesList = rates.getRate();
List<Project.Resources.Resource.Rates.Rate> ratesList = null;
for (int tableIndex = 0; tableIndex < 5; tableIndex++)
{
CostRateTable table = mpx.getCostRateTable(tableIndex);
if (table != null)
{
Date from = DateHelper.FIRST_DATE;
for (CostRateTableEntry entry : table)
{
if (costRateTableWriteRequired(entry, from))
{
if (ratesList == null)
{
Rates rates = m_factory.createProjectResourcesResourceRates();
xml.setRates(rates);
ratesList = rates.getRate();
}
Project.Resources.Resource.Rates.Rate rate = m_factory.createProjectResourcesResourceRatesRate();
ratesList.add(rate);
rate.setCostPerUse(DatatypeConverter.printCurrency(entry.getCostPerUse()));
rate.setOvertimeRate(DatatypeConverter.printRate(entry.getOvertimeRate()));
rate.setOvertimeRateFormat(DatatypeConverter.printTimeUnit(entry.getOvertimeRateFormat()));
rate.setRatesFrom(from);
from = entry.getEndDate();
rate.setRatesTo(from);
rate.setRateTable(BigInteger.valueOf(tableIndex));
rate.setStandardRate(DatatypeConverter.printRate(entry.getStandardRate()));
rate.setStandardRateFormat(DatatypeConverter.printTimeUnit(entry.getStandardRateFormat()));
}
}
}
}
} | [
"Writes a resource's cost rate tables.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource"
] | [
"The selectionStrategy given as String argument is selected as locatorSelectionStrategy.\nIf selectionStrategy is null, the defaultLocatorSelectionStrategy is used instead.\nThen the new locatorSelectionStrategy is connected to the locatorClient and the matcher.\nA new LocatorTargetSelector is created, set to the locatorSelectionStrategy and then set\nas selector in the conduitSelectorHolder.\n\n@param conduitSelectorHolder\n@param matcher\n@param selectionStrategy",
"This method skips the end-of-line markers in the RTF document.\nIt also indicates if the end of the embedded object has been reached.\n\n@param text RTF document test\n@param offset offset into the RTF document\n@return new offset",
"Reads a stringtemplate group from a stream.\n\nThis will always return a group (empty if necessary), even if reading it from the stream fails.\n\n@param stream the stream to read from\n@return the string template group",
"For a given activity, retrieve a map of the activity code values which have been assigned to it.\n\n@param activity target activity\n@return map of activity code value UUIDs",
"Update the context session to mark a user logged in\n\n@param userIdentifier\nthe user identifier, could be either userId or username",
"add a join between two aliases\n\nTODO BRJ : This needs refactoring, it looks kind of weird\n\nno extents\nA1 -> A2\n\nextents on the right\nA1 -> A2\nA1 -> A2E0\n\nextents on the left : copy alias on right, extents point to copies\nA1 -> A2\nA1E0 -> A2C0\n\nextents on the left and right\nA1 -> A2\nA1 -> A2E0\nA1E0 -> A2C0\nA1E0 -> A2E0C0\n\n@param left\n@param leftKeys\n@param right\n@param rightKeys\n@param outer\n@param name",
"Set the group name\n\n@param name new name of server group\n@param id ID of group",
"Returns true if this Bytes object equals another. This method doesn't check it's arguments.\n\n@since 1.2.0",
"Adds a patch operation.\n@param op the operation type. Must be add, replace, remove, or test.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value to be set."
] |
public static void generateJavaFiles(String requirementsFolder,
String platformName, String src_test_dir, String tests_package,
String casemanager_package, String loggingPropFile)
throws Exception {
File reqFolder = new File(requirementsFolder);
if (reqFolder.isDirectory()) {
for (File f : reqFolder.listFiles()) {
if (f.getName().endsWith(".story")) {
try {
SystemReader.generateJavaFilesForOneStory(
f.getCanonicalPath(), platformName,
src_test_dir, tests_package,
casemanager_package, loggingPropFile);
} catch (IOException e) {
String message = "ERROR: " + e.getMessage();
logger.severe(message);
throw new BeastException(message, e);
}
}
}
for (File f : reqFolder.listFiles()) {
if (f.isDirectory()) {
SystemReader.generateJavaFiles(requirementsFolder
+ File.separator + f.getName(), platformName,
src_test_dir, tests_package + "." + f.getName(),
casemanager_package, loggingPropFile);
}
}
} else if (reqFolder.getName().endsWith(".story")) {
SystemReader.generateJavaFilesForOneStory(requirementsFolder,
platformName, src_test_dir, tests_package,
casemanager_package, loggingPropFile);
} else {
String message = "No story file found in " + requirementsFolder;
logger.severe(message);
throw new BeastException(message);
}
} | [
"Main method of the class, which handles the process of creating the tests\n\n@param requirementsFolder\n, it is the folder where the plain text given by the client is\nstored\n@param platformName\n, to choose the MAS platform (JADE, JADEX, etc.)\n@param src_test_dir\n, the folder where our classes are created\n@param tests_package\n, the name of the package where the stories are created\n@param casemanager_package\n, the path where casemanager must be created\n@param loggingPropFile\n, properties file\n@throws Exception\n, if any error is found in the configuration"
] | [
"Build query string.\n@return Query string or null if query string contains no parameters at all.",
"Loads the data from the database. Override this method if the objects\nshall be loaded in a specific way.\n\n@return The loaded data",
"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",
"Heat Equation Boundary Conditions",
"Removes 'original' and places 'target' at the same location",
"Called by the engine to trigger the cleanup at the end of a payload thread.",
"Read exceptions for a calendar.\n\n@param table calendar exception data\n@param calendar calendar\n@param exceptionID first exception ID",
"Writes the timephased data for a resource assignment.\n\n@param mpx MPXJ assignment\n@param xml MSDPI assignment",
"Check if the property is part of the identifier of the entity.\n\n@param persister the {@link OgmEntityPersister} of the entity with the property\n@param namesWithoutAlias the path to the property with all the aliases resolved\n@return {@code true} if the property is part of the id, {@code false} otherwise."
] |
private boolean exceedsScreenDimensions(InternalFeature f, double scale) {
Envelope env = f.getBounds();
return (env.getWidth() * scale > MAXIMUM_TILE_COORDINATE) ||
(env.getHeight() * scale > MAXIMUM_TILE_COORDINATE);
} | [
"The test that checks if clipping is needed.\n\n@param f\nfeature to test\n@param scale\nscale\n@return true if clipping is needed"
] | [
"Use this API to fetch filtered set of vpnglobal_auditnslogpolicy_binding resources.\nset the filter parameter values in filtervalue object.",
"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",
"Runs the record linkage process.",
"Create a forward curve from given times and discount factors.\n\nThe forward curve will have times.length-1 fixing times from times[0] to times[times.length-2]\n<code>\nforward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]);\n</code>\nNote: If time[0] > 0, then the discount factor 1.0 will inserted at time 0.0\n\n@param name The name of this curve.\n@param times A vector of given time points.\n@param givenDiscountFactors A vector of given discount factors (corresponding to the given time points).\n@param paymentOffset The maturity of the underlying index modeled by this curve.\n@return A new ForwardCurve object.",
"Use this API to update tmtrafficaction.",
"Check if the path to the property correspond to an association.\n\n@param targetTypeName the name of the entity containing the property\n@param pathWithoutAlias the path to the property WITHOUT aliases\n@return {@code true} if the property is an association or {@code false} otherwise",
"Load a model to attach to the avatar\n@param avatarResource resource with avatar model\n@param attachBone name of bone to attach model to",
"Extracts the service name from a Server.\n@param server\n@return",
"Returns a query filter for the given document _id and version. The version is allowed to be\nnull. The query will match only if there is either no version on the document in the database\nin question if we have no reference of the version or if the version matches the database's\nversion.\n\n@param documentId the _id of the document.\n@param version the expected version of the document, if any.\n@return a query filter for the given document _id and version for a remote operation."
] |
public final void addRule(TableRowStyle style){
Validate.notNull(style);
Validate.validState(style!=TableRowStyle.UNKNOWN, "cannot add a rule of unknown style");
this.rows.add(AT_Row.createRule(TableRowType.RULE, style));
} | [
"Adds a rule row to the table with a given style.\n@param style the rule style, must not be null nor {@link TableRowStyle#UNKNOWN}\n@throws {@link NullPointerException} if style was null\n@throws {@link IllegalArgumentException} if style was {@link TableRowStyle#UNKNOWN}"
] | [
"Use this API to unset the properties of rnatparam resource.\nProperties that need to be unset are specified in args array.",
"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",
"Will scale the image down before processing for\nperformance enhancement and less memory usage\nsacrificing image quality.\n\n@param scaleInSample value greater than 1 will scale the image width/height, so 2 will getFromDiskCache you 1/4\nof the original size and 4 will getFromDiskCache you 1/16 of the original size - this just sets\nthe inSample size in {@link android.graphics.BitmapFactory.Options#inSampleSize } and\nbehaves exactly the same, so keep the value 2^n for least scaling artifacts",
"Build list of style filters from style definitions.\n\n@param styleDefinitions\nlist of style definitions\n@return list of style filters\n@throws GeomajasException",
"We have a directory. Determine if this contains a multi-file database we understand, if so\nprocess it. If it does not contain a database, test each file within the directory\nstructure to determine if it contains a file whose format we understand.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null",
"Update list of sorted services by copying it from the array and making it unmodifiable.",
"Use this API to fetch the statistics of all systemmemory_stats resources that are configured on netscaler.",
"Gets the string representation of the path to the current JSON element.\n\n@param key the leaf key",
"Use this API to fetch authenticationvserver_authenticationradiuspolicy_binding resources of given name ."
] |
private void populateRecurringTask(Record record, RecurringTask task) throws MPXJException
{
//System.out.println(record);
task.setStartDate(record.getDateTime(1));
task.setFinishDate(record.getDateTime(2));
task.setDuration(RecurrenceUtility.getDuration(m_projectFile.getProjectProperties(), record.getInteger(3), record.getInteger(4)));
task.setOccurrences(record.getInteger(5));
task.setRecurrenceType(RecurrenceUtility.getRecurrenceType(record.getInteger(6)));
task.setUseEndDate(NumberHelper.getInt(record.getInteger(8)) == 1);
task.setWorkingDaysOnly(NumberHelper.getInt(record.getInteger(9)) == 1);
task.setWeeklyDaysFromBitmap(RecurrenceUtility.getDays(record.getString(10)), RecurrenceUtility.RECURRING_TASK_DAY_MASKS);
RecurrenceType type = task.getRecurrenceType();
if (type != null)
{
switch (task.getRecurrenceType())
{
case DAILY:
{
task.setFrequency(record.getInteger(13));
break;
}
case WEEKLY:
{
task.setFrequency(record.getInteger(14));
break;
}
case MONTHLY:
{
task.setRelative(NumberHelper.getInt(record.getInteger(11)) == 1);
if (task.getRelative())
{
task.setFrequency(record.getInteger(17));
task.setDayNumber(record.getInteger(15));
task.setDayOfWeek(RecurrenceUtility.getDay(record.getInteger(16)));
}
else
{
task.setFrequency(record.getInteger(19));
task.setDayNumber(record.getInteger(18));
}
break;
}
case YEARLY:
{
task.setRelative(NumberHelper.getInt(record.getInteger(12)) != 1);
if (task.getRelative())
{
task.setDayNumber(record.getInteger(20));
task.setDayOfWeek(RecurrenceUtility.getDay(record.getInteger(21)));
task.setMonthNumber(record.getInteger(22));
}
else
{
task.setYearlyAbsoluteFromDate(record.getDateTime(23));
}
break;
}
}
}
//System.out.println(task);
} | [
"Populates a recurring task.\n\n@param record MPX record\n@param task recurring task\n@throws MPXJException"
] | [
"Use this API to update cacheselector.",
"Run through all maps and remove any references that have been null'd out by the GC.",
"Use this API to fetch dnspolicylabel resource of given name .",
"Get the VCS url from the Jenkins build environment. The search will one of \"SVN_REVISION\", \"GIT_COMMIT\",\n\"P4_CHANGELIST\" in the environment.\n\n@param env Th Jenkins build environment.\n@return The vcs url for supported VCS",
"Returns the list of nodes which match the expression xpathExpr in the Document dom.\n\n@param dom the Document to search in\n@param xpathExpr the xpath query\n@return the list of nodes which match the query\n@throws XPathExpressionException On error.",
"Use this API to update dbdbprofile resources.",
"Sets the bottom padding for all cells in the table.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining",
"Export the modules that should be checked in into git.",
"Sets all elements in this matrix to their absolute values. Note\nthat this operation is in-place.\n@see MatrixFunctions#abs(DoubleMatrix)\n@return this matrix"
] |
public static base_responses delete(nitro_service client, String Dnssuffix[]) throws Exception {
base_responses result = null;
if (Dnssuffix != null && Dnssuffix.length > 0) {
dnssuffix deleteresources[] = new dnssuffix[Dnssuffix.length];
for (int i=0;i<Dnssuffix.length;i++){
deleteresources[i] = new dnssuffix();
deleteresources[i].Dnssuffix = Dnssuffix[i];
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | [
"Use this API to delete dnssuffix resources of given names."
] | [
"Returns the classDescriptor.\n\n@return ClassDescriptor",
"Shutdown the socket server",
"Finds the parent group of the given one and returns it\n\n@param group Group for which the parent is needed\n@return The parent group of the given one. If the given one is the first one, it returns the same group",
"20130512 Converts the sdsm string generated above to Date format.\n\n@param str\nthe str\n@return the date from concise str",
"Obtain the class of a given className\n\n@param className\n@return\n@throws Exception",
"Closes the connection to the Z-Wave controller.",
"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",
"given the groupName, it returns the groupId\n\n@param groupName name of group\n@return ID of group",
"Send message to all connections labeled with tag specified\nwith self connection excluded\n\n@param message the message to be sent\n@param tag the string that tag the connections to be sent\n@return this context"
] |
public static <R extends Resource<?>, U extends PaginatedResponse<R>> Flux<R> getResources(U response) {
return Flux.fromIterable(response.getResources());
} | [
"Return a stream of resources from a response\n\n@param response the response\n@param <R> the resource type\n@param <U> the response type\n@return a stream of resources from the response"
] | [
"Cleans up the given group and adds it to the list of groups if still valid\n@param group\n@param groups",
"returns an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searched objects\n@param query the query",
"Read a task relationship.\n\n@param link ConceptDraw PROJECT task link",
"Deselects all child items of the provided item.\n@param item the item for which all childs should be deselected.d",
"Get the schema for the Avro Record from the object container file",
"Returns true if a List literal that contains only entries that are constants.\n@param expression - any expression",
"Detect what has changed in the store definition and rewire BDB\nenvironments accordingly.\n\n@param storeDef updated store definition",
"Use this API to fetch all the appflowpolicylabel resources that are configured on netscaler.",
"Read holidays from the database and create calendar exceptions."
] |
public List<I_CmsEditableGroupRow> getRows() {
List<I_CmsEditableGroupRow> result = Lists.newArrayList();
for (Component component : m_container) {
if (component instanceof I_CmsEditableGroupRow) {
result.add((I_CmsEditableGroupRow)component);
}
}
return result;
} | [
"Gets all rows.\n\n@return the list of all rows"
] | [
"Computes the decomposition of the provided matrix. If no errors are detected then true is returned,\nfalse otherwise.\n@param A The matrix that is being decomposed. Not modified.\n@return If it detects any errors or not.",
"Remove write.lock file in the data directory to ensure the index is unlocked.\n@param dataDir the data directory of the Solr index that should be unlocked.",
"Calculates a column title using camel humps to separate words.\n@param _property the property descriptor.\n@return the column title for the given property.",
"This is the main entry point used to convert the internal representation\nof timephased baseline work into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param work timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range",
"Add image in the document.\n\n@param context\nPDF context\n@param imageResult\nimage\n@throws BadElementException\nPDF construction problem\n@throws IOException\nPDF construction problem",
"Use this API to fetch appfwpolicy_csvserver_binding resources of given name .",
"Returns the response error stream, handling the case when it contains gzipped data.\n@return gzip decoded (if needed) error stream or null",
"Sends a server command continuation request '+' back to the client,\nrequesting more data to be sent.",
"Update list of sorted services by copying it from the array and making it unmodifiable."
] |
private static boolean isCollectionMatching(Joinable mainSideJoinable, OgmCollectionPersister inverseSidePersister) {
boolean isSameTable = mainSideJoinable.getTableName().equals( inverseSidePersister.getTableName() );
if ( !isSameTable ) {
return false;
}
return Arrays.equals( mainSideJoinable.getKeyColumnNames(), inverseSidePersister.getElementColumnNames() );
} | [
"Checks whether table name and key column names of the given joinable and inverse collection persister match."
] | [
"Fetch all relevant attributes from the backing store and copy instances which are not present in the local bean store.",
"Saves the current translations from the container to the respective localization.",
"Get the number of views, comments and favorites on a photoset for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param photosetId\n(Required) The id of the photoset to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotosetStats.htm\"",
"Remove a license from an artifact\n\n@param gavc String The artifact GAVC\n@param licenseId String The license id to be removed.",
"Parse a command line with the defined command as base of the rules.\nIf any options are found, but not defined in the command object an\nCommandLineParserException will be thrown.\nAlso, if a required option is not found or options specified with value,\nbut is not given any value an CommandLineParserException will be thrown.\n\n@param line input\n@param mode parser mode",
"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",
"Assembles an avro format string of single store config from store\nproperties\n\n@param props Store properties\n@return String in avro format that contains single store configs",
"Add groups to the tree.\n\n@param parentNode parent tree node\n@param file group container",
"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."
] |
public Set<Action.ActionEffect> getActionEffects() {
switch(getImpact()) {
case CLASSLOADING:
case WRITE:
return WRITES;
case READ_ONLY:
return READS;
default:
throw new IllegalStateException();
}
} | [
"Gets the effects of this action.\n\n@return the effects. Will not be {@code null}"
] | [
"Calls all initializers of the bean\n\n@param instance The bean instance",
"remove an objects entry from the object registry",
"Flips the output buffer, and lets the Selector know we're ready to write.\n\n@param selectionKey",
"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",
"This method is used to initiate a release staging process using the Artifactory Release Staging API.",
"Creates AzureAsyncOperation from the given HTTP response.\n\n@param serializerAdapter the adapter to use for deserialization\n@param response the response\n@return the async operation object\n@throws CloudException if the deserialization fails or response contains invalid body",
"Calculates how much of a time range is before or after a\ntarget intersection point.\n\n@param start time range start\n@param end time range end\n@param target target intersection point\n@param after true if time after target required, false for time before\n@return length of time in milliseconds",
"Defers an event for processing in a later phase of the current\ntransaction.\n\n@param metadata The event object",
"for testing purpose"
] |
public CurrencyQueryBuilder setNumericCodes(int... codes) {
return set(CurrencyQuery.KEY_QUERY_NUMERIC_CODES,
Arrays.stream(codes).boxed().collect(Collectors.toList()));
} | [
"Set the numeric code. Setting it to -1 search for currencies that have no numeric code.\n\n@param codes the numeric codes.\n@return the query for chaining."
] | [
"Creates a new access control entry and stores it for later write out.\n\n@param res the resource\n@param id the id of the principal\n@param allowed the allowed permissions\n@param denied the denied permissions\n@param flags the flags\n\n@return the created ACE",
"Adds a word to the end of the token list\n@param word word which is to be added\n@return The new Token created around symbol",
"Populates a ProjectCalendarWeek instance from Asta work pattern data.\n\n@param week target ProjectCalendarWeek instance\n@param workPatternID target work pattern ID\n@param workPatternMap work pattern data\n@param timeEntryMap time entry map\n@param exceptionTypeMap exception type map",
"Use this API to fetch statistics of nspbr6_stats resource of given name .",
"Retrieves the timephased breakdown of actual cost.\n\n@return timephased actual cost",
"Gets read-only metadata.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeIds Node ids to fetch read-only metadata from\n@param storeNames Stores names to fetch read-only metadata from\n@param metaKeys List of read-only metadata to fetch\n@throws IOException",
"Create a handful of default currencies to keep Primavera happy.",
"Parse a currency symbol position value.\n\n@param value currency symbol position\n@return CurrencySymbolPosition instance",
"Gets a string attribute from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attribute as a {@link String}, or null if it was not found."
] |
public void addConverter(int index, IConverter converter) {
converterList.add(index, converter);
if (converter instanceof IContainerConverter) {
IContainerConverter containerConverter = (IContainerConverter) converter;
if (containerConverter.getElementConverter() == null) {
containerConverter.setElementConverter(elementConverter);
}
}
} | [
"add converter at given index. The index can be changed during conversion\nif canReorder is true\n\n@param index\n@param converter"
] | [
"Check whether vector addition works. This is pure Java code and should work.",
"Extracts the data for a single file from the input stream and writes\nit to a target directory.\n\n@param stream input stream\n@param dir target directory",
"Adds a filter definition to this project file.\n\n@param filter filter definition",
"Add a mapping of properties between two beans\n\n@param beanToBeanMapping",
"Creates a single property declaration.\n@param property Property name.\n@param term Property value.\n@return The resulting declaration.",
"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.",
"Indicates if a bean is proxyable\n\n@param bean The bean to test\n@return True if proxyable, false otherwise",
"This method writes data for a single calendar to a Planner file.\n\n@param mpxjCalendar MPXJ calendar instance\n@param plannerCalendar Planner calendar instance\n@throws JAXBException on xml creation errors",
"Sends the collected dependencies over to the master and record them."
] |
@Override
public void perform(Rewrite event, EvaluationContext context)
{
perform((GraphRewrite) event, context);
} | [
"Called internally to actually process the Iteration."
] | [
"Resolves the gav using the resolver. If the gav corresponds to the project artifact and is an unresolved version\nfor a RELEASE or LATEST, the gav is resolved such it a release not newer than the project version is found that\noptionally corresponds to the provided version regex, if provided.\n\n<p>If the gav exactly matches the current project, the file of the artifact is found on the filesystem in\ntarget directory and the resolver is ignored.\n\n@param project the project to restrict by, if applicable\n@param gav the gav to resolve\n@param versionRegex the optional regex the version must match to be considered.\n@param resolver the version resolver to use\n@return the resolved artifact matching the criteria.\n@throws VersionRangeResolutionException on error\n@throws ArtifactResolutionException on error",
"Register the given mbean with the server\n\n@param server The server to register with\n@param mbean The mbean to register\n@param name The name to register under",
"Pre API 11, this does an alpha animation.\n\n@param progress",
"Returns information for a specific client\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return\n@throws Exception",
"Computes the tree edit distance between trees t1 and t2.\n\n@param t1\n@param t2\n@return tree edit distance between trees t1 and t2",
"This method is used to extract the task hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param task task instance\n@param data hyperlink data block",
"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",
"Produces an IPv4 address from any sequence of 4 bytes in this IPv6 address.\n\n@param byteIndex the byte index to start\n@throws IndexOutOfBoundsException if the index is less than zero or bigger than 7\n@return",
"Serialize a parameterized object to an OutputStream.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType<MyModel<OtherModel>>() { }, os);\n@param os The OutputStream being written to."
] |
public static RebalanceTaskInfo decodeRebalanceTaskInfoMap(VAdminProto.RebalanceTaskInfoMap rebalanceTaskInfoMap) {
RebalanceTaskInfo rebalanceTaskInfo = new RebalanceTaskInfo(
rebalanceTaskInfoMap.getStealerId(),
rebalanceTaskInfoMap.getDonorId(),
decodeStoreToPartitionIds(rebalanceTaskInfoMap.getPerStorePartitionIdsList()),
new ClusterMapper().readCluster(new StringReader(rebalanceTaskInfoMap.getInitialCluster())));
return rebalanceTaskInfo;
} | [
"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."
] | [
"Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise.",
"Processes the template for all column definitions of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Set some initial values.",
"Perform the given work with a Jedis connection from the given pool.\nWraps any thrown checked exceptions in a RuntimeException.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work",
"Returns the duration of the measured tasks in ms",
"Searches for a sequence of integers\n\nexample:\n1 2 3 4 6 7 -3",
"Records the result of updating a server group.\n\n@param serverGroup the server group's name. Cannot be <code>null</code>\n@param failed <code>true</code> if the server group update failed;\n<code>false</code> if it succeeded",
"Fill the attributes in the processor.\n\n@param processors The processors\n@param initialAttributes The attributes\n@see RequireAttributes\n@see ProvideAttributes",
"SuppressWarnings I really want to return HazeltaskTasks instead of Runnable"
] |
public static void setFaceNames(String[] nameArray)
{
if (nameArray.length != 6)
{
throw new IllegalArgumentException("nameArray length is not 6.");
}
for (int i = 0; i < 6; i++)
{
faceIndexMap.put(nameArray[i], i);
}
} | [
"Set the names of six images in the zip file. The default names of the six\nimages are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\", \"posz.png\",\nand \"negz.png\". If the names of the six images in the zip file are\ndifferent to the default ones, this function must be called before load\nthe zip file.\n\n@param nameArray\nAn array containing six strings which are names of images\ncorresponding to +x, -x, +y, -y, +z, and -z faces of the cube\nmap texture respectively."
] | [
"Load model from file\n\n@param gvrContext Valid {@link GVRContext} instance\n@param modelFile Path to the model's file, relative to the {@code assets} directory\n@return root object The root {@link GVRSceneObject} of the model\n@throws IOException If reading the model file fails",
"Check if the path to the property correspond to an association.\n\n@param targetTypeName the name of the entity containing the property\n@param pathWithoutAlias the path to the property WITHOUT aliases\n@return {@code true} if the property is an association or {@code false} otherwise",
"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}).",
"Undo a prior removal using the supplied undo key.\n\n@param removalKey - The key returned from the call to removeRoleMapping.\n@return true if the undo was successful, false otherwise.",
"Given a list of store definitions return a set of store names\n\n@param storeDefList The list of store definitions\n@return Returns a set of store names",
"Sets the specified double 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",
"Set the permissions for the photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param permissions\nThe permissions object\n@throws FlickrException",
"Gets the '.disabled' file for a given version of this store. That file may or may not\nexist.\n\n@param version of the store for which to get the '.disabled' file.\n@return an instance of {@link File} pointing to the '.disabled' file.\n@throws PersistenceFailureException if the requested version cannot be found.",
"Notification that boot has completed successfully and the configuration history should be updated"
] |
private void setRecordNumber(LinkedList<String> list)
{
try
{
String number = list.remove(0);
m_recordNumber = Integer.valueOf(number);
}
catch (NumberFormatException ex)
{
// Malformed MPX file: the record number isn't a valid integer
// Catch the exception here, leaving m_recordNumber as null
// so we will skip this record entirely.
}
} | [
"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"
] | [
"Extracts the words from a string. Words are seperated by a space character.\n\n@param line The line that is being parsed.\n@return A list of words contained on the line.",
"Delete the given file in a separate thread\n\n@param file The file to delete",
"Manual check because introducing a capability can't be done without a full refactoring.\nThis has to go as soon as the management interfaces are redesigned.\n@param context the OperationContext\n@param otherManagementEndpoint : the address to check that may provide an exposed jboss-remoting endpoint.\n@throws OperationFailedException in case we can't remove the management resource.",
"Finds the null space of A\n@param A (Input) Matrix. Modified\n@param numSingularValues Number of singular values\n@param nullspace Storage for null-space\n@return true if successful or false if it failed",
"Writes the data collected about properties to a file.",
"Scales a process type\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param processType type of process to maintain\n@param quantity number of processes to maintain",
"Creates a bridge accessory, capable of holding multiple child accessories. This has the\nadvantage over multiple standalone accessories of only requiring a single pairing from iOS for\nthe bridge.\n\n@param authInfo authentication information for this accessory. These values should be persisted\nand re-supplied on re-start of your application.\n@param label label for the bridge. This will show in iOS during pairing.\n@param manufacturer manufacturer of the bridge. This information is exposed to iOS for unknown\npurposes.\n@param model model of the bridge. This is also exposed to iOS for unknown purposes.\n@param serialNumber serial number of the bridge. Also exposed. Purposes also unknown.\n@return the bridge, from which you can {@link HomekitRoot#addAccessory add accessories} and\nthen {@link HomekitRoot#start start} handling requests.\n@throws IOException when mDNS cannot connect to the network",
"Gets a JsonObject containing any pending changes to this object that can be sent back to the Box API.\n@return a JsonObject containing the pending changes.",
"Shutdown the container.\n\n@see Weld#initialize()"
] |
private static String removeLastDot(final String pkgName) {
return pkgName.charAt(pkgName.length() - 1) == Characters.DOT ? pkgName.substring(0, pkgName.length() - 1) : pkgName;
} | [
"Filters a dot at the end of the passed package name if present.\n\n@param pkgName\na package name\n@return a filtered package name"
] | [
"Given a particular key, first converts its to the storage format and then\ndetermines which chunk it belongs to\n\n@param key Byte array of keys\n@return Chunk id\n@throws IllegalStateException if unable to find the chunk id for the given key",
"Calculate the color using the supplied angle.\n\n@param angle The selected color's position expressed as angle (in rad).\n\n@return The ARGB value of the color on the color wheel at the specified\nangle.",
"prefetch defined relationships requires JDBC level 2.0, does not work\nwith Arrays",
"Parses the field facet configurations.\n@param fieldFacetObject The JSON sub-node with the field facet configurations.\n@return The field facet configurations.",
"alert, prompt, and confirm behave as if the OK button is always clicked.",
"Sets the body filter for this ID\n\n@param pathId ID of path\n@param bodyFilter Body filter to set",
"another media scan way",
"Old REST client uses old REST service",
"Use this API to fetch all the dnssuffix resources that are configured on netscaler."
] |
public void download(OutputStream output, ProgressListener listener) {
URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.fileID, this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
BoxAPIResponse response = request.send();
InputStream input = response.getBody(listener);
long totalRead = 0;
byte[] buffer = new byte[BUFFER_SIZE];
try {
int n = input.read(buffer);
totalRead += n;
while (n != -1) {
output.write(buffer, 0, n);
n = input.read(buffer);
totalRead += n;
}
} catch (IOException e) {
throw new BoxAPIException("Couldn't connect to the Box API due to a network error.", e);
}
response.disconnect();
} | [
"Downloads this version of the file to a given OutputStream while reporting the progress to a ProgressListener.\n@param output the stream to where the file will be written.\n@param listener a listener for monitoring the download's progress."
] | [
"Processes one item document. This is often the main workhorse that\ngathers the data you are interested in. You can modify this code as you\nwish.",
"Generates an expression from a variable\n@param var The variable from which to generate the expression\n@return A expression that represents the given variable",
"Put a new resource description into the index, or remove one if the delta has no new description. A delta for a\nparticular URI may be registered more than once; overwriting any earlier registration.\n\n@param delta\nThe resource change.\n@since 2.9",
"Return the numeric distance value in degrees.\n\n@return the degrees",
"Removes empty space when \"fitToContent\" is true and real height of object is\ntaller than current bands height, otherwise, it is not modified\n\n@param band\n@param currHeigth\n@param fitToContent",
"Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values",
"Creates an element that represents a single positioned box with no content.\n@return the resulting DOM element",
"Delete a database for a given path and userId.\n@param appInfo the info for this application\n@param serviceName the name of the associated service\n@param clientFactory the associated factory that creates clients\n@param userId the id of the user's to delete\n@return true if successfully deleted, false if not",
"Sets the upper limits for the \"moving\" body translation relative to joint point.\n\n@param limitX the X upper lower translation limit\n@param limitY the Y upper lower translation limit\n@param limitZ the Z upper lower translation limit"
] |
public static boolean isCacheSafe(Class<?> clazz, ClassLoader classLoader) {
Assert.notNull(clazz, "Class must not be null");
try {
ClassLoader target = clazz.getClassLoader();
if (target == null) {
return true;
}
ClassLoader cur = classLoader;
if (cur == target) {
return true;
}
while (cur != null) {
cur = cur.getParent();
if (cur == target) {
return true;
}
}
return false;
}
catch (SecurityException ex) {
// Probably from the system ClassLoader - let's consider it safe.
return true;
}
} | [
"Check whether the given class is cache-safe in the given context,\ni.e. whether it is loaded by the given ClassLoader or a parent of it.\n@param clazz the class to analyze\n@param classLoader the ClassLoader to potentially cache metadata in"
] | [
"compute Exp using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed.",
"Add the buildInfo to step variables if missing and set its cps script.\n\n@param cpsScript the cps script\n@param stepVariables step variables map\n@return the build info",
"This is the profiles page. this is the 'regular' page when the url is typed in",
"Get the Avro Schema of the input path, assuming the path contains just one\nschema version in all files under that path.",
"Checks whether given class descriptor has a primary key.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"This method reads a two byte integer from the input stream.\n\n@param is the input stream\n@return integer value\n@throws IOException on file read error or EOF",
"Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed",
"Set sizes to override the generated URLs of the different sizes.\n\n@param sizes\n@see com.flickr4java.flickr.photos.PhotosInterface#getSizes(String)"
] |
@PostConstruct
public void init() {
this.metricRegistry.register(name("gc"), new GarbageCollectorMetricSet());
this.metricRegistry.register(name("memory"), new MemoryUsageGaugeSet());
this.metricRegistry.register(name("thread-states"), new ThreadStatesGaugeSet());
this.metricRegistry.register(name("fd-usage"), new FileDescriptorRatioGauge());
} | [
"Add several jvm metrics."
] | [
"Determines if a point is inside a box.",
"Constructs a new ClientBuilder for building a CloudantClient instance to connect to the\nCloudant server with the specified account.\n\n@param account the Cloudant account name to connect to e.g. \"example\" is the account name\nfor the \"example.cloudant.com\" endpoint\n@return a new ClientBuilder for the account\n@throws IllegalArgumentException if the specified account name forms an invalid endpoint URL",
"Get the first non-white X point\n@param img Image n memory\n@return the x start",
"Get a value from a date metadata field.\n@param path the key path in the metadata object. Must be prefixed with a \"/\".\n@return the metadata value as a Date.\n@throws ParseException when the value cannot be parsed as a valid date",
"Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts.",
"Apply the necessary rotation to the transform so that it is in front of\nthe camera.\n\n@param transform The transform to modify.",
"Uses data from a bar to populate a task.\n\n@param row bar data\n@param task task to populate",
"Delete any log segments matching the given predicate function\n\n@throws IOException",
"Get the account knowing his title\n@param title the title of the account (it can change at runtime!)\n@return the account founded or null if the account not exists"
] |
@Override
public List<Object> loadEntitiesFromTuples(SharedSessionContractImplementor session, LockOptions lockOptions, OgmLoadingContext ogmContext) {
return loadEntity( null, null, session, lockOptions, ogmContext );
} | [
"Load a list of entities using the information in the context\n\n@param session The session\n@param lockOptions The locking details\n@param ogmContext The context with the information to load the entities\n@return the list of entities corresponding to the given context"
] | [
"Convert string to qname.\n\n@param str the string\n@return the qname",
"Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record",
"Converts an update description BSON document from a MongoDB Change Event into an\nUpdateDescription object.\n\n@param document the\n@return the converted UpdateDescription",
"Return all option names that not already have a value\nand is enabled",
"Adds a new task to this file. The task can have an optional message to include, and a due date.\n\n@param action the action the task assignee will be prompted to do.\n@param message an optional message to include with the task.\n@param dueAt the day at which this task is due.\n@return information about the newly added task.",
"Resets the resend counter and possibly resets the\nnode stage to DONE when previous initialization was\ncomplete.",
"Stops the service. If a timeout is given and the service has still not\ngracefully been stopped after timeout ms the service is stopped by force.\n\n@param millis value in ms",
"SearchService is a service which shares the information about Persons with the PersonService.\nIt lets users search for individual people using simple or complex search expressions.\nThe interaction with this service also verifies that the JAX-RS server is capable of supporting multiple\nroot resource classes",
"Sets a property on this Javascript object for which the value is a\nJavascript object itself.\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property."
] |
public static String[] sortStringArray(String[] array) {
if (isEmpty(array)) {
return new String[0];
}
Arrays.sort(array);
return array;
} | [
"Turn given source String array into sorted array.\n\n@param array the source array\n@return the sorted array (never <code>null</code>)"
] | [
"Send an error to the client with an exception.\n\n@param httpServletResponse the http response to send the error to\n@param e the error that occurred",
"Releases a database connection, and cleans up any resources\nassociated with that connection.",
"Flat the map of list of string to map of strings, with theoriginal values, seperated by comma",
"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",
"Given the key, figures out which partition on the local node hosts the key.\n\n@param key\n@return",
"Returns the text value of all of the elements in the collection.\n\n@return the text value of all the elements in the collection or null",
"Deletes this collaboration whitelist.",
"Use this API to change appfwsignatures.",
"Append the path to the StringBuilder.\n\n@param result the string builder to add the path to."
] |
protected Object checkUndefined(Object val) {
if (val instanceof String && ((String) val).equals("undefined")) {
return null;
}
return val;
} | [
"JSObject will return the String \"undefined\" at certain times, so we\nneed to make sure we're not getting a value that looks valid, but isn't.\n\n@param val The value from Javascript to be checked.\n@return Either null or the value passed in."
] | [
"refresh the most recent history entries\n\n@param limit number of entries to populate\n@param offset number of most recent entries to skip\n@return populated history entries\n@throws Exception exception",
"Called to update the cached formats when something changes.",
"Write correlation id to message.\n\n@param message the message\n@param correlationId the correlation id",
"performs an INSERT operation against RDBMS.\n@param obj The Object to be inserted as a row of the underlying table.\n@param cld ClassDescriptor providing mapping information.",
"Computes the dot product of each basis vector against the sample. Can be used as a measure\nfor membership in the training sample set. High values correspond to a better fit.\n\n@param sample Sample of original data.\n@return Higher value indicates it is more likely to be a member of input dataset.",
"Invoked periodically.",
"Returns the number of consecutive trailing one or zero bits.\nIf network is true, returns the number of consecutive trailing zero bits.\nOtherwise, returns the number of consecutive trailing one bits.\n\n@param network\n@return",
"Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path",
"adds the qualified names to the require-bundle attribute, if not already\npresent.\n\n@param bundles - passing parameterized bundled (e.g. versions, etc.) is\nnot supported"
] |
public static <E extends Style.HasCssName, F extends Enum<? extends Style.HasCssName>> void addUniqueEnumStyleName(final UIObject uiObject,
final Class<F> enumClass,
final E style) {
removeEnumStyleNames(uiObject, enumClass);
addEnumStyleName(uiObject, style);
} | [
"Convenience method for first removing all enum style constants and then adding the single one.\n\n@see #removeEnumStyleNames(UIObject, Class)\n@see #addEnumStyleName(UIObject, Style.HasCssName)"
] | [
"Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion 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 a Exponent alpha of power law function\n@param D Diffusion coeffcient",
"Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid",
"Set the String of request body data to be sent to the server.\n\n@param input String of request body data to be sent to the server\n@return an {@link HttpConnection} for method chaining",
"Handle bind service event.\n@param service Service instance\n@param props Service reference properties",
"Use this API to delete ntpserver of given name.",
"Set editable state on an attribute. This needs to also set the state on the associated attributes.\n\n@param attribute attribute for which the editable state needs to be set\n@param editable new editable state",
"Set the background color of the progress spinner disc.\n\n@param colorRes Resource id of the color.",
"Time since last time the store was swapped\n\n@return Time in milliseconds since the store was swapped",
"This method reads a single byte from the input stream.\n\n@param is the input stream\n@return byte value\n@throws IOException on file read error or EOF"
] |
private void checkInitializationMethod(ClassDescriptorDef classDef, String checkLevel) throws ConstraintException
{
if (!CHECKLEVEL_STRICT.equals(checkLevel))
{
return;
}
String initMethodName = classDef.getProperty(PropertyHelper.OJB_PROPERTY_INITIALIZATION_METHOD);
if (initMethodName == null)
{
return;
}
Class initClass;
Method initMethod;
try
{
initClass = InheritanceHelper.getClass(classDef.getName());
}
catch (ClassNotFoundException ex)
{
throw new ConstraintException("The class "+classDef.getName()+" was not found on the classpath");
}
try
{
initMethod = initClass.getDeclaredMethod(initMethodName, new Class[0]);
}
catch (NoSuchMethodException ex)
{
initMethod = null;
}
catch (Exception ex)
{
throw new ConstraintException("Exception while checking the class "+classDef.getName()+": "+ex.getMessage());
}
if (initMethod == null)
{
try
{
initMethod = initClass.getMethod(initMethodName, new Class[0]);
}
catch (NoSuchMethodException ex)
{
throw new ConstraintException("No suitable initialization-method "+initMethodName+" found in class "+classDef.getName());
}
catch (Exception ex)
{
throw new ConstraintException("Exception while checking the class "+classDef.getName()+": "+ex.getMessage());
}
}
// checking modifiers
int mods = initMethod.getModifiers();
if (Modifier.isStatic(mods) || Modifier.isAbstract(mods))
{
throw new ConstraintException("The initialization-method "+initMethodName+" in class "+classDef.getName()+" must be a concrete instance method");
}
} | [
"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"
] | [
"Gets the current user.\n@param api the API connection of the current user.\n@return the current user.",
"Return list of all files in the directory.\n\n@param directory target directory on file system\n@return list of files in the directory or empty list if directory is empty.",
"Add a row to the table. We have a limited understanding of the way\nBtrieve handles outdated rows, so we use what we think is a version number\nto try to ensure that we only have the latest rows.\n\n@param primaryKeyColumnName primary key column name\n@param map Map containing row data",
"Get an extent aware Iterator based on the Query\n\n@param query\n@param cld the ClassDescriptor\n@return OJBIterator",
"Perform the given work with a Jedis connection from the given pool.\nWraps any thrown checked exceptions in a RuntimeException.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work",
"B tensor is ignored for CUDNN_OP_TENSOR_SQRT, CUDNN_OP_TENSOR_NOT.",
"Assign FK value to all n-side objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation",
"Returns all program element docs that have a visibility greater or\nequal than the specified level",
"Called when a drawer has settled in a completely open state."
] |
private static void checkPreconditions(final Set<Object> possibleValues) {
if( possibleValues == null ) {
throw new NullPointerException("possibleValues Set should not be null");
} else if( possibleValues.isEmpty() ) {
throw new IllegalArgumentException("possibleValues Set should not be empty");
}
} | [
"Checks the preconditions for creating a new IsIncludedIn processor with a Set of Objects.\n\n@param possibleValues\nthe Set of possible values\n@throws NullPointerException\nif possibleValues is null\n@throws IllegalArgumentException\nif possibleValues is empty"
] | [
"Shows a dialog with user information for given session.\n\n@param session to show information for",
"Use this API to delete lbroute.",
"Tries to stop the JLAN server and return after it is stopped, but will also return if the thread hasn't stopped after MAX_SHUTDOWN_WAIT_MILLIS.",
"Write a time units field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Sets no of currency digits.\n\n@param currDigs Available values, 0,1,2",
"Remove all children that have been added to the owner object of this camera rig; except the\ncamera objects.",
"Throw fault.\n\n@param code the fault code\n@param message the message\n@param t the throwable type\n@throws PutEventsFault",
"Writes all auxiliary triples that have been buffered recently. This\nincludes OWL property restrictions but it also includes any auxiliary\ntriples required by complex values that were used in snaks.\n\n@throws RDFHandlerException\nif there was a problem writing the RDF triples",
"Use this API to delete locationfile."
] |
@Override
public void close(SocketDestination destination) {
factory.setLastClosedTimestamp(destination);
queuedPool.reset(destination);
} | [
"Reset the pool of resources for a specific destination. Idle resources\nwill be destroyed. Checked out resources that are subsequently checked in\nwill be destroyed. Newly created resources can be checked in to\nreestablish resources for the specific destination."
] | [
"Set a proxy for REST-requests.\n\n@param proxyHost\n@param proxyPort",
"Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name .",
"Get the names of the paths that would apply to the request\n\n@param requestUrl URL of the request\n@param requestType Type of the request: GET, POST, PUT, or DELETE as integer\n@return JSONArray of path names\n@throws Exception",
"Stores the output from a Frontier into the queue, pausing and waiting if the given queue is too large\n\n@param resultsMap map of String and String representing the output of a Frontier's DFS",
"Get a fallback handler.\n\n@param header the protocol header\n@return the fallback handler",
"Dumps a single material property to stdout.\n\n@param property the property",
"package scope in order to test the method",
"Create content assist proposals and pass them to the given acceptor.",
"Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values"
] |
public Slice newSlice(long address, int size)
{
if (address <= 0) {
throw new IllegalArgumentException("Invalid address: " + address);
}
if (size == 0) {
return Slices.EMPTY_SLICE;
}
return new Slice(null, address, size, 0, null);
} | [
"Creates a slice for directly a raw memory address. This is\ninherently unsafe as it may be used to access arbitrary memory.\n\n@param address the raw memory address base\n@param size the size of the slice\n@return the unsafe slice"
] | [
"Figure out, based on how much time has elapsed since we received an update, and the playback position,\nspeed, and direction at the time of that update, where the player will be now.\n\n@param update the most recent update received from a player\n@param currentTimestamp the nanosecond timestamp representing when we want to interpolate the track's position\n\n@return the playback position we believe that player has reached now",
"Locate a child block by byte pattern and validate by\nchecking the length of the string we are expecting\nto follow the pattern.\n\n@param bufferIndex start index\n@return true if a child block starts at this point",
"Delete all enabled overrides for a client\n\n@param profileId profile ID of teh client\n@param client_uuid UUID of teh client",
"Get a property as a float or Default value.\n\n@param key the property name\n@param defaultValue default value",
"Create a ModelNode representing the operating system the instance is running on.\n\n@return a ModelNode representing the operating system the instance is running on.\n@throws OperationFailedException",
"Use this API to sync gslbconfig.",
"This method performs database modification at the very and of transaction.",
"Returns iterable with all enterprise 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 enterprise assignments.",
"Adds the default value of property if defined.\n\n@param props the Properties object\n@param propDef the property definition\n\n@return true if the property could be added"
] |
public void seekToDayOfWeek(String direction, String seekType, String seekAmount, String dayOfWeek) {
int dayOfWeekInt = Integer.parseInt(dayOfWeek);
int seekAmountInt = Integer.parseInt(seekAmount);
assert(direction.equals(DIR_LEFT) || direction.equals(DIR_RIGHT));
assert(seekType.equals(SEEK_BY_DAY) || seekType.equals(SEEK_BY_WEEK));
assert(dayOfWeekInt >= 1 && dayOfWeekInt <= 7);
markDateInvocation();
int sign = direction.equals(DIR_RIGHT) ? 1 : -1;
if(seekType.equals(SEEK_BY_WEEK)) {
// set our calendar to this weeks requested day of the week,
// then add or subtract the week(s)
_calendar.set(Calendar.DAY_OF_WEEK, dayOfWeekInt);
_calendar.add(Calendar.DAY_OF_YEAR, seekAmountInt * 7 * sign);
}
else if(seekType.equals(SEEK_BY_DAY)) {
// find the closest day
do {
_calendar.add(Calendar.DAY_OF_YEAR, sign);
} while(_calendar.get(Calendar.DAY_OF_WEEK) != dayOfWeekInt);
// now add/subtract any additional days
if(seekAmountInt > 0) {
_calendar.add(Calendar.WEEK_OF_YEAR, (seekAmountInt - 1) * sign);
}
}
} | [
"seeks to a specified day of the week in the past or future.\n\n@param direction the direction to seek: two possibilities\n'<' go backward\n'>' go forward\n\n@param seekType the type of seek to perform (by_day or by_week)\nby_day means we seek to the very next occurrence of the given day\nby_week means we seek to the first occurrence of the given day week in the\nnext (or previous,) week (or multiple of next or previous week depending\non the seek amount.)\n\n@param seekAmount the amount to seek. Must be guaranteed to parse as an integer\n\n@param dayOfWeek the day of the week to seek to, represented as an integer from\n1 to 7 (1 being Sunday, 7 being Saturday.) Must be guaranteed to parse as an Integer"
] | [
"Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add.",
"Stops download dispatchers.",
"Adds the includes of the fileset to the handling.\n\n@param handling The handling\n@param fileSet The fileset",
"region Override Methods",
"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.",
"Checks if a key already exists.\n@param newKey the key to check for.\n@return <code>true</code> if the key already exists, <code>false</code> otherwise.",
"Minimize the function starting at the given initial point.",
"Show only the following channels.\n@param channels The names of the channels to show.\n@return this",
"Returns the name of the operation.\n\n@param op the operation\n\n@return the name of the operation\n\n@throws IllegalArgumentException if the operation was not defined."
] |
public SerialMessage setValueMessage(int level) {
logger.debug("Creating new message for application command BASIC_SET for node {}", this.getNode().getNodeId());
SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.SendData, SerialMessagePriority.Set);
byte[] newPayload = { (byte) this.getNode().getNodeId(),
3,
(byte) getCommandClass().getKey(),
(byte) BASIC_SET,
(byte) level
};
result.setMessagePayload(newPayload);
return result;
} | [
"Gets a SerialMessage with the BASIC SET command\n@param the level to set.\n@return the serial message"
] | [
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler.",
"Builds a instance of the class for a map containing the values\n\n@param clazz Class to build\n@param values Values map\n@param differenceHandler The difference handler\n@return The created instance\n@throws InstantiationException Error instantiating\n@throws IllegalAccessException Access error\n@throws IntrospectionException Introspection error\n@throws IllegalArgumentException Argument invalid\n@throws InvocationTargetException Invalid target",
"Read a single calendar exception.\n\n@param bc parent calendar\n@param exception exception data",
"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",
"Use this API to rename a cmppolicylabel resource.",
"Sends a multipart response. Each body part represents a versioned value\nof the given key.\n\n@throws IOException\n@throws MessagingException",
"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.",
"Load the given class using a specific class loader.\n\n@param className The name of the class\n@param cl The Class Loader to be used for finding the class.\n@return The class object",
"Determine whether the user has followed bean-like naming convention or not."
] |
public void store(Object obj) throws PersistenceBrokerException
{
obj = extractObjectToStore(obj);
// only do something if obj != null
if(obj == null) return;
ClassDescriptor cld = getClassDescriptor(obj.getClass());
/*
if one of the PK fields was null, we assume the objects
was new and needs insert
*/
boolean insert = serviceBrokerHelper().hasNullPKField(cld, obj);
Identity oid = serviceIdentity().buildIdentity(cld, obj);
/*
if PK values are set, lookup cache or db to see whether object
needs insert or update
*/
if (!insert)
{
insert = objectCache.lookup(oid) == null
&& !serviceBrokerHelper().doesExist(cld, oid, obj);
}
store(obj, oid, cld, insert);
} | [
"Store an Object.\n@see org.apache.ojb.broker.PersistenceBroker#store(Object)"
] | [
"See convertToSQL92.\n\n@return SQL like sub-expression\n@throws IllegalArgumentException oops",
"This must be called with the write lock held.\n@param requirement the requirement",
"Given counters of true positives, false positives, and false\nnegatives, prints out precision, recall, and f1 for each key.",
"Creates a new empty HTML document tree.\n@throws ParserConfigurationException",
"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.",
"Transforms a length according to the current transformation matrix.",
"Internal method that adds a metadata provider to the set associated with a particular hash key, creating the\nset if needed.\n\n@param key the hashKey identifying the media for which this provider can offer metadata (or the empty string if\nit can offer metadata for all media)\n@param provider the metadata provider to be added to the active set",
"Draw a rectangular boundary with this color and linewidth.\n\n@param rect\nrectangle\n@param color\ncolor\n@param linewidth\nline width",
"Flushes all changes to disk."
] |
public static nssimpleacl[] get(nitro_service service) throws Exception{
nssimpleacl obj = new nssimpleacl();
nssimpleacl[] response = (nssimpleacl[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the nssimpleacl resources that are configured on netscaler."
] | [
"Set the week day.\n@param weekDayStr the week day to set.",
"Get the int resource id with specified type definition\n@param context\n@param id String resource id\n@return int resource id",
"The primary run loop of the event processor.",
"Add the given, single header value under the given name.\n@param headerName the header name\n@param headerValue the header value\n@throws UnsupportedOperationException if adding headers is not supported\n@see #put(String, List)\n@see #set(String, String)",
"Convenience wrapper for message parameters\n@param params\n@return",
"Gets the Chi Square distance between two normalized histograms.\n\n@param histogram1 Histogram.\n@param histogram2 Histogram.\n@return The Chi Square distance between x and y.",
"Retrieves the timephased breakdown of actual cost.\n\n@return timephased actual cost",
"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",
"Opens a JDBC connection with the given parameters."
] |
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (position == super.getCount() && isEnableRefreshing()) {
return (mFooter);
}
return (super.getView(position, convertView, parent));
} | [
"Get a View that displays the data at the specified\nposition in the data set. In this case, if we are at\nthe end of the list and we are still in append mode, we\nask for a pending view and return it, plus kick off the\nbackground task to append more data to the wrapped\nadapter.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View"
] | [
"Determine if a CharSequence can be parsed as a Double.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isDouble(String)\n@since 1.8.2",
"Read the metadata from a hadoop SequenceFile\n\n@param fs The filesystem to read from\n@param path The file to read from\n@return The metadata from this file",
"Returns the maximum magnitude of the complex numbers\n@param u Array of complex numbers\n@param startU first index to consider in u\n@param length Number of complex numebrs to consider\n@return magnitude",
"Show multiple channels. All other channels will be unaffected.\n@param channels The channels to show",
"Specify the class represented by this `ClassNode` implements\nan interface specified by the given name\n\n@param name the name of the interface class\n@return this `ClassNode` instance",
"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.",
"Return the list of module dependencies\n\n@param moduleName\n@param moduleVersion\n@param fullRecursive\n@param corporate\n@param thirdParty\n@return List<Dependency>\n@throws GrapesCommunicationException",
"Deletes all of the Directories in root that match the FileFilter\n\n@param root\n@param filter",
"Create a new connection manager, based on an existing connection.\n\n@param connection the existing connection\n@param openHandler a connection open handler\n@return the connected manager"
] |
private void forward() {
Set<String> selected = new HashSet<>();
for (CheckBox checkbox : m_componentCheckboxes) {
CmsSetupComponent component = (CmsSetupComponent)(checkbox.getData());
if (checkbox.getValue().booleanValue()) {
selected.add(component.getId());
}
}
String error = null;
for (String compId : selected) {
CmsSetupComponent component = m_componentMap.get(compId);
for (String dep : component.getDependencies()) {
if (!selected.contains(dep)) {
error = "Unfulfilled dependency: The component "
+ component.getName()
+ " can not be installed because its dependency "
+ m_componentMap.get(dep).getName()
+ " is not selected";
break;
}
}
}
if (error == null) {
Set<String> modules = new HashSet<>();
for (CmsSetupComponent component : m_componentMap.values()) {
if (selected.contains(component.getId())) {
for (CmsModule module : m_context.getSetupBean().getAvailableModules().values()) {
if (component.match(module.getName())) {
modules.add(module.getName());
}
}
}
}
List<String> moduleList = new ArrayList<>(modules);
m_context.getSetupBean().setInstallModules(CmsStringUtil.listAsString(moduleList, "|"));
m_context.stepForward();
} else {
CmsSetupErrorDialog.showErrorDialog(error, error);
}
} | [
"Moves to the next step."
] | [
"Sets the CircularImageView's border width in pixels.\n@param borderWidth Width in pixels for the border.",
"Stops all transitions.",
"Wraps a StatisticsMatrix around 'm'. Does NOT create a copy of 'm' but saves a reference\nto it.",
"gets the count of addresses that this address division grouping may represent\n\nIf this address division grouping is not a subnet block of multiple addresses or has no range of values, then there is only one such address.\n\n@return",
"Builds a batch-fetch capable loader based on the given persister, lock-mode, etc.\n\n@param persister The entity persister\n@param batchSize The maximum number of ids to batch-fetch at once\n@param lockMode The lock mode\n@param factory The SessionFactory\n@param influencers Any influencers that should affect the built query\n@param innerEntityLoaderBuilder Builder of the entity loader receiving the subset of batches\n\n@return The loader.",
"generate a select-Statement according to query\n\n@param query the Query\n@param cld the ClassDescriptor",
"Sets the max.\n\n@param n the new max",
"Converts a date series configuration to a date series bean.\n@return the date series bean.",
"Runs a query that returns a single int."
] |
private void sendSyncControlCommand(DeviceUpdate target, byte command) throws IOException {
ensureRunning();
byte[] payload = new byte[SYNC_CONTROL_PAYLOAD.length];
System.arraycopy(SYNC_CONTROL_PAYLOAD, 0, payload, 0, SYNC_CONTROL_PAYLOAD.length);
payload[2] = getDeviceNumber();
payload[8] = getDeviceNumber();
payload[12] = command;
assembleAndSendPacket(Util.PacketType.SYNC_CONTROL, payload, target.getAddress(), BeatFinder.BEAT_PORT);
} | [
"Assemble and send a packet that performs sync control, turning a device's sync mode on or off, or telling it\nto become the tempo master.\n\n@param target an update from the device whose sync state is to be set\n@param command the byte identifying the specific sync command to be sent\n\n@throws IOException if there is a problem sending the command to the device"
] | [
"Sets the quaternion of the keyframe.",
"Commit all changes if there are uncommitted changes.\n\n@param msg the commit message.\n@throws GitAPIException",
"Retrieves state and metrics information for all client connections across the cluster.\n\n@return list of connections across the cluster",
"Hashes a path, if the path points to a directory then hashes the contents recursively.\n@param messageDigest the digest used to hash.\n@param path the file/directory we want to hash.\n@return the resulting hash.\n@throws IOException",
"The normalized string returned by this method is consistent with java.net.Inet6address.\n\nIPs are not compressed nor mixed in this representation. If this has a prefix length, that will be included in the string.",
"Use this API to fetch nd6ravariables resources of given names .",
"Cache a parse failure for this document.",
"Helper to read an optional String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read.",
"Populate the constraint type and constraint date.\nNote that Merlin allows both start and end constraints simultaneously.\nAs we can't have both, we'll prefer the start constraint.\n\n@param row task data from database\n@param task Task instance"
] |
public String toIPTC(SubjectReferenceSystem srs) {
StringBuffer b = new StringBuffer();
b.append("IPTC:");
b.append(getNumber());
b.append(":");
if (getNumber().endsWith("000000")) {
b.append(toIPTCHelper(srs.getName(this)));
b.append("::");
} else if (getNumber().endsWith("000")) {
b.append(toIPTCHelper(srs.getName(srs.get(getNumber().substring(0, 2) + "000000"))));
b.append(":");
b.append(toIPTCHelper(srs.getName(this)));
b.append(":");
} else {
b.append(toIPTCHelper(srs.getName(srs.get(getNumber().substring(0, 2) + "000000"))));
b.append(":");
b.append(toIPTCHelper(srs.getName(srs.get(getNumber().substring(0, 5) + "000"))));
b.append(":");
b.append(toIPTCHelper(srs.getName(this)));
}
return b.toString();
} | [
"Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference"
] | [
"Parse rate.\n\n@param value rate value\n@return Rate instance",
"Check if the given class represents an array of primitive wrappers,\ni.e. Boolean, Byte, Character, Short, Integer, Long, Float, or Double.\n@param clazz the class to check\n@return whether the given class is a primitive wrapper array class",
"Transforms a position according to the current transformation matrix and current page transformation.\n@param x\n@param y\n@return",
"Use this API to update appfwlearningsettings.",
"Returns the description of the running container.\n\n@param client the client used to query the server\n\n@return the description of the running container\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to query the container fails",
"Delete any log segments matching the given predicate function\n\n@throws IOException",
"Prepare a parallel SSH Task.\n\n@return the parallel task builder",
"Main file parser. Reads GIF content blocks. Stops after reading maxFrames",
"Vend a SessionVar with the function to create the default value"
] |
@RequestMapping(value = "/api/backup", method = RequestMethod.POST)
public
@ResponseBody
Backup processBackup(@RequestParam("fileData") MultipartFile fileData) throws Exception {
// Method taken from: http://spring.io/guides/gs/uploading-files/
if (!fileData.isEmpty()) {
try {
byte[] bytes = fileData.getBytes();
BufferedOutputStream stream =
new BufferedOutputStream(new FileOutputStream(new File("backup-uploaded.json")));
stream.write(bytes);
stream.close();
} catch (Exception e) {
}
}
File f = new File("backup-uploaded.json");
BackupService.getInstance().restoreBackupData(new FileInputStream(f));
return BackupService.getInstance().getBackupData();
} | [
"Restore backup data\n\n@param fileData - json file with restore data\n@return\n@throws Exception"
] | [
"Used to apply or update the watermark for the item.\n@param itemUrl url template for the item.\n@param imprint the value must be \"default\", as custom watermarks is not yet supported.\n@return the watermark associated with the item.",
"Obtains a local date in Accounting calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Accounting era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Accounting local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code AccountingEra}",
"This method converts a node to text.\n\nLeading and trailing text from hidden tokens (whitespace/comments) is removed. Text from hidden tokens that is\nsurrounded by text from non-hidden tokens is summarized to a single whitespace.\n\nThe preferred use case of this method is to convert the {@link ICompositeNode} that has been created for a data\ntype rule to text.\n\nThis is also the recommended way to convert a node to text if you want to invoke\n{@link org.eclipse.xtext.conversion.IValueConverterService#toValue(String, String, INode)}",
"Set the default size of the texture buffers. You can call this to reduce the buffer size\nof views with anti-aliasing issue.\n\nThe max value to the buffer size should be the Math.max(width, height) of attached view.\n\n@param size buffer size. Value > 0 and <= Math.max(width, height).",
"Set day.\n\n@param d day instance",
"Construct new root step. Used for inspect problems with Allure lifecycle\n\n@return new root step marked as broken",
"Read an optional Date value form a JSON value.\n@param val the JSON value that should represent the Date as long value in a string.\n@return the Date from the JSON or null if reading the date fails.",
"Use this API to fetch autoscalepolicy_binding resource of given name .",
"Sets currency symbol.\n\n@param symbol currency symbol"
] |
public void removeFile(String name) {
if(files.containsKey(name)) {
files.remove(name);
}
if(fileStreams.containsKey(name)) {
fileStreams.remove(name);
}
} | [
"Removes file from your assembly.\n\n@param name field name of the file to remove."
] | [
"Returns the zip entry for a file in the archive.\n@param filename the file name\n@return the zip entry for the file with the provided name\n@throws ZipException thrown if the file is not in the zip archive",
"Get the photos for the specified group pool, optionally filtering by taf.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param groupId\nThe group ID\n@param userId\nThe user ID (may be null)\n@param tags\nThe optional tags (may be null)\n@param extras\nSet of extra-attributes to include (may be null)\n@param perPage\nThe number of photos per page (0 to ignore)\n@param page\nThe page offset (0 to ignore)\n@return A Collection of Photo objects\n@throws FlickrException",
"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",
"Appends to the statement table and all tables joined to it.\n@param alias the table alias\n@param where append conditions for WHERE clause here",
"Prints the URL of a thumbnail for the given item document to the output,\nor a default image if no image is given for the item.\n\n@param out\nthe output to write to\n@param itemDocument\nthe document that may provide the image information",
"Use this API to delete route6 of given name.",
"Helper method to set a value in the internal header list.\n\n@param headers the headers to set the value in\n@param name the name to set\n@param value the value to set",
"Substitute the variables in the given expression with the\nvalues from the resolver\n\n@param pResolver\n@param pExpression",
"Send JSON representation of given data object to all connections tagged with all give tag labels\n@param data the data object\n@param labels the tag labels"
] |
public static Path getRootFolderForSource(Path sourceFilePath, String packageName)
{
if (packageName == null || packageName.trim().isEmpty())
{
return sourceFilePath.getParent();
}
String[] packageNameComponents = packageName.split("\\.");
Path currentPath = sourceFilePath.getParent();
for (int i = packageNameComponents.length; i > 0; i--)
{
String packageComponent = packageNameComponents[i - 1];
if (!StringUtils.equals(packageComponent, currentPath.getFileName().toString()))
{
return null;
}
currentPath = currentPath.getParent();
}
return currentPath;
} | [
"Returns the root path for this source file, based upon the package name.\n\nFor example, if path is \"/project/src/main/java/org/example/Foo.java\" and the package is \"org.example\", then this\nshould return \"/project/src/main/java\".\n\nReturns null if the folder structure does not match the package name."
] | [
"Use this API to unset the properties of responderpolicy resource.\nProperties that need to be unset are specified in args array.",
"Execute all recorded tasks.\n\n@param context the patch context\n@param callback the finalization callback\n@throws Exception",
"Answer true if an Iterator for a Table is already available\n@param aTable\n@return",
"returns true if the primary key fields are valid for delete, else false.\nPK fields are valid if each of them contains a valid non-null value\n@param cld the ClassDescriptor\n@param obj the object\n@return boolean",
"Updates the options panel for a special configuration.\n@param gitConfig the git configuration.",
"Set the individual dates.\n@param dates the dates to set.",
"Produces a new ConditionalCounter.\n\n@return a new ConditionalCounter, where order of indices is reversed",
"Port forward missing module changes for each layer.\n\n@param patch the current patch\n@param context the patch context\n@throws PatchingException\n@throws IOException\n@throws XMLStreamException",
"Given a container, and a set of raw data blocks, this method extracts\nthe field data and writes it into the container.\n\n@param type expected type\n@param container field container\n@param id entity ID\n@param fixedData fixed data block\n@param varData var data block"
] |
public void logAttributeWarning(PathAddress address, String attribute) {
logAttributeWarning(address, null, null, attribute);
} | [
"Log a warning for the resource at the provided address and a single attribute. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attribute attribute we are warning about"
] | [
"Handles a key change.\n\n@param event the key change event.\n@param allLanguages <code>true</code> for changing the key for all languages, <code>false</code> if the key should be changed only for the current language.\n@return result, indicating if the key change was successful.",
"Checks to see if another AbstractTransition's states is isCompatible for merging.\n\n@param another\n@return",
"Flushes all changes to disk.",
"Sets the Calendar used. 'Standard' if no value is set.\n\n@param calendarName Calendar name",
"Gets the favorite entries corresponding to the currently displayed favorite widgets.\n\n@return the list of favorite entries",
"Use this API to fetch csvserver_copolicy_binding resources of given name .",
"Accessor method used to retrieve a Number instance representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails",
"Get a lower-scoped token restricted to a resource for the list of scopes that are passed.\n@param scopes the list of scopes to which the new token should be restricted for\n@param resource the resource for which the new token has to be obtained\n@return scopedToken which has access token and other details",
"Unlock the given region. Does not report failures."
] |
public boolean contains(Vector3 p) {
boolean ans = false;
if(this.halfplane || p== null) return false;
if (isCorner(p)) {
return true;
}
PointLinePosition a12 = PointLineTest.pointLineTest(a,b,p);
PointLinePosition a23 = PointLineTest.pointLineTest(b,c,p);
PointLinePosition a31 = PointLineTest.pointLineTest(c,a,p);
if ((a12 == PointLinePosition.LEFT && a23 == PointLinePosition.LEFT && a31 == PointLinePosition.LEFT ) ||
(a12 == PointLinePosition.RIGHT && a23 == PointLinePosition.RIGHT && a31 == PointLinePosition.RIGHT ) ||
(a12 == PointLinePosition.ON_SEGMENT ||a23 == PointLinePosition.ON_SEGMENT || a31 == PointLinePosition.ON_SEGMENT)) {
ans = true;
}
return ans;
} | [
"determinates if this triangle contains the point p.\n@param p the query point\n@return true iff p is not null and is inside this triangle (Note: on boundary is considered inside!!)."
] | [
"Sets name, status, start time and title to specified step\n\n@param step which will be changed",
"Login the user and redirect back to original URL. If no\noriginal URL found then redirect to `defaultLandingUrl`.\n\n@param userIdentifier\nthe user identifier, could be either userId or username\n@param defaultLandingUrl\nthe URL to be redirected if original URL not found",
"Create button message key.\n\n@param gallery name\n@return Button message key as String",
"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.",
"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.",
"Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the artist menu\n\n@throws Exception if there is a problem obtaining the menu",
"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>",
"Logs the current user out.\n\n@throws IOException",
"Get the type created by selecting only a subset of properties from this\ntype. The type must be a map for this to work\n\n@param properties The properties to select\n@return The new type definition"
] |
private Date readOptionalDate(JSONValue val) {
JSONString str = null == val ? null : val.isString();
if (str != null) {
try {
return new Date(Long.parseLong(str.stringValue()));
} catch (@SuppressWarnings("unused") NumberFormatException e) {
// do nothing - return the default value
}
}
return null;
} | [
"Read an optional Date value form a JSON value.\n@param val the JSON value that should represent the Date as long value in a string.\n@return the Date from the JSON or null if reading the date fails."
] | [
"Mark for creation all objects that were included into dependent collections.\nMark for deletion all objects that were excluded from dependent collections.",
"This method take a list of fileName of the type partitionId_Replica_Chunk\nand returns file names that match the regular expression\nmasterPartitionId_",
"Add key value pair to extra info\n\n@param key Key of new item\n@param value New value to add",
"Validate JUnit4 presence in a concrete version.",
"Return all valid tenors for a given moneyness and maturity.\n\n@param moneynessBP The moneyness in bp for which to get the tenors.\n@param maturityInMonths The maturities in months for which to get the tenors.\n@return The tenors in months.",
"Defers an event for processing in a later phase of the current\ntransaction.\n\n@param metadata The event object",
"Use this API to fetch statistics of streamidentifier_stats resource of given name .",
"Sets the promotion state.\n\n<P>INFO: This method updates automatically all the contained artifacts.\n\n@param promoted boolean",
"Will create a JNDI Context and register it as the initial context factory builder\n\n@return the context\n@throws NamingException\non any issue during initial context factory builder registration"
] |
public static base_responses disable(nitro_service client, String id[]) throws Exception {
base_responses result = null;
if (id != null && id.length > 0) {
Interface disableresources[] = new Interface[id.length];
for (int i=0;i<id.length;i++){
disableresources[i] = new Interface();
disableresources[i].id = id[i];
}
result = perform_operation_bulk_request(client, disableresources,"disable");
}
return result;
} | [
"Use this API to disable Interface resources of given names."
] | [
"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",
"Determines the encoding block groups for the specified data.",
"Use this API to delete ntpserver resources of given names.",
"Entry point for processing filter definitions.\n\n@param properties project properties\n@param filters project filters\n@param fixedData filter fixed data\n@param varData filter var data",
"Use this API to fetch a aaaglobal_binding resource .",
"Use this API to unset the properties of systemuser resources.\nProperties that need to be unset are specified in args array.",
"Return fallback if first string is null or empty",
"Send a get module request\n\n@param name\n@param version\n@return the targeted module\n@throws GrapesCommunicationException",
"Use this API to update csparameter."
] |
public Set<RateType> getRateTypes() {
@SuppressWarnings("unchecked")
Set<RateType> rateSet = get(KEY_RATE_TYPES, Set.class);
if (rateSet == null) {
return Collections.emptySet();
}
return Collections.unmodifiableSet(rateSet);
} | [
"Get the deferred flag. Exchange rates can be deferred or real.time.\n\n@return the deferred flag, or {code null}."
] | [
"Decode PKWare Compression Library stream.\n\nFormat notes:\n\n- First byte is 0 if literals are uncoded or 1 if they are coded. Second\nbyte is 4, 5, or 6 for the number of extra bits in the distance code.\nThis is the base-2 logarithm of the dictionary size minus six.\n\n- Compressed data is a combination of literals and length/distance pairs\nterminated by an end code. Literals are either Huffman coded or\nuncoded bytes. A length/distance pair is a coded length followed by a\ncoded distance to represent a string that occurs earlier in the\nuncompressed data that occurs again at the current location.\n\n- A bit preceding a literal or length/distance pair indicates which comes\nnext, 0 for literals, 1 for length/distance.\n\n- If literals are uncoded, then the next eight bits are the literal, in the\nnormal bit order in the stream, i.e. no bit-reversal is needed. Similarly,\nno bit reversal is needed for either the length extra bits or the distance\nextra bits.\n\n- Literal bytes are simply written to the output. A length/distance pair is\nan instruction to copy previously uncompressed bytes to the output. The\ncopy is from distance bytes back in the output stream, copying for length\nbytes.\n\n- Distances pointing before the beginning of the output data are not\npermitted.\n\n- Overlapped copies, where the length is greater than the distance, are\nallowed and common. For example, a distance of one and a length of 518\nsimply copies the last byte 518 times. A distance of four and a length of\ntwelve copies the last four bytes three times. A simple forward copy\nignoring whether the length is greater than the distance or not implements\nthis correctly.\n\n@param input InputStream instance\n@param output OutputStream instance\n@return status code",
"Dumps the contents of a structured block made up from a header\nand fixed sized records.\n\n@param headerSize header zie\n@param blockSize block size\n@param data data block",
"Flush output streams.",
"Read JdbcConnectionDescriptors from the given repository file.\n\n@see #mergeConnectionRepository",
"Searches the type and its sub types for the nearest ojb-persistent type and returns its name.\n\n@param type The type to search\n@return The qualified name of the found type or <code>null</code> if no type has been found",
"Replace bad xml charactes in given array by space\n\n@param cbuf buffer to replace in\n@param off Offset from which to start reading characters\n@param len Number of characters to be replaced",
"Configures the log context.\n\n@param configFile the configuration file\n@param classLoader the class loader to use for the configuration\n@param logContext the log context to configure\n\n@return {@code true} if the log context was successfully configured, otherwise {@code false}\n\n@throws DeploymentUnitProcessingException if the configuration fails",
"By default all bean archives see each other.",
"Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed."
] |
@Pure
public static <P1, P2, RESULT> Function1<P2, RESULT> curry(final Function2<? super P1, ? super P2, ? extends RESULT> function,
final P1 argument) {
if (function == null)
throw new NullPointerException("function");
return new Function1<P2, RESULT>() {
@Override
public RESULT apply(P2 p) {
return function.apply(argument, p);
}
};
} | [
"Curries a function that takes two arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes one argument. Never <code>null</code>."
] | [
"Handles a faulted task.\n\n@param faultedEntry the entry holding faulted task\n@param throwable the reason for fault\n@param context the context object shared across all the task entries in this group during execution\n\n@return an observable represents asynchronous operation in the next stage",
"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.",
"Shut down the input manager.\n\nAfter this call, GearVRf will not be able to access IO devices.",
"Apply the necessary rotation to the transform so that it is in front of\nthe camera. The actual rotation is performed not using the yaw angle but\nusing equivalent quaternion values for better accuracy. But the yaw angle\nis still returned for backward compatibility.\n\n@param widget The transform to modify.\n@return The camera's yaw in degrees.",
"Build a new WebDriver based EmbeddedBrowser.\n\n@return the new build WebDriver based embeddedBrowser",
"Redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@return\n@throws Exception",
"Adjusts beforeIndex to account for the possibility that the given widget is\nalready a child of this panel.\n\n@param child the widget that might be an existing child\n@param beforeIndex the index at which it will be added to this panel\n@return the modified index",
"build an Authentication.\n\nTypes:\n<ul>\n<li>plain:jafka</li>\n<li>md5:77be29f6d71ec4e310766ddf881ae6a0</li>\n<li>crc32:1725717671</li>\n</ul>\n@param crypt password style\n@return an authentication\n@throws IllegalArgumentException password error",
"Retrieve the default mapping between MPXJ resource fields and Primavera resource field names.\n\n@return mapping"
] |
private void processHyperlinkData(Task task, byte[] data)
{
if (data != null)
{
int offset = 12;
String hyperlink;
String address;
String subaddress;
offset += 12;
hyperlink = MPPUtility.getUnicodeString(data, offset);
offset += ((hyperlink.length() + 1) * 2);
offset += 12;
address = MPPUtility.getUnicodeString(data, offset);
offset += ((address.length() + 1) * 2);
offset += 12;
subaddress = MPPUtility.getUnicodeString(data, offset);
task.setHyperlink(hyperlink);
task.setHyperlinkAddress(address);
task.setHyperlinkSubAddress(subaddress);
}
} | [
"This method is used to extract the task hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param task task instance\n@param data hyperlink data block"
] | [
"Get the values of the fields for an obj\nAutoincrement values are automatically set.\n@param fields\n@param obj\n@throws PersistenceBrokerException",
"Handle the serialization of String, Integer and boolean parameters.\n\n@param param to serialize\n@return Object",
"Get the collection of contacts for the calling user.\n\n@return The Collection of Contact objects",
"compares two AST nodes",
"Prepares a Jetty server for communicating with consumers.",
"Here the search query is composed and executed.\nThe result is wrapped in an easily usable form.\nIt is exposed to the JSP via the tag's \"var\" attribute.\n@return The result object exposed via the tag's attribute \"var\".",
"Use this API to fetch all the appfwwsdl resources that are configured on netscaler.",
"Writes references that have been added recently. Auxiliary triples that\nare generated for serializing snaks in references will be written right\nafterwards. This will also trigger any other auxiliary triples to be\nwritten that the snak converter object may have buffered.\n\n@throws RDFHandlerException\nif there was a problem writing the restrictions",
"Returns the directory of the file.\n\n@param filePath Path of the file.\n@return The directory string or {@code null} if\nthere is no parent directory.\n@throws IllegalArgumentException if path is bad"
] |
public static boolean isLogDownloadAvailable(CliGuiContext cliGuiCtx) {
ModelNode readOps = null;
try {
readOps = cliGuiCtx.getExecutor().doCommand("/subsystem=logging:read-children-types");
} catch (CommandFormatException | IOException e) {
return false;
}
if (!readOps.get("result").isDefined()) return false;
for (ModelNode op: readOps.get("result").asList()) {
if ("log-file".equals(op.asString())) return true;
}
return false;
} | [
"Does the server support log downloads?\n\n@param cliGuiCtx The context.\n@return <code>true</code> if the server supports log downloads,\n<code>false</code> otherwise."
] | [
"Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.",
"Deletes any empty directories under the output directory. These\ndirectories are created by TestNG for its own reports regardless\nof whether those reports are generated. If you are using the\ndefault TestNG reports as well as ReportNG, these directories will\nnot be empty and will be retained. Otherwise they will be removed.\n@param outputDirectory The directory to search for empty directories.",
"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.",
"Sets an Integer attribute.\n\n@param key the key, non null.\n@param value the value\n@return the Builder, for chaining.",
"Split a module Id to get the module name\n@param moduleId\n@return String",
"Use this API to fetch authenticationvserver_authenticationlocalpolicy_binding resources of given name .",
"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",
"Finds \"Y\" coordinate value in which more elements could be added in the band\n@param band\n@return",
"Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source"
] |
private int bestSurroundingSet(int index, int length, int... valid) {
int option1 = set[index - 1];
if (index + 1 < length) {
// we have two options to check
int option2 = set[index + 1];
if (contains(valid, option1) && contains(valid, option2)) {
return Math.min(option1, option2);
} else if (contains(valid, option1)) {
return option1;
} else if (contains(valid, option2)) {
return option2;
} else {
return valid[0];
}
} else {
// we only have one option to check
if (contains(valid, option1)) {
return option1;
} else {
return valid[0];
}
}
} | [
"Guesses the best set to use at the specified index by looking at the surrounding sets. In general, characters in\nlower-numbered sets are more common, so we choose them if we can. If no good surrounding sets can be found, the default\nvalue returned is the first value from the valid set.\n\n@param index the current index\n@param length the maximum length to look at\n@param valid the valid sets for this index\n@return the best set to use at the specified index"
] | [
"Return true only if the node has the named annotation\n@param node - the AST Node to check\n@param name - the name of the annotation\n@return true only if the node has the named annotation",
"Retrieve the routing type value from the REST request.\n\"X_VOLD_ROUTING_TYPE_CODE\" is the routing type header.\n\nBy default, the routing code is set to NORMAL\n\nTODO REST-Server 1. Change the header name to a better name. 2. Assumes\nthat integer is passed in the header",
"Use this API to count sslcipher_individualcipher_binding resources configued on NetScaler.",
"Get a timer of the given string name and todos for the current thread. If\nno such timer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return timer",
"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.",
"Return a list of 'Files' of downloaded or uploaded files. Filters build files without local and remote paths.\n\n@param buildFilesStream - Stream of build Artifacts or Dependencies.\n@return - List of build files.",
"GENERIC!!! HELPER FUNCION FOR REPLACEMENT\n\nupdate the var: DYNAMIC REPLACEMENT of VAR.\n\nEvery task must have matching command data and task result\n\n@param task\nthe task\n@param replaceVarKey\nthe replace var key\n@param replaceVarValue\nthe replace var value",
"Loads a CRF classifier from an InputStream, and returns it. This method\ndoes not buffer the InputStream, so you should have buffered it before\ncalling this method.\n\n@param in\nInputStream to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"Returns an object which represents the data to be transferred. The class\nof the object returned is defined by the representation class of the flavor.\n\n@param flavor the requested flavor for the data\n@see DataFlavor#getRepresentationClass\n@exception IOException if the data is no longer available\nin the requested flavor.\n@exception UnsupportedFlavorException if the requested data flavor is\nnot supported."
] |
@Nullable
@VisibleForTesting
protected PolygonSymbolizer createPolygonSymbolizer(final PJsonObject styleJson) {
if (this.allowNullSymbolizer && !styleJson.has(JSON_FILL_COLOR)) {
return null;
}
final PolygonSymbolizer symbolizer = this.styleBuilder.createPolygonSymbolizer();
symbolizer.setFill(createFill(styleJson));
symbolizer.setStroke(createStroke(styleJson, false));
return symbolizer;
} | [
"Add a polygon symbolizer definition to the rule.\n\n@param styleJson The old style."
] | [
"If first and second are Strings, then this returns an MutableInternedPair\nwhere the Strings have been interned, and if this Pair is serialized\nand then deserialized, first and second are interned upon\ndeserialization.\n\n@param p A pair of Strings\n@return MutableInternedPair, with same first and second as this.",
"Removes the given service provider factory from the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>",
"once we're on ORM 5",
"convert selector used in an upsert statement into a document",
"Recursively sort the supplied child tasks.\n\n@param container child tasks",
"Returns the ViewGroup used as a parent for the content view.\n\n@return The content view's parent.",
"Extracts the version id from a string\n\n@param versionDir The string\n@return Returns the version id of the directory, else -1",
"Retrieve the routing type value from the REST request.\n\"X_VOLD_ROUTING_TYPE_CODE\" is the routing type header.\n\nBy default, the routing code is set to NORMAL\n\nTODO REST-Server 1. Change the header name to a better name. 2. Assumes\nthat integer is passed in the header",
"Process a currency definition.\n\n@param row record from XER file"
] |
public void setSiteRoot(String siteRoot) {
if (siteRoot != null) {
siteRoot = siteRoot.replaceFirst("/$", "");
}
m_siteRoot = siteRoot;
} | [
"Sets the site root.\n\n@param siteRoot the site root"
] | [
"Adds folders to perform the search in.\n@param folders Folders to search in.",
"Creates and returns a matrix which is idential to this one.\n\n@return A new identical matrix.",
"Use this API to fetch all the csparameter resources that are configured on netscaler.",
"Additional bean deployment archives are used for extentions, synthetic annotated types and beans which do not come from a bean archive.\n\n@param beanClass\n@return the additional bean deployment archive",
"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",
"Transforms a length according to the current transformation matrix.",
"changes the color of the image - more red and less blue\n\n@return new pixel array",
"Handles subscription verification callback from Facebook.\n@param subscription The subscription name.\n@param challenge A challenge that Facebook expects to be returned.\n@param verifyToken A verification token that must match with the subscription's token given when the controller was created.\n@return The challenge if the verification token matches; blank string otherwise.",
"Set the association in the entry state.\n\n@param collectionRole the role of the association\n@param association the association"
] |
private static String qualifiedName(Options opt, String r) {
if (opt.hideGenerics)
r = removeTemplate(r);
// Fast path - nothing to do:
if (opt.showQualified && (opt.showQualifiedGenerics || r.indexOf('<') < 0))
return r;
StringBuilder buf = new StringBuilder(r.length());
qualifiedNameInner(opt, r, buf, 0, !opt.showQualified);
return buf.toString();
} | [
"Return the class's name, possibly by stripping the leading path"
] | [
"Sets the underlying connect timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#connectTimeout(long, TimeUnit)",
"Sets the name of the base calendar associated with this task.\nNote that this attribute appears in MPP9 and MSPDI files.\n\n@param calendar calendar instance",
"Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException",
"Build a String representation of given arguments.",
"This method is very similar to addMainHandler, except ShellFactory\nwill pass all handlers registered with this method to all this shell's subshells.\n\n@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)\n\n@param handler Object which should be registered as handler.\n@param prefix Prefix that should be prepended to all handler's command names.",
"Gets the Symmetric Chi-square divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Symmetric chi-square divergence between p and q.",
"Print a duration value.\n\n@param value Duration instance\n@return string representation of a duration",
"Use this API to fetch a cmpglobal_cmppolicy_binding resources.",
"Read a single weekday from the provided JSON value.\n@param val the value to read the week day from.\n@return the week day read\n@throws IllegalArgumentException thrown if the provided JSON value is not the representation of a week day."
] |
public static void checkDelegateType(Decorator<?> decorator) {
Set<Type> types = new HierarchyDiscovery(decorator.getDelegateType()).getTypeClosure();
for (Type decoratedType : decorator.getDecoratedTypes()) {
if(!types.contains(decoratedType)) {
throw BeanLogger.LOG.delegateMustSupportEveryDecoratedType(decoratedType, decorator);
}
}
} | [
"Check whether the delegate type implements or extends all decorated types.\n\n@param decorator\n@throws DefinitionException If the delegate type doesn't implement or extend all decorated types"
] | [
"Start a process using the given parameters.\n\n@param processId\n@param parameters\n@return",
"Visits an annotation on a local variable type.\n\n@param typeRef\na reference to the annotated type. The sort of this type\nreference must be {@link TypeReference#LOCAL_VARIABLE\nLOCAL_VARIABLE} or {@link TypeReference#RESOURCE_VARIABLE\nRESOURCE_VARIABLE}. See {@link TypeReference}.\n@param typePath\nthe path to the annotated type argument, wildcard bound, array\nelement type, or static inner type within 'typeRef'. May be\n<tt>null</tt> if the annotation targets 'typeRef' as a whole.\n@param start\nthe fist instructions corresponding to the continuous ranges\nthat make the scope of this local variable (inclusive).\n@param end\nthe last instructions corresponding to the continuous ranges\nthat make the scope of this local variable (exclusive). This\narray must have the same size as the 'start' array.\n@param index\nthe local variable's index in each range. This array must have\nthe same size as the 'start' array.\n@param desc\nthe class descriptor of the annotation class.\n@param visible\n<tt>true</tt> if the annotation is visible at runtime.\n@return a visitor to visit the annotation values, or <tt>null</tt> if\nthis visitor is not interested in visiting this annotation.",
"Ends interception context if it was previously stated. This is indicated by a local variable with index 0.",
"Use this API to update gslbsite.",
"Update the id field of the object in the database.",
"Use this API to delete dnstxtrec resources.",
"Compares two sets of snaks, given by iterators. The method is optimised\nfor short lists of snaks, as they are typically found in claims and\nreferences.\n\n@param snaks1\n@param snaks2\n@return true if the lists are equal",
"Creates an appropriate HSGE for a domain-wide resource of a type that is mappable to server groups",
"Unzip a file or a folder\n@param zipFile\n@param unzippedFolder optional, if null the file/folder will be extracted in the same folder as zipFile\n@return"
] |
public final SimpleFeatureCollection autoTreat(final Template template, final String features)
throws IOException {
SimpleFeatureCollection featuresCollection = treatStringAsURL(template, features);
if (featuresCollection == null) {
featuresCollection = treatStringAsGeoJson(features);
}
return featuresCollection;
} | [
"Get the features collection from a GeoJson inline string or URL.\n\n@param template the template\n@param features what to parse\n@return the feature collection\n@throws IOException"
] | [
"2-D Forward Discrete Hartley Transform.\n\n@param data Data.",
"The method determines if the type can be resolved and if not, will try to guess the qualified name using the information from the imports.",
"Creates the request.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception",
"Clear JobContext of current thread",
"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.",
"region Override Methods",
"This is the main entry point used to convert the internal representation\nof timephased baseline cost into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range",
"don't run on main thread",
"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>"
] |
public ResultSetAndStatement executeQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
{
if (logger.isDebugEnabled())
{
logger.debug("executeQuery: " + query);
}
/*
* MBAIRD: we should create a scrollable resultset if the start at
* index or end at index is set
*/
boolean scrollable = ((query.getStartAtIndex() > Query.NO_START_AT_INDEX) || (query.getEndAtIndex() > Query.NO_END_AT_INDEX));
/*
* OR if the prefetching of relationships is being used.
*/
if (query != null && query.getPrefetchedRelationships() != null && !query.getPrefetchedRelationships().isEmpty())
{
scrollable = true;
}
final StatementManagerIF sm = broker.serviceStatementManager();
final SelectStatement sql = broker.serviceSqlGenerator().getPreparedSelectStatement(query, cld);
PreparedStatement stmt = null;
ResultSet rs = null;
try
{
final int queryFetchSize = query.getFetchSize();
final boolean isStoredProcedure = isStoredProcedure(sql.getStatement());
stmt = sm.getPreparedStatement(cld, sql.getStatement() ,
scrollable, queryFetchSize, isStoredProcedure);
if (isStoredProcedure)
{
// Query implemented as a stored procedure, which must return a result set.
// Query sytax is: { ?= call PROCEDURE_NAME(?,...,?)}
getPlatform().registerOutResultSet((CallableStatement) stmt, 1);
sm.bindStatement(stmt, query, cld, 2);
if (logger.isDebugEnabled())
logger.debug("executeQuery: " + stmt);
stmt.execute();
rs = (ResultSet) ((CallableStatement) stmt).getObject(1);
}
else
{
sm.bindStatement(stmt, query, cld, 1);
if (logger.isDebugEnabled())
logger.debug("executeQuery: " + stmt);
rs = stmt.executeQuery();
}
return new ResultSetAndStatement(sm, stmt, rs, sql);
}
catch (PersistenceBrokerException e)
{
// release resources on exception
sm.closeResources(stmt, rs);
logger.error("PersistenceBrokerException during the execution of the query: " + e.getMessage(), e);
throw e;
}
catch (SQLException e)
{
// release resources on exception
sm.closeResources(stmt, rs);
throw ExceptionHelper.generateException(e, sql.getStatement(), null, logger, null);
}
} | [
"performs a SELECT operation against RDBMS.\n@param query the query string.\n@param cld ClassDescriptor providing JDBC information."
] | [
"Given a interim cluster with a previously vacated zone, constructs a new\ncluster object with the drop zone completely removed\n\n@param intermediateCluster\n@param dropZoneId\n@return adjusted cluster with the zone dropped",
"splits a string into a list of strings. Trims the results and ignores empty strings",
"Reset the crawler to its initial state.",
"Joins the given list into a single string.",
"Gets the Jaccard distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Jaccard distance between x and y.",
"This takes into account scrolling and will be in absolute\ncoordinates where the top left corner of the page is 0,0 but\nthe viewport may be scrolled to something else.",
"Use this API to fetch cmppolicylabel resource of given name .",
"retrieve a collection of type collectionClass matching the Query query\nif lazy = true return a CollectionProxy\n\n@param collectionClass\n@param query\n@param lazy\n@return ManageableCollection\n@throws PersistenceBrokerException",
"Retrieve timephased baseline cost. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present"
] |
private Map<Integer, List<Row>> createExceptionAssignmentMap(List<Row> rows)
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer calendarID = row.getInteger("ID");
String exceptions = row.getString("EXCEPTIONS");
map.put(calendarID, createExceptionAssignmentRowList(exceptions));
}
return map;
} | [
"Create the exception assignment map.\n\n@param rows calendar rows\n@return exception assignment map"
] | [
"retrieve a collection of type collectionClass matching the Query query\nif lazy = true return a CollectionProxy\n\n@param collectionClass\n@param query\n@param lazy\n@return ManageableCollection\n@throws PersistenceBrokerException",
"Build a stack trace for this path. This can be used in generating more meaningful exceptions\nwhile using Crawljax in conjunction with JUnit for example.\n\n@return a array of StackTraceElements denoting the steps taken by this path. The first\nelement [0] denotes the last {@link Eventable} on this path while the last item\ndenotes the first {@link Eventable} executed.",
"Adds to this set all of the elements in the specified map of members and their score.\n@param scoredMember the members to add together with their scores\n@return the number of members actually added",
"Merge the given maps.\n\n<p>\nThe replied map is a view on the given two maps.\nIf a key exists in the two maps, the replied value is the value of the right operand.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n<p>\nThe replied map is unmodifiable.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@since 2.15",
"Gets the or create protocol header.\n\n@param message the message\n@return the message headers map",
"Process TestCaseFinishedEvent. Add steps and attachments from\ntop step from stepStorage to current testCase, then remove testCase\nand step from stores. Also remove attachments matches removeAttachments\nconfig.\n\n@param event to process",
"return a prepared Insert Statement fitting for the given ClassDescriptor",
"Get the scale at the given index.\n\n@param index the index of the zoom level to access.\n@param unit the unit.",
"Retrieves a field type from a location in a data block.\n\n@param data data block\n@param offset offset into data block\n@return field type"
] |
public Method getGetMethod(final Object object, final String fieldName) {
if( object == null ) {
throw new NullPointerException("object should not be null");
} else if( fieldName == null ) {
throw new NullPointerException("fieldName should not be null");
}
Method method = getCache.get(object.getClass().getName(), fieldName);
if( method == null ) {
method = ReflectionUtils.findGetter(object, fieldName);
getCache.set(object.getClass().getName(), fieldName, method);
}
return method;
} | [
"Returns the getter method for field on an object.\n\n@param object\nthe object\n@param fieldName\nthe field name\n@return the getter associated with the field on the object\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible"
] | [
"Log an audit record of this operation.",
"Retrieve the default mapping between MPXJ task fields and Primavera task field names.\n\n@return mapping",
"Create a field map for enterprise custom fields.\n\n@param props props data\n@param c target class",
"Answer the TableAlias for aPath or aUserAlias\n@param aPath\n@param aUserAlias\n@param hintClasses\n@return TableAlias, null if none",
"Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class",
"Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD\n@param _jasperPrint\n@param _format\n@param _parameters\n@return",
"Creates the parents of nested XML elements if necessary.\n@param xmlContent the XML content that is edited.\n@param xmlPath the path of the (nested) element, for which the parents should be created\n@param l the locale for which the XML content is edited.",
"Log a trace message.",
"Given a method node, checks if we are calling a private method from an inner class."
] |
private void enableTalkBack() {
GVRSceneObject[] sceneObjects = mGvrContext.getMainScene().getWholeSceneObjects();
for (GVRSceneObject sceneObject : sceneObjects) {
if (sceneObject instanceof GVRAccessiblityObject)
if (((GVRAccessiblityObject) sceneObject).getTalkBack() != null)
((GVRAccessiblityObject) sceneObject).getTalkBack().setActive(true);
}
} | [
"find all accessibility object and set active true for enable talk back."
] | [
"Generate a groupId tree regarding the filters\n\n@param moduleId\n@return TreeNode",
"Adds a user defined field value to a task.\n\n@param fieldType field type\n@param container FieldContainer instance\n@param row UDF data",
"Use this API to fetch appqoepolicy resource of given name .",
"Log a byte array as a hex dump.\n\n@param data byte array",
"Finds the beat in which the specified track position falls.\n\n@param milliseconds how long the track has been playing\n\n@return the beat number represented by that time, or -1 if the time is before the first beat",
"Use this API to fetch a vpnglobal_auditnslogpolicy_binding resources.",
"Returns the compact project status update records for all updates on the project.\n\n@param project The project to find status updates for.\n@return Request object",
"It is required that T be Serializable",
"Only meant to be called once\n\n@throws Exception exception"
] |
HtmlTag attr(String name, String value) {
if (attrs == null) {
attrs = new HashMap<>();
}
attrs.put(name, value);
return this;
} | [
"Attribute name and value are not escaped or modified in any way.\n\n@param name\n@param value\n@return self"
] | [
"This method extracts data for an exception day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data",
"This method takes the textual version of a constraint name\nand returns an appropriate class instance. Note that unrecognised\nvalues are treated as \"As Soon As Possible\" constraints.\n\n@param locale target locale\n@param type text version of the constraint type\n@return ConstraintType instance",
"Creates a real agent in the platform\n\n@param agent_name\nThe name that the agent is gonna have in the platform\n@param path\nThe path of the description (xml) of the agent",
"Returns the value of the identified field as a Date.\nTime fields returned from an FQL query are expressed in terms of seconds since midnight, January 1, 1970 UTC.\n@param fieldName the name of the field\n@return the value of the field as a Date\n@throws FqlException if the field's value cannot be expressed as a long value from which a Date object can be constructed.",
"Peeks the current top of the stack or returns null if the stack is empty\n@return the current top of the stack or returns null if the stack is empty",
"remove an objects entry from the object registry",
"Read an optional string value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the string value in the provided JSON object.\n@param defaultValue the default value, to be returned if the string can not be read from the JSON object.\n@return the string or the default value if reading the string fails.",
"Set the classpath for loading the driver using the classpath reference.\n\n@param r reference to the classpath",
"Don't use input, it's match values might have been reset in the\nloop that looks for the first possible match.\n\n@param pairIndex TODO\n@param result TODO\n@return TODO"
] |
public static String regexFindFirst(String pattern, String str) {
return regexFindFirst(Pattern.compile(pattern), str, 1);
} | [
"Gets the first group of a regex\n@param pattern Pattern\n@param str String to find\n@return the matching group"
] | [
"Generic string joining function.\n@param strings Strings to be joined\n@param fixCase does it need to fix word case\n@param withChar char to join strings with.\n@return joined-string",
"Commit the contents of the given temp file to either the main file, or, if we are not persisting\nto the main file, to the .last file in the configuration history\n@param temp temp file containing the latest configuration. Will not be {@code null}\n@throws ConfigurationPersistenceException",
"Match the Origin header with the allowed origins.\nIf it doesn't match then a 403 response code is set on the response and it returns null.\n@param exchange the current HttpExchange.\n@param allowedOrigins list of sanitized allowed origins.\n@return the first matching origin, null otherwise.\n@throws Exception",
"Determines whether a project has the specified publisher type, wrapped by the \"Flexible Publish\" publisher.\n@param project The project\n@param type The type of the publisher\n@return true if the project contains a publisher of the specified type wrapped by the \"Flexible Publish\" publisher.",
"Calls the stored procedure stored procedure throws an\nerror if it doesn't exist.\n@param broker\n@param cld\n@param sequenceName\n@return\n@throws LookupException\n@throws SQLException",
"Adds a new point.\n\n@param point a point\n@return this for chaining",
"All the indexes defined in the database. Type widening means that the returned Index objects\nare limited to the name, design document and type of the index and the names of the fields.\n\n@return a list of defined indexes with name, design document, type and field names.",
"Calculates the next snapshot version based on the current release version\n\n@param fromVersion The version to bump to next development version\n@return The next calculated development (snapshot) version",
"Add a line symbolizer definition to the rule.\n\n@param styleJson The old style."
] |
public static sslpolicylabel get(nitro_service service, String labelname) throws Exception{
sslpolicylabel obj = new sslpolicylabel();
obj.set_labelname(labelname);
sslpolicylabel response = (sslpolicylabel) obj.get_resource(service);
return response;
} | [
"Use this API to fetch sslpolicylabel resource of given name ."
] | [
"Are both Id's the same?\n\n@param otherElement the other element to compare\n@return true if id == otherElement.id",
"Assigned action code",
"Copy new data to an existing float-point texture.\n\nCreating a new {@link GVRFloatImage} is pretty cheap, but it's still\nnot a totally trivial operation: it does involve some memory management\nand some GL hardware handshaking. Reusing the texture reduces this\noverhead (primarily by delaying garbage collection). Do be aware that\nupdating a texture will affect any and all {@linkplain GVRMaterial\nmaterials} (and/or post effects that use the texture!\n\n@param width\nTexture width, in pixels\n@param height\nTexture height, in pixels\n@param data\nA linear array of float pairs.\n@return {@code true} if the updateGPU succeeded, and {@code false} if it\nfailed. Updating a texture requires that the new data parameter\nhas the exact same {@code width} and {@code height} and pixel\nformat as the original data.\n@throws IllegalArgumentException\nIf {@code width} or {@code height} is {@literal <= 0,} or if\n{@code data} is {@code null}, or if\n{@code data.length < height * width * 2}",
"Get history for a specific database ID\n\n@param id ID of history entry\n@return History entry",
"Subtracts the given range from this range, to produce either zero, one, or two address ranges that contain the addresses in this range and not in the given range.\nIf the result has length 2, the two ranges are in increasing order.\n\n@param other\n@return",
"Saves the favorites.\n\n@param favorites the list of favorites to save\n@throws CmsException if something goes wrong",
"Add a new value to the array map.\n@param key The key under which to store the value. <b>Must not be null.</b> If\nthis key already exists in the array, its value will be replaced.\n@param value The value to store for the given key.\n@return Returns the old value that was stored for the given key, or null if there\nwas no such key.",
"Use this API to update clusternodegroup resources.",
"Used for unit tests only.\n\nFIXME: Refactor test code with dependency injection or scope restrictions so this function is not public.\n\n@deprecated Do not use for production code, use {@link #fetch(String, String, voldemort.server.protocol.admin.AsyncOperationStatus, String, long, voldemort.store.metadata.MetadataStore, Long diskQuotaSizeInKB)} instead."
] |
public Record findRecordById(String id) {
if (directory == null)
init();
Property idprop = config.getIdentityProperties().iterator().next();
for (Record r : lookup(idprop, id))
if (r.getValue(idprop.getName()).equals(id))
return r;
return null; // not found
} | [
"Look up record by identity."
] | [
"Returns status message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String",
"Add or remove the active cursors from the provided scene.\n\n@param scene The GVRScene.\n@param add <code>true</code> for add, <code>false</code> to remove",
"Creates the event type.\n\n@param type the EventEnumType\n@return the event type",
"Core implementation of matchPath. It is isolated so that it can be called\nfrom TokenizedPattern.",
"Get the days difference",
"checks if a bean has been seen before in the dependencyPath. If not, it\nresolves the InjectionPoints and adds the resolved beans to the set of\nbeans to be validated",
"Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text 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 1.0",
"Gets the default configuration for Freemarker within Windup.",
"Return the current working directory\n\n@return the current working directory"
] |
private void setVerticalScrollbar(final CmsScrollBar scrollbar, int width) {
// Validate.
if ((scrollbar == m_scrollbar) || (scrollbar == null)) {
return;
}
// Detach new child.
scrollbar.asWidget().removeFromParent();
// Remove old child.
if (m_scrollbar != null) {
if (m_verticalScrollbarHandlerRegistration != null) {
m_verticalScrollbarHandlerRegistration.removeHandler();
m_verticalScrollbarHandlerRegistration = null;
}
remove(m_scrollbar);
}
m_scrollLayer.appendChild(scrollbar.asWidget().getElement());
adopt(scrollbar.asWidget());
// Logical attach.
m_scrollbar = scrollbar;
m_verticalScrollbarWidth = width;
// Initialize the new scrollbar.
m_verticalScrollbarHandlerRegistration = scrollbar.addValueChangeHandler(new ValueChangeHandler<Integer>() {
public void onValueChange(ValueChangeEvent<Integer> event) {
int vPos = scrollbar.getVerticalScrollPosition();
int v = getVerticalScrollPosition();
if (v != vPos) {
setVerticalScrollPosition(vPos);
}
}
});
maybeUpdateScrollbars();
} | [
"Set the scrollbar used for vertical scrolling.\n\n@param scrollbar the scrollbar, or null to clear it\n@param width the width of the scrollbar in pixels"
] | [
"Does the given class has bidirectional assiciation\nwith some other class?",
"Read an element which contains only a single list attribute of a given\ntype.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@param type the value type class\n@param <T> the value type\n@return the value list\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.",
"Write back to hints file.",
"Returns all the retention policies.\n@param api the API connection to be used by the resource.\n@param fields the fields to retrieve.\n@return an iterable with all the retention policies.",
"Calculate start dates for a weekly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Get the response headers for URL, following redirects\n\n@param stringUrl URL to use\n@param followRedirects whether to follow redirects\n@return headers HTTP Headers\n@throws IOException I/O error happened",
"Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return",
"Assigns an element a value based on its index in the internal array..\n\n@param index The matrix element that is being assigned a value.\n@param value The element's new value.",
"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"
] |
public static boolean hasFacet(GridDialect gridDialect, Class<? extends GridDialect> facetType) {
if ( gridDialect instanceof ForwardingGridDialect ) {
return hasFacet( ( (ForwardingGridDialect<?>) gridDialect ).getGridDialect(), facetType );
}
else {
return facetType.isAssignableFrom( gridDialect.getClass() );
}
} | [
"Whether the given grid dialect implements the specified facet or not.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return {@code true} in case the given dialect implements the specified facet, {@code false} otherwise"
] | [
"Notifies all listeners that the data is about to be loaded.",
"Returns true if all pixels in the array have the same color",
"Remove the corresponding object from session AND application cache.",
"Initializes class data structures and parameters",
"Disable all overrides for a specified path with overrideType\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client\n@param overrideType Override type identifier",
"Propagates node table of given DAG to all of it ancestors.",
"Returns the result of a stored procedure executed on the backend.\n\n@param embeddedCacheManager embedded cache manager\n@param storedProcedureName name of stored procedure\n@param queryParameters parameters passed for this query\n@param classLoaderService the class loader service\n\n@return a {@link ClosableIterator} with the result of the query",
"Set the view frustum to pick against from the field of view, aspect\nratio and near, far clip planes. The viewpoint of the frustum\nis the center of the scene object the picker is attached to.\nThe view direction is the forward direction of that scene object.\nThe frustum will pick what a camera attached to the scene object\nwith that view frustum would see. If the frustum is not attached\nto a scene object, it defaults to the view frustum of the main camera of the scene.\n\n@param fovy vertical field of view in degrees\n@param aspect aspect ratio (width / height)",
"Mark root of this task task group depends on the given task group's root.\nThis ensure this task group's root get picked for execution only after the completion\nof all tasks in the given group.\n\n@param dependencyTaskGroup the task group that this task group depends on"
] |
public static String capitalize( String text ) {
if( text == null || text.isEmpty() ) {
return text;
}
return text.substring( 0, 1 ).toUpperCase().concat( text.substring( 1, text.length() ) );
} | [
"Returns the given text with the first letter in upper case.\n\n<h2>Examples:</h2>\n<pre>\ncapitalize(\"hi\") == \"Hi\"\ncapitalize(\"Hi\") == \"Hi\"\ncapitalize(\"hi there\") == \"hi there\"\ncapitalize(\"\") == \"\"\ncapitalize(null) == null\n</pre>\n@param text the text to capitalize\n@return text with the first letter in upper case"
] | [
"Adjusts all links in the target folder that point to the source folder\nso that they are kept \"relative\" in the target folder where possible.\n\nIf a link is found from the target folder to the source folder,\nthen the target folder is checked if a target of the same name\nis found also \"relative\" inside the target Folder, and if so,\nthe link is changed to that \"relative\" target. This is mainly used to keep\nrelative links inside a copied folder structure intact.\n\nExample: Image we have folder /folderA/ that contains files\n/folderA/x1 and /folderA/y1. x1 has a link to y1 and y1 to x1.\nNow someone copies /folderA/ to /folderB/. So we end up with\n/folderB/x2 and /folderB/y2. Because of the link mechanism in OpenCms,\nx2 will have a link to y1 and y2 to x1. By using this method,\nthe links from x2 to y1 will be replaced by a link x2 to y2,\nand y2 to x1 with y2 to x2.\n\nLink replacement works for links in XML files as well as relation only\ntype links.\n\n@param sourceFolder the source folder\n@param targetFolder the target folder\n\n@throws CmsException if something goes wrong",
"Build a Dataset from some data.\n\n@param oldData This {@link Dataset} represents data for which we which to\nsome features, specifically those features not in the {@link edu.stanford.nlp.util.Index}\ngoodFeatures.\n@param goodFeatures An {@link edu.stanford.nlp.util.Index} of features we wish to retain.\n@return A new {@link Dataset} wheres each datapoint contains only features\nwhich were in goodFeatures.",
"Flush output streams.",
"This method is called to alert project listeners to the fact that\na resource has been read from a project file.\n\n@param resource resource instance",
"Merge this ExecutionStatistics with all the statistics created within the child threads. All the child threads had to be created using Windup-specific\nThreadFactory in order to contain a reference to the parent thread.",
"Provides a collection of all the nodes in the tree\nusing a depth first traversal.\n\n@return the list of (depth-first) ordered nodes",
"Create a clone of the Renderer. This method is the base of the prototype mechanism implemented\nto avoid create new objects from RendererBuilder. Pay an special attention implementing clone\nmethod in Renderer subtypes.\n\n@return a copy of the current renderer.",
"Signals that the processor to finish and waits until it finishes.",
"Performs MAC signing of the SMB. This is done as follows.\nThe signature field of the SMB is overwritted with the sequence number;\nThe MD5 digest of the MAC signing key + the entire SMB is taken;\nThe first 8 bytes of this are placed in the signature field.\n\n@param data The data.\n@param offset The starting offset at which the SMB header begins.\n@param length The length of the SMB data starting at offset."
] |
@Deprecated
public ClientConfig setNodeBannagePeriod(int nodeBannagePeriod, TimeUnit unit) {
this.failureDetectorBannagePeriod = unit.toMillis(nodeBannagePeriod);
return this;
} | [
"The period of time to ban a node that gives an error on an operation.\n\n@param nodeBannagePeriod The period of time to ban the node\n@param unit The time unit of the given value\n\n@deprecated Use {@link #setFailureDetectorBannagePeriod(long)} instead"
] | [
"Convert a key-version-nodeSet information to string\n\n@param key The key\n@param versionMap mapping versions to set of PrefixNodes\n@param storeName store's name\n@param partitionId partition scanned\n@return a string that describe the information passed in",
"This method changes package_path into folder's path\n\n@param path\n, as es.upm.gsi\n@return the new path, es/upm/gsi",
"Retrieve and validate the key from the REST request.\n\n@return true if present, false if missing",
"Appends a formatted line of code to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>",
"This function interprets the arguments of the main function. By doing\nthis it will set flags for the dump generation. See in the help text for\nmore specific information about the options.\n\n@param args\narray of arguments from the main function.\n@return list of {@link DumpProcessingOutputAction}",
"Note that the index can only be built once.\n\n@param beans The set of beans the index should be built from, only instances of {@link CommonBean} and implementations of {@link PassivationCapable} are\nincluded\n@throws IllegalStateException If the index is built already",
"Find the number of Strings matched to the given Matcher.\n\n@param matcher a Matcher\n@return int the number of Strings matched to the given matcher.\n@since 1.0",
"Returns the ReportModel with given name.",
"Performs an efficient update of each columns' norm"
] |
public static lbvserver_servicegroupmember_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_servicegroupmember_binding obj = new lbvserver_servicegroupmember_binding();
obj.set_name(name);
lbvserver_servicegroupmember_binding response[] = (lbvserver_servicegroupmember_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch lbvserver_servicegroupmember_binding resources of given name ."
] | [
"This method extracts data for a single calendar from a Phoenix file.\n\n@param calendar calendar data",
"Find a statement group by its property id, without checking for\nequality with the site IRI. More efficient implementation than\nthe default one.",
"Define the set of extensions.\n\n@param extensions\n@return self",
"Use this API to fetch vrid6 resource of given name .",
"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",
"Use this API to unset the properties of tmsessionparameter resource.\nProperties that need to be unset are specified in args array.",
"Get the default provider used.\n\n@return the default provider, never {@code null}.",
"Unchecks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already unchecked; {@code false} otherwise.",
"GetJob helper - String predicates are all created the same way, so this factors some code."
] |
public String getUniformDescriptor(GVRContext ctx)
{
if (mShaderTemplate == null)
{
mShaderTemplate = makeTemplate(ID, ctx);
ctx.getShaderManager().addShaderID(this);
}
return mShaderTemplate.getUniformDescriptor();
} | [
"Gets the string describing the uniforms used by shaders of this type.\n@param ctx GVFContext shader is associated with\n@return uniform descriptor string\n@see #getTemplate(GVRContext) GVRShader#getUniformDescriptor()"
] | [
"If the user has not specified a project ID, this method\nretrieves the ID of the first project in the file.",
"Finds the beat in which the specified track position falls.\n\n@param milliseconds how long the track has been playing\n\n@return the beat number represented by that time, or -1 if the time is before the first beat",
"Removes all commas from the token list",
"Truncated power function.\n\n@param value Value.\n@param degree Degree.\n@return Result.",
"Updates the properties of a tag. Only the fields provided in the `data`\nblock will be updated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated tag record.\n\n@param tag The tag to update.\n@return Request object",
"called when we are completed finished with using the TcpChannelHub",
"A map of the header key value pairs. Keys are strings and values are either list of strings or a\nstring.\n\n@param headers the header map",
"Given a status update from a CDJ, find the metadata for the track that it has loaded, if any. If there is\nan appropriate metadata cache, will use that, otherwise makes a query to the players dbserver.\n\n@param status the CDJ status update that will be used to determine the loaded track and ask the appropriate\nplayer for metadata about it\n\n@return the metadata that was obtained, if any",
"Shuts down the server. Active connections are not affected."
] |
protected void getBatch(int batchSize){
// if (numCalls == 0) {
// for (int i = 0; i < 1538*\15; i++) {
// randGenerator.nextInt(this.dataDimension());
// }
// }
// numCalls++;
if (thisBatch == null || thisBatch.length != batchSize){
thisBatch = new int[batchSize];
}
//-----------------------------
//RANDOM WITH REPLACEMENT
//-----------------------------
if (sampleMethod.equals(SamplingMethod.RandomWithReplacement)){
for(int i = 0; i<batchSize;i++){
thisBatch[i] = randGenerator.nextInt(this.dataDimension()); //Just generate a random index
// System.err.println("numCalls = "+(numCalls++));
}
//-----------------------------
//ORDERED
//-----------------------------
}else if(sampleMethod.equals(SamplingMethod.Ordered)){
for(int i = 0; i<batchSize;i++){
thisBatch[i] = (curElement + i) % this.dataDimension() ; //Take the next batchSize points in order
}
curElement = (curElement + batchSize) % this.dataDimension(); //watch out for overflow
//-----------------------------
//RANDOM WITHOUT REPLACEMENT
//-----------------------------
}else if(sampleMethod.equals(SamplingMethod.RandomWithoutReplacement)){
//Declare the indices array if needed.
if (allIndices == null || allIndices.size()!= this.dataDimension()){
allIndices = new ArrayList<Integer>();
for(int i=0;i<this.dataDimension();i++){
allIndices.add(i);
}
Collections.shuffle(allIndices,randGenerator);
}
for(int i = 0; i<batchSize;i++){
thisBatch[i] = allIndices.get((curElement + i) % allIndices.size()); //Grab the next batchSize indices
}
if (curElement + batchSize > this.dataDimension()){
Collections.shuffle(Arrays.asList(allIndices),randGenerator); //Shuffle if we got to the end of the list
}
//watch out for overflow
curElement = (curElement + batchSize) % allIndices.size(); //Rollover
}else{
System.err.println("NO SAMPLING METHOD SELECTED");
System.exit(1);
}
} | [
"private int numCalls = 0;"
] | [
"Retrieves the class object for the given qualified class name.\n\n@param className The qualified name of the class\n@param initialize Whether the class shall be initialized\n@return The class object",
"Get the VCS url from the Jenkins build environment. The search will one of \"SVN_REVISION\", \"GIT_COMMIT\",\n\"P4_CHANGELIST\" in the environment.\n\n@param env Th Jenkins build environment.\n@return The vcs url for supported VCS",
"Get the current stack trace element, skipping anything from known logging classes.\n@return The current stack trace for this thread",
"Get a collection of methods declared on this object by method name and parameter count.\n\n@param name the name of the method\n@param paramCount the number of parameters\n@return the (possibly empty) collection of methods with the given name and parameter count",
"Obtains a local date in Symmetry454 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry454 local date, not null\n@throws DateTimeException if unable to create the date",
"Set default interval for sending events to monitoring service. DefaultInterval will be used by\nscheduler.\n\n@param defaultInterval the new default interval",
"Returns the address for the operation.\n\n@param op the operation\n\n@return the operation address or a new undefined model node",
"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",
"Straight conversion from an ObjectName to a PathAddress.\n\nThere may not necessarily be a Resource at this path address (if that correspond to a pattern) but it must\nmatch a model in the registry.\n\n@param domain the name of the caller's JMX domain\n@param registry the root resource for the management model\n@param name the ObjectName to convert\n\n@return the PathAddress, or {@code null} if no address matches the object name"
] |
public void onLayoutApplied(final WidgetContainer container, final Vector3Axis viewPortSize) {
mContainer = container;
mViewPort.setSize(viewPortSize);
if (mContainer != null) {
mContainer.onLayoutChanged(this);
}
} | [
"Called when the layout is applied to the data\n@param container WidgetContainer to access the org.gearvrf.org.gearvrf.widgetlib in the layout\n@param viewPortSize View port for data set"
] | [
"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",
"Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception",
"Plots the MSD curve with the trajectory t and adds the fitted model for confined diffusion above.\n@param t Trajectory to calculate the msd curve\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param a Parameter alpha\n@param b Shape parameter 1\n@param c Shape parameter 2\n@param d Diffusion coefficient",
"Gets all the enterprise events that occurred within a specified date range.\n@param api the API connection to use.\n@param after the lower bound on the timestamp of the events returned.\n@param before the upper bound on the timestamp of the events returned.\n@param types an optional list of event types to filter by.\n@return a log of all the events that met the given criteria.",
"Read the table headers. This allows us to break the file into chunks\nrepresenting the individual tables.\n\n@param is input stream\n@return list of tables in the file",
"Calculates the column width according to its type.\n@param _property the property.\n@return the column width.",
"Shut down actor system force.",
"Returns the log message id used by this checker. This is used to group it so that all attributes failing a type of rejction\nend up in the same error message. This default implementation uses the formatted log message with an empty attribute map as the id.\n\n@return the log message id",
"Used to set the complex value of a matrix element.\n@param row The row of the element.\n@param col The column of the element.\n@param real Real component of assigned value\n@param imaginary Imaginary component of assigned value"
] |
static PlexusConfiguration convert(ModelNode configuration, ModelNode jsonSchema, String extensionId, String id) {
ConversionContext ctx = new ConversionContext();
ctx.currentSchema = jsonSchema;
ctx.rootSchema = jsonSchema;
ctx.pushTag(extensionId);
ctx.id = id;
return convert(configuration, ctx);
} | [
"visibility increased for testing"
] | [
"Returns redirect information for the given ID\n\n@param id ID of redirect\n@return ServerRedirect\n@throws Exception exception",
"Read an optional boolean value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the boolean value in the provided JSON object.\n@return the boolean or null if reading the boolean fails.",
"Handles the response of the Request node request.\n@param incomingMessage the response message to process.",
"Create a new server group for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception",
"Use this API to fetch all the lbvserver resources that are configured on netscaler.",
"Retrieve the result produced by a task with the given id in the group.\n\nThis method can be used to retrieve the result of invocation of both dependency\nand \"post-run\" dependent tasks. If task with the given id does not exists then\nIllegalArgumentException exception will be thrown.\n\n@param taskId the task item id\n@return the task result, null will be returned if task has not yet been invoked",
"Get new vector clock based on this clock but incremented on index nodeId\n\n@param nodeId The id of the node to increment\n@return A vector clock equal on each element execept that indexed by\nnodeId",
"returns a proxy or a fully materialized Object from the current row of the\nunderlying resultset.",
"Reads a markdown link.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link."
] |
protected int readShort(int offset, byte[] data)
{
int result = 0;
int i = offset + m_offset;
for (int shiftBy = 0; shiftBy < 16; shiftBy += 8)
{
result |= ((data[i] & 0xff)) << shiftBy;
++i;
}
return result;
} | [
"Read a two byte integer from the data.\n\n@param offset current offset into data block\n@param data data block\n@return int value"
] | [
"Set the value of switch component.",
"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).",
"Get the ActivityInterface.\n\n@return The ActivityInterface",
"Set the week of month.\n@param weekOfMonthStr the week of month to set.",
"Flushes this output stream and forces any buffered output bytes to be written out to the stream. If propagate is\ntrue, the wrapped stream will also be flushed.\n\n@param propagate\nboolean flag to indicate whether the wrapped OutputStream should also be flushed.\n@throws IOException\nif an I/O error occurs.",
"Joins the given ints using the given separator into a single string.\n\n@return the joined string or an empty string if the int array is null",
"compares two AST nodes",
"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.",
"Main method of VPRendererAdapter. 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 ViewPager.\n\nIf RendererBuilder returns a null Renderer this method will throw a\nNullRendererBuiltException.\n\n@param parent The containing View in which the page will be shown.\n@param position to render.\n@return view rendered."
] |
public static boolean isAssignableFrom(TypeReference<?> from, TypeReference<?> to) {
if (from == null) {
return false;
}
if (to.equals(from)) {
return true;
}
if (to.getType() instanceof Class) {
return to.getRawType().isAssignableFrom(from.getRawType());
} else if (to.getType() instanceof ParameterizedType) {
return isAssignableFrom(from.getType(), (ParameterizedType) to
.getType(), new HashMap<String, Type>());
} else if (to.getType() instanceof GenericArrayType) {
return to.getRawType().isAssignableFrom(from.getRawType())
&& isAssignableFrom(from.getType(), (GenericArrayType) to
.getType());
} else {
throw new AssertionError("Unexpected Type : " + to);
}
} | [
"Check if this type is assignable from the given Type."
] | [
"Searches for all annotations of the given type on this method or on type level for all interfaces and superclasses\n\n@param method the method to scan\n@param annotation the annotation to search for\n@param <T> the type of the annotation\n@return the list of all method or type level annotations in the type hierarchy",
"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.",
"Returns a single template.\n\n@param id id of the template to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Main executable method of Crawljax CLI.\n\n@param args\nthe arguments.",
"Creates a new instance of this class.\n\n@param variableName\nname of the instance variable to search aliases for. Must\nneither be {@code null} nor empty.\n@param controlFlowBlockToExamine\na {@link ControlFlowBlock} which possibly contains the setup\nof an alias for a lazy variable. This method thereby examines\npredecessors of {@code block}, too. This parameter must not be\n{@code null}.\n@return a new instance of this class.",
"This method performs database modification at the very and of transaction.",
"Determines if the queue identified by the given key can be used as a delayed queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key already is a delayed queue or is not currently used, false otherwise",
"A convenience method for creating an immutable list\n\n@param self a List\n@return an immutable List\n@see java.util.Collections#unmodifiableList(java.util.List)\n@since 1.0",
"This method extracts project properties from a Phoenix file.\n\n@param phoenixSettings Phoenix settings\n@param storepoint Current storepoint"
] |
public static nstimer_binding get(nitro_service service, String name) throws Exception{
nstimer_binding obj = new nstimer_binding();
obj.set_name(name);
nstimer_binding response = (nstimer_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch nstimer_binding resource of given name ."
] | [
"By default uses InputStream as the type of the image\n@param title\n@param property\n@param width\n@param fixedWidth\n@param imageScaleMode\n@param style\n@return\n@throws ColumnBuilderException\n@throws ClassNotFoundException",
"Use this API to renumber nspbr6 resources.",
"Use this API to fetch all the vpath resources that are configured on netscaler.",
"Returns the Euclidean distance between this vector and vector v.\n\n@return distance between this vector and v",
"This method is used to launch mock agents. First it creates them, with\nthe generic df_service_name \\\"mock_agent\\\", and then the method sends to\nthe agent a message with the new df_service_name and its behaviour.\n\n@param agent_name\nThe name of the mock agent\n@param agent_path\nThe path of the agent, described in\nmocks/jadex/common/Definitions file\n@param configuration\nWhere the new df_service_name and the agents behaviour is\nsaved\n@param scenario\nThe Scenario of the Test",
"Prepares this DAG for node enumeration using getNext method, each call to getNext returns next node\nin the DAG with no dependencies.",
"Setter for \"addContentInfo\", indicating if content information should be added.\n@param doAddInfo The value of the \"addContentInfo\" attribute of the tag",
"Create a Build retention object out of the build\n\n@param build The build to create the build retention out of\n@param discardOldArtifacts Flag whether to discard artifacts of those builds that are to be discarded.\n@return a new Build retention",
"Decomposes the provided matrix and stores the result in the same matrix.\n\n@param A Matrix that is to be decomposed. Modified.\n@return If it succeeded or not."
] |
public static HashMap<StoreDefinition, Integer> getUniqueStoreDefinitionsWithCounts(List<StoreDefinition> storeDefs) {
HashMap<StoreDefinition, Integer> uniqueStoreDefs = Maps.newHashMap();
for(StoreDefinition storeDef: storeDefs) {
if(uniqueStoreDefs.isEmpty()) {
uniqueStoreDefs.put(storeDef, 1);
} else {
StoreDefinition sameStore = null;
// Go over all the other stores to find if this is unique
for(StoreDefinition uniqueStoreDef: uniqueStoreDefs.keySet()) {
if(uniqueStoreDef.getReplicationFactor() == storeDef.getReplicationFactor()
&& uniqueStoreDef.getRoutingStrategyType()
.compareTo(storeDef.getRoutingStrategyType()) == 0) {
// Further check for the zone routing case
if(uniqueStoreDef.getRoutingStrategyType()
.compareTo(RoutingStrategyType.ZONE_STRATEGY) == 0) {
boolean zonesSame = true;
for(int zoneId: uniqueStoreDef.getZoneReplicationFactor().keySet()) {
if(storeDef.getZoneReplicationFactor().get(zoneId) == null
|| storeDef.getZoneReplicationFactor().get(zoneId) != uniqueStoreDef.getZoneReplicationFactor()
.get(zoneId)) {
zonesSame = false;
break;
}
}
if(zonesSame) {
sameStore = uniqueStoreDef;
}
} else {
sameStore = uniqueStoreDef;
}
if(sameStore != null) {
// Bump up the count
int currentCount = uniqueStoreDefs.get(sameStore);
uniqueStoreDefs.put(sameStore, currentCount + 1);
break;
}
}
}
if(sameStore == null) {
// New store
uniqueStoreDefs.put(storeDef, 1);
}
}
}
return uniqueStoreDefs;
} | [
"Given a list of store definitions, find out and return a map of similar\nstore definitions + count of them\n\n@param storeDefs All store definitions\n@return Map of a unique store definition + counts"
] | [
"Used to create a new retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param type the type of the retention policy. Can be \"finite\" or \"indefinite\".\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info.",
"Sets the baseline duration text value.\n\n@param baselineNumber baseline number\n@param value baseline duration text value",
"Formats a percentage value.\n\n@param number MPXJ percentage value\n@return Primavera percentage value",
"Deletes a chain of vertices from this list.",
"Use this API to fetch aaauser_vpntrafficpolicy_binding resources of given name .",
"Method to create a new proxy that wraps the bean instance.\n\n@param beanInstance the bean instance\n@return a new proxy object",
"This handler will be triggered when search is finish",
"Set an enterprise cost value.\n\n@param index cost index (1-30)\n@param value cost value",
"Shutdown the container.\n\n@see Weld#initialize()"
] |
public static void createDirectory(Path dir, String dirDesc)
{
try
{
Files.createDirectories(dir);
}
catch (IOException ex)
{
throw new WindupException("Error creating " + dirDesc + " folder: " + dir.toString() + " due to: " + ex.getMessage(), ex);
}
} | [
"Creates the given directory. Fails if it already exists."
] | [
"Calculate the finish variance.\n\n@return finish variance",
"Convert a floating point date to a LocalDate.\n\nNote: This method currently performs a rounding to the next day.\nIn a future extension intra-day time offsets may be considered.\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*365.0) days to referenceDate.",
"Loads configuration from InputStream. Later loads have lower priority.\n\n@param in InputStream to load from\n@since 1.2.0",
"Updates the indices in the index buffer from a Java IntBuffer.\nAll of the entries of the input int buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if int buffer is wrong size",
"Creates an immutable list that consists of the elements in the given collection. If the given collection is already an immutable list,\nit is returned directly.\n\n@param source the given collection\n@return an immutable list",
"A convenience method for creating an immutable list\n\n@param self a List\n@return an immutable List\n@see java.util.Collections#unmodifiableList(java.util.List)\n@since 1.0",
"Validations specific to GET and GET ALL",
"Return the current handedness of the Gear Controller.\n\n@return returns whether the user is using the controller left or right handed. This function\nreturns <code>null</code> if the controller is unavailable or the data is stale.",
"Return the map bounds rotated with the set rotation. The bounds are adapted to rounding changes of the\nsize of the set paint area.\n\n@return Rotated bounds."
] |
@SuppressWarnings("rawtypes") public static final Map getMap(Locale locale, String key)
{
ResourceBundle bundle = ResourceBundle.getBundle(LocaleData.class.getName(), locale);
return ((Map) bundle.getObject(key));
} | [
"Convenience method for retrieving a Map resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value"
] | [
"Counts the coordinates stored in a single statement for the relevant\nproperty, if they are actually given and valid.\n\n@param statement\n@param itemDocument",
"Triggers a new search with the given text.\n\n@param query the text to search for.",
"Populate the container, converting raw data into Java types.\n\n@param field custom field to which these values belong\n@param values raw value data\n@param descriptions raw description data",
"Extract a duration amount from the assignment, converting a percentage\ninto an actual duration.\n\n@param task parent task\n@param work duration from assignment\n@return Duration instance",
"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",
"Detect and apply waves, now or when the widget is attached.\n\n@param widget target widget to ensure is attached first",
"Send message to all connections connected to the same URL of this context\n\n@param message the message to be sent\n@param excludeSelf whether the connection of this context should be sent to\n@return this context",
"Use this API to update bridgetable resources.",
"Append the Parameter\nAdd the place holder ? or the SubQuery\n@param value the value of the criteria"
] |
protected Transformer getTransformer() {
TransformerFactory transformerFactory = domXmlDataFormat.getTransformerFactory();
try {
Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
return transformer;
}
catch (TransformerConfigurationException e) {
throw LOG.unableToCreateTransformer(e);
}
} | [
"Returns a configured transformer to write XML.\n\n@return the XML configured transformer\n@throws SpinXmlElementException if no new transformer can be created"
] | [
"Checks if ranges contain the uid\n\n@param idRanges the id ranges\n@param uid the uid\n@return true, if ranges contain given uid",
"Ask the specified player for the specified waveform detail from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform detail\n\n@return the waveform detail, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running",
"Turns a series of strings into their corresponding license entities\nby using regular expressions\n\n@param licStrings The list of license strings\n@return A set of license entities",
"Create the index and associate it with all project models in the Application",
"Emit an enum event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(Enum, Object...)",
"Sets an Integer attribute.\n\n@param key the key, non null.\n@param value the value\n@return the Builder, for chaining.",
"Returns a byte array containing a copy of the bytes",
"This method should be called after all column have been added to the report.\n@param numgroups\n@return",
"Read a long int from an input stream.\n\n@param is input stream\n@return long value"
] |
public Duration getWork(FastTrackField type)
{
Double value = (Double) getObject(type);
return value == null ? null : Duration.getInstance(value.doubleValue(), m_table.getWorkTimeUnit());
} | [
"Retrieve a work field.\n\n@param type field type\n@return Duration instance"
] | [
"Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations",
"Sets the package pattern to match against.",
"Sinc function.\n\n@param x Value.\n@return Sinc of the value.",
"Use this API to reset appfwlearningdata.",
"Deletes all of the Directories in root that match the FileFilter\n\n@param root\n@param filter",
"Checks length and compare order of field names with declared PK fields in metadata.",
"Gets the value of the task property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the task property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetTask().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link GanttDesignerRemark.Task }",
"Create all the links possible between the Declaration and all the ImporterService matching the.\nImporterServiceFilter of the Linker.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration",
"Use this API to delete ntpserver resources."
] |
private void validate(Object object) {
Set<ConstraintViolation<Object>> viols = validator.validate(object);
for (ConstraintViolation<Object> constraintViolation : viols) {
if (Null.class.isAssignableFrom(constraintViolation.getConstraintDescriptor().getAnnotation().getClass())) {
Object o = constraintViolation.getLeafBean();
Iterator<Node> iterator = constraintViolation.getPropertyPath().iterator();
String propertyName = null;
while (iterator.hasNext()) {
propertyName = iterator.next().getName();
}
if (propertyName != null) {
try {
PropertyDescriptor descriptor = BeanUtils.getPropertyDescriptor(o.getClass(), propertyName);
descriptor.getWriteMethod().invoke(o, new Object[] { null });
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
} | [
"Take a stab at fixing validation problems ?\n\n@param object"
] | [
"Retrieve timephased baseline work. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present",
"Unregister all MBeans",
"Gets the Chi Square distance between two normalized histograms.\n\n@param histogram1 Histogram.\n@param histogram2 Histogram.\n@return The Chi Square distance between x and y.",
"Uses current variable assignments and info in an NWiseActionTag to expand on an n wise combinatorial set\n\n@param action an NWiseAction Action\n@param possibleStateList a current list of possible states produced so far from expanding a model state\n@return every input possible state expanded on an n wise combinatorial set defined by that input possible state",
"Gets the argument names of a method call. If the arguments are not VariableExpressions then a null\nwill be returned.\n@param methodCall\nthe method call to search\n@return\na list of strings, never null, but some elements may be null",
"Checks if this has the passed suffix\n\n@param suffix is a Bytes object to compare to this\n@return true or false\n@since 1.1.0",
"This method extracts data for a single resource from a Planner file.\n\n@param plannerResource Resource data",
"Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print",
"Return SELECT clause for object existence call"
] |
public synchronized int get(byte[] dst, int off, int len) {
if (available == 0) {
return 0;
}
// limit is last index to read + 1
int limit = idxGet < idxPut ? idxPut : capacity;
int count = Math.min(limit - idxGet, len);
System.arraycopy(buffer, idxGet, dst, off, count);
idxGet += count;
if (idxGet == capacity) {
// Array end reached, check if we have more
int count2 = Math.min(len - count, idxPut);
if (count2 > 0) {
System.arraycopy(buffer, 0, dst, off + count, count2);
idxGet = count2;
count += count2;
} else {
idxGet = 0;
}
}
available -= count;
return count;
} | [
"Gets as many of the requested bytes as available from this buffer.\n\n@return number of bytes actually got from this buffer (0 if no bytes are available)"
] | [
"Checks if the query should be executed using the debug mode where the security restrictions do not apply.\n@param cms the current context.\n@param query the query to execute.\n@return a flag, indicating, if the query should be performed in debug mode.",
"Checks to see if a valid deployment parameter has been defined.\n\n@param operation the operation to check.\n\n@return {@code true} of the parameter is valid, otherwise {@code false}.",
"mark a node as blacklisted\n\n@param nodeId Integer node id of the node to be blacklisted",
"Uploads a new large file.\n@param boxApi the API connection to be used by the upload session.\n@param folderId the id of the folder in which the file will be uploaded.\n@param stream the input stream that feeds the content of the file.\n@param url the upload session URL.\n@param fileName the name of the file to be created.\n@param fileSize the total size of the file.\n@return the created file instance.\n@throws InterruptedException when a thread gets interupted.\n@throws IOException when reading a stream throws exception.",
"Formats a logging event to a writer.\n\n@param event\nlogging event to be formatted.",
"Recursively inspects the given objects and returns a node representing their differences. Both objects\nhave be have the same type.\n\n@param working This object will be treated as the successor of the `base` object.\n@param base This object will be treated as the predecessor of the <code>working</code> object.\n@return A node representing the differences between the given objects.",
"This loads plugin file information into a hash for lazy loading later on\n\n@param pluginDirectory path of plugin\n@throws Exception exception",
"Return the lines of a CharSequence as a List of String.\n\n@param self a CharSequence object\n@return a list of lines\n@throws java.io.IOException if an error occurs\n@since 1.8.2",
"Get the list of supported resolutions for the layer. Each resolution is specified in map units per pixel.\n\n@return list of supported resolutions\n@deprecated use {@link #getZoomLevels()}"
] |
public void propagateAsErrorIfCancelException(final Throwable t) {
if ((t instanceof OperationCanceledError)) {
throw ((OperationCanceledError)t);
}
final RuntimeException opCanceledException = this.getPlatformOperationCanceledException(t);
if ((opCanceledException != null)) {
throw new OperationCanceledError(opCanceledException);
}
} | [
"Rethrows OperationCanceledErrors and wraps platform specific OperationCanceledExceptions. Does nothing for any other type of Throwable."
] | [
"Add a user by ID to the list of people to notify when the retention period is ending.\n@param userID The ID of the user to add to the list.",
"This method writes extended attribute data for an assignment.\n\n@param xml MSPDI assignment\n@param mpx MPXJ assignment",
"Appends the key and value to the address and sets the address on the operation.\n\n@param operation the operation to set the address on\n@param base the base address\n@param key the key for the new address\n@param value the value for the new address",
"Updates the existing cluster such that we remove partitions mentioned\nfrom the stealer node and add them to the donor node\n\n@param currentCluster Existing cluster metadata. Both stealer and donor\nnode should already exist in this metadata\n@param stealerNodeId Id of node for which we are stealing the partitions\n@param donatedPartitions List of partitions we are moving\n@return Updated cluster metadata",
"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",
"Converts a parameter map to the parameter string.\n@param parameters the parameter map.\n@return the parameter string.",
"Parse the XML for a collection as returned by getInfo call.\n\n@param collectionElement\n@return",
"Sets in-place the right child with the same first byte.\n\n@param b next byte of child suffix.\n@param child child node.",
"Build the tree of joins for the given criteria"
] |
protected void cacheCollection() {
this.clear();
for (FluentModelTImpl childResource : this.listChildResources()) {
this.childCollection.put(childResource.childResourceKey(), childResource);
}
} | [
"Initializes the external child resource collection."
] | [
"Use this API to fetch a appfwglobal_auditsyslogpolicy_binding resources.",
"Destroys the internal connection handle and creates a new one.\n@throws SQLException",
"Use this API to fetch clusternodegroup resource of given name .",
"This function is responsible for starting the actual async rebalance\noperation. This is run if this node is the stealer node\n\n<br>\n\nWe also assume that the check that this server is in rebalancing state\nhas been done at a higher level\n\n@param stealInfo Partition info to steal\n@return Returns a id identifying the async operation",
"Calculates the bearing, in degrees, of the end LatLong point from this\nLatLong point.\n\n@param end The point that the bearing is calculated for.\n@return The bearing, in degrees, of the supplied point from this point.",
"Returns whether this is a valid address string format.\n\nThe accepted IP address formats are:\nan IPv4 address, an IPv6 address, a network prefix alone, the address representing all addresses of all types, or an empty string.\nIf this method returns false, and you want more details, call validate() and examine the thrown exception.\n\n@return whether this is a valid address string format",
"Sets the lower limits for the \"moving\" body translation relative to joint point.\n\n@param limitX the X axis lower translation limit\n@param limitY the Y axis lower translation limit\n@param limitZ the Z axis lower translation limit",
"Adds each forbidden substring, checking that it's not null.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif a forbidden substring is null",
"Sets the action label to be displayed, if any. Note that if this is not set, the action\nbutton will not be displayed\n\n@param actionButtonLabel\n@return"
] |
public void setAcquireRetryDelay(long acquireRetryDelay, TimeUnit timeUnit) {
this.acquireRetryDelayInMs = TimeUnit.MILLISECONDS.convert(acquireRetryDelay, timeUnit);
} | [
"Sets the number of ms to wait before attempting to obtain a connection again after a failure.\n@param acquireRetryDelay the acquireRetryDelay to set\n@param timeUnit time granularity"
] | [
"DISPATCHING - COMMANDS",
"1-D Forward Discrete Hartley Transform.\n\n@param data Data.",
"Print a duration represented by an arbitrary fraction of minutes.\n\n@param duration Duration instance\n@param factor required factor\n@return duration represented as an arbitrary fraction of minutes",
"Use this API to disable clusterinstance resources of given names.",
"Populate a resource assignment workgroup instance.\n\n@param record MPX record\n@param workgroup workgroup instance\n@throws MPXJException",
"Returns true if the predicate is true for all pixels in the image.\n\n@param predicate a predicate function that accepts 3 parameters - the x,y coordinate and the pixel at that coordinate\n@return true if f holds for at least one pixel",
"refresh credentials if CredentialProvider set",
"I promise that this is always a collection of HazeltaskTasks",
"Returns true if the provided matrix is has a value of 1 along the diagonal\nelements and zero along all the other elements.\n\n@param a Matrix being inspected.\n@param tol How close to zero or one each element needs to be.\n@return If it is within tolerance to an identity matrix."
] |
protected boolean showMoreEntries(Calendar nextDate, int previousOccurrences) {
switch (getSerialEndType()) {
case DATE:
boolean moreByDate = nextDate.getTimeInMillis() < m_endMillis;
boolean moreByOccurrences = previousOccurrences < CmsSerialDateUtil.getMaxEvents();
if (moreByDate && !moreByOccurrences) {
m_hasTooManyOccurrences = Boolean.TRUE;
}
return moreByDate && moreByOccurrences;
case TIMES:
case SINGLE:
return previousOccurrences < getOccurrences();
default:
throw new IllegalArgumentException();
}
} | [
"Check if the provided date or any date after it are part of the series.\n@param nextDate the current date to check.\n@param previousOccurrences the number of events of the series that took place before the date to check.\n@return <code>true</code> if more dates (including the provided one) could be in the series, <code>false</code> otherwise."
] | [
"Sets the working directory.\n\n@param dir The directory\n@throws IOException If the directory does not exist or cannot be written/read",
"Adds the word.\n\n@param w the w\n@throws ParseException the parse exception",
"The user can be referenced by their globally unique user ID or their email address.\nReturns the full user record for the invited user.\n\n@param workspace The workspace or organization to invite the user to.\n@return Request object",
"Determines whether the given list contains a descriptor with the same name.\n\n@param defs The list to search\n@param obj The object that is searched for\n@return <code>true</code> if the list contains a descriptor with the same name",
"set the textColor of the ColorHolder to a view\n\n@param view",
"See if there is an auto-attach cache file that seems to match the media in the specified slot, and if so,\nattach it.\n\n@param slot the player slot that is under consideration for automatic cache attachment",
"Wraps the specified object pool for connections as a DataSource.\n\n@param jcd the OJB connection descriptor for the pool to be wrapped\n@param connectionPool the connection pool to be wrapped\n@return a DataSource attached to the connection pool.\nConnections will be wrapped using DBCP PoolGuard, that will not allow\nunwrapping unless the \"accessToUnderlyingConnectionAllowed=true\" configuration\nis specified.",
"Retrieve the default number of minutes per year.\n\n@return minutes per year",
"This is a convenience method provided to allow a day to be set\nas working or non-working, by using the day number to\nidentify the required day.\n\n@param day required day\n@param working flag indicating if the day is a working day"
] |
Subsets and Splits