query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public Channel sessionConnectGenerateChannel(Session session)
throws JSchException {
// set timeout
session.connect(sshMeta.getSshConnectionTimeoutMillis());
ChannelExec channel = (ChannelExec) session.openChannel("exec");
channel.setCommand(sshMeta.getCommandLine());
// if run as super user, assuming the input stream expecting a password
if (sshMeta.isRunAsSuperUser()) {
try {
channel.setInputStream(null, true);
OutputStream out = channel.getOutputStream();
channel.setOutputStream(System.out, true);
channel.setExtOutputStream(System.err, true);
channel.setPty(true);
channel.connect();
out.write((sshMeta.getPassword()+"\n").getBytes());
out.flush();
} catch (IOException e) {
logger.error("error in sessionConnectGenerateChannel for super user", e);
}
} else {
channel.setInputStream(null);
channel.connect();
}
return channel;
} | [
"Session connect generate channel.\n\n@param session\nthe session\n@return the channel\n@throws JSchException\nthe j sch exception"
] | [
"Process the scheduling project property from PROJPROP. This table only seems to exist\nin P6 databases, not XER files.\n\n@throws SQLException",
"Boyer Moore scan that proceeds backwards from the end of the file looking for ENDSIG\n@throws NonScannableZipException",
"Returns the Java executable command.\n\n@param javaHome the java home directory or {@code null} to use the default\n\n@return the java command to use",
"Use this API to reset appfwlearningdata resources.",
"This method is called to format a relation.\n\n@param relation relation instance\n@return formatted relation instance",
"Creates a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.",
"Add a 'IS NULL' clause so the column must be null. '=' NULL does not work.",
"Create a canonical represenation of the data type value. Defaults to the value converter.\n\n@since 2.9",
"calculate and set position to menu items"
] |
public final void reset()
{
for (int i = 0; i < combinationIndices.length; i++)
{
combinationIndices[i] = i;
}
remainingCombinations = totalCombinations;
} | [
"Reset the combination generator."
] | [
"Join N sets.",
"Returns the plugins classpath elements.",
"a small helper to set the text color to a textView null save\n\n@param textView\n@param colorDefault",
"Get the context for the specified photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@return The PhotoContext\n@throws FlickrException",
"If task completed success or failure from response.\n\n@param myResponse\nthe my response\n@return true, if successful",
"Expand a macro.\n\nThis will look up the macro definition from {@link #macros} map.\nIf not found then return passed in `macro` itself, otherwise return\nthe macro definition found.\n\n**note** if macro definition is not found and the string\n{@link #isMacro(String) comply to macro name convention}, then a\nwarn level message will be logged.\n\n@param macro the macro name\n@return macro definition or macro itself if no definition found.",
"Set new front facing rotation\n@param rotation",
"todo remove, here only for binary compatibility of elytron subsystem, drop once it is in.",
"The amount of time to keep an idle client thread alive\n\n@param threadIdleTime"
] |
public String interpolate( String input, RecursionInterceptor recursionInterceptor )
throws InterpolationException
{
try
{
return interpolate( input, recursionInterceptor, new HashSet<String>() );
}
finally
{
if ( !cacheAnswers )
{
existingAnswers.clear();
}
}
} | [
"Entry point for recursive resolution of an expression and all of its\nnested expressions.\n\n@todo Ensure unresolvable expressions don't trigger infinite recursion."
] | [
"2-D Forward Discrete Cosine Transform.\n\n@param data Data.",
"Parse JSON parameters from this request.\n\n@param jsonRequest The request in the JSON format.\n@return CmsSpellcheckingRequest object that contains parsed parameters or null, if JSON input is not well\ndefined.",
"Called on mouse down in the caption area, begins the dragging loop by\nturning on event capture.\n\n@see DOM#setCapture\n@see #continueDragging\n@param event the mouse down event that triggered dragging",
"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.",
"We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException",
"Lookup the Gallery for the specified ID.\n\n@param galleryId\nThe user profile URL\n@return The Gallery\n@throws FlickrException",
"Set the weekdays at which the event should take place.\n@param weekDays the weekdays at which the event should take place.",
"The point that is the GOLDEN_SECTION along the way from a to b.\na may be less or greater than b, you find the point 60-odd percent\nof the way from a to b.\n\n@param a Interval minimum\n@param b Interval maximum\n@return The GOLDEN_SECTION along the way from a to b.",
"Creates a future that will send a request to the reporting host and call\nthe handler with the response\n\n@param path the path at the reporting host which the request will be made\n@param reportingHandler the handler to receive the response once executed\nand recieved\n@return a {@link java.util.concurrent.Future} for handing the request"
] |
public static final long getLong6(byte[] data, int offset)
{
long result = 0;
int i = offset;
for (int shiftBy = 0; shiftBy < 48; shiftBy += 8)
{
result |= ((long) (data[i] & 0xff)) << shiftBy;
++i;
}
return result;
} | [
"This method reads a six byte long from the input array.\n\n@param data the input array\n@param offset offset of integer data in the array\n@return integer value"
] | [
"Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded.",
"Invoke the setters for the given variables on the given instance.\n@param <T> the instance type\n@param instance the instance to inject with the variables\n@param vars the variables to inject\n@return the instance\n@throws ReflectiveOperationException if there was a problem finding or invoking a setter method",
"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",
"Read an unsigned integer from the given byte array\n\n@param bytes The bytes to read from\n@param offset The offset to begin reading at\n@return The integer as a long",
"Get prototype name.\n\n@return prototype name",
"Get the account knowing his position\n@param position the position of the account (it can change at runtime!)\n@return the account",
"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",
"Create and bind a server socket\n\n@return the server socket\n@throws IOException",
"Performs a matrix inversion operations that takes advantage of the special\nproperties of a covariance matrix.\n\n@param cov A covariance matrix. Not modified.\n@param cov_inv The inverse of cov. Modified.\n@return true if it could invert the matrix false if it could not."
] |
public static void acceptsDir(OptionParser parser) {
parser.acceptsAll(Arrays.asList(OPT_D, OPT_DIR), "directory path for input/output")
.withRequiredArg()
.describedAs("dir-path")
.ofType(String.class);
} | [
"Adds OPT_D | OPT_DIR option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional"
] | [
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"Apply the layout to the each page in the list\n@param itemLayout item layout in the page\n@return true if the new layout is applied successfully, otherwise - false",
"Get a File path list from configuration.\n\n@param name the name of the property\n@param props the set of configuration properties\n\n@return the CanonicalFile form for the given name.",
"Removes an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return this metadata object.",
"Add new control at the end of control bar with specified touch listener, control label and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param label the control label\n@param listener touch listener",
"Use this API to fetch a vpnglobal_binding resource .",
"Returns the compact task records for all tasks within the given project,\nordered by their priority within the project. Tasks can exist in more than one project at a time.\n\n@param project The project in which to search for tasks.\n@return Request object",
"Takes the specified object and converts the argument to a String.\n\n@param arg The object to convert\n@return A String representation of the argument.",
"Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost."
] |
public Widget addControl(String name, int resId, Widget.OnTouchListener listener) {
return addControl(name, resId, null, listener, -1);
} | [
"Add new control at the end of control bar with specified touch listener and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener"
] | [
"Adds a logical operator block.\n\n@param list parent criteria list\n@param block current block\n@param operator logical operator represented by this block",
"Obtains a Pax local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Use this API to login into Netscaler.\n@param username Username\n@param password Password for the Netscaler.\n@param timeout timeout for netscaler session.Default is 1800secs\n@return status of the operation performed.\n@throws Exception nitro exception is thrown.",
"Invokes a function defined in the script.\n\n@param funcName\nThe function name.\n@param params\nThe parameter array.\n@return\nA boolean value representing whether the function is\nexecuted correctly. If the function cannot be found, or\nparameters don't match, {@code false} is returned.",
"Retrieves state and metrics information for all channels across the cluster.\n\n@return list of channels across the cluster",
"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",
"Start offering shared dbserver sessions.\n\n@throws SocketException if there is a problem opening connections",
"Use this API to fetch sslocspresponder resource of given name .",
"Facade method facilitating the creation of subshell.\nSubshell is created and run inside Command method and shares the same IO and naming strategy.\n\nRun the obtained Shell with commandLoop().\n\n@param pathElement sub-prompt\n@param parent Shell to be subshell'd\n@param appName The app name string\n@param mainHandler Command handler\n@param auxHandlers Aux handlers to be passed to all subshells.\n@return subshell"
] |
public void takeNoteOfGradient(IntDoubleVector gradient) {
gradient.iterate(new FnIntDoubleToVoid() {
@Override
public void call(int index, double value) {
gradSumSquares[index] += value * value;
assert !Double.isNaN(gradSumSquares[index]);
}
});
} | [
"A tie-in for subclasses such as AdaGrad."
] | [
"Use this API to apply nspbr6 resources.",
"Retrieves the value of the given accessible field of the given receiver.\n\n@param receiver the container of the field, not <code>null</code>\n@param fieldName the field's name, not <code>null</code>\n@return the value of the field\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#get(Object)}\n@throws IllegalArgumentException see {@link Field#get(Object)}",
"callers of doLogin should be serialized before calling in.",
"Create a model mbean from an object using the description given in the\nJmx annotation if present. Only operations are supported so far, no\nattributes, constructors, or notifications\n\n@param o The object to create an MBean for\n@return The ModelMBean for the given object",
"Processes an anonymous reference definition.\n\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"false\" description=\"The fully qualified name of the class\nowning the referenced field\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\"",
"Logs an error by sending an error event to all listeners.\n\nError events can be generated by any part of GearVRF,\nfrom any thread. They are always sent to the event receiver\nof the GVRContext.\n\n@param message error message\n@param sender object which had the error\n@see IErrorEvents",
"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}.",
"Creates an immutable singleton instance.\n\n@param key\n@param value\n@return",
"Notifies that an existing header item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position."
] |
public static void closeScope(Object name) {
//we remove the scope first, so that other threads don't see it, and see the next snapshot of the tree
ScopeNode scope = (ScopeNode) MAP_KEY_TO_SCOPE.remove(name);
if (scope != null) {
ScopeNode parentScope = scope.getParentScope();
if (parentScope != null) {
parentScope.removeChild(scope);
} else {
ConfigurationHolder.configuration.onScopeForestReset();
}
removeScopeAndChildrenFromMap(scope);
}
} | [
"Detach a scope from its parent, this will trigger the garbage collection of this scope and it's\nsub-scopes\nif they are not referenced outside of Toothpick.\n\n@param name the name of the scope to close."
] | [
"Find the path.\n\n@param start key of first node in the path\n@param end key of last node in the path\n@return string containing the nodes keys in the path separated by arrow symbol",
"Goes through the token lists and adds all the variables which can be used to define a sub-matrix. If anything\nelse is found an excpetion is thrown",
"Initializes class data structures and parameters",
"Compares two annotated types and returns true if they are the same",
"Checks whether the given set of properties is available.\n\n@param keys the keys to check\n@return true if all properties are available, false otherwise",
"Returns the intersection of sets s1 and s2.",
"Split string of comma-delimited ints into an a int array\n\n@param str\n@return\n@throws IllegalArgumentException",
"This method dumps the entire contents of a file to an output\nprint writer as ascii data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors",
"Filter out interceptors and decorators which are also enabled globally.\n\n@param enabledClasses\n@param globallyEnabledClasses\n@param logMessageCallback\n@param deployment\n@return the filtered list"
] |
public static appfwwsdl get(nitro_service service, String name) throws Exception{
appfwwsdl obj = new appfwwsdl();
obj.set_name(name);
appfwwsdl response = (appfwwsdl) obj.get_resource(service);
return response;
} | [
"Use this API to fetch appfwwsdl resource of given name ."
] | [
"Get the sub registry for the domain.\n\n@param range the version range\n@return the sub registry",
"This method is called to format a time value.\n\n@param value time value\n@return formatted time value",
"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",
"Sets a quota for a users.\n\n@param user the user.\n@param quota the quota.",
"Returns true if the input is a vector\n@param a A matrix or vector\n@return true if it's a vector. Column or row.",
"Gets all checked widgets in the group\n@return list of checked widgets",
"An endpoint to compile an array of soy templates to JavaScript.\n\nThis endpoint is a preferred way of compiling soy templates to JavaScript but it requires a user to compose a url\non their own or using a helper class TemplateUrlComposer, which calculates checksum of a file and puts this in url\nso that whenever a file changes, after a deployment a JavaScript, url changes and a new hash is appended to url, which enforces\ngetting of new compiles JavaScript resource.\n\nInvocation of this url may throw two types of http exceptions:\n1. notFound - usually when a TemplateResolver cannot find a template with an associated name\n2. error - usually when there is a permission error and a user is not allowed to compile a template into a JavaScript\n\n@param hash - some unique number that should be used when we are caching this resource in a browser and we use http cache headers\n@param templateFileNames - an array of template names, e.g. client-words,server-time, which may or may not contain extension\ncurrently three modes are supported - soy extension, js extension and no extension, which is preferred\n@param disableProcessors - whether the controller should run registered outputProcessors after the compilation is complete.\n@param request - HttpServletRequest\n@param locale - locale\n@return response entity, which wraps a compiled soy to JavaScript files.\n@throws IOException - io error",
"We have received notification that a device is no longer on the network, so clear out all its waveforms.\n\n@param announcement the packet which reported the device’s disappearance",
"Returns a Pair constructed from X and Y. Convenience method; the\ncompiler will disambiguate the classes used for you so that you\ndon't have to write out potentially long class names."
] |
public void setMaxConnectionAge(long maxConnectionAge, TimeUnit timeUnit) {
this.maxConnectionAgeInSeconds = TimeUnit.SECONDS.convert(maxConnectionAge, timeUnit);
} | [
"Sets the maxConnectionAge. Any connections older than this setting will be closed\noff whether it is idle or not. Connections currently in use will not be affected until they\nare returned to the pool.\n\n@param maxConnectionAge the maxConnectionAge to set.\n@param timeUnit the unit of the maxConnectionAge argument."
] | [
"Gets the top of thread-local shell stack, or null if it is empty.\n\n@return the top of the shell stack",
"Enable the use of the given controller type by\nadding it to the cursor controller types list.\n@param controllerType GVRControllerType to add to the list",
"Read hints from a file and merge with the given hints map.",
"The user making this call must be an admin in the workspace.\nReturns an empty data record.\n\n@param workspace The workspace or organization to invite the user to.\n@return Request object",
"Remove an write lock.",
"Shutdown the server\n\n@throws Exception exception",
"Set the dates for the specified photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param datePosted\nThe date the photo was posted or null\n@param dateTaken\nThe date the photo was taken or null\n@param dateTakenGranularity\nThe granularity of the taken date or null\n@throws FlickrException",
"Gets the or create protocol header.\n\n@param message the message\n@return the message headers map",
"Given a class node, if this class node implements a trait, then generate all the appropriate\ncode which delegates calls to the trait. It is safe to call this method on a class node which\ndoes not implement a trait.\n@param cNode a class node\n@param unit the source unit"
] |
public void restoreSecurityContext(CacheContext context) {
SavedAuthorization cached = context.get(CacheContext.SECURITY_CONTEXT_KEY, SavedAuthorization.class);
if (cached != null) {
log.debug("Restoring security context {}", cached);
securityManager.restoreSecurityContext(cached);
} else {
securityManager.clearSecurityContext();
}
} | [
"Puts the cached security context in the thread local.\n\n@param context the cache context"
] | [
"This utility displays a list of available task filters, and a\nlist of available resource filters.\n\n@param project project file",
"Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key",
"Gets or creates id of the entity type.\n\n@param entityType entity type name.\n@param allowCreate if set to true and if there is no entity type like entityType,\ncreate the new id for the entityType.\n@return entity type id.",
"Set the channel. This will return whether the channel could be set successfully or not.\n\n@param newChannel the channel\n@return whether the operation succeeded or not",
"Creates a new Terms of Services.\n@param api the API connection to be used by the resource.\n@param termsOfServiceStatus the current status of the terms of services. Set to \"enabled\" or \"disabled\".\n@param termsOfServiceType the scope of terms of service. Set to \"external\" or \"managed\".\n@param text the text field of terms of service containing terms of service agreement info.\n@return information about the Terms of Service created.",
"Set the named roles which may be defined.\n\n@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values\n@since 1.10.0",
"Calculate the child size along the axis\n@param dataIndex data index\n@param axis {@link Axis}\n@return child size",
"Scans a single class for Swagger annotations - does not invoke ReaderListeners",
"Retrieves a ProjectWriter instance which can write a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectWriter instance"
] |
public static int countNonZero(DMatrixRMaj A){
int total = 0;
for (int row = 0, index=0; row < A.numRows; row++) {
for (int col = 0; col < A.numCols; col++,index++) {
if( A.data[index] != 0 ) {
total++;
}
}
}
return total;
} | [
"Counts the number of elements in A which are not zero.\n@param A A matrix\n@return number of non-zero elements"
] | [
"Post-configure retreival of server engine.",
"Determines the field name based on an accessor method name.\n\n@param methodName\nan accessor method name\n@return the resulting field name",
"Return a set of all the Declaration matching the DeclarationFilter of the.\nLinker.\n\n@return a set of all the Declaration matching the DeclarationFilter of the\nLinker.",
"Retrieve the version number",
"Checks to make sure that pseudo scoped beans (i.e. @Dependent scoped beans) have no circular dependencies.",
"Must be called before any other functions. Declares and sets up internal data structures.\n\n@param numSamples Number of samples that will be processed.\n@param sampleSize Number of elements in each sample.",
"Convert an operation for deployment overlays to be executed on local servers.\nSince this might be called in the case of redeployment of affected deployments, we need to take into account\nthe composite op resulting from such a transformation\n@see AffectedDeploymentOverlay#redeployLinksAndTransformOperationForDomain\n@param operation\n@param host\n@return",
"Aliases variables with an unknown type.\n@param variable The variable being aliased\n@param name Name of the variable",
"this method will be invoked after methodToBeInvoked is invoked"
] |
public CollectionRequest<Section> findByProject(String project) {
String path = String.format("/projects/%s/sections", project);
return new CollectionRequest<Section>(this, Section.class, path, "GET");
} | [
"Returns the compact records for all sections in the specified project.\n\n@param project The project to get sections from.\n@return Request object"
] | [
"Set the amount of padding between child objects.\n@param axis {@link Axis}\n@param padding",
"Return the text box for the specified text and font.\n\n@param text text\n@param font font\n@return text box",
"Calculate the signature by which we can reliably recognize a loaded track.\n\n@param title the track title\n@param artist the track artist, or {@code null} if there is no artist\n@param duration the duration of the track in seconds\n@param waveformDetail the monochrome waveform detail of the track\n@param beatGrid the beat grid of the track\n\n@return the SHA-1 hash of all the arguments supplied, or {@code null} if any either {@code waveFormDetail} or {@code beatGrid} were {@code null}",
"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.",
"Returns the instance.\n@return InterceptorFactory",
"Given the comma separated list of properties as a string, splits it\nmultiple strings\n\n@param paramValue Concatenated string\n@param type Type of parameter ( to throw exception )\n@return List of string properties",
"Convert a collection of objects to a JSON array with the string representations of that objects.\n@param collection the collection of objects.\n@return the JSON array with the string representations.",
"Dump an array of bytes in hexadecimal.\n\n@param displayOffset the display offset (left column)\n@param data the byte array of data\n@param offset the offset to start dumping in the byte array\n@param len the length of data to dump\n@return the dump string",
"Constructs a Google APIs HTTP client with the associated credentials."
] |
public String get(final long index) {
return doWithJedis(new JedisCallable<String>() {
@Override
public String call(Jedis jedis) {
return jedis.lindex(getKey(), index);
}
});
} | [
"Get the element value in the list by index\n@param index the position in the list from which to get the element\n@return the element value"
] | [
"Returns real unquoted value for a DisplayValue\n@param key\n@return",
"Returns an integer between interval\n@param min Minimum value\n@param max Maximum value\n@return int number",
"Make a copy.",
"Connect sync.\n\n@param configuration the protocol configuration\n@return the connection\n@throws IOException",
"Set the buttons size.",
"Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set",
"Convert the integer representation of a duration value and duration units\ninto an MPXJ Duration instance.\n\n@param properties project properties, used for duration units conversion\n@param durationValue integer duration value\n@param unitsValue integer units value\n@return Duration instance",
"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.",
"Fetch the next event from a given stream\n@return the next event\n@throws IOException any io exception that could occur"
] |
private void renderAsLI(Writer writer, ProjectModel project, Iterator<Link> links, boolean wrap) throws IOException
{
if (!links.hasNext())
return;
if (wrap)
writer.append("<ul>");
while (links.hasNext())
{
Link link = links.next();
writer.append("<li>");
renderLink(writer, project, link);
writer.append("</li>");
}
if (wrap)
writer.append("</ul>");
} | [
"Renders in LI tags, Wraps with UL tags optionally."
] | [
"Create a random permutation of the numbers 0, ..., size - 1.\n\nsee Algorithm P, D.E. Knuth: The Art of Computer Programming, Vol. 2, p. 145",
"Build a compact representation of the ModelNode.\n@param node The model\n@return A single line containing the multi lines ModelNode.toString() content.",
"Create a Map composed of the entries of the first map minus the\nentries of the given map.\n\n@param self a map object\n@param removeMe the entries to remove from the map\n@return the resulting map\n@since 1.7.4",
"Helper to read an optional Integer value.\n@param path The XML path of the element to read.\n@return The Integer value stored in the XML, or <code>null</code> if the value could not be read.",
"Get all sub-lists of the given list of the given sizes.\n\nFor example:\n\n<pre>\nList<String> items = Arrays.asList("a", "b", "c", "d");\nSystem.out.println(CollectionUtils.getNGrams(items, 1, 2));\n</pre>\n\nwould print out:\n\n<pre>\n[[a], [a, b], [b], [b, c], [c], [c, d], [d]]\n</pre>\n\n@param <T>\nThe type of items contained in the list.\n@param items\nThe list of items.\n@param minSize\nThe minimum size of an ngram.\n@param maxSize\nThe maximum size of an ngram.\n@return All sub-lists of the given sizes.",
"Delete inactive contents.",
"Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week",
"Returns an iterable containing the items in this folder sorted by name and direction.\n@param sort the field to sort by, can be set as `name`, `id`, and `date`.\n@param direction the direction to display the item results.\n@param fields the fields to retrieve.\n@return an iterable containing the items in this folder.",
"Use this API to fetch tmtrafficpolicy_lbvserver_binding resources of given name ."
] |
public void setQueryExecuteTimeLimit(long queryExecuteTimeLimit, TimeUnit timeUnit) {
this.queryExecuteTimeLimitInMs = TimeUnit.MILLISECONDS.convert(queryExecuteTimeLimit, timeUnit);
} | [
"Queries taking longer than this limit to execute are logged.\n@param queryExecuteTimeLimit the limit to set in milliseconds.\n@param timeUnit"
] | [
"resolves any lazy cross references in this resource, adding Issues for unresolvable elements to this resource.\nThis resource might still contain resolvable proxies after this method has been called.\n\n@param mon a {@link CancelIndicator} can be used to stop the resolution.",
"Compress contiguous partitions into format \"e-i\" instead of\n\"e, f, g, h, i\". This helps illustrate contiguous partitions within a\nzone.\n\n@param cluster\n@param zoneId\n@return pretty string of partitions per zone",
"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.",
"Modify the transform's current rotation in quaternion terms, around a\npivot other than the origin.\n\n@param quatW\n'W' component of the rotation quaternion.\n@param quatX\n'X' component of the rotation quaternion.\n@param quatY\n'Y' component of the rotation quaternion.\n@param quatZ\n'Z' component of the rotation quaternion.\n@param pivotX\n'X' component of the pivot's location.\n@param pivotY\n'Y' component of the pivot's location.\n@param pivotZ\n'Z' component of the pivot's location.",
"disables the responses for a given pathname and user id\n\n@param model\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"A factory method for users that need to report success without actually running any analysis. The returned\nresult will be successful, but will not contain the actual configurations of extensions.\n\n@return a \"fake\" successful analysis result",
"Clones the given reference.\n\n@param refDef The reference descriptor\n@param prefix A prefix for the name\n@return The cloned reference",
"Read multiple columns from a block.\n\n@param startIndex start of the block\n@param blockLength length of the block",
"Calculates the legend positions and which legend title should be displayed or not.\n\nImportant: the LegendBounds in the _Models should be set and correctly calculated before this\nfunction is called!\n@param _Models The graph data which should have the BaseModel class as parent class.\n@param _StartX Left starting point on the screen. Should be the absolute pixel value!\n@param _Paint The correctly set Paint which will be used for the text painting in the later process"
] |
public static String detokenize(List<String> tokens) {
return TwitterKoreanProcessor.detokenize(JavaConversions.iterableAsScalaIterable(tokens));
} | [
"Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string."
] | [
"Get a property as a json object or null.\n\n@param key the property name",
"Throws an IllegalStateException when the given value is not null.\n@return the value",
"Use this API to fetch appfwhtmlerrorpage resource of given name .",
"Add a property.",
"Adds a value to the list if does not already exists.\n\n@param list the list\n@param value value to add if not exists in the list",
"Returns a Span that covers all rows beginning with a prefix.",
"Undo changes for a single patch entry.\n\n@param entry the patch entry\n@param loader the content loader",
"Acquire the exclusive lock, with a max wait timeout to acquire.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the timeout scalar quantity.\n@param unit - see {@code TimeUnit} for quantities.\n@return {@code boolean} true on successful acquire.\n@throws InterruptedException - if the acquiring thread was interrupted.\n@throws IllegalArgumentException if {@code permit} is null.",
"If any of the given list of properties are not found, returns the\nname of that property. Otherwise, returns null."
] |
public ConfigBuilder withHost(final String host) {
if (host == null || "".equals(host)) {
throw new IllegalArgumentException("host must not be null or empty: " + host);
}
this.host = host;
return this;
} | [
"Configs created by this ConfigBuilder will have the given Redis hostname.\n\n@param host the Redis hostname\n@return this ConfigBuilder"
] | [
"Set the color at \"index\" to \"color\". Entries are interpolated linearly from\nthe existing entries at \"firstIndex\" and \"lastIndex\" to the new entry.\nfirstIndex < index < lastIndex must hold.\n@param index the position to set\n@param firstIndex the position of the first color from which to interpolate\n@param lastIndex the position of the second color from which to interpolate\n@param color the color to set",
"Gets the JsonObject representation of the Field Operation.\n@param fieldOperation represents the template update operation\n@return the json object",
"adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported",
"Use this API to add transformpolicy.",
"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.",
"Execute a HTTP request and handle common error cases.\n\n@param connection the HttpConnection request to execute\n@return the executed HttpConnection\n@throws CouchDbException for HTTP error codes or if an IOException was thrown",
"Creates a \"delta clone\" of this Map, where only the differences are\nrepresented.",
"bootstrap method for method calls with \"this\" as receiver\n@deprecated since Groovy 2.1.0",
"Read predecessors from a Gantt Designer file.\n\n@param gantt Gantt Designer file"
] |
public BufferedImage getNewImageInstance() {
BufferedImage buf = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());
buf.setData(image.getData());
return buf;
} | [
"Return a new instance of the BufferedImage\n\n@return BufferedImage"
] | [
"Return key Values of an Identity\n@param cld\n@param oid\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException",
"Convert this buffer to a java array.\n@return",
"create a path structure representing the object graph",
"Carry out any post-processing required to tidy up\nthe data read from the database.",
"Convert subQuery to SQL\n@param subQuery the subQuery value of SelectionCriteria",
"Put features in a tile. This will assure all features are only added in one tile. When a feature's unique tile\nis different from this one a link is added in the tile.\n\n@param tile\ntile to put features in\n@param maxTileExtent\nthe maximum tile extent\n@throws GeomajasException oops",
"Wrap a simple attribute def as list.\n\n@param def the attribute definition\n@return the list attribute def",
"Retrieves the Material Shader ID associated with the\ngiven shader template class.\n\nA shader template is capable of generating multiple variants\nfrom a single shader source. The exact vertex and fragment\nshaders are generated by GearVRF based on the lights\nbeing used and the material attributes. you may subclass\nGVRShaderTemplate to create your own shader templates.\n\n@param shaderClass shader class to find (subclass of GVRShader)\n@return GVRShaderId associated with that shader template\n@see GVRShaderTemplate GVRShader",
"Parses command-line and gets read-only metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException"
] |
private void setTempoMaster(DeviceUpdate newMaster) {
DeviceUpdate oldMaster = tempoMaster.getAndSet(newMaster);
if ((newMaster == null && oldMaster != null) ||
(newMaster != null && ((oldMaster == null) || !newMaster.getAddress().equals(oldMaster.getAddress())))) {
// This is a change in master, so report it to any registered listeners
deliverMasterChangedAnnouncement(newMaster);
}
} | [
"Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master."
] | [
"Adds a class to the unit.",
"Find the path.\n\n@param start key of first node in the path\n@param end key of last node in the path\n@return string containing the nodes keys in the path separated by arrow symbol",
"Allows this closeable to be used within the closure, ensuring that it\nis closed once the closure has been executed and before this method returns.\n\n@param self the Closeable\n@param action the closure taking the Closeable as parameter\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 2.4.0",
"Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity",
"Removes the specified list of users from following the project, this will not affect project membership status.\nReturns the updated project record.\n\n@param project The project to remove followers from.\n@return Request object",
"Gets an iterator to the EJB descriptors for an EJB implementation class\n\n@param beanClass The EJB class\n@return An iterator",
"Adds OPT_D | OPT_DIR option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Use this API to fetch a appfwglobal_auditnslogpolicy_binding resources.",
"Returns true if required properties for FluoClient are set"
] |
private void digestInteger(MessageDigest digest, int value) {
byte[] valueBytes = new byte[4];
Util.numberToBytes(value, valueBytes, 0, 4);
digest.update(valueBytes);
} | [
"Helper method to add a Java integer value to a message digest.\n\n@param digest the message digest being built\n@param value the integer whose bytes should be included in the digest"
] | [
"Computes execution time\n@param extra",
"Write a comma to the output stream if required.",
"Formats a resource type.\n\n@param resource MPXJ resource\n@return Primavera resource type",
"Use this API to update inat.",
"Reads characters until the 'end' character is encountered.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found.",
"Return a new instance of the BufferedImage\n\n@return BufferedImage",
"A simple helper method that creates a pool of connections to Redis using\nthe supplied configurations.\n\n@param jesqueConfig the config used to create the pooled Jedis connections\n@param poolConfig the config used to create the pool\n@return a configured Pool of Jedis connections",
"Create an index of base font numbers and their associated base\nfont instances.\n@param data property data",
"Ask the specified player for the specified artwork from the specified media slot, first checking if we have a\ncached copy.\n\n@param artReference uniquely identifies the desired artwork\n@param trackType the kind of track that owns the artwork\n\n@return the artwork, if it was found, or {@code null}\n\n@throws IllegalStateException if the ArtFinder is not running"
] |
public static LBuffer loadFrom(File file) throws IOException {
FileChannel fin = new FileInputStream(file).getChannel();
long fileSize = fin.size();
if (fileSize > Integer.MAX_VALUE)
throw new IllegalArgumentException("Cannot load from file more than 2GB: " + file);
LBuffer b = new LBuffer((int) fileSize);
long pos = 0L;
WritableChannelWrap ch = new WritableChannelWrap(b);
while (pos < fileSize) {
pos += fin.transferTo(0, fileSize, ch);
}
return b;
} | [
"Create an LBuffer from a given file.\n@param file\n@return\n@throws IOException"
] | [
"Marks the given list of statements for deletion. It is verified that the\ncurrent document actually contains the statements before doing so. This\ncheck is based on exact statement equality, including qualifier order and\nstatement id.\n\n@param currentDocument\nthe document with the current statements\n@param deleteStatements\nthe list of statements to be deleted",
"Starts the scenario with the given method and arguments.\nDerives the description from the method name.\n@param method the method that started the scenario\n@param arguments the test arguments with their parameter names",
"Function to perform forward pooling",
"Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque",
"Obtain the name of the caller, most likely a user but could also be a remote process.\n\n@return The name of the caller.",
"The timeout which we block for when a resource is not available\n\n@param timeout The timeout\n@param unit The units of the timeout",
"Set the color for the statusBar\n\n@param statusBarColor",
"Adds a value to the list if does not already exists.\n\n@param list the list\n@param value value to add if not exists in the list",
"Optional operations to do before the multiple-threads start indexing\n\n@param backend"
] |
public boolean mapsCell(String cell) {
return mappers.values().stream().anyMatch(mapper -> mapper.mapsCell(cell));
} | [
"Returns if this has any mapping for the specified cell.\n\n@param cell the cell name\n@return {@code true} if there is any mapping for the cell, {@code false} otherwise"
] | [
"Launch Sample Activity residing in the same module",
"Returns the adapter position of the Parent associated with this ChildViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.",
"Read the parameters on initialization.\n\n@see org.apache.solr.update.processor.UpdateRequestProcessorFactory#init(org.apache.solr.common.util.NamedList)",
"Get all info for the specified photo.\n\nThe calling user must have permission to view the photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo Id\n@param secret\nThe optional secret String\n@return The Photo\n@throws FlickrException",
"Adds a measure to the crosstab. A crosstab can have many measures. DJ will lay out one measure above\nthe other.\n\nA measure is what is shown on each intersection of a column and a row. A calculation is performed to\nall occurrences in the datasource where the column and row values matches (between elements)\n\nThe only difference between the prior methods is that this method sets \"visible\" to false\n\n@param property\n@param className\n@param title\n@return",
"Scan a network interface to find if it has an address space which matches the device we are trying to reach.\nIf so, return the address specification.\n\n@param aDevice the DJ Link device we are trying to communicate with\n@param networkInterface the network interface we are testing\n@return the address which can be used to communicate with the device on the interface, or null",
"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",
"Escape text to ensure valid JSON.\n\n@param value value\n@return escaped value",
"Remove all the existing links of the Declaration.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration"
] |
public double getDegrees() {
double kms = getValue(GeoDistanceUnit.KILOMETRES);
return DistanceUtils.dist2Degrees(kms, DistanceUtils.EARTH_MEAN_RADIUS_KM);
} | [
"Return the numeric distance value in degrees.\n\n@return the degrees"
] | [
"This method is called to format a date. It will return the null text\nif a null value is supplied.\n\n@param value date value\n@return formatted date value",
"Starts all streams.",
"Remove the sequence for given sequence name.\n\n@param sequenceName Name of the sequence to remove.",
"Sets the target translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator",
"Add network interceptor to httpClient to track download progress for\nasync requests.",
"Scale all widgets in Main Scene hierarchy\n@param scale",
"Parse work units.\n\n@param value work units value\n@return TimeUnit instance",
"Sets the size of a UIObject",
"Create an index of base font numbers and their associated base\nfont instances.\n@param data property data"
] |
private Iterable<PersistentNoSqlIdentifierGenerator> getPersistentGenerators() {
Map<String, EntityPersister> entityPersisters = factory.getMetamodel().entityPersisters();
Set<PersistentNoSqlIdentifierGenerator> persistentGenerators = new HashSet<PersistentNoSqlIdentifierGenerator>( entityPersisters.size() );
for ( EntityPersister persister : entityPersisters.values() ) {
if ( persister.getIdentifierGenerator() instanceof PersistentNoSqlIdentifierGenerator ) {
persistentGenerators.add( (PersistentNoSqlIdentifierGenerator) persister.getIdentifierGenerator() );
}
}
return persistentGenerators;
} | [
"Returns all the persistent id generators which potentially require the creation of an object in the schema."
] | [
"Reverses all the TransitionControllers managed by this TransitionManager",
"Create the work pattern assignment map.\n\n@param rows calendar rows\n@return work pattern assignment map",
"Use this API to fetch all the responderhtmlpage resources that are configured on netscaler.",
"Handle bind service event.\n@param service Service instance\n@param props Service reference properties",
"This method is called to alert project listeners to the fact that\na task has been read from a project file.\n\n@param task task instance",
"Read the domain controller data from an S3 file.\n\n@param directoryName the name of the directory in the bucket that contains the S3 file\n@return the domain controller data",
"Retrieves the members of the type and of its super types.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the MembersInclSupertypes attribute\n@param paramValue The feature to be added to the MembersInclSupertypes attribute\n@throws XDocletException If an error occurs",
"Notifies all interested subscribers of the given revision.\n\n@param mwRevision\nthe given revision\n@param isCurrent\ntrue if this is guaranteed to be the most current revision",
"returns a sorted array of fields"
] |
public void update(int number) {
byte[] numberInBytes = new byte[ByteUtils.SIZE_OF_INT];
ByteUtils.writeInt(numberInBytes, number, 0);
update(numberInBytes);
} | [
"Update the underlying buffer using the integer\n\n@param number number to be stored in checksum buffer"
] | [
"Sets the HTTP poller processor to handle Async API.\nWill auto enable the pollable mode with this call\n\n@param httpPollerProcessor\nthe http poller processor\n@return the parallel task builder",
"Read all configuration files.\n@return the list with all available configurations",
"Returns a compact representation of all of the subtasks of a task.\n\n@param task The task to get the subtasks of.\n@return Request object",
"Convert a collection of objects to a JSON array with the string representations of that objects.\n@param collection the collection of objects.\n@return the JSON array with the string representations.",
"Use this API to fetch filterpolicy_binding resource of given name .",
"Returns the configured page sizes, or the default page size if no core is configured.\n@return The configured page sizes, or the default page size if no core is configured.",
"Writes assignment data to a PM XML file.",
"Ask the specified player for the specified waveform preview from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform preview\n\n@return the preview, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running",
"Visits a parameter of this method.\n\n@param name\nparameter name or null if none is provided.\n@param access\nthe parameter's access flags, only <tt>ACC_FINAL</tt>,\n<tt>ACC_SYNTHETIC</tt> or/and <tt>ACC_MANDATED</tt> are\nallowed (see {@link Opcodes})."
] |
public void setValue(float value) {
mBarPointerPosition = Math.round((mSVToPosFactor * (1 - value))
+ mBarPointerHaloRadius + (mBarLength / 2));
calculateColor(mBarPointerPosition);
mBarPointerPaint.setColor(mColor);
// Check whether the Saturation/Value bar is added to the ColorPicker
// wheel
if (mPicker != null) {
mPicker.setNewCenterColor(mColor);
mPicker.changeOpacityBarColor(mColor);
}
invalidate();
} | [
"Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1"
] | [
"Export the modules that should be checked in into git.",
"Constructs a new FastEvent instance\n@param type the event type\n@param manager the bean manager\n@param notifier the notifier to be used for observer method resolution\n@param qualifiers the event qualifiers\n@return",
"Returns the version of Jenkins Artifactory Plugin or empty string if not found\n\n@return the version of Jenkins Artifactory Plugin or empty string if not found",
"Writes image files for all data that was collected and the statistics\nfile for all sites.",
"Checks if template mapper is configured in modules.\n\n@return true if the template mapper is configured in modules",
"OJB can handle only classes that declare at least one primary key attribute,\nthis method checks this condition.\n\n@param realObject The real object to check\n@throws ClassNotPersistenceCapableException thrown if no primary key is specified for the objects class",
"Adds a new cell to the current grid\n@param cell the td component",
"Returns iterable with all non-deleted file version legal holds for this legal hold 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 file version legal holds info.",
"This method will return a list of installed identities for which\nthe corresponding .conf file exists under .installation directory.\nThe list will also include the default identity even if the .conf\nfile has not been created for it."
] |
private CmsSpellcheckingRequest parseHttpRequest(final ServletRequest req, final CmsObject cms) {
if ((null != cms) && OpenCms.getRoleManager().hasRole(cms, CmsRole.ROOT_ADMIN)) {
try {
if (null != req.getParameter(HTTP_PARAMETER_CHECKREBUILD)) {
if (CmsSpellcheckDictionaryIndexer.updatingIndexNecessesary(cms)) {
parseAndAddDictionaries(cms);
}
}
if (null != req.getParameter(HTTP_PARAMTER_REBUILD)) {
parseAndAddDictionaries(cms);
}
} catch (CmsRoleViolationException e) {
LOG.error(e.getLocalizedMessage(), e);
}
}
final String q = req.getParameter(HTTP_PARAMETER_WORDS);
if (null == q) {
LOG.debug("Invalid HTTP request: No parameter \"" + HTTP_PARAMETER_WORDS + "\" defined. ");
return null;
}
final StringTokenizer st = new StringTokenizer(q);
final List<String> wordsToCheck = new ArrayList<String>();
while (st.hasMoreTokens()) {
final String word = st.nextToken();
wordsToCheck.add(word);
if (Character.isUpperCase(word.codePointAt(0))) {
wordsToCheck.add(word.toLowerCase());
}
}
final String[] w = wordsToCheck.toArray(new String[wordsToCheck.size()]);
final String dict = req.getParameter(HTTP_PARAMETER_LANG) == null
? LANG_DEFAULT
: req.getParameter(HTTP_PARAMETER_LANG);
return new CmsSpellcheckingRequest(w, dict);
} | [
"Parse parameters from this request using HTTP.\n\n@param req The ServletRequest containing all request parameters.\n@param cms The OpenCms object.\n@return CmsSpellcheckingRequest object that contains parsed parameters."
] | [
"Writes all data that was collected about properties to a json file.",
"Returns the y-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the y coordinate",
"Returns formatted version of Iban.\n\n@return A string representing formatted Iban for printing.",
"Process a text-based PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance",
"Processes the template for all procedure arguments of the current procedure.\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\"",
"Obtains a Pax zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Print the visibility adornment of element e prefixed by\nany stereotypes",
"Store the char in the internal buffer",
"Maps a story if it is allowed by the meta filter\n\n@param story\nthe Story\n@param metaFilter\nthe meta filter"
] |
public BsonDocument toUpdateDocument() {
final List<BsonElement> unsets = new ArrayList<>();
for (final String removedField : this.removedFields) {
unsets.add(new BsonElement(removedField, new BsonBoolean(true)));
}
final BsonDocument updateDocument = new BsonDocument();
if (this.updatedFields.size() > 0) {
updateDocument.append("$set", this.updatedFields);
}
if (unsets.size() > 0) {
updateDocument.append("$unset", new BsonDocument(unsets));
}
return updateDocument;
} | [
"Convert this update description to an update document.\n\n@return an update document with the appropriate $set and $unset documents."
] | [
"Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array.",
"Performs a transpose across block sub-matrices. Reduces\nthe number of cache misses on larger matrices.\n\n*NOTE* If this is beneficial is highly dependent on the computer it is run on. e.g:\n- Q6600 Almost twice as fast as standard.\n- Pentium-M Same speed and some times a bit slower than standard.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.\n@param blockLength Length of a block.",
"Stores a public key mapping.\n@param original\n@param substitute",
"Use this API to fetch filtered set of appqoepolicy resources.\nset the filter parameter values in filtervalue object.",
"Waits the given amount of time in seconds for a standalone server to start.\n\n@param client the client used to communicate with the server\n@param startupTimeout the time, in seconds, to wait for the server start\n\n@throws InterruptedException if interrupted while waiting for the server to start\n@throws RuntimeException if the process has died\n@throws TimeoutException if the timeout has been reached and the server is still not started",
"create a new instance of the class represented by the no-argument constructor provided\n@param constructor the zero argument constructor for the class\n@return a new instance of the class\n@throws InstantiationException\n@throws ClassNotPersistenceCapableException if the constructor is null or there is an\nexception while trying to create a new instance",
"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.",
"Log table contents.\n\n@param label label text\n@param klass reader class name\n@param map table data",
"Read a block of data from the FastTrack file and determine if\nit contains a table definition, or columns.\n\n@param blockIndex index of the current block\n@param startIndex start index of the block in the file\n@param blockLength block length"
] |
private List<DumpProcessingAction> handleArguments(String[] args) {
CommandLine cmd;
CommandLineParser parser = new GnuParser();
try {
cmd = parser.parse(options, args);
} catch (ParseException e) {
logger.error("Failed to parse arguments: " + e.getMessage());
return Collections.emptyList();
}
// Stop processing if a help text is to be printed:
if ((cmd.hasOption(CMD_OPTION_HELP)) || (args.length == 0)) {
return Collections.emptyList();
}
List<DumpProcessingAction> configuration = new ArrayList<>();
handleGlobalArguments(cmd);
if (cmd.hasOption(CMD_OPTION_ACTION)) {
DumpProcessingAction action = handleActionArguments(cmd);
if (action != null) {
configuration.add(action);
}
}
if (cmd.hasOption(CMD_OPTION_CONFIG_FILE)) {
try {
List<DumpProcessingAction> configFile = readConfigFile(cmd
.getOptionValue(CMD_OPTION_CONFIG_FILE));
configuration.addAll(configFile);
} catch (IOException e) {
logger.error("Failed to read configuration file \""
+ cmd.getOptionValue(CMD_OPTION_CONFIG_FILE) + "\": "
+ e.toString());
}
}
return configuration;
} | [
"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}"
] | [
"Main render algorithm based on render the video thumbnail, render the title, render the marker\nand the label.",
"Reads a single record from the table.\n\n@param buffer record data\n@param table parent table",
"Performs a transpose across block sub-matrices. Reduces\nthe number of cache misses on larger matrices.\n\n*NOTE* If this is beneficial is highly dependent on the computer it is run on. e.g:\n- Q6600 Almost twice as fast as standard.\n- Pentium-M Same speed and some times a bit slower than standard.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.\n@param blockLength Length of a block.",
"Put new sequence object for given sequence name.\n@param sequenceName Name of the sequence.\n@param seq The sequence object to add.",
"The parameter 'project' is not used at the moment, but will be used once schema and plugin support lands.",
"Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String",
"Return a vector of values corresponding to a given vector of times.\n@param times A given vector of times.\n@return A vector of values corresponding to the given vector of times.",
"Update the content of the tables.",
"Method to build Integration flow for IMAP Idle configuration.\n@param urlName Mail source URL.\n@return Integration Flow object IMAP IDLE."
] |
public static BufferedImage cloneImage( BufferedImage image ) {
BufferedImage newImage = new BufferedImage( image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB );
Graphics2D g = newImage.createGraphics();
g.drawRenderedImage( image, null );
g.dispose();
return newImage;
} | [
"Clones a BufferedImage.\n@param image the image to clone\n@return the cloned image"
] | [
"Emit an enum event with parameters supplied.\n\nThis will invoke all {@link SimpleEventListener} bound to the specific\nenum value and all {@link SimpleEventListener} bound to the enum class\ngiven the listeners has the matching argument list.\n\nFor example, given the following enum definition:\n\n```java\npublic enum UserActivity {LOGIN, LOGOUT}\n```\n\nWe have the following simple event listener methods:\n\n```java\n{@literal @}OnEvent\npublic void handleUserActivity(UserActivity, User user) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGIN)\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGOUT)\npublic void logUserLogout(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` method:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGIN, user, System.currentTimeMills());\n```\n\nThe `handleUserActivity` is not invoked because\n\n* The method parameter `(UserActivity, User, long)` does not match the declared argument list `(UserActivity, User)`\n\nWhile the following code will invoke both `handleUserActivity` and `logUserLogout` methods:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGOUT, user);\n```\n\nThe `logUserLogin` method will not be invoked because\n\n1. the method is bound to `UserActivity.LOGIN` enum value specifically, while `LOGOUT` is triggered\n2. the method has a `long timestamp` in the argument list and it is not passed to `eventBus.emit`\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener",
"If there is an unprocessed change event for a particular document ID, fetch it from the\nappropriate namespace change stream listener, and remove it. By reading the event here, we are\nassuming it will be processed by the consumer.\n\n@return the latest unprocessed change event for the given document ID and namespace, or null\nif none exists.",
"Returns true if we should skip this bar, i.e. the bar only has a single child task.\n\n@param row bar row to test\n@return true if this bar should be skipped",
"Write correlation id.\n\n@param message the message\n@param correlationId the correlation id",
"Retrieves the content of the filename. Also reads from JAR Searches for the resource in the\nroot folder in the jar\n\n@param fileName Filename.\n@return The contents of the file.\n@throws IOException On error.",
"This handler will be triggered when there's no search result",
"Gets the current page\n@return",
"Obtains the collection of server groups defined for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception",
"End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance"
] |
public static Info rng( final Variable A , ManagerTempVariables manager) {
Info ret = new Info();
if( A instanceof VariableInteger ) {
ret.op = new Operation("rng") {
@Override
public void process() {
int seed = ((VariableInteger)A).value;
manager.getRandom().setSeed(seed);
}
};
} else {
throw new RuntimeException("Expected one integer");
}
return ret;
} | [
"Sets the seed for random number generator"
] | [
"Optimized version of the Wagner & Fischer algorithm that only\nkeeps a single column in the matrix in memory at a time. It\nimplements the simple cutoff, but otherwise computes the entire\nmatrix. It is roughly twice as fast as the original function.",
"Returns data tree structured as Transloadit expects it.\n\n@param data\n@return {@link Map}\n@throws LocalOperationException",
"This method writes calendar data to a Planner file.\n\n@throws JAXBException on xml creation errors",
"This functions reads SAM flowId and sets it\nas message property for subsequent store in CallContext\n@param message",
"Remove a column from the Document\n\n@param entity the {@link Document} with the column\n@param column the column to remove",
"Use this API to fetch csvserver_appflowpolicy_binding resources of given name .",
"Use this API to fetch all the sslcipher resources that are configured on netscaler.",
"Set possible tile URLs.\n\n@param tileUrls tile URLs",
"Merge the contents of the given plugin.xml into this one."
] |
private static int getContainerPort(Service service, Annotation... qualifiers) {
for (Annotation q : qualifiers) {
if (q instanceof Port) {
Port port = (Port) q;
if (port.value() > 0) {
return port.value();
}
}
}
ServicePort servicePort = findQualifiedServicePort(service, qualifiers);
if (servicePort != null) {
return servicePort.getTargetPort().getIntVal();
}
return 0;
} | [
"Find the the qualfied container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback."
] | [
"Use this API to delete cacheselector of given name.",
"Synchronize the scroll positions of the scrollbars with the actual scroll\nposition of the content.",
"Add all elements in the iterable to the collection.\n\n@param target\n@param iterable\n@return true if the target was modified, false otherwise",
"Create a field map for enterprise custom fields.\n\n@param props props data\n@param c target class",
"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",
"Handle unbind service event.\n@param service Service instance\n@param props Service reference properties",
"Use this API to fetch vpnclientlessaccesspolicy resource of given name .",
"Create a new DateTime. To the last second. This will not create any\nextra-millis-seconds, which may cause bugs when writing to stores such as\ndatabases that round milli-seconds up and down.",
"Applies the given filter to each of the given elems, and returns the\nlist of elems that were accepted. The runtime type of the returned\narray is the same as the passed in array."
] |
protected static BigInteger getRadixPower(BigInteger radix, int power) {
long key = (((long) radix.intValue()) << 32) | power;
BigInteger result = radixPowerMap.get(key);
if(result == null) {
if(power == 1) {
result = radix;
} else if((power & 1) == 0) {
BigInteger halfPower = getRadixPower(radix, power >> 1);
result = halfPower.multiply(halfPower);
} else {
BigInteger halfPower = getRadixPower(radix, (power - 1) >> 1);
result = halfPower.multiply(halfPower).multiply(radix);
}
radixPowerMap.put(key, result);
}
return result;
} | [
"Caches the results of radix to the given power.\n\n@param radix\n@param power\n@return"
] | [
"Make all elements of a String array lower case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements lower case",
"Use this API to fetch a vpnglobal_binding resource .",
"Update a feature object in the Hibernate session.\n\n@param feature feature object\n@throws LayerException oops",
"Exchanges the initial fully-formed messages which establishes the transaction context for queries to\nthe dbserver.\n\n@throws IOException if there is a problem during the exchange",
"Adds the scroll position CSS extension to the given component\n\n@param componentContainer the component to extend\n@param scrollBarrier the scroll barrier\n@param barrierMargin the margin\n@param styleName the style name to set beyond the scroll barrier",
"Get a property as a double or defaultValue.\n\n@param key the property name\n@param defaultValue the default value",
"Helper method to convert seed bytes into the long value required by the\nsuper class.",
"Removes elements from begin to end from the list, inclusive. Returns a new list which\nis composed of the removed elements",
"Add the steal information to the rebalancer state\n\n@param stealInfo The steal information to add"
] |
public void setBaselineStartText(int baselineNumber, String value)
{
set(selectField(TaskFieldLists.BASELINE_STARTS, baselineNumber), value);
} | [
"Sets the baseline start text value.\n\n@param baselineNumber baseline number\n@param value baseline start text value"
] | [
"Generates an artifact regarding the parameters.\n\n<P> <b>WARNING:</b> The parameters grId/arId/version should be filled!!! Only classifier and type are not mandatory.\n\n@param groupId String\n@param artifactId String\n@param version String\n@param classifier String\n@param type String\n@param extension String\n@return Artifact",
"Wrapper to avoid throwing an exception over JMX",
"Prepares a statement with parameters that should work with most RDBMS.\n\n@param con the connection to utilize\n@param sql the sql syntax to use when creating the statement.\n@param scrollable determines if the statement will be scrollable.\n@param createPreparedStatement if <code>true</code>, then a\n{@link PreparedStatement} will be created. If <code>false</code>, then\na {@link java.sql.CallableStatement} will be created.\n@param explicitFetchSizeHint will be used as fetchSize hint\n(if applicable) if > 0\n\n@return a statement that can be used to execute the syntax contained in\nthe <code>sql</code> argument.",
"Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed",
"Use this API to fetch statistics of cmppolicy_stats resource of given name .",
"Sets the segment reject as a string. This method is for convenience\nto be able to set percent reject type just by calling with '3%' and\notherwise it uses rows. All this assuming that parsing finds '%' characher\nand is able to parse a raw reject number.\n\n@param reject the new segment reject",
"Make a sort order for use in a query.",
"Returns a byte array containing a copy of the bytes",
"Print time unit.\n\n@param value TimeUnit instance\n@return time unit value"
] |
public static <E> Set<E> union(Set<E> s1, Set<E> s2) {
Set<E> s = new HashSet<E>();
s.addAll(s1);
s.addAll(s2);
return s;
} | [
"Returns the union of sets s1 and s2."
] | [
"Convert raw value as read from the MPP file into a Java type.\n\n@param type MPP value type\n@param value raw value data\n@return Java object",
"Set the query parameter values overriding all existing query values for\nthe same parameter. If no values are given, the query parameter is removed.\n@param name the query parameter name\n@param values the query parameter values\n@return this UriComponentsBuilder",
"Searches for pairs of parentheses and processes blocks inside of them. Embedded parentheses are handled\nwith no problem. On output only a single token should be in tokens.\n@param tokens List of parsed tokens\n@param sequence Sequence of operators",
"A henson navigator is a class that helps a consumer to consume the navigation api that it\ndeclares in its dependencies. The henson navigator will wrap the intent builders. Thus, a\nhenson navigator, is driven by consumption of intent builders, whereas the henson classes are\ndriven by the production of an intent builder.\n\n<p>This task is created per android variant:\n\n<ul>\n<li>we scan the variant compile configuration for navigation api dependencies\n<li>we generate a henson navigator class for this variant that wraps the intent builders\n</ul>\n\n@param variant the variant for which to create a builder.\n@param hensonNavigatorPackageName the package name in which we create the class.",
"Combine the iterators into a single one.\n\n@param iterators An iterator of iterators\n@return a single combined iterator",
"Get the permission information for the specified photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nThe photo id\n@return The Permissions object\n@throws FlickrException",
"Use this API to update callhome.",
"Print the class's operations m",
"Parses a PDF document and serializes the resulting DOM tree to an output. This requires\na DOM Level 3 capable implementation to be available."
] |
public ServerRedirect updateServerRedirectHost(int serverMappingId, String hostHeader) {
ServerRedirect redirect = new ServerRedirect();
BasicNameValuePair[] params = {
new BasicNameValuePair("hostHeader", hostHeader),
new BasicNameValuePair("profileIdentifier", this._profileName)
};
try {
JSONObject response = new JSONObject(doPost(BASE_SERVER + "/" + serverMappingId + "/host", params));
redirect = getServerRedirectFromJSON(response);
} catch (Exception e) {
e.printStackTrace();
return null;
}
return redirect;
} | [
"Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect"
] | [
"End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance",
"Provides a method that compares two comparables using Groovy's\ndefault number aware comparator.\n\n@param self a Comparable\n@param other another Comparable\n@return a -ve number, 0 or a +ve number according to Groovy's compareTo contract\n@since 1.6.0",
"Set default value with\n\n@param iso ISO2 of country",
"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",
"Returns the required gallery open parameters.\n\n@param cms an initialized instance of a CmsObject\n@param messages the dialog messages\n@param param the widget parameter to generate the widget for\n@param resource the resource being edited\n@param hashId the field id hash\n\n@return the gallery open parameters",
"Ensures that generate-table-info is set to false if generate-repository-info is set to false.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Internal initialization.\n@throws ParserConfigurationException",
"This main method provides an easy command line tool to compare two\nschemas.",
"Creates the node corresponding to an entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}\n@return the corresponding node"
] |
@SuppressWarnings("unchecked")
public static <T extends Serializable> T makeClone(T from) {
return (T) SerializationUtils.clone(from);
} | [
"Creates a clone using java serialization\n\n@param from Object to be cloned\n@param <T> type of the cloned object\n@return Clone of the object"
] | [
"Function to delete the specified store from Metadata store. This involves\n\n1. Remove entry from the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeName specifies name of the store to be deleted.",
"Pretty prints a task list of rebalancing tasks.\n\n@param infos list of rebalancing tasks (RebalancePartitionsInfo)\n@return pretty-printed string",
"Constructs a string representing this address according to the given parameters\n\n@param keepMixed if this address was constructed from a string with mixed representation (a:b:c:d:e:f:1.2.3.4), whether to keep it that way (ignored if makeMixed is true in the params argument)\n@param params the parameters for the address string",
"Use this API to fetch a responderglobal_responderpolicy_binding resources.",
"Updates the database. Never call this during normal operations, upgrade is a user-controlled operation.",
"Opens a file from the volume. The filePath is relative to the\ndefaultPath.\n\n@param filePath\nFile path of the resource to open.\n\n@throws IOException",
"Create and return a SelectIterator for the class using the default mapped query for all statement.",
"Creates a decorator bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return a Bean",
"Add an executable \"post-run\" dependent for this model.\n\n@param executable the executable \"post-run\" dependent\n@return the key to be used as parameter to taskResult(string) method to retrieve result of executing\nthe executable \"post-run\" dependent"
] |
public boolean putAtomic(C instance, K key, V value, Map<K, V> snapshot) {
Assert.checkNotNullParam("key", key);
final Map<K, V> newMap;
final int oldSize = snapshot.size();
if (oldSize == 0) {
newMap = Collections.singletonMap(key, value);
} else if (oldSize == 1) {
final Map.Entry<K, V> entry = snapshot.entrySet().iterator().next();
final K oldKey = entry.getKey();
if (oldKey.equals(key)) {
return false;
} else {
newMap = new FastCopyHashMap<K, V>(snapshot);
newMap.put(key, value);
}
} else {
newMap = new FastCopyHashMap<K, V>(snapshot);
newMap.put(key, value);
}
return updater.compareAndSet(instance, snapshot, newMap);
} | [
"Put a value if and only if the map has not changed since the given snapshot was taken. If the put fails,\nit is the caller's responsibility to retry.\n\n@param instance the instance with the map field\n@param key the key\n@param value the value\n@param snapshot the map snapshot\n@return {@code false} if the snapshot is out of date and we could not update, {@code true} if the put succeeded"
] | [
"Mbeans for SLOP_UPDATE",
"Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given reference curve and an additional spread.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.\n@param referenceCurve The reference curve used for discounting the coupon payments.\n@param spread The spread which should be added to the discount curve.\n@param model The model under which the product is valued.\n@return The value of the bond for the given curve and spread.",
"Turn map into string\n\n@param propMap Map to be converted\n@return",
"Returns the association row with the given key.\n\n@param key the key of the row to return.\n@return the association row with the given key or {@code null} if no row with that key is contained in this\nassociation",
"Get parent digest of an image.\n\n@param digest\n@param host\n@return",
"Converts an object to an instance of the target type.\n\n@param mapper the object mapper\n@param source the source to convert\n@param targetType the target class type\n@return target instance\n@see SquigglyUtils#objectify(ObjectMapper, Object, Class)",
"Calculate delta with another vector\n@param v another vector\n@return delta vector",
"Counts the amount of 'ch' at the start of this line optionally ignoring\nspaces.\n\n@param ch\nThe char to count.\n@param allowSpaces\nWhether to allow spaces or not\n@return Number of characters found.\n@since 0.12",
"Not used."
] |
public double computeLikelihoodP() {
double ret = 1.0;
for( int i = 0; i < r.numRows; i++ ) {
double a = r.get(i,0);
ret *= Math.exp(-a*a/2.0);
}
return ret;
} | [
"Computes the likelihood of the random draw\n\n@return The likelihood."
] | [
"Inserts the specified array into the specified original array at the specified index.\n\n@param original the original array into which we want to insert another array\n@param index the index at which we want to insert the array\n@param inserted the array that we want to insert\n@return the combined array",
"Returns the data about all of the plugins that are set\n\n@param onlyValid True to get only valid plugins, False for all\n@return array of Plugins set",
"Looks up and returns the value of the given key in the properties file of\nthe currently-selected theme.\n\n@param code Key to look up in the theme properties file.\n@return The value of the code in the current theme properties file, or an\nempty string if the code could not be resolved.",
"Creates a curator built using Fluo's zookeeper connection string. Root path will start at Fluo\nchroot.",
"Return the class of one of the properties of another class from which the Hibernate metadata is given.\n\n@param meta\nThe parent class to search a property in.\n@param propertyName\nThe name of the property in the parent class (provided by meta)\n@return Returns the class of the property in question.\n@throws HibernateLayerException\nThrows an exception if the property name could not be retrieved.",
"Get a random sample of k out of n elements.\n\nSee Algorithm S, D. E. Knuth, The Art of Computer Programming, Vol. 2, p.142.",
"Determines the number of elements that the query would return. Override this\nmethod if the size shall be determined in a specific way.\n\n@return The number of elements",
"Extract data for a single resource.\n\n@param row Synchro resource data",
"Concat a List into a CSV String.\n@param list list to concat\n@return csv string"
] |
public static void validateInterimFinalCluster(final Cluster interimCluster,
final Cluster finalCluster) {
validateClusterPartitionCounts(interimCluster, finalCluster);
validateClusterZonesSame(interimCluster, finalCluster);
validateClusterNodeCounts(interimCluster, finalCluster);
validateClusterNodeState(interimCluster, finalCluster);
return;
} | [
"Interim and final clusters ought to have same partition counts, same\nzones, and same node state. Partitions per node may of course differ.\n\n@param interimCluster\n@param finalCluster"
] | [
"Remove a notification message. Recursive until all pending removals have been completed.",
"Makes it possible to uniquify a collection of objects which are normally\nnon-hashable. Alternatively, it lets you define an alternate hash function\nfor them for limited-use hashing.",
"Parse a list of Photos from given Element.\n\n@param photosElement\n@return PhotoList",
"Set the time and value of the key at the given index\n@param keyIndex 0 based index of key\n@param time key time in seconds\n@param values key values",
"Delete all backups asynchronously",
"Retrieves the timephased breakdown of cost.\n\n@return timephased cost",
"Find a toBuilder method, if the user has provided one.",
"Given a filesystem, path and buffer-size, read the file contents and\npresents it as a string\n\n@param fs Underlying filesystem\n@param path The file to read\n@param bufferSize The buffer size to use for reading\n@return The contents of the file as a string\n@throws IOException",
"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"
] |
public CollectionRequest<ProjectMembership> findByProject(String project) {
String path = String.format("/projects/%s/project_memberships", project);
return new CollectionRequest<ProjectMembership>(this, ProjectMembership.class, path, "GET");
} | [
"Returns the compact project membership records for the project.\n\n@param project The project for which to fetch memberships.\n@return Request object"
] | [
"if |a11-a22| >> |a12+a21| there might be a better way. see pg371",
"Adds a chain of vertices to the end of this list.",
"Return a collection of Photo objects not in part of any sets.\n\nThis method requires authentication with 'read' permission.\n\n@param perPage\nThe per page\n@param page\nThe page\n@return The collection of Photo objects\n@throws FlickrException",
"Calculates the local translation and rotation for a bone.\nAssumes WorldRot and WorldPos have been calculated for the bone.",
"Replace error msg.\n\n@param origMsg\nthe orig msg\n@return the string",
"Assembles the exception message when the value received by a CellProcessor isn't of the correct type.\n\n@param expectedType\nthe expected type\n@param actualValue\nthe value received by the CellProcessor\n@return the message\n@throws NullPointerException\nif expectedType is null",
"Read the data for all of the tables we're interested in.\n\n@param tables list of all available tables\n@param is input stream",
"Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader.",
"Ensures that the element is child element of the parent element.\n\n@param parentElement the parent xml dom element\n@param childElement the child element\n@throws SpinXmlElementException if the element is not child of the parent element"
] |
public static BoxAPIConnection getTransactionConnection(String accessToken, String scope, String resource) {
BoxAPIConnection apiConnection = new BoxAPIConnection(accessToken);
URL url;
try {
url = new URL(apiConnection.getTokenURL());
} catch (MalformedURLException e) {
assert false : "An invalid token URL indicates a bug in the SDK.";
throw new RuntimeException("An invalid token URL indicates a bug in the SDK.", e);
}
String urlParameters;
try {
urlParameters = String.format("grant_type=%s&subject_token=%s&subject_token_type=%s&scope=%s", GRANT_TYPE,
URLEncoder.encode(accessToken, "UTF-8"), SUBJECT_TOKEN_TYPE, URLEncoder.encode(scope, "UTF-8"));
if (resource != null) {
urlParameters += "&resource=" + URLEncoder.encode(resource, "UTF-8");
}
} catch (UnsupportedEncodingException e) {
throw new BoxAPIException(
"An error occurred while attempting to encode url parameters for a transactional token request"
);
}
BoxAPIRequest request = new BoxAPIRequest(apiConnection, url, "POST");
request.shouldAuthenticate(false);
request.setBody(urlParameters);
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
final String fileToken = responseJSON.get("access_token").asString();
BoxTransactionalAPIConnection transactionConnection = new BoxTransactionalAPIConnection(fileToken);
transactionConnection.setExpires(responseJSON.get("expires_in").asLong() * 1000);
return transactionConnection;
} | [
"Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests."
] | [
"Replace default values will null, allowing them to be ignored.\n\n@param value value to test\n@return filtered value",
"This method retrieves a byte array containing the data at the\ngiven offset in the block. If no data is found at the given offset\nthis method returns null.\n\n@param offset offset of required data\n@return byte array containing required data",
"Record the details of the media being cached, to make it easier to recognize, now that we have access to that\ninformation.\n\n@param slot the slot from which a metadata cache is being created\n@param zos the stream to which the ZipFile is being written\n@param channel the low-level channel to which the cache is being written\n\n@throws IOException if there is a problem writing the media details entry",
"Support the range subscript operator for String with IntRange\n\n@param text a String\n@param range an IntRange\n@return the resulting String\n@since 1.0",
"This method retrieves a byte array of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return byte array containing required data",
"Return the profileId for a path\n\n@param path_id ID of path\n@return ID of profile\n@throws Exception exception",
"Determine whether we should use the normal repaint process, or delegate that to another component that is\nhosting us in a soft-loaded manner to save memory.\n\n@param x the left edge of the region that we want to have redrawn\n@param y the top edge of the region that we want to have redrawn\n@param width the width of the region that we want to have redrawn\n@param height the height of the region that we want to have redrawn",
"Provides a ready to use diff update for our adapter based on the implementation of the\nstandard equals method from Object.\n\n@param newList to refresh our content",
"Authenticate with the target database using OAuth.\n\n@param consumerSecret consumer secret\n@param consumerKey consumer key\n@param tokenSecret token secret\n@param token token\n@return this Replication instance to set more options\n@deprecated OAuth 1.0 implementation has been <a href=\"http://docs.couchdb.org/en/stable/whatsnew/2.1.html?highlight=oauth#upgrade-notes\"\ntarget=\"_blank\">removed in CouchDB 2.1</a>"
] |
public ItemRequest<Story> delete(String story) {
String path = String.format("/stories/%s", story);
return new ItemRequest<Story>(this, Story.class, path, "DELETE");
} | [
"Deletes a story. A user can only delete stories they have created. Returns an empty data record.\n\n@param story Globally unique identifier for the story.\n@return Request object"
] | [
"Sets the bootstrap URLs used by the different Fat clients inside the\nCoordinator\n\n@param bootstrapUrls list of bootstrap URLs defining which cluster to\nconnect to\n@return modified CoordinatorConfig",
"Sets a header per-request\n\n@param key Header key\n@param value Header value\n@return The request itself",
"Get DPI suggestions.\n\n@return DPI suggestions",
"Gets the last element in the address.\n\n@return the element, or {@code null} if {@link #size()} is zero.",
"2-D Integer array to float array.\n\n@param array Integer array.\n@return Float array.",
"Validate the Combination filter field in Multi configuration jobs",
"Add the string representation of the given object to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param object\nthe appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.",
"Use this API to fetch filtered set of dbdbprofile resources.\nset the filter parameter values in filtervalue object.",
"Try to obtain the value that is cached for the given key in the given resource.\nIf no value is cached, the provider is used to compute it and store it afterwards.\n@param resource the resource. If it is <code>null</code>, the provider will be used to compute the value.\n@param key the cache key. May not be <code>null</code>.\n@param provider the strategy to compute the value if necessary. May not be <code>null</code>."
] |
public static boolean isConstantVal(DMatrixRMaj mat , double val , double tol )
{
// see if the result is an identity matrix
int index = 0;
for( int i = 0; i < mat.numRows; i++ ) {
for( int j = 0; j < mat.numCols; j++ ) {
if( !(Math.abs(mat.get(index++)-val) <= tol) )
return false;
}
}
return true;
} | [
"Checks to see if every value in the matrix is the specified value.\n\n@param mat The matrix being tested. Not modified.\n@param val Checks to see if every element in the matrix has this value.\n@param tol True if all the elements are within this tolerance.\n@return true if the test passes."
] | [
"Moves a particular enum option to be either before or after another specified enum option in the custom field.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"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",
"Send a master handoff yield command to all registered listeners.\n\n@param toPlayer the device number to which we are being instructed to yield the tempo master role",
"Extracts the list of columns from the given field list.\n\n@param fields The fields\n@return The corresponding columns",
"Use this API to fetch nstimer_binding resource of given name .",
"EXecutes command to given container returning the inspection object as well. This method does 3 calls to\ndockerhost. Create, Start and Inspect.\n\n@param containerId\nto execute command.",
"If the burst mode is on, emit the particles only once.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps",
"Closes off all connections in all partitions.",
"This method extracts data for a single day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data\n@param readExceptionsFromDays read exceptions form day definitions"
] |
public DbOrganization getMatchingOrganization(final DbModule dbModule) {
if(dbModule.getOrganization() != null
&& !dbModule.getOrganization().isEmpty()){
return getOrganization(dbModule.getOrganization());
}
for(final DbOrganization organization: repositoryHandler.getAllOrganizations()){
final CorporateFilter corporateFilter = new CorporateFilter(organization);
if(corporateFilter.matches(dbModule)){
return organization;
}
}
return null;
} | [
"Returns an Organization that suits the Module or null if there is none\n\n@param dbModule DbModule\n@return DbOrganization"
] | [
"Given the key, figures out which partition on the local node hosts the key.\n\n@param key\n@return",
"Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the text of the item to be added\n@param reload perform a 'material select' reload to update the DOM.",
"Use this API to unset the properties of nsdiameter resource.\nProperties that need to be unset are specified in args array.",
"Reads a row of a CSV file and populates the bean, using the supplied name mapping to map column values to the\nappropriate fields. If processors are supplied then they are used, otherwise the raw String values will be used.\n\n@param bean\nthe bean to populate\n@param nameMapping\nthe name mapping array\n@param processors\nthe (optional) cell processors\n@return the populated bean, or null if EOF was reached\n@throws IllegalArgumentException\nif nameMapping.length != number of CSV columns read\n@throws IOException\nif an I/O error occurred\n@throws NullPointerException\nif bean or nameMapping are null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif there was a general exception while reading/processing\n@throws SuperCsvReflectionException\nif there was an reflection exception while mapping the values to the bean",
"Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together",
"Acquire a calendar instance.\n\n@return Calendar instance",
"Generates required number of placeholders as string.\n\nExample: {@code numberOfPlaceholders == 1, result == \"?\"},\n{@code numberOfPlaceholders == 2, result == \"?,?\"}.\n\n@param numberOfPlaceholders required amount of placeholders, should be {@code > 0}.\n@return string with placeholders.",
"Redirect to page\n\n@param model\n@return",
"Read the relationships for an individual GanttProject task.\n\n@param gpTask GanttProject task"
] |
public static String readFlowId(Message message) {
String flowId = null;
Map<String, List<String>> headers = getOrCreateProtocolHeader(message);
List<String> flowIds = headers.get(FLOWID_HTTP_HEADER_NAME);
if (flowIds != null && flowIds.size() > 0) {
flowId = flowIds.get(0);
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("HTTP header '" + FLOWID_HTTP_HEADER_NAME + "' found: " + flowId);
}
} else {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("No HTTP header '" + FLOWID_HTTP_HEADER_NAME + "' found");
}
}
return flowId;
} | [
"Read flow id from message.\n\n@param message the message\n@return the FlowId as string"
] | [
"callers of doLogin should be serialized before calling in.",
"This method is called to format a duration.\n\n@param value duration value\n@return formatted duration value",
"Helper method to convert seed bytes into the long value required by the\nsuper class.",
"Gets the publisher of the specified type, if it is wrapped by the \"Flexible Publish\" publisher in a project.\nNull is returned if no such publisher is found.\n@param project The project\n@param type The type of the publisher",
"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",
"Retrieves the members of the type and of its super types.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the MembersInclSupertypes attribute\n@param paramValue The feature to be added to the MembersInclSupertypes attribute\n@throws XDocletException If an error occurs",
"We have received notification that a device is no longer on the network, so clear out its metadata.\n\n@param announcement the packet which reported the device’s disappearance",
"Record a Screen View event\n@param screenName String, the name of the screen",
"Closes off this connection pool."
] |
public static boolean xpathExists(Node document, String xpathExpression, Map<String, String> namespaceMapping) throws XPathException,
MarshallingException
{
Boolean result = (Boolean) executeXPath(document, xpathExpression, namespaceMapping, XPathConstants.BOOLEAN);
return result != null && result;
} | [
"Runs the given xpath and returns a boolean result."
] | [
"Use this API to fetch appfwwsdl resource of given name .",
"Get FieldDescriptor from Reference",
"Adds parameters contained in the annotation into the annotation type reference\n\n@param typeRef\n@param node",
"Clean up the environment object for the given storage engine",
"Shut down actor system force.",
"Use this API to fetch vrid_nsip6_binding resources of given name .",
"Use this API to fetch all the systemeventhistory resources that are configured on netscaler.\nThis uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources.",
"private int numCalls = 0;",
"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."
] |
public static ProctorLoadResult verify(
@Nonnull final TestMatrixArtifact testMatrix,
final String matrixSource,
@Nonnull final Map<String, TestSpecification> requiredTests,
@Nonnull final FunctionMapper functionMapper,
final ProvidedContext providedContext,
@Nonnull final Set<String> dynamicTests
) {
final ProctorLoadResult.Builder resultBuilder = ProctorLoadResult.newBuilder();
final Map<String, Map<Integer, String>> allTestsKnownBuckets = Maps.newHashMapWithExpectedSize(requiredTests.size());
for (final Entry<String, TestSpecification> entry : requiredTests.entrySet()) {
final Map<Integer, String> bucketValueToName = Maps.newHashMap();
for (final Entry<String, Integer> bucket : entry.getValue().getBuckets().entrySet()) {
bucketValueToName.put(bucket.getValue(), bucket.getKey());
}
allTestsKnownBuckets.put(entry.getKey(), bucketValueToName);
}
final Map<String, ConsumableTestDefinition> definedTests = testMatrix.getTests();
final SetView<String> missingTests = Sets.difference(requiredTests.keySet(), definedTests.keySet());
resultBuilder.recordAllMissing(missingTests);
for (final Entry<String, ConsumableTestDefinition> entry : definedTests.entrySet()) {
final String testName = entry.getKey();
final Map<Integer, String> knownBuckets;
final TestSpecification specification;
final boolean isRequired;
if (allTestsKnownBuckets.containsKey(testName)) {
// required in specification
isRequired = true;
knownBuckets = allTestsKnownBuckets.remove(testName);
specification = requiredTests.get(testName);
} else if (dynamicTests.contains(testName)) {
// resolved by dynamic filter
isRequired = false;
knownBuckets = Collections.emptyMap();
specification = new TestSpecification();
} else {
// we don't care about this test
continue;
}
final ConsumableTestDefinition testDefinition = entry.getValue();
try {
verifyTest(testName, testDefinition, specification, knownBuckets, matrixSource, functionMapper, providedContext);
} catch (IncompatibleTestMatrixException e) {
if (isRequired) {
LOGGER.error(String.format("Unable to load test matrix for a required test %s", testName), e);
resultBuilder.recordError(testName, e);
} else {
LOGGER.info(String.format("Unable to load test matrix for a dynamic test %s", testName), e);
resultBuilder.recordIncompatibleDynamicTest(testName, e);
}
}
}
// TODO mjs - is this check additive?
resultBuilder.recordAllMissing(allTestsKnownBuckets.keySet());
resultBuilder.recordVerifiedRules(providedContext.shouldEvaluate());
final ProctorLoadResult loadResult = resultBuilder.build();
return loadResult;
} | [
"Does not mutate the TestMatrix.\nVerifies that the test matrix contains all the required tests and that\neach required test is valid.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@param requiredTests a {@link Map} of required test. The {@link TestSpecification} would be verified\n@param functionMapper a given el {@link FunctionMapper}\n@param providedContext a {@link Map} containing variables describing the context in which the request is executing. These will be supplied to verifying all rules.\n@param dynamicTests a {@link Set} of dynamic tests determined by filters.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test."
] | [
"Poll for the next N waiting jobs in line.\n\n@param size maximum amount of jobs to poll for\n@return up to \"size\" jobs",
"Use this API to delete dnsaaaarec resources of given names.",
"Returns the current revision.",
"Notify all WorkerListeners currently registered for the given WorkerEvent.\n@param event the WorkerEvent that occurred\n@param worker the Worker that the event occurred in\n@param queue the queue the Worker is processing\n@param job the Job related to the event (only supply for JOB_PROCESS, JOB_EXECUTE, JOB_SUCCESS, and\nJOB_FAILURE events)\n@param runner the materialized object that the Job specified (only supply for JOB_EXECUTE and\nJOB_SUCCESS events)\n@param result the result of the successful execution of the Job (only set for JOB_SUCCESS and if the Job was\na Callable that returned a value)\n@param t the Throwable that caused the event (only supply for JOB_FAILURE and ERROR events)",
"Generate a schedule for the given start and end date.\n\n@param referenceDate The reference date (corresponds to \\( t = 0 \\).\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule",
"Execute a request through Odo processing\n\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@param history",
"Animate de-selection of visible views and clear\nselected set.",
"Map event type enum.\n\n@param eventType the event type\n@return the event type enum",
"Set an enterprise text value.\n\n@param index text index (1-40)\n@param value text value"
] |
private void recordTime(Tracked op,
long timeNS,
long numEmptyResponses,
long valueSize,
long keySize,
long getAllAggregateRequests) {
counters.get(op).addRequest(timeNS,
numEmptyResponses,
valueSize,
keySize,
getAllAggregateRequests);
if (logger.isTraceEnabled() && !storeName.contains("aggregate") && !storeName.contains("voldsys$"))
logger.trace("Store '" + storeName + "' logged a " + op.toString() + " request taking " +
((double) timeNS / voldemort.utils.Time.NS_PER_MS) + " ms");
} | [
"Method to service public recording APIs\n\n@param op Operation being tracked\n@param timeNS Duration of operation\n@param numEmptyResponses Number of empty responses being sent back,\ni.e.: requested keys for which there were no values (GET and GET_ALL only)\n@param valueSize Size in bytes of the value\n@param keySize Size in bytes of the key\n@param getAllAggregateRequests Total of amount of keys requested in the operation (GET_ALL only)"
] | [
"Return the coding scheme to IOB1 coding, regardless of what was used\ninternally. This is useful for scoring against CoNLL test output.\n\n@param tokens List of tokens in some NER encoding",
"Inspects the object and all superclasses for public, non-final, accessible methods and returns a\ncollection containing all the attributes found.\n\n@param classToInspect the class under inspection.",
"Returns the default privacy level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@throws FlickrException\n@return privacyLevel",
"Use this API to add systemuser resources.",
"Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.",
"Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.",
"Decrease the indent level.",
"Distributed process finish.\n\n@param rb the rb\n@param mtasFields the mtas fields\n@throws IOException Signals that an I/O exception has occurred.",
"Use this API to fetch all the rnatparam resources that are configured on netscaler."
] |
public boolean measureAll(List<Widget> measuredChildren) {
boolean changed = false;
for (int i = 0; i < mContainer.size(); ++i) {
if (!isChildMeasured(i)) {
Widget child = measureChild(i, false);
if (child != null) {
if (measuredChildren != null) {
measuredChildren.add(child);
}
changed = true;
}
}
}
if (changed) {
postMeasurement();
}
return changed;
} | [
"Measure all children from container if needed\n@param measuredChildren the list of measured children\nmeasuredChildren list can be passed as null if it's not needed to\ncreate the list of the measured items\n@return true if the layout was recalculated, otherwise - false"
] | [
"Determine if a job name and job type are valid.\n@param jobName the name of the job\n@param jobType the class of the job\n@throws IllegalArgumentException if the name or type are invalid",
"Calculate the child size along the axis and measure the offset inside the\nlayout container\n@param dataIndex of child in Container\n@return true item fits the container, false - otherwise",
"Unmark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to unmark",
"Create the close button UI Component.\n@return the close button.",
"IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery",
"Gets the or create protocol header.\n\n@param message the message\n@return the message headers map",
"Use this API to fetch dnstxtrec resource of given name .",
"Deserializes a variable, NOT checking whether the datatype is custom\n@param s\n@param variableType\n@return",
"Encodes the given URI query with the given encoding.\n@param query the query to be encoded\n@param encoding the character encoding to encode to\n@return the encoded query\n@throws UnsupportedEncodingException when the given encoding parameter is not supported"
] |
public Script updateName(int id, String name) throws Exception {
PreparedStatement statement = null;
try (Connection sqlConnection = SQLService.getInstance().getConnection()) {
statement = sqlConnection.prepareStatement(
"UPDATE " + Constants.DB_TABLE_SCRIPT +
" SET " + Constants.SCRIPT_NAME + " = ? " +
" WHERE " + Constants.GENERIC_ID + " = ?"
);
statement.setString(1, name);
statement.setInt(2, id);
statement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
}
return this.getScript(id);
} | [
"Update the name of a script\n\n@param id ID of script\n@param name new name\n@return updated script\n@throws Exception exception"
] | [
"Performs the conversion from standard XPath to xpath with parameterization support.",
"Checks to see if all the diagonal elements in the matrix are positive.\n\n@param a A matrix. Not modified.\n@return true if all the diagonal elements are positive, false otherwise.",
"get TypeSignature given the signature\n\n@param typeSignature\n@param useInternalFormFullyQualifiedName\nif true, fqn in parameterizedTypeSignature must be in the form\n'java/lang/Thread'. If false fqn must be of the form\n'java.lang.Thread'\n@return",
"Adds the given some-value restriction to the list of restrictions that\nshould still be serialized. The given resource will be used as a subject.\n\n@param subject\n@param propertyUri\n@param rangeUri",
"Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by applying a key function to each element which yields a comparable criteria.\n\n@param iterable\nthe elements to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return a sorted list as a shallow copy of the given iterable.\n@see #sort(Iterable)\n@see #sort(Iterable, Comparator)\n@see ListExtensions#sortInplaceBy(List, org.eclipse.xtext.xbase.lib.Functions.Function1)",
"Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.",
"Use this API to fetch statistics of servicegroup_stats resource of given name .",
"Read calendar data.",
"Use this API to add gslbsite resources."
] |
public static SimpleFeatureType createGridFeatureType(
@Nonnull final MapfishMapContext mapContext,
@Nonnull final Class<? extends Geometry> geomClass) {
final SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder();
CoordinateReferenceSystem projection = mapContext.getBounds().getProjection();
typeBuilder.add(Constants.Style.Grid.ATT_GEOM, geomClass, projection);
typeBuilder.setName(Constants.Style.Grid.NAME_LINES);
return typeBuilder.buildFeatureType();
} | [
"Create the grid feature type.\n\n@param mapContext the map context containing the information about the map the grid will be\nadded to.\n@param geomClass the geometry type"
] | [
"Writes assignment baseline data.\n\n@param xml MSPDI assignment\n@param mpxj MPXJ assignment",
"Use this API to add authenticationradiusaction resources.",
"Generates a change event for a local deletion of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@return a change event for a local deletion of a document in the given namespace referring\nto the given document _id.",
"Reconnect to the HC.\n\n@return whether the server is still in sync\n@throws IOException",
"Fetch a value from the Hashmap .\n\n@param firstKey\nfirst key\n@param secondKey\nsecond key\n@return the element or null.",
"Used to NOT the argument clause specified.",
"Removes the supplied marker from the map.\n\n@param marker",
"Returns an iterator equivalent to this iterator with all duplicated items removed\nby using the default comparator. The original iterator will become\nexhausted of elements after determining the unique values. A new iterator\nfor the unique values will be returned.\n\n@param self an Iterator\n@return the modified Iterator\n@since 1.5.5",
"Parses the comma delimited address into model nodes.\n\n@param profileName the profile name for the domain or {@code null} if not a domain\n@param inputAddress the address.\n\n@return a collection of the address nodes."
] |
public static final GVRPickedObject[] pickObjects(GVRScene scene, float ox, float oy, float oz, float dx,
float dy, float dz) {
sFindObjectsLock.lock();
try {
final GVRPickedObject[] result = NativePicker.pickObjects(scene.getNative(), 0L, ox, oy, oz, dx, dy, dz);
return result;
} finally {
sFindObjectsLock.unlock();
}
} | [
"Casts a ray into the scene graph, and returns the objects it intersects.\n\nThe ray is defined by its origin {@code [ox, oy, oz]} and its direction\n{@code [dx, dy, dz]}.\n\n<p>\nThe ray origin may be [0, 0, 0] and the direction components should be\nnormalized from -1 to 1: Note that the y direction runs from -1 at the\nbottom to 1 at the top. To construct a picking ray originating at the\nuser's head and pointing into the scene along the camera lookat vector,\npass in 0, 0, 0 for the origin and 0, 0, -1 for the direction.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is doing a ray cast into a particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n<p>\nDepending on the type of collider, that the hit location may not be exactly\nwhere the ray would intersect the scene object itself. Rather, it is\nwhere the ray intersects the collision geometry associated with the collider.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@param ox\nThe x coordinate of the ray origin.\n\n@param oy\nThe y coordinate of the ray origin.\n\n@param oz\nThe z coordinate of the ray origin.\n\n@param dx\nThe x vector of the ray direction.\n\n@param dy\nThe y vector of the ray direction.\n\n@param dz\nThe z vector of the ray direction.\n@return A list of {@link GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6"
] | [
"Sets an element in at the specified index.",
"Backup the current configuration as part of the patch history.\n\n@throws IOException for any error",
"Get an active operation.\n\n@param header the request header\n@return the active operation, {@code null} if if there is no registered operation",
"adds a value to the list\n\n@param value the value",
"Get the element value in the list by index\n@param index the position in the list from which to get the element\n@return the element value",
"Scans given archive for files passing given filter, adds the results into given list.",
"Convenience routine to return the specified error's\nunderlying SyntaxException, or null if it isn't one.",
"Performs a get all operation with the specified composite request object\n\n@param requestWrapper Composite request object containing a reference to\nthe Iterable keys\n\n@return Map of the keys to the corresponding versioned values",
"Processes the template if the property value of the current object on the specified level equals the given value.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"\[email protected] name=\"value\" optional=\"false\" description=\"The value to check for\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\""
] |
public Number getMinutesPerMonth()
{
return Integer.valueOf(NumberHelper.getInt(getMinutesPerDay()) * NumberHelper.getInt(getDaysPerMonth()));
} | [
"Retrieve the default number of minutes per month.\n\n@return minutes per month"
] | [
"For each node in specified zones, tries swapping some minimum number of\nrandom partitions per node with some minimum number of random partitions\nfrom other specified nodes. Chooses the best swap in each iteration.\nLarge values of the greedSwapMaxPartitions... arguments make this method\nequivalent to comparing every possible swap. This may get very expensive.\n\nSo if a node had partitions P1, P2, P3 and P4 and the other partitions\nset was Q1, Q2, Q3, Q4, Q5 The combinations that will be tried for\nswapping will be the cartesian product of the two sets. That is, {P1,\nQ1}, {P2, Q2}...{P2,Q1}, {P2,Q2}, in total 20 such swap pairs will be\ngenerated. The best among these swap pairs will be chosen.\n\n@param nextCandidateCluster\n@param nodeIds Node IDs within which to shuffle partitions\n@param greedySwapMaxPartitionsPerNode See RebalanceCLI.\n@param greedySwapMaxPartitionsPerZone See RebalanceCLI.\n@param storeDefs\n@return updated cluster",
"Delete a record.\n\n@param referenceId the reference ID.",
"Webkit based browsers require that we set the webkit-user-drag style\nattribute to make an element draggable.",
"We need to make sure the terms are of the right type, otherwise they will not be serialized correctly.",
"Moves to the next step.",
"Use this API to fetch all the nsacl6 resources that are configured on netscaler.",
"Paint a check pattern, used for a background to indicate image transparency.\n@param c the component to draw into\n@param g the Graphics objects\n@param x the x position\n@param y the y position\n@param width the width\n@param height the height",
"Returns the real key object.",
"Tries to guess location of the user secure keyring using various\nheuristics.\n\n@return path to the keyring file\n@throws FileNotFoundException if no keyring file found"
] |
public float getTangentY(int vertex) {
if (!hasTangentsAndBitangents()) {
throw new IllegalStateException("mesh has no bitangents");
}
checkVertexIndexBounds(vertex);
return m_tangents.getFloat((vertex * 3 + 1) * SIZEOF_FLOAT);
} | [
"Returns the y-coordinate of a vertex bitangent.\n\n@param vertex the vertex index\n@return the y coordinate"
] | [
"Removes the row with the specified key from this association.\n\n@param key the key of the association row to remove",
"True if deleted, false if not found.",
"Reads primary key information from current RS row and generates a\n\ncorresponding Identity, and returns a proxy from the Identity.\n\n@throws PersistenceBrokerException\nif there was an error creating the proxy class",
"Use this API to add clusterinstance.",
"Convert this buffer to a java array.\n@return",
"Print channels to the left of log messages\n@param width The width (in characters) to print the channels\n@return this",
"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",
"Function to add a new Store to the Metadata store. This involves\n\n1. Create a new entry in the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeDef defines the new store to be created",
"Compare two versions\n\n@param other\n@return an integer: 0 if equals, -1 if older, 1 if newer\n@throws IncomparableException is thrown when two versions are not coparable"
] |
public void appendImmediate(Object object, String indentation) {
for (int i = segments.size() - 1; i >= 0; i--) {
String segment = segments.get(i);
for (int j = 0; j < segment.length(); j++) {
if (!WhitespaceMatcher.isWhitespace(segment.charAt(j))) {
append(object, indentation, i + 1);
return;
}
}
}
append(object, indentation, 0);
} | [
"Add the string representation of the given object to this sequence immediately. That is, all the trailing\nwhitespace of this sequence will be ignored and the string is appended directly after the last segment that\ncontains something besides whitespace. The given indentation will be prepended to each line except the first one\nif the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>."
] | [
"Adds a port that serves the HTTP requests. If unspecified, cleartext HTTP on port 36462 is used.\n\n@param localAddress the TCP/IP load address to bind\n@param protocol {@link SessionProtocol#HTTP} or {@link SessionProtocol#HTTPS}",
"Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is\nunique. Will create a transaction on the given entity manager.",
"Type variables are not supported.\n\n@param value\n@return the type",
"Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException",
"Finds out which dump files of the given type have been downloaded\nalready. The result is a list of objects that describe the available dump\nfiles, in descending order by their date. Not all of the dumps included\nmight be actually available.\n\n@param dumpContentType\nthe type of dump to consider\n@return list of objects that provide information on available dumps",
"Use this API to fetch sslcertkey resources of given names .",
"Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"Tests whether the ClassNode implements the specified method name\n\n@param classNode The ClassNode\n@param methodName The method name\n@param argTypes\n@return True if it implements the method",
"private int numCalls = 0;"
] |
@Override
public Map<String, Set<String>> cleanObsoleteContent() {
if(!readWrite) {
return Collections.emptyMap();
}
Map<String, Set<String>> cleanedContents = new HashMap<>(2);
cleanedContents.put(MARKED_CONTENT, new HashSet<>());
cleanedContents.put(DELETED_CONTENT, new HashSet<>());
synchronized (contentHashReferences) {
for (ContentReference fsContent : listLocalContents()) {
if (!readWrite) {
return Collections.emptyMap();
}
if (!contentHashReferences.containsKey(fsContent.getHexHash())) { //We have no reference to this content
if (markAsObsolete(fsContent)) {
cleanedContents.get(DELETED_CONTENT).add(fsContent.getContentIdentifier());
} else {
cleanedContents.get(MARKED_CONTENT).add(fsContent.getContentIdentifier());
}
} else {
obsoleteContents.remove(fsContent.getHexHash()); //Remove existing references from obsoleteContents
}
}
}
return cleanedContents;
} | [
"Clean obsolete contents from the content repository. It will first mark contents as obsolete then after some time\nif these contents are still obsolete they will be removed.\n\n@return a map containing the list of marked contents and the list of deleted contents."
] | [
"radi otsu da dobije spojena crna slova i ra\n\n@param input\n@return the processed image",
"If a custom CSS file has been specified, returns the path. Otherwise\nreturns null.\n@return A {@link File} pointing to the stylesheet, or null if no stylesheet\nis specified.",
"Formats a vertex using it's properties. Debugging purposes.",
"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",
"Escape text to ensure valid JSON.\n\n@param value value\n@return escaped value",
"Builds the data structures that show the effects of the plan by server group",
"Returns a list of metadata property paths.\n@return the list of metdata property paths.",
"All address strings are comparable. If two address strings are invalid, their strings are compared.\nOtherwise, address strings are compared according to which type or version of string, and then within each type or version\nthey are compared using the comparison rules for addresses.\n\n@param other\n@return",
"Populates date time settings.\n\n@param record MPX record\n@param properties project properties"
] |
public static base_responses add(nitro_service client, dospolicy resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dospolicy addresources[] = new dospolicy[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new dospolicy();
addresources[i].name = resources[i].name;
addresources[i].qdepth = resources[i].qdepth;
addresources[i].cltdetectrate = resources[i].cltdetectrate;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add dospolicy resources."
] | [
"Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.\n\n@param flatParent Flat parent archetype\n@param specialized Specialized archetype",
"Iterates over all tags of current member and evaluates the template for each one.\n\n@param template The template to be evaluated\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" optional=\"true\" description=\"The parameter name.\"",
"Returns a new iterator filtering any null references.\n\n@param unfiltered\nthe unfiltered iterator. May not be <code>null</code>.\n@return an unmodifiable iterator containing all elements of the original iterator without any <code>null</code>\nreferences. Never <code>null</code>.",
"Read an optional JSON array.\n@param json the JSON Object that has the array as element\n@param key the key for the array in the provided JSON object\n@return the array or null if reading the array fails.",
"Returns the type of the current member which is the type in the case of a field, the return type for a getter\nmethod, or the type of the parameter for a setter method.\n\n@return The member type\n@exception XDocletException if an error occurs",
"We add typeRefs without Nodes on the fly, so we should remove them before relinking.",
"Distributed process finish.\n\n@param rb the rb\n@param mtasFields the mtas fields\n@throws IOException Signals that an I/O exception has occurred.",
"Backup the current version of the configuration to the versioned configuration history",
"Register the given callback as to be executed after request completion.\n\n@param name The name of the bean.\n@param callback The callback of the bean to be executed for destruction."
] |
public static Timer getNamedTimer(String timerName, int todoFlags,
long threadId) {
Timer key = new Timer(timerName, todoFlags, threadId);
registeredTimers.putIfAbsent(key, key);
return registeredTimers.get(key);
} | [
"Get a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked\n@return timer"
] | [
"Sets the character translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator\n@return this to allow chaining",
"Handle exceptions thrown by the storage. Exceptions specific to DELETE go\nhere. Pass other exceptions to the parent class.\n\nTODO REST-Server Add a new exception for this condition - server busy\nwith pending requests. queue is full",
"Waits for the current outstanding request retrying it with exponential backoff if it fails.\n\n@throws ClosedByInterruptException if request was interrupted\n@throws IOException In the event of FileNotFoundException, MalformedURLException\n@throws RetriesExhaustedException if exceeding the number of retries",
"Sets the width and height of the canvas the text is drawn to.\n\n@param width\nwidth of the new canvas.\n\n@param height\nhegiht of the new canvas.",
"Require that the namespace of the current element matches the required namespace.\n\n@param reader the reader\n@param requiredNs the namespace required\n@throws XMLStreamException if the current namespace does not match the required namespace",
"Obtains a Symmetry010 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Retrieves state and metrics information for individual node.\n\n@param name node name\n@return node information",
"Receive a notification that the channel was closed.\n\nThis is used for the {@link ManagementClientChannelStrategy.Establishing} since it might use multiple channels.\n\n@param closed the closed resource\n@param e the exception which occurred during close, if any",
"Use this API to update sslocspresponder."
] |
public BoxFile.Info uploadFile(FileUploadParams uploadParams) {
URL uploadURL = UPLOAD_FILE_URL.build(this.getAPI().getBaseUploadURL());
BoxMultipartRequest request = new BoxMultipartRequest(getAPI(), uploadURL);
JsonObject fieldJSON = new JsonObject();
JsonObject parentIdJSON = new JsonObject();
parentIdJSON.add("id", getID());
fieldJSON.add("name", uploadParams.getName());
fieldJSON.add("parent", parentIdJSON);
if (uploadParams.getCreated() != null) {
fieldJSON.add("content_created_at", BoxDateFormat.format(uploadParams.getCreated()));
}
if (uploadParams.getModified() != null) {
fieldJSON.add("content_modified_at", BoxDateFormat.format(uploadParams.getModified()));
}
if (uploadParams.getSHA1() != null && !uploadParams.getSHA1().isEmpty()) {
request.setContentSHA1(uploadParams.getSHA1());
}
if (uploadParams.getDescription() != null) {
fieldJSON.add("description", uploadParams.getDescription());
}
request.putField("attributes", fieldJSON.toString());
if (uploadParams.getSize() > 0) {
request.setFile(uploadParams.getContent(), uploadParams.getName(), uploadParams.getSize());
} else if (uploadParams.getContent() != null) {
request.setFile(uploadParams.getContent(), uploadParams.getName());
} else {
request.setUploadFileCallback(uploadParams.getUploadFileCallback(), uploadParams.getName());
}
BoxJSONResponse response;
if (uploadParams.getProgressListener() == null) {
response = (BoxJSONResponse) request.send();
} else {
response = (BoxJSONResponse) request.send(uploadParams.getProgressListener());
}
JsonObject collection = JsonObject.readFrom(response.getJSON());
JsonArray entries = collection.get("entries").asArray();
JsonObject fileInfoJSON = entries.get(0).asObject();
String uploadedFileID = fileInfoJSON.get("id").asString();
BoxFile uploadedFile = new BoxFile(getAPI(), uploadedFileID);
return uploadedFile.new Info(fileInfoJSON);
} | [
"Uploads a new file to this folder with custom upload parameters.\n\n@param uploadParams the custom upload parameters.\n@return the uploaded file's info."
] | [
"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 the key to the format in which it is stored for searching\n\n@param key Byte array of the key\n@return The format stored in the index file",
"Gets all tags that are \"prime\" tags.",
"Add a range to this LOD group. Specify the scene object that should be displayed in this\nrange. Add the LOG group as a component to the parent scene object. The scene objects\nassociated with each range will automatically be added as children to the parent.\n@param range show the scene object if the camera distance is greater than this value\n@param sceneObject scene object that should be rendered when in this range\n@throws IllegalArgumentException if range is negative or sceneObject null",
"Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed.",
"Gen error response.\n\n@param t\nthe t\n@return the response on single request",
"Save current hostname and reuse it.\n\n@return hostname as String",
"Set the \"everyWorkingDay\" flag.\n@param isEveryWorkingDay flag, indicating if the event should take place every working day.",
"This handler will be triggered when search is finish"
] |
public static int findFirstNonAnnotationLine(ASTNode node, SourceCode sourceCode) {
if (node instanceof AnnotatedNode && !((AnnotatedNode) node).getAnnotations().isEmpty()) {
// HACK: Groovy line numbers are broken when annotations have a parameter :(
// so we must look at the lineNumber, not the lastLineNumber
AnnotationNode lastAnnotation = null;
for (AnnotationNode annotation : ((AnnotatedNode) node).getAnnotations()) {
if (lastAnnotation == null) lastAnnotation = annotation;
else if (lastAnnotation.getLineNumber() < annotation.getLineNumber()) lastAnnotation = annotation;
}
String rawLine = getRawLine(sourceCode, lastAnnotation.getLastLineNumber()-1);
if(rawLine == null) {
return node.getLineNumber();
}
// is the annotation the last thing on the line?
if (rawLine.length() > lastAnnotation.getLastColumnNumber()) {
// no it is not
return lastAnnotation.getLastLineNumber();
}
// yes it is the last thing, return the next thing
return lastAnnotation.getLastLineNumber() + 1;
}
return node.getLineNumber();
} | [
"gets the first non annotation line number of a node, taking into account annotations."
] | [
"Iterate and insert each of the elements of the Collection.\n\n@param objects\nThe objects to insert\n@param outIdentifier\nIdentifier to lookup the returned objects\n@param returnObject\nboolean to specify whether the inserted Collection is part of the ExecutionResults\n@param entryPoint\nOptional EntryPoint for the insertions\n@return",
"Returns the ending used by the Wikimedia-provided dumpfile names of the\ngiven type.\n\n@param dumpContentType\nthe type of dump\n@return postfix of the dumpfile name\n@throws IllegalArgumentException\nif the given dump file type is not known",
"Use this API to fetch statistics of appfwpolicylabel_stats resource of given name .",
"Specialized version of readValue just for reading map keys, because the StdDeserializer methods like\n_parseIntPrimitive blow up when the current JsonToken is FIELD_NAME",
"Set the background color of the progress spinner disc.\n\n@param colorRes Resource id of the color.",
"Read all task relationships from a GanttProject.\n\n@param gpProject GanttProject project",
"Removes a filter from this project file.\n\n@param filterName The name of the filter",
"Use this API to delete snmpmanager.",
"Notifies that an existing content item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position."
] |
private static File getUserDirectory(final String prefix, final String suffix, final File parent) {
final String dirname = formatDirName(prefix, suffix);
return new File(parent, dirname);
} | [
"Returns a File object whose path is the expected user directory.\nDoes not create or check for existence.\n@param prefix\n@param suffix\n@param parent\n@return"
] | [
"Creates a non-binary text media type with the given subtype and a specified encoding",
"Utility function that converts a list to a map.\n\n@param list The list in which even elements are keys and odd elements are\nvalues.\n@rturn The map container that maps even elements to odd elements, e.g.\n0->1, 2->3, etc.",
"Get a list of referring domains for a collection.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html\"",
"Gets type from super class's type parameter.",
"Return a list of unique values for a namespace and predicate.\n\nThis method does not require authentication.\n\n@param namespace\nThe namespace that all values should be restricted to.\n@param predicate\nThe predicate that all values should be restricted to.\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return NamespacesList\n@throws FlickrException",
"Return the raw source line corresponding to the specified AST node\n\n@param node - the Groovy AST node",
"Checks to see if a WORD matches the name of a macro. if it does it applies the macro at that location",
"request token from FCM",
"Create an object of the given type using a constructor that matches the\nsupplied arguments and invoke the setters with the supplied variables.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@param vars\nthe named arguments for setters\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception"
] |
public static appfwprofile[] get(nitro_service service) throws Exception{
appfwprofile obj = new appfwprofile();
appfwprofile[] response = (appfwprofile[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the appfwprofile resources that are configured on netscaler."
] | [
"Extract calendar data.",
"This handler will be triggered when there's no search result",
"Create a host target.\n\n@param hostName the host name\n@param client the connected controller client to the master host.\n@return the remote target",
"Updates a metadata classification on the specified file.\n\n@param classificationType the metadata classification type.\n@return the new metadata classification type updated on the file.",
"Gets next node in the DAG which has no dependency or all of it's dependencies are resolved and\nready to be consumed.\n\n@return next node or null if all the nodes have been explored or no node is available at this moment.",
"This returns a string from decimal digit smallestDigit to decimal digit\nbiggest digit. Smallest digit is labeled 1, and the limits are\ninclusive.",
"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)",
"Updates the model. Ensures that we reset the columns widths.\n\n@param model table model",
"Transfer the ownership of an application to another user.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param to Username of the person to transfer the app to. This is usually in the form of \"[email protected]\"."
] |
public static Attachment fromBinaryBytes( byte[] bytes, MediaType mediaType ) {
if( !mediaType.isBinary() ) {
throw new IllegalArgumentException( "MediaType must be binary" );
}
return new Attachment(BaseEncoding.base64().encode( bytes ), mediaType, null );
} | [
"Creates an attachment from a given array of bytes.\nThe bytes will be Base64 encoded.\n@throws java.lang.IllegalArgumentException if mediaType is not binary"
] | [
"Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code\nbottom} or {@code right} are less than one or less than {@code top} or {@code left},\nrespectively.",
"Return true only if the node has any of the named annotations\n@param node - the AST Node to check\n@param names - the names of the annotations\n@return true only if the node has any of the named annotations",
"Find and return the appropriate getter method for field.\n\n@return Get method or null (or throws IllegalArgumentException) if none found.",
"Readable yyyyMMdd representation of a day, which is also sortable.",
"get current total used capacity.\n\n@return the total used capacity",
"Creates a text box with the given parent and text node assigned.\n@param contblock The parent node (and the containing block in the same time)\n@param n The corresponding text node in the DOM tree.\n@return The new text box.",
"Return a new client that may be cached or not. Given properties are always use when not cached, and only used at creation time for\ncached clients.\n\n@param name\nif null, default client. Otherwise, helpful to retrieve cached clients later.\n@param p\na set of properties. Implementation specific. Unknown properties are silently ignored.\n@param cached\nif false, the client will not be cached and subsequent calls with the same name will return different objects.",
"Read FTS file data from the configured source and return a populated ProjectFile instance.\n\n@return ProjectFile instance",
"Rename an existing app.\n@param appName Existing app name. See {@link #listApps()} for names that can be used.\n@param newName New name to give the existing app.\n@return the new name of the object"
] |
public static cacheselector get(nitro_service service, String selectorname) throws Exception{
cacheselector obj = new cacheselector();
obj.set_selectorname(selectorname);
cacheselector response = (cacheselector) obj.get_resource(service);
return response;
} | [
"Use this API to fetch cacheselector resource of given name ."
] | [
"Returns flag whose value indicates if the string is null, empty or\nonly contains whitespace characters\n\n@param s a string\n@return true if the string is null, empty or only contains whitespace characters",
"Retrieves state and metrics information for all nodes in the cluster.\n\n@return list of nodes in the cluster",
"Check if this applies to the provided authorization scope and return the credentials for that scope or\nnull if it doesn't apply to the scope.\n\n@param authscope the scope to test against.",
"Use this API to enable clusterinstance resources of given names.",
"Get a string property, or, if no such property is defined, return\nthe given default value\n\n@param props the properties\n@param name the key in the properties\n@param defaultValue the default value if the key not exists\n@return value in the props or defaultValue while name not exist",
"Whether the address is IPv4-compatible\n\n@see java.net.Inet6Address#isIPv4CompatibleAddress()",
"StartMain passes in the command line args here.\n\n@param args The command line arguments. If null is given then an empty\narray will be used instead.",
"Find documents using an index\n\n@param selectorJson String representation of a JSON object describing criteria used to\nselect documents. For example:\n{@code \"{ \\\"selector\\\": {<your data here>} }\"}.\n@param classOfT The class of Java objects to be returned\n@param <T> the type of the Java object to be returned\n@return List of classOfT objects\n@see #findByIndex(String, Class, FindByIndexOptions)\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/cloudant_query.html#selector-syntax\"\ntarget=\"_blank\">selector syntax</a>\n@deprecated Use {@link #query(String, Class)} instead",
"Use this API to fetch statistics of cmppolicy_stats resource of given name ."
] |
public static vpnsessionaction[] get(nitro_service service) throws Exception{
vpnsessionaction obj = new vpnsessionaction();
vpnsessionaction[] response = (vpnsessionaction[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the vpnsessionaction resources that are configured on netscaler."
] | [
"Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identifying the association\n@param embeddedKey the {@link EntityKey} identifying the embedded component\n@return the created {@link Relationship} that represents the association",
"This ensures that we are able to use the default preference from JSDK, to check basically if we are in Android or Not\n@param preference\n@throws BackingStoreException",
"Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.\nThis uses dnsnsecrec_args which is a way to provide additional arguments while fetching the resources.",
"Return the serialized form of this Identity.\n\n@return The serialized representation\n@see #fromByteArray\n@deprecated",
"Convert JsonString to Object of Clazz\n\n@param json\n@param clazz\n@return Object of Clazz",
"Apply a filter to the list of all resources, and show the results.\n\n@param project project file\n@param filter filter",
"Performs a partial BFS on model until the search frontier reaches the desired bootstrap size\n\n@param min the desired bootstrap size\n@return a list of found PossibleState\n@throws ModelException if the desired bootstrap can not be reached",
"Obtains a local date in Discordian 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 Discordian local date, not null\n@throws DateTimeException if unable to create the date",
"Use this API to fetch all the ntpserver resources that are configured on netscaler."
] |
public static <K, V> Map<K, V> immutableMapView(Map<K, V> map) {
if (map instanceof ImmutableMap<?, ?>) {
return map;
}
return Collections.unmodifiableMap(map);
} | [
"Returns an immutable view of a given map."
] | [
"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",
"once animation is setup, start the animation record the beginning and\nending time for the animation",
"Computes A-B\n\n@param listA\n@param listB\n@return",
"Returns whether this address section represents a subnet block of addresses associated its prefix length.\n\nReturns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include\nthe entire subnet block for its prefix length.\n\nIf {@link AddressNetwork#getPrefixConfiguration} is set to consider all prefixes as subnets, this returns true for any grouping with prefix length.\n\n@return",
"Sorts the row indices in ascending order.\n@param sorter (Optional) Used to sort rows. If null a new instance will be declared internally.",
"Get container for principal.\n\n@param cms cmsobject\n@param list of principals\n@param captionID caption id\n@param descID description id\n@param iconID icon id\n@param ouID ou id\n@param icon icon\n@param iconList iconlist\n@return indexedcontainer",
"An invalid reference or references. The verification of the digest of a\nreference failed. This can be caused by a change to the referenced data\nsince the signature was generated.\n\n@param aInvalidReferences\nThe indices to the invalid references.\n@return Result object",
"This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset to position 0 before\ncalling this method and the caller must reset it after the call\nreturns\n@return True if the buffer holds a complete request, false otherwise",
"Get a list of people in a given photo.\n\n@param photoId\n@throws FlickrException"
] |
public RandomVariable[] getValues(double[] times) {
RandomVariable[] values = new RandomVariable[times.length];
for(int i=0; i<times.length; i++) {
values[i] = getValue(null, times[i]);
}
return values;
} | [
"Return a vector of values corresponding to a given vector of times.\n@param times A given vector of times.\n@return A vector of values corresponding to the given vector of times."
] | [
"Return a capitalized version of the specified property name.\n\n@param s\nThe property name",
"Generate a Jongo query regarding a set of parameters.\n\n@param params Map<queryKey, queryValue> of query parameters\n@return String",
"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",
"given the groupId, and 2 string arrays, adds the name-responses pair to the table_override\n\n@param groupId ID of group\n@param methodName name of method\n@param className name of class\n@throws Exception exception",
"Parse a currency symbol position value.\n\n@param value currency symbol position\n@return CurrencySymbolPosition instance",
"Producers returned from this method are not validated. Internal use only.",
"Sets the yearly absolute date.\n\n@param date yearly absolute date",
"Calculates the Boundedness value to given confinement radius, diffusion coefficient, timlag and number of steps.\n@param D diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param confRadius Confinement radius\n@return Boundedness value",
"Prints a report about the statistics stored in the given data object.\n\n@param usageStatistics\nthe statistics object to print\n@param entityLabel\nthe label to use to refer to this kind of entities (\"items\" or\n\"properties\")"
] |
public void setStartTime(final Date date) {
if (!Objects.equals(m_model.getStart(), date)) {
removeExceptionsOnChange(new Command() {
public void execute() {
m_model.setStart(date);
setPatternDefaultValues(date);
valueChanged();
}
});
}
} | [
"Set the start time.\n@param date the start time to set."
] | [
"Pad or trim so as to produce a string of exactly a certain length.\n\n@param str The String to be padded or truncated\n@param num The desired length",
"Gets an iterable of all the assignments of this task.\n@param fields the fields to retrieve.\n@return an iterable containing info about all the assignments.",
"Get an exception reporting a missing, required XML child element.\n@param reader the stream reader\n@param required a set of enums whose toString method returns the\nattribute name\n@return the exception",
"Append Join for non SQL92 Syntax",
"Finds the column with the largest normal and makes that the first column\n\n@param j Current column being inspected",
"Read an optional JSON array.\n@param json the JSON Object that has the array as element\n@param key the key for the array in the provided JSON object\n@return the array or null if reading the array fails.",
"This method is called to format a rate.\n\n@param value rate value\n@return formatted rate",
"Split a span into two by adding a knot in the middle.\n@param n the span index",
"Clone a widget info map considering what may be copied to the client.\n\n@param widgetInfo widget info map\n@return cloned copy including only records which are not {@link ServerSideOnlyInfo}"
] |
private void validateQuery(Query query) throws IllegalArgumentException {
if (query.getKindCount() != 1) {
throw new IllegalArgumentException("Query must have exactly one kind.");
}
if (query.getOrderCount() != 0) {
throw new IllegalArgumentException("Query cannot have any sort orders.");
}
if (query.hasFilter()) {
validateFilter(query.getFilter());
}
} | [
"Verifies that the given query can be properly scattered.\n\n@param query the query to verify\n@throws IllegalArgumentException if the query is invalid."
] | [
"Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list",
"Sets a client option per-request\n\n@param key Option name\n@param value Option value\n@return The request itself",
"Adds and returns a document with a new version to the given document.\n\n@param document the document to attach a new version to.\n@param newVersion the version to attach to the document\n@return a document with a new version to the given document.",
"Use this API to restore appfwprofile.",
"Returns iban length for the specified country.\n\n@param countryCode {@link org.iban4j.CountryCode}\n@return the length of the iban for the specified country.",
"Returns the compact project records for all projects in the workspace.\n\n@param workspace The workspace or organization to find projects in.\n@return Request object",
"Processes the template for all table definitions in the torque model.\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\"",
"Wrap CallableStatement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a Callablestatement.",
"Shutdown the server\n\n@throws Exception exception"
] |
public static Command newInsert(Object object,
String outIdentifier) {
return getCommandFactoryProvider().newInsert( object,
outIdentifier );
} | [
"Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\n\n@param object\n@param outIdentifier\n@return"
] | [
"Adds a new leap second to these rules.\n\n@param mjDay the Modified Julian Day that the leap second occurs at the end of\n@param leapAdjustment the leap seconds to add/remove at the end of the day, either -1 or 1\n@throws IllegalArgumentException if the leap adjustment is invalid\n@throws IllegalArgumentException if the day is before or equal the last known leap second day\nand the definition does not match a previously registered leap\n@throws ConcurrentModificationException if another thread updates the rules at the same time",
"Obtains a Symmetry454 zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry454 zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Attaches a morph to scene object with a base mesh\n@param sceneObj is the base mesh.\n@throws IllegalStateException if component is null\n@throws IllegalStateException if mesh is null\n@throws IllegalStateException if material is null",
"Determines whether or not a given feature matches this pattern.\n\n@param feature\nSpecified feature to examine.\n\n@return Flag confirming whether or not this feature is inside the filter.",
"Invokes a closure passing it a new Sql instance created from the given JDBC connection URL.\nThe created connection will be closed if required.\n\n@param url a database url of the form\n<code>jdbc:<em>subprotocol</em>:<em>subname</em></code>\n@param c the Closure to call\n@see #newInstance(String)\n@throws SQLException if a database access error occurs",
"Add the line to the content\n\n@param bufferedFileReader The file reader\n@param content The content of the file\n@param line The current read line\n@throws IOException",
"Closes the server socket. No new clients are accepted afterwards.",
"Retrieve a finish date time in the form required by Phoenix.\n\n@param value Date instance\n@return formatted date time",
"Specifies the maximum capacity of the counter.\n\n@param capacity\n<code>long</code>\n@throws IllegalArgumentException\nif windowMillis is less than 1."
] |
synchronized boolean markReadMessageForId(String messageId, String userId){
if(messageId == null || userId == null) return false;
final String tName = Table.INBOX_MESSAGES.getName();
try{
final SQLiteDatabase db = dbHelper.getWritableDatabase();
ContentValues cv = new ContentValues();
cv.put(IS_READ,1);
db.update(Table.INBOX_MESSAGES.getName(), cv,_ID + " = ? AND " + USER_ID + " = ?",new String[]{messageId,userId});
return true;
}catch (final SQLiteException e){
getConfigLogger().verbose("Error removing stale records from " + tName, e);
return false;
} finally {
dbHelper.close();
}
} | [
"Marks inbox message as read for given messageId\n@param messageId String messageId\n@return boolean value depending on success of operation"
] | [
"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",
"the 1st request from the manager.",
"Parses an item id\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@param siteIri\nthe siteIRI that this value refers to\n@throws IllegalArgumentException\nif the id is invalid",
"Register a new DropPasteWorkerInterface.\n@param worker The new worker",
"Split string content into list\n@param content String content\n@return list",
"Starts the enforcer.",
"Runs the given method with the specified arguments, substituting with proxies where necessary\n@param method\n@param target proxy target\n@param args\n@return Proxy-fied result for statements, actual call result otherwise\n@throws IllegalAccessException\n@throws InvocationTargetException",
"Register this broker in ZK for the first time.",
"Open the event stream\n\n@return true if successfully opened, false if not"
] |
public void removeFilter(String filterName)
{
Filter filter = getFilterByName(filterName);
if (filter != null)
{
if (filter.isTaskFilter())
{
m_taskFilters.remove(filter);
}
if (filter.isResourceFilter())
{
m_resourceFilters.remove(filter);
}
m_filtersByName.remove(filterName);
m_filtersByID.remove(filter.getID());
}
} | [
"Removes a filter from this project file.\n\n@param filterName The name of the filter"
] | [
"Perform a post-boot scan to remove any deployments added during boot that failed to deploy properly.\nThis method isn't private solely to allow a unit test in the same package to call it.",
"Creates the publish button.\n\n@param updateListener the update listener\n@return the publish button",
"Returns the perma link for the given resource and optional detail content.<p<\n\n@param cms the CMS context to use\n@param resourceName the page to generate the perma link for\n@param detailContentId the structure id of the detail content (may be null)\n\n@return the perma link",
"Calculate delta with another vector\n@param v another vector\n@return delta vector",
"Validates the input parameters.",
"Process normal calendar working and non-working days.\n\n@param calendar parent calendar",
"digest message with MD5\n\n@param source message\n@return 32 bit MD5 value (lower case)",
"Returns a flag indicating if also expired resources should be found.\n@return A flag indicating if also expired resources should be found.",
"Creates a new status update on the project.\n\nReturns the full record of the newly created project status update.\n\n@param project The project on which to create a status update.\n@return Request object"
] |
public void generateTracedFile(final IFileSystemAccess2 fsa, final String path, final EObject rootTrace, final StringConcatenationClient code) {
final CompositeGeneratorNode node = this.trace(rootTrace, code);
this.generateTracedFile(fsa, path, node);
} | [
"Convenience extension, to generate traced code."
] | [
"Creates a real valued diagonal matrix of the specified type",
"Add a new download. The download will start automatically once the download manager is\nready to execute it and connectivity is available.\n\n@param request the parameters specifying this download\n@return an ID for the download, unique across the application. This ID is used to make future\ncalls related to this download.\n@throws IllegalArgumentException",
"Parses a raw WBS value from the database and breaks it into\ncomponent parts ready for formatting.\n\n@param value raw WBS value",
"Sets the initial pivot ordering and compute the F-norm squared for each column",
"Handle the given response, return the deserialized object when the response is successful.\n\n@param <T> Type\n@param response Response\n@param returnType Return type\n@throws ApiException If the response has a unsuccessful status code or\nfail to deserialize the response body\n@return Type",
"2-D Double array to integer array.\n\n@param array Double array.\n@return Integer array.",
"Get a scalar value for the DOM diversity using the Robust Tree Edit Distance\n\n@param dom1\n@param dom2\n@return",
"A specific, existing workspace can be updated by making a PUT request on\nthe URL for that workspace. Only the fields provided in the data block\nwill be updated; any unspecified fields will remain unchanged.\n\nCurrently the only field that can be modified for a workspace is its `name`.\n\nReturns the complete, updated workspace record.\n\n@param workspace The workspace to update.\n@return Request object",
"The setter for setting configuration file. It will convert the value to a URI.\n\n@param configurationFiles the configuration file map."
] |
public void setValue(String constantValue)
{
this.fieldSource = SOURCE_VALUE;
this.fieldRefName = null;
this.returnedByProcedure = false;
this.constantValue = constantValue;
} | [
"Sets up this object to represent an argument that will be set to a\nconstant value.\n\n@param constantValue the constant value."
] | [
"check if MessageID exists in the message, if not, only generate new MessageID for outbound message.\n@param message",
"Use this API to fetch nstrafficdomain_binding resources of given names .",
"Returns an integer array that contains the default values for all the\ntexture parameters.\n\n@return an integer array that contains the default values for all the\ntexture parameters.",
"Converts the search results from CmsSearchResource to CmsSearchResourceBean.\n@param searchResults The collection of search results to transform.",
"Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows",
"Use this API to update nsconfig.",
"Tells you if the expression is a predefined constant like TRUE or FALSE.\n@param expression\nany expression\n@return\nas described",
"get the type erasure signature",
"Return the index associated to the Renderer.\n\n@param renderer used to search in the prototypes collection.\n@return the prototype index associated to the renderer passed as argument."
] |
public static CmsShell getTopShell() {
ArrayList<CmsShell> shells = SHELL_STACK.get();
if (shells.isEmpty()) {
return null;
}
return shells.get(shells.size() - 1);
} | [
"Gets the top of thread-local shell stack, or null if it is empty.\n\n@return the top of the shell stack"
] | [
"all objects in list1 that are not in list2\n\n@param <T>\n@param list1\nFirst collection\n@param list2\nSecond collection\n@return The collection difference list1 - list2",
"Sets left and right padding for all cells in the table.\n@param padding new padding for left and right, ignored if smaller than 0\n@return this to allow chaining",
"Log a string.\n\n@param label label text\n@param data string data",
"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.",
"Put a new value in map.\n\n@param key id of the value for looking up.\n@param value the value.",
"Creates a new instance from the given configuration file.\n\n@throws IOException if failed to load the configuration from the specified file",
"Populate a resource assignment.\n\n@param record MPX record\n@param assignment resource assignment\n@throws MPXJException",
"Utility function that checks if store names are valid on a node.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch stores from\n@param storeNames Store names to check",
"Return a long value from a prepared query."
] |
public static policydataset get(nitro_service service, String name) throws Exception{
policydataset obj = new policydataset();
obj.set_name(name);
policydataset response = (policydataset) obj.get_resource(service);
return response;
} | [
"Use this API to fetch policydataset resource of given name ."
] | [
"Convert custom info.\n\n@param customInfo the custom info map\n@return the custom info type",
"Use this API to fetch gslbservice resource of given name .",
"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",
"read CustomInfo list from table.\n\n@param eventId the event id\n@return the map",
"Reads non outline code custom field values and populates container.",
"Use this API to fetch statistics of appfwpolicy_stats resource of given name .",
"Returns the ordered Map value of the field.\n\n@return the ordered Map value of the field. It returns a reference of the value.\n@throws IllegalArgumentException if the value cannot be converted to ordered Map.",
"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",
"Return the value of field in the data argument if it is not the default value for the class. If it is the default\nthen null is returned."
] |
public void setPatternScheme(final boolean isWeekDayBased) {
if (isWeekDayBased ^ (null != m_model.getWeekDay())) {
removeExceptionsOnChange(new Command() {
public void execute() {
if (isWeekDayBased) {
m_model.setWeekDay(getPatternDefaultValues().getWeekDay());
m_model.setWeekOfMonth(getPatternDefaultValues().getWeekOfMonth());
} else {
m_model.setWeekDay(null);
m_model.setWeekOfMonth(null);
}
m_model.setMonth(getPatternDefaultValues().getMonth());
m_model.setDayOfMonth(getPatternDefaultValues().getDayOfMonth());
m_model.setInterval(getPatternDefaultValues().getInterval());
onValueChange();
}
});
}
} | [
"Set the pattern scheme.\n@param isWeekDayBased flag, indicating if the week day based scheme should be set."
] | [
"Init the headers of the table regarding the filters\n\n@return String[]",
"handles when a member leaves and hazelcast partition data is lost. We want\nto find the Futures that are waiting on lost data and error them",
"Use this API to add dospolicy.",
"Sets the replace var map to single target from map.\n\n@param replacementVarMapNodeSpecific\nthe replacement var map node specific\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero",
"Opens the stream in a background thread.",
"Recursively loads the metadata for this node",
"Stop an animation.",
"Scans given directory for files passing given filter, adds the results into given list."
] |
public static HttpResponse getResponse(String urls, HttpRequest request,
HttpMethod method, int connectTimeoutMillis, int readTimeoutMillis) throws IOException {
OutputStream out = null;
InputStream content = null;
HttpResponse response = null;
HttpURLConnection httpConn = request
.getHttpConnection(urls, method.name());
httpConn.setConnectTimeout(connectTimeoutMillis);
httpConn.setReadTimeout(readTimeoutMillis);
try {
httpConn.connect();
if (null != request.getPayload() && request.getPayload().length > 0) {
out = httpConn.getOutputStream();
out.write(request.getPayload());
}
content = httpConn.getInputStream();
response = new HttpResponse();
parseHttpConn(response, httpConn, content);
return response;
} catch (SocketTimeoutException e) {
throw e;
} catch (IOException e) {
content = httpConn.getErrorStream();
response = new HttpResponse();
parseHttpConn(response, httpConn, content);
return response;
} finally {
if (content != null) {
content.close();
}
httpConn.disconnect();
}
} | [
"Get http response"
] | [
"Joins the given list into a single string.",
"Creates a converter function that converts value into primitive type.\n\n@return A converter function or {@code null} if the given type is not primitive type or boxed type",
"Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value",
"The full path of a jrxml file, or the path in the classpath of a jrxml\nresource.\n\n@param path\n@return",
"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",
"Create the metadata which gets send to the DC when registering.\n\n\n@param hostInfo the local host info\n@param productConfig the product config\n@param ignoredResourceRegistry registry of ignored resources\n@return the host info",
"mark a node as blacklisted\n\n@param nodeId Integer node id of the node to be blacklisted",
"Check if the node matches the column values\n\n@param nodeProperties the properties on the node\n@param keyColumnNames the name of the columns to check\n@param keyColumnValues the value of the columns to check\n@return true if the properties of the node match the column names and values",
"Set day.\n\n@param d day instance"
] |
public static int cudnnSoftmaxForward(
cudnnHandle handle,
int algo,
int mode,
Pointer alpha,
cudnnTensorDescriptor xDesc,
Pointer x,
Pointer beta,
cudnnTensorDescriptor yDesc,
Pointer y)
{
return checkResult(cudnnSoftmaxForwardNative(handle, algo, mode, alpha, xDesc, x, beta, yDesc, y));
} | [
"Function to perform forward softmax"
] | [
"Gets type from super class's type parameter.",
"Trim the trailing spaces.\n\n@param line",
"get the type erasure signature",
"Provides a consistent ordering over lists. First compares by the first\nelement. If that element is equal, the next element is considered, and so\non.",
"Retrieve a single field value.\n\n@param id parent entity ID\n@param type field type\n@param fixedData fixed data block\n@param varData var data block\n@return field value",
"Reconstructs a number that is represented by more than one byte in a network packet in big-endian order.\n\n@param buffer the byte array containing the packet data\n@param start the index of the first byte containing a numeric value\n@param length the number of bytes making up the value\n@return the reconstructed number",
"Delivers the correct JSON Object for properties\n\n@param properties\n@throws org.json.JSONException",
"Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x and y.",
"Get prototype name.\n\n@return prototype name"
] |
public static List<Artifact> getAllArtifacts(final Module module){
final List<Artifact> artifacts = new ArrayList<Artifact>();
for(final Module subModule: module.getSubmodules()){
artifacts.addAll(getAllArtifacts(subModule));
}
artifacts.addAll(module.getArtifacts());
return artifacts;
} | [
"Returns all the Artifacts of the module\n\n@param module Module\n@return List<Artifact>"
] | [
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"Generate a sql where-clause for the array of fields\n\n@param fields array containing all columns used in WHERE clause",
"Build a Pk-Query base on the ClassDescriptor.\n\n@param cld\n@return a select by PK query",
"Initializes the external child resource collection.",
"Use this API to fetch all the dnspolicylabel resources that are configured on netscaler.",
"Fired whenever a browser event is received.\n@param event Event to process",
"Delete all backups asynchronously",
"Use this API to fetch sslvserver_sslcipher_binding resources of given name .",
"Get the element at the index as an integer.\n\n@param i the index of the element to access"
] |
@Override
public void putAll(Map<? extends K, ? extends V> in) {
if (fast) {
synchronized (this) {
Map<K, V> temp = cloneMap(map);
temp.putAll(in);
map = temp;
}
} else {
synchronized (map) {
map.putAll(in);
}
}
} | [
"Copy all of the mappings from the specified map to this one, replacing\nany mappings with the same keys.\n\n@param in the map whose mappings are to be copied"
] | [
"Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above.",
"Get the literal value for an expression.\n\n@param expression expression\n@return literal value",
"Sets an argument to the collection of arguments. This guarantees only one value will be assigned to the\nargument key.\n\n@param argument the argument to add",
"Plots the trajectory\n@param title Title of the plot\n@param t Trajectory to be plotted",
"Start with specifying the groupId",
"Remove paths with no active overrides\n\n@throws Exception",
"Multiple of gradient windwos per masc relation of x y\n\n@return int[]",
"Stores a new certificate and its associated private key in the keystore.\n@param hostname\n@param cert\n@param privKey @throws KeyStoreException\n@throws CertificateException\n@throws NoSuchAlgorithmException",
"Create an element that represents a horizntal or vertical line.\n@param x1\n@param y1\n@param x2\n@param y2\n@return the created DOM element"
] |
public AccrueType getAccrueType(int field)
{
AccrueType result;
if ((field < m_fields.length) && (m_fields[field].length() != 0))
{
result = AccrueTypeUtility.getInstance(m_fields[field], m_locale);
}
else
{
result = null;
}
return (result);
} | [
"Accessor method to retrieve an accrue type instance.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field"
] | [
"Set the named roles which may be defined.\n\n@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values\n@since 1.10.0",
"Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.\n@return a JSON string containing the pending changes.",
"Called recursively to renumber child task IDs.\n\n@param parentTask parent task instance\n@param currentID current task ID\n@return updated current task ID",
"Multiply two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the multiply of specified complex numbers.",
"Read activities.",
"Configures the player whose current track waveforms and status will automatically be reflected. Whenever a new\ntrack is loaded on that player, the waveform and metadata will be updated, and the current playback position and\nstate of the player will be reflected by the component.\n\n@param player the player number to monitor, or zero if monitoring should stop",
"Retrieves the class object for the class with the given name.\n\n@param name The class name\n@return The class object\n@throws ClassNotFoundException If the class is not on the classpath (the exception message contains the class name)",
"Returns the user defined field without its prefix.\n\n@param field the name of the user defined field\n@return the user defined field without the prefix, or null if the fields\ndoesn't apply to this control file.\n@since 1.1",
"Assigns one variable to one value\n\n@param action an Assign Action\n@param possibleStateList a current list of possible states produced so far from expanding a model state\n\n@return the same list, with every possible state augmented with an assigned variable, defined by action"
] |
public void growMaxColumns( int desiredColumns , boolean preserveValue ) {
if( col_idx.length < desiredColumns+1 ) {
int[] c = new int[ desiredColumns+1 ];
if( preserveValue )
System.arraycopy(col_idx,0,c,0,col_idx.length);
col_idx = c;
}
} | [
"Increases the maximum number of columns in the matrix.\n@param desiredColumns Desired number of columns.\n@param preserveValue If the array needs to be expanded should it copy the previous values?"
] | [
"Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFileName The file to write the stream contents to.\n@throws IOException If the stream cannot be copied.",
"Might not fill all of dst.",
"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",
"Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value",
"Use this API to fetch appfwprofile_denyurl_binding resources of given name .",
"The documentation for InputStream.skip indicates that it can bail out early, and not skip\nthe requested number of bytes. I've encountered this in practice, hence this helper method.\n\n@param stream InputStream instance\n@param skip number of bytes to skip",
"Iterates through this file line by line, splitting each line using\nthe given regex separator. For each line, the given closure is called with\na single parameter being the list of strings computed by splitting the line\naround matches of the given regular expression.\nFinally the resources used for processing the file are closed.\n\n@param self a File\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see IOGroovyMethods#splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5",
"Merge another AbstractTransition's states into this object, such that the other AbstractTransition\ncan be discarded.\n\n@param another\n@return true if the merge is successful.",
"Get path ID for a given profileId and pathName\n\n@param pathName Name of path\n@param profileId ID of profile\n@return ID of path"
] |
public static Iterable<BoxFileVersionRetention.Info> getRetentions(
final BoxAPIConnection api, QueryFilter filter, String ... fields) {
filter.addFields(fields);
return new BoxResourceIterable<BoxFileVersionRetention.Info>(api,
ALL_RETENTIONS_URL_TEMPLATE.buildWithQuery(api.getBaseURL(), filter.toString()),
DEFAULT_LIMIT) {
@Override
protected BoxFileVersionRetention.Info factory(JsonObject jsonObject) {
BoxFileVersionRetention retention = new BoxFileVersionRetention(api, jsonObject.get("id").asString());
return retention.new Info(jsonObject);
}
};
} | [
"Retrieves all file version retentions matching given filters as an Iterable.\n@param api the API connection to be used by the resource.\n@param filter filters for the query stored in QueryFilter object.\n@param fields the fields to retrieve.\n@return an iterable contains information about all file version retentions matching given filter."
] | [
"Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits",
"Internal method used to retrieve a byte array from one\nor more embedded data blocks. Consecutive data blocks may\nneed to be concatenated by this method in order to retrieve\nthe complete set of data.\n\n@param blocks list of data blocks\n@param length expected length of the data\n@return byte array",
"Divides the elements at the specified column by 'val'. Takes in account\nleading zeros and one.",
"required for rest assured base URI configuration.",
"Returns all found resolvers\n@return",
"Filter unsafe or unnecessary request.\n\n@param nodeDataMapValidSource\nthe node data map valid source\n@param nodeDataMapValidSafe\nthe node data map valid safe",
"Creates the final artifact name.\n\n@return the artifact name",
"Initial random seed used for shuffling test suites and other sources\nof pseudo-randomness. If not set, any random value is set.\n\n<p>The seed's format is compatible with {@link RandomizedRunner} so that\nseed can be fixed for suites and methods alike.",
"Retrieve a table by name.\n\n@param name table name\n@return Table instance"
] |
public String getInvalidMessage(String key) {
return invalidMessageOverride == null ? messageMixin.lookup(key, messageValueArgs) : MessageFormat.format(
invalidMessageOverride, messageValueArgs);
} | [
"Gets the invalid message.\n\n@param key the key\n@return the invalid message"
] | [
"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",
"Clean wait task queue.",
"This function computes which reduce task to shuffle a record to.",
"Start a timer of the given string name for the current thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked",
"Use this API to fetch rewritepolicy_csvserver_binding resources of given name .",
"Generates a sub-trajectory",
"Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException",
"Get a property as a boolean or throw exception.\n\n@param key the property name",
"returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException"
] |
public List<com.groupon.odo.proxylib.models.Method> getMethodsNotInGroup(int groupId) throws Exception {
List<com.groupon.odo.proxylib.models.Method> allMethods = getAllMethods();
List<com.groupon.odo.proxylib.models.Method> methodsNotInGroup = new ArrayList<com.groupon.odo.proxylib.models.Method>();
List<com.groupon.odo.proxylib.models.Method> methodsInGroup = editService.getMethodsFromGroupId(groupId, null);
for (int i = 0; i < allMethods.size(); i++) {
boolean add = true;
String methodName = allMethods.get(i).getMethodName();
String className = allMethods.get(i).getClassName();
for (int j = 0; j < methodsInGroup.size(); j++) {
if ((methodName.equals(methodsInGroup.get(j).getMethodName())) &&
(className.equals(methodsInGroup.get(j).getClassName()))) {
add = false;
}
}
if (add) {
methodsNotInGroup.add(allMethods.get(i));
}
}
return methodsNotInGroup;
} | [
"returns all methods not in the group\n\n@param groupId Id of group\n@return List of Methods for a group\n@throws Exception exception"
] | [
"Set the HomeAsUpIndicator that is visible when user navigate to a fragment child\n@param indicator the resource drawable to use as indicator",
"Deletes all of the Directories in root that match the FileFilter\n\n@param root\n@param filter",
"This should be called from a subclass constructor, if offset or length\nare unknown at a time when SubIIMInputStream constructor is called. This\nmethod shouldn't be called more than once.\n\n@param offset\nbyte offset\n@param length\nbyte length\n@throws IOException\nif underlying stream can't be read",
"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",
"Retrieve a flag value.\n\n@param index flag index (1-20)\n@return flag value",
"Use this API to fetch appfwjsoncontenttype resources of given names .",
"Marks the given list of statements for deletion. It is verified that the\ncurrent document actually contains the statements before doing so. This\ncheck is based on exact statement equality, including qualifier order and\nstatement id.\n\n@param currentDocument\nthe document with the current statements\n@param deleteStatements\nthe list of statements to be deleted",
"Caches the results of radix to the given power.\n\n@param radix\n@param power\n@return",
"Sets the initial pivot ordering and compute the F-norm squared for each column"
] |
private void executeResult() throws Exception {
result = createResult();
String timerKey = "executeResult: " + getResultCode();
try {
UtilTimerStack.push(timerKey);
if (result != null) {
result.execute(this);
} else if (resultCode != null && !Action.NONE.equals(resultCode)) {
throw new ConfigurationException("No result defined for action " + getAction().getClass().getName()
+ " and result " + getResultCode(), proxy.getConfig());
} else {
if (LOG.isDebugEnabled()) {
LOG.debug("No result returned for action " + getAction().getClass().getName() + " at "
+ proxy.getConfig().getLocation());
}
}
} finally {
UtilTimerStack.pop(timerKey);
}
} | [
"Uses getResult to get the final Result and executes it\n\n@throws ConfigurationException\nIf not result can be found with the returned code"
] | [
"Legacy conversion.\n@param map\n@return Properties",
"Parses an item IRI\n\n@param iri\nthe item IRI like http://www.wikidata.org/entity/Q42\n@throws IllegalArgumentException\nif the IRI is invalid or does not ends with an item id",
"Retrieve the date range at the specified index.\nThe index is zero based, and this method will return\nnull if the requested date range does not exist.\n\n@param index range index\n@return date range instance",
"Set the start time.\n@param date the start time to set.",
"Obtains a Ethiopic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Performs a HTTP DELETE request.\n\n@return {@link Response}",
"add various getAt and setAt methods for primitive arrays\n@param receiver the receiver class\n@param name the name of the method\n@param args the argument classes",
"for bpm connector",
"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."
] |
public Number getPercentageWorkComplete()
{
Number pct = (Number) getCachedValue(AssignmentField.PERCENT_WORK_COMPLETE);
if (pct == null)
{
Duration actualWork = getActualWork();
Duration work = getWork();
if (actualWork != null && work != null && work.getDuration() != 0)
{
pct = Double.valueOf((actualWork.getDuration() * 100) / work.convertUnits(actualWork.getUnits(), getParentFile().getProjectProperties()).getDuration());
set(AssignmentField.PERCENT_WORK_COMPLETE, pct);
}
}
return pct;
} | [
"The % Work Complete field contains the current status of a task,\nexpressed as the percentage of the task's work that has been completed.\nYou can enter percent work complete, or you can have Microsoft Project\ncalculate it for you based on actual work on the task.\n\n@return percentage as float"
] | [
"Add the string representation of the given object to this sequence at the given index. The given indentation will\nbe prepended to each line except the first one if the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.\n@param index\nthe index in the list of segments.",
"Closes the JDBC statement and its associated connection.",
"Get a unique reference to a place where a track is currently loaded in a player.\n\n@param player the player in which the track is loaded\n@param hotCue hot cue number in which the track is loaded, or 0 if it is actively loaded on the playback deck\n\n@return the instance that will always represent a reference to the specified player and hot cue",
"This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar. The\ncalendar used is the \"Standard\" calendar. If this calendar does not exist,\nand exception will be thrown.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object\n@throws MPXJException normally when no Standard calendar is available\n@deprecated use calendar.getDuration(startDate, endDate)",
"Checks given permissions are needed to show rationale.\n\n@return returns true if one of the permission is needed to show rationale.",
"Post a build info to the server\n\n@param moduleName String\n@param moduleVersion String\n@param buildInfo Map<String,String>\n@param user String\n@param password String\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() method on the JavascriptEnum\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property.",
"Determine if the exception is relative based on the recurrence type integer value.\n\n@param value integer value\n@return true if the recurrence is relative",
"create logs with given partition number\n\n@param topic the topic name\n@param partitions partition number\n@param forceEnlarge enlarge the partition number of log if smaller than runtime\n@return the partition number of the log after enlarging"
] |
public static authenticationvserver_authenticationlocalpolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_authenticationlocalpolicy_binding obj = new authenticationvserver_authenticationlocalpolicy_binding();
obj.set_name(name);
authenticationvserver_authenticationlocalpolicy_binding response[] = (authenticationvserver_authenticationlocalpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch authenticationvserver_authenticationlocalpolicy_binding resources of given name ."
] | [
"Helper method to track storage operations & time via StreamingStats.\n\n@param startNs",
"Concats an element and an array.\n\n@param firstElement the first element\n@param array the array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after the first element",
"Add a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param newHash the new hash of the added content\n@return the builder",
"Creates the conversion server that is specified by this builder.\n\n@return The conversion server that is specified by this builder.",
"This method is used to configure the primary and alternative\nformat patterns.\n\n@param primaryPattern new format pattern\n@param alternativePatterns alternative format patterns\n@param decimalSeparator Locale specific decimal separator to replace placeholder\n@param groupingSeparator Locale specific grouping separator to replace placeholder",
"Make sure that the Identity objects of garbage collected cached\nobjects are removed too.",
"Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops",
"Specifies an input field to assign a value to. Crawljax first tries to match the found HTML\ninput element's id and then the name attribute.\n\n@param type\nthe type of input field\n@param identification\nthe locator of the input field\n@return an InputField",
"Retrieves the project start date. If an explicit start date has not been\nset, this method calculates the start date by looking for\nthe earliest task start date.\n\n@return project start date"
] |
private TreeMap<Integer, Integer> createTaskMap(FieldMap fieldMap, FixedMeta taskFixedMeta, FixedData taskFixedData, Var2Data taskVarData)
{
TreeMap<Integer, Integer> taskMap = new TreeMap<Integer, Integer>();
int uniqueIdOffset = fieldMap.getFixedDataOffset(TaskField.UNIQUE_ID);
Integer taskNameKey = fieldMap.getVarDataKey(TaskField.NAME);
int itemCount = taskFixedMeta.getAdjustedItemCount();
int uniqueID;
Integer key;
//
// First three items are not tasks, so let's skip them
//
for (int loop = 3; loop < itemCount; loop++)
{
byte[] data = taskFixedData.getByteArrayValue(loop);
if (data != null)
{
byte[] metaData = taskFixedMeta.getByteArrayValue(loop);
//
// Check for the deleted task flag
//
int flags = MPPUtility.getInt(metaData, 0);
if ((flags & 0x02) != 0)
{
// Project stores the deleted tasks unique id's into the fixed data as well
// and at least in one case the deleted task was listed twice in the list
// the second time with data with it causing a phantom task to be shown.
// See CalendarErrorPhantomTasks.mpp
//
// So let's add the unique id for the deleted task into the map so we don't
// accidentally include the task later.
//
uniqueID = MPPUtility.getShort(data, TASK_UNIQUE_ID_FIXED_OFFSET); // Only a short stored for deleted tasks?
key = Integer.valueOf(uniqueID);
if (taskMap.containsKey(key) == false)
{
taskMap.put(key, null); // use null so we can easily ignore this later
}
}
else
{
//
// Do we have a null task?
//
if (data.length == NULL_TASK_BLOCK_SIZE)
{
uniqueID = MPPUtility.getInt(data, TASK_UNIQUE_ID_FIXED_OFFSET);
key = Integer.valueOf(uniqueID);
if (taskMap.containsKey(key) == false)
{
taskMap.put(key, Integer.valueOf(loop));
}
}
else
{
//
// We apply a heuristic here - if we have more than 75% of the data, we assume
// the task is valid.
//
int maxSize = fieldMap.getMaxFixedDataSize(0);
if (maxSize == 0 || ((data.length * 100) / maxSize) > 75)
{
uniqueID = MPPUtility.getInt(data, uniqueIdOffset);
key = Integer.valueOf(uniqueID);
// Accept this task if it does not have a deleted unique ID or it has a deleted unique ID but the name is not null
if (!taskMap.containsKey(key) || taskVarData.getUnicodeString(key, taskNameKey) != null)
{
taskMap.put(key, Integer.valueOf(loop));
}
}
}
}
}
}
return (taskMap);
} | [
"This method maps the task unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param taskFixedMeta Fixed meta data for this task\n@param taskFixedData Fixed data for this task\n@param taskVarData Variable task data\n@return Mapping between task identifiers and block position"
] | [
"Used to add exceptions to the calendar. The MPX standard defines\na limit of 250 exceptions per calendar.\n\n@param fromDate exception start date\n@param toDate exception end date\n@return ProjectCalendarException instance",
"Calculate the pointer's coordinates on the color wheel using the supplied\nangle.\n\n@param angle The position of the pointer expressed as angle (in rad).\n\n@return The coordinates of the pointer's center in our internal\ncoordinate system.",
"Checks if the method being invoked should be wrapped by a service.\nIt looks the method name up in the methodList. If its in the list, then\nthe method should be wrapped. If the list is null, then all methods\nare wrapped.\n\n@param methodName The method being called\n\n@return boolean",
"Parse init parameter for integer value, returning default if not found or invalid",
"Returns a list of objects for each line in the spreadsheet, of the specified type.\n\n<p>\nIf the class is a view model then the objects will be properly instantiated (that is, using\n{@link DomainObjectContainer#newViewModelInstance(Class, String)}, with the correct\nview model memento); otherwise the objects will be simple transient objects (that is, using\n{@link DomainObjectContainer#newTransientInstance(Class)}).\n</p>",
"Put event.\n\n@param eventType the event type\n@throws Exception the exception",
"Stop the service and end the program",
"Sets the debug JPDA remote socket debugging argument.\n\n@param suspend {@code true} to suspend otherwise {@code false}\n@param port the port to listen on\n\n@return the builder",
"Cancel the pause operation"
] |
public static void writeCorrelationId(Message message, String correlationId) {
Map<String, List<String>> headers = getOrCreateProtocolHeader(message);
headers.put(CORRELATIONID_HTTP_HEADER_NAME, Collections.singletonList(correlationId));
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("HTTP header '" + CORRELATIONID_HTTP_HEADER_NAME + "' set to: " + correlationId);
}
} | [
"Write correlation id.\n\n@param message the message\n@param correlationId the correlation id"
] | [
"Put a new value in map.\n\n@param key id of the value for looking up.\n@param value the value.",
"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",
"Copies entries in the source map to target map.\n\n@param source source map\n@param target target map",
"Update rows in the database.",
"Write calendar exceptions.\n\n@param records list of ProjectCalendars\n@throws IOException",
"k\nReturns a list of artifact regarding the filters\n\n@return List<DbArtifact>",
"Invoke an operation on an MBean by name.\nNote that only basic data types are supported for parameter values.\n@param operationName the operation name (can be URL-encoded).\n@param parameterMap the {@link Map} of parameter names and value arrays.\n@return the returned value from the operation.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Store the char in the internal buffer",
"Iterates through the given CharSequence line by line, splitting each line using\nthe given separator Pattern. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param pattern the regular expression Pattern for the delimiter\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@since 1.8.2"
] |
private void updateScheduleSource(ProjectProperties properties)
{
// Rudimentary identification of schedule source
if (properties.getCompany() != null && properties.getCompany().equals("Synchro Software Ltd"))
{
properties.setFileApplication("Synchro");
}
else
{
if (properties.getAuthor() != null && properties.getAuthor().equals("SG Project"))
{
properties.setFileApplication("Simple Genius");
}
else
{
properties.setFileApplication("Microsoft");
}
}
properties.setFileType("MSPDI");
} | [
"Populate the properties indicating the source of this schedule.\n\n@param properties project properties"
] | [
"Renumbers all entity unique IDs.",
"Creates the save and exit button UI Component.\n@return the save and exit button.",
"Attach a metadata cache file to a particular player media slot, so the cache will be used instead of querying\nthe player for metadata. This supports operation with metadata during shows where DJs are using all four player\nnumbers and heavily cross-linking between them.\n\nIf the media is ejected from that player slot, the cache will be detached.\n\n@param slot the media slot to which a meta data cache is to be attached\n@param file the metadata cache to be attached\n\n@throws IOException if there is a problem reading the cache file\n@throws IllegalArgumentException if an invalid player number or slot is supplied\n@throws IllegalStateException if the metadata finder is not running",
"This method is called when the locale of the parent file is updated.\nIt resets the locale specific currency attributes to the default values\nfor the new locale.\n\n@param properties project properties\n@param locale new locale",
"Computes the final list of versions to be stored, on top of what is\ncurrently being stored. Final list is valuesInStorage modified in place\n\n\n@param valuesInStorage list of versions currently in storage\n@param multiPutValues list of new versions being written to storage\n@return list of versions from multiPutVals that were rejected as obsolete",
"Obtains the transform for a specific time in animation.\n\n@param animationTime The time in animation.\n\n@return The transform.",
"Creates an Executor that is based on daemon threads.\nThis allows the program to quit without explicitly\ncalling shutdown on the pool\n\n@return the newly created single-threaded Executor",
"Obtains a local date in International Fixed calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the International Fixed era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the International Fixed local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code InternationalFixedEra}",
"Compares two double values up to some delta.\n\n@param a\n@param b\n@param delta\n@return The value 0 if a equals b, a value greater than 0 if if a > b, and a value less than 0 if a < b."
] |
public URL getDownloadURL() {
URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
request.setFollowRedirects(false);
BoxRedirectResponse response = (BoxRedirectResponse) request.send();
return response.getRedirectURL();
} | [
"Gets an expiring URL for downloading a file directly from Box. This can be user,\nfor example, for sending as a redirect to a browser to cause the browser\nto download the file directly from Box.\n\n@return the temporary download URL"
] | [
"Reads a single resource from a ConceptDraw PROJECT file.\n\n@param resource ConceptDraw PROJECT resource",
"set custom request for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise",
"Use this API to fetch all the sslpolicylabel resources that are configured on netscaler.",
"Set a colspan in a group of columns. First add the cols to the report\n\n@param colNumber the index of the col\n@param colQuantity the number of cols how i will take\n@param colspanTitle colspan title\n@return a Dynamic Report Builder\n@throws ColumnBuilderException When the index of the cols is out of\nbounds.",
"Set the serial pattern type.\n@param patternType the pattern type to set.",
"Flushes all changes to disk.",
"if you have a default, it's automatically optional",
"Initializes an annotation class\n\n@param name The name of the annotation class\n@return The instance of the annotation. Returns a dummy if the class was\nnot found",
"Get the best guess we have for the current track position on the specified player.\n\n@param player the player number whose position is desired\n\n@return the milliseconds into the track that we believe playback has reached, or -1 if we don't know\n\n@throws IllegalStateException if the TimeFinder is not running"
] |
@Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<BritishCutoverDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<BritishCutoverDate>) super.localDateTime(temporal);
} | [
"Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time"
] | [
"Finish initializing service.\n\n@throws IOException oop",
"Returns a single parent of the given tag. If there are multiple parents, throws a WindupException.",
"Parse a string representation of password spec.\n\nA password spec string should be `<trait spec><length spec>`.\n\nWhere \"trait spec\" should be a composition of\n\n* `a` - indicate lowercase letter required\n* `A` - indicate uppercase letter required\n* `0` - indicate digit letter required\n* `#` - indicate special character required\n\n\"length spec\" should be `[min,max]` where `max` can be omitted.\n\nHere are examples of valid \"length spec\":\n\n* `[6,20]` // min length: 6, max length: 20\n* `[8,]` // min length: 8, max length: unlimited\n\nAnd examples of invalid \"length spec\":\n\n* `[8]` // \",\" required after min part\n* `[a,f]` // min and max part needs to be decimal digit(s)\n* `[3,9)` // length spec must be started with `[` and end with `]`\n\n@param spec a string representation of password spec\n@return a {@link PasswordSpec} instance",
"Determine if a task field contains data.\n\n@param task task instance\n@param field target field\n@return true if the field contains data",
"Use this API to fetch the statistics of all rnat_stats resources that are configured on netscaler.",
"Set a colspan in a group of columns. First add the cols to the report\n\n@param colNumber the index of the col\n@param colQuantity the number of cols how i will take\n@param colspanTitle colspan title\n@return a Dynamic Report Builder\n@throws ColumnBuilderException When the index of the cols is out of\nbounds.",
"Returns the class of datatype URI that best characterizes the range of\nthe given property based on its datatype.\n\n@param propertyIdValue\nthe property for which to get a range\n@return the range URI or null if the datatype could not be identified.",
"Generates a diagonal matrix with the input vector on its diagonal\n\n@param vector The given matrix A.\n@return diagonalMatrix The matrix with the vectors entries on its diagonal",
"Ensures that the primary keys required by the given collection with indirection table are present in\nthe element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the fitting collection (if any) or the primary keys"
] |
public static boolean decomposeSafe(DecompositionInterface<ZMatrixRMaj> decomposition, ZMatrixRMaj a) {
if( decomposition.inputModified() ) {
a = a.copy();
}
return decomposition.decompose(a);
} | [
"Decomposes the input matrix 'a' and makes sure it isn't modified."
] | [
"Print work units.\n\n@param value TimeUnit instance\n@return work units value",
"Registers the resource to the parent deployment resource. The model returned is that of the resource parameter.\n\n@param subsystemName the subsystem name\n@param resource the resource to be used for the subsystem on the deployment\n\n@return the model\n\n@throws java.lang.IllegalStateException if the subsystem resource already exists",
"Bessel function of the second kind, of order 0.\n\n@param x Value.\n@return Y0 value.",
"Send a sync command to all registered listeners.\n\n@param command the byte which identifies the type of sync command we received",
"Searches the variables layers, top to bottom, for the iterable having all of it's items of the given type. Return\nnull if not found.",
"ends the request and clears the cache. This can be called before the request is over,\nin which case the cache will be unavailable for the rest of the request.",
"List details of all calendars in the file.\n\n@param file ProjectFile instance",
"Use this API to add appfwjsoncontenttype.",
"Iterate through a set of bit field flags and set the value for each one\nin the supplied container.\n\n@param flags bit field flags\n@param container field container\n@param data source data"
] |
public void close() throws SQLException {
try {
if (this.resetConnectionOnClose /*FIXME: && !getAutoCommit() && !isTxResolved() */){
/*if (this.autoCommitStackTrace != null){
logger.debug(this.autoCommitStackTrace);
this.autoCommitStackTrace = null;
} else {
logger.debug(DISABLED_AUTO_COMMIT_WARNING);
}*/
rollback();
if (!getAutoCommit()){
setAutoCommit(true);
}
}
if (this.logicallyClosed.compareAndSet(false, true)) {
if (this.threadWatch != null){
this.threadWatch.interrupt(); // if we returned the connection to the pool, terminate thread watch thread if it's
// running even if thread is still alive (eg thread has been recycled for use in some
// container).
this.threadWatch = null;
}
if (this.closeOpenStatements){
for (Entry<Statement, String> statementEntry: this.trackedStatement.entrySet()){
statementEntry.getKey().close();
if (this.detectUnclosedStatements){
logger.warn(String.format(UNCLOSED_LOG_ERROR_MESSAGE, statementEntry.getValue()));
}
}
this.trackedStatement.clear();
}
if (!this.connectionTrackingDisabled){
pool.getFinalizableRefs().remove(this.connection);
}
ConnectionHandle handle = null;
//recreate can throw a SQLException in constructor on recreation
try {
handle = this.recreateConnectionHandle();
this.pool.connectionStrategy.cleanupConnection(this, handle);
this.pool.releaseConnection(handle);
} catch(SQLException e) {
//check if the connection was already closed by the recreation
if (!isClosed()) {
this.pool.connectionStrategy.cleanupConnection(this, handle);
this.pool.releaseConnection(this);
}
throw e;
}
if (this.doubleCloseCheck){
this.doubleCloseException = this.pool.captureStackTrace(CLOSED_TWICE_EXCEPTION_MESSAGE);
}
} else {
if (this.doubleCloseCheck && this.doubleCloseException != null){
String currentLocation = this.pool.captureStackTrace("Last closed trace from thread ["+Thread.currentThread().getName()+"]:\n");
logger.error(String.format(LOG_ERROR_MESSAGE, this.doubleCloseException, currentLocation));
}
}
} catch (SQLException e) {
throw markPossiblyBroken(e);
}
} | [
"Release the connection back to the pool.\n\n@throws SQLException Never really thrown"
] | [
"Converts the bytes that make up an internet address into the corresponding integer value to make\nit easier to perform bit-masking operations on them.\n\n@param address an address whose integer equivalent is desired\n\n@return the integer corresponding to that address",
"Reads entries from transforms.xml.\n\n@param file the XML file\n@return the transform entries read from the file\n\n@throws Exception if something goes wrong",
"Get the collection of contacts for the calling user.\n\n@return The Collection of Contact objects",
"Removes the given row.\n\n@param row the row to remove",
"Use this API to unset the properties of vridparam resource.\nProperties that need to be unset are specified in args array.",
"Create a new queued pool using the defaults for key of type K, request of\ntype R, and value of Type V.\n\n@param factory The factory that creates objects\n@return The created pool",
"Provides an object that can build SQL clauses to match this string representation.\n\nThis method can be overridden for other IP address types to match in their own ways.\n\n@param isEntireAddress\n@param translator\n@return",
"Merge a new subsystem from the global registration.\n\n@param registry the global registry\n@param subsystemName the subsystem name\n@param version the subsystem version",
"Returns the version document of the given document, if any; returns null otherwise.\n@param document the document to get the version from.\n@return the version of the given document, if any; returns null otherwise."
] |
public void readFrom(IIMReader reader, int recover) throws IOException, InvalidDataSetException {
final boolean doLog = log != null;
for (;;) {
try {
DataSet ds = reader.read();
if (ds == null) {
break;
}
if (doLog) {
log.debug("Read data set " + ds);
}
DataSetInfo info = ds.getInfo();
Serializer s = info.getSerializer();
if (s != null) {
if (info.getDataSetNumber() == IIM.DS(1, 90)) {
setCharacterSet((String) s.deserialize(ds.getData(), activeSerializationContext));
}
}
dataSets.add(ds);
if (stopAfter9_10 && info.getDataSetNumber() == IIM.DS(9, 10))
break;
} catch (IIMFormatException e) {
if (recoverFromIIMFormat && recover-- > 0) {
boolean r = reader.recover();
if (doLog) {
log.debug(r ? "Recoved from " + e : "Failed to recover from " + e);
}
if (!r)
break;
} else {
throw e;
}
} catch (UnsupportedDataSetException e) {
if (recoverFromUnsupportedDataSet && recover-- > 0) {
boolean r = reader.recover();
if (doLog) {
log.debug(r ? "Recoved from " + e : "Failed to recover from " + e);
}
if (!r)
break;
} else {
throw e;
}
} catch (InvalidDataSetException e) {
if (recoverFromInvalidDataSet && recover-- > 0) {
boolean r = reader.recover();
if (doLog) {
log.debug(r ? "Recoved from " + e : "Failed to recover from " + e);
}
if (!r)
break;
} else {
throw e;
}
} catch (IOException e) {
if (recover-- > 0 && !dataSets.isEmpty()) {
if (doLog) {
log.error("IOException while reading, however some data sets where recovered, " + e);
}
return;
} else {
throw e;
}
}
}
} | [
"Reads data sets from a passed reader.\n\n@param reader\ndata sets source\n@param recover\nmax number of errors reading process will try to recover from.\nSet to 0 to fail immediately\n@throws IOException\nif reader can't read underlying stream\n@throws InvalidDataSetException\nif invalid/undefined data set is encountered"
] | [
"Notifies that an existing content item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.",
"Delete a record.\n\n@param referenceId the reference ID.",
"Returns new boolean matrix with true or false values selected with equal probability.\n\n@param numRow Number of rows in the new matrix.\n@param numCol Number of columns in the new matrix.\n@param rand Random number generator used to fill the matrix.\n@return The randomly generated matrix.",
"parse the stencil out of a JSONObject and set it to the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Deletes the disabled marker file in the directory of the specified version.\n\n@param version to enable\n@throws PersistenceFailureException if the marker file could not be deleted (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).",
"Deletes the specified shovel from specified virtual host.\n\n@param vhost virtual host from where to delete the shovel\n@param shovelname Shovel to be deleted.",
"Sets the necessary height for all bands in the report, to hold their children",
"Forces removal of one or several faceted attributes for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining.",
"Replace the last element of an address with a static path element.\n\n@param element the path element\n@return the operation address transformer"
] |
final public void addPositionRange(int start, int end) {
if (tokenPosition == null) {
tokenPosition = new MtasPosition(start, end);
} else {
int[] positions = new int[end - start + 1];
for (int i = start; i <= end; i++) {
positions[i - start] = i;
}
tokenPosition.add(positions);
}
} | [
"Adds the position range.\n\n@param start the start\n@param end the end"
] | [
"Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color",
"Returns a client object for a clientId\n\n@param clientId ID of client to return\n@return Client or null\n@throws Exception exception",
"The quick way to detect for a tier of devices.\nThis method detects for devices which can\ndisplay iPhone-optimized web content.\nIncludes iPhone, iPod Touch, Android, Windows Phone 7 and 8, BB10, WebOS, Playstation Vita, etc.\n@return detection of any device in the iPhone/Android/Windows Phone/BlackBerry/WebOS Tier",
"Use this API to update tmtrafficaction resources.",
"Get the context for a photo in the group pool.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@param groupId\nThe group ID\n@return The PhotoContext\n@throws FlickrException",
"defines the KEY in the parent report parameters map where to get the subreport parameters map.\n@param path where to get the parameter map for the subrerpot.\n@return",
"Get the bean if it exists in the contexts.\n\n@return An instance of the bean\n@throws ContextNotActiveException if the context is not active\n@see javax.enterprise.context.spi.Context#get(BaseBean, boolean)",
"Map Synchro constraints to MPXJ constraints.\n\n@param task task\n@param row Synchro constraint data",
"Used to read the domain model when a slave host connects to the DC\n\n@param transformers the transformers for the host\n@param transformationInputs parameters for the transformation\n@param ignoredTransformationRegistry registry of resources ignored by the transformation target\n@param domainRoot the root resource for the domain resource tree\n@return a read master domain model util instance"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.