query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
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"
] | [
"Match the Origin header with the allowed origins.\nIf it doesn't match then a 403 response code is set on the response and it returns null.\n@param exchange the current HttpExchange.\n@param allowedOrigins list of sanitized allowed origins.\n@return the first matching origin, null otherwise.\n@throws Exception",
"Finds the magnitude of the largest element in the row\n@param A Complex matrix\n@param row Row in A\n@param col0 First column in A to be copied\n@param col1 Last column in A + 1 to be copied\n@return magnitude of largest element",
"return the squared area of the triangle defined by the half edge hedge0\nand the point at the head of hedge1.\n\n@param hedge0\n@param hedge1\n@return",
"Update the server group's name\n\n@param serverGroupId ID of server group\n@param name new name of server group\n@return updated ServerGroup",
"Starts processor thread.",
"QR decomposition.\n\nDecomposes (m,n) matrix A into a (m,m) matrix Q and an (m,n) matrix R such that\nQ is orthogonal, R is upper triangular and Q * R = A\n\nNote that if A has more rows than columns, then the lower rows of R will contain\nonly zeros, such that the corresponding later columns of Q do not enter the computation\nat all. For some reason, LAPACK does not properly normalize those columns.\n\n@param A matrix\n@return QR decomposition",
"Sets a listener for user actions within the SearchView.\n\n@param listener the listener object that receives callbacks when the user performs\nactions in the SearchView such as clicking on buttons or typing a query.",
"The sniffing Loggers are some special Loggers, whose level will be set to TRACE forcedly.\n@param logger",
"Use this API to fetch autoscalepolicy_binding resource of given name ."
] |
public static void main(String[] args) {
try {
TreeFactory tf = new LabeledScoredTreeFactory();
Reader r = new BufferedReader(new InputStreamReader(new FileInputStream(args[0]), "UTF-8"));
TreeReader tr = new PennTreeReader(r, tf);
Tree t = tr.readTree();
while (t != null) {
System.out.println(t);
System.out.println();
t = tr.readTree();
}
r.close();
} catch (IOException ioe) {
ioe.printStackTrace();
}
} | [
"Loads treebank data from first argument and prints it.\n\n@param args Array of command-line arguments: specifies a filename"
] | [
"Retrieves the project finish date. If an explicit finish date has not been\nset, this method calculates the finish date by looking for\nthe latest task finish date.\n\n@return Finish Date",
"Return the profileId for a path\n\n@param path_id ID of path\n@return ID of profile\n@throws Exception exception",
"Returns the associated SQL WHERE statement.",
"Display web page, but no user interface - close",
"This method allows a resource calendar to be added to a resource.\n\n@return ResourceCalendar\n@throws MPXJException if more than one calendar is added",
"Convert an array of column definitions into a map keyed by column name.\n\n@param columns array of column definitions\n@return map of column definitions",
"Tries to guess the packaging of the archive - whether it's an EAR, WAR, JAR.\nMaybe not needed as we can rely on the suffix?",
"Use this API to fetch a vpnglobal_authenticationsamlpolicy_binding resources.",
"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"
] |
static void i(String message){
if (getStaticDebugLevel() >= CleverTapAPI.LogLevel.INFO.intValue()){
Log.i(Constants.CLEVERTAP_LOG_TAG,message);
}
} | [
"Logs to Info if the debug level is greater than or equal to 1."
] | [
"Add a clause where the ID is from an existing object.",
"Joins a collection in a string using a delimiter\n@param col Collection\n@param delim Delimiter\n@return String",
"Returns the index of each elem in a List.\n@param elems The list of items\n@return An array of indices",
"Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content",
"For a given activity, retrieve a map of the activity code values which have been assigned to it.\n\n@param activity target activity\n@return map of activity code value UUIDs",
"Adds a variable to the end of the token list\n@param variable Variable which is to be added\n@return The new Token created around variable",
"Move this rectangle to the specified bottom-left point.\n\n@param rect rectangle to move\n@param x new x origin\n@param y new y origin",
"Create a document that parses the tile's labelFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@param labelStyleInfo\nlabel style info\n@return graphics document\n@throws RenderException\ncannot render",
"Gets the visibility modifiers for the property as defined by the getter and setter methods.\n\n@return the visibility modifer of the getter, the setter, or both depending on which exist"
] |
private <T> CoreRemoteMongoCollection<T> getRemoteCollection(
final MongoNamespace namespace,
final Class<T> resultClass
) {
return remoteClient
.getDatabase(namespace.getDatabaseName())
.getCollection(namespace.getCollectionName(), resultClass);
} | [
"Returns the remote collection representing the given namespace.\n\n@param namespace the namespace referring to the remote collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the remote collection representing the given namespace."
] | [
"Convert weekly recurrence days into a bit field.\n\n@param task recurring task\n@return bit field as a string",
"Create a new instance for the specified host and encryption key.\n\n@see #create(String)",
"Gets the Jaccard distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Jaccard distance between x and y.",
"Adds this handler to the widget.\n\n@param <H> the type of handler to add\n@param type the event type\n@param handler the handler\n@return {@link HandlerRegistration} used to remove the handler",
"Template-and-Hook method for generating the url required by the jdbc driver\nto allow for modifying an existing database.",
"Run the JavaScript program, Output saved in localBindings",
"Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string",
"Returns sql statement used in this prepared statement together with the parameters.\n@param sql base sql statement\n@param logParams parameters to print out\n@return returns printable statement",
"Extract data for a single task.\n\n@param parent task parent\n@param row Synchro task data"
] |
public static nsacl6[] get(nitro_service service, String acl6name[]) throws Exception{
if (acl6name !=null && acl6name.length>0) {
nsacl6 response[] = new nsacl6[acl6name.length];
nsacl6 obj[] = new nsacl6[acl6name.length];
for (int i=0;i<acl6name.length;i++) {
obj[i] = new nsacl6();
obj[i].set_acl6name(acl6name[i]);
response[i] = (nsacl6) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"Use this API to fetch nsacl6 resources of given names ."
] | [
"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",
"Make a sort order for use in a query.",
"Use this API to update autoscaleaction.",
"Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\nThe outIdentifier can be null.\nThe entryPoint, which can also be null, specifies the entrypoint the object is inserted into.\n\n@param object\n@param outIdentifier\n@param entryPoint\n@return",
"Produces a new ConditionalCounter.\n\n@return a new ConditionalCounter, where order of indices is reversed",
"Retrieve the integer value used to represent a task field in an\nMPX file.\n\n@param value MPXJ task field value\n@return MPX field value",
"Prints to a file. If the file does not exist, rewrites the file;\ndoes not append.",
"Clear all beans and call the destruction callback.",
"Add the elements that all values objects require from the provided values object.\n\n@param sourceValues the values object containing the required elements"
] |
public String getHostName() {
if( addr instanceof NbtAddress ) {
return ((NbtAddress)addr).getHostName();
}
return ((InetAddress)addr).getHostName();
} | [
"Return the hostname of this address such as \"MYCOMPUTER\"."
] | [
"Clean up the environment object for the given storage engine",
"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>.",
"Inserts a column name, value pair into the SQL.\n\n@param column\nName of the table column.\n@param value\nValue to substitute in. InsertBuilder does *no* interpretation\nof this. If you want a string constant inserted, you must\nprovide the single quotes and escape the internal quotes. It\nis more common to use a question mark or a token in the style\nof {@link ParameterizedPreparedStatementCreator}, e.g. \":foo\".",
"This method uses the configured git credentials and repo, to test its validity.\nIn addition, in case the user requested creation of a new tag, it checks that\nanother tag with the same name doesn't exist",
"Configures a worker pool for the converter.\n\n@param corePoolSize The core pool size of the worker pool.\n@param maximumPoolSize The maximum pool size of the worker pool.\n@param keepAliveTime The keep alive time of the worker pool.\n@param unit The time unit of the specified keep alive time.\n@return This builder instance.",
"Return the containing group if it contains exactly one element.\n\n@since 2.14",
"Toggle between single events and series.\n@param isSeries flag, indicating if we want a series of events.",
"Calculate the value of a CMS option using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS option",
"Build a Dataset from some data.\n\n@param oldData This {@link Dataset} represents data for which we which to\nsome features, specifically those features not in the {@link edu.stanford.nlp.util.Index}\ngoodFeatures.\n@param goodFeatures An {@link edu.stanford.nlp.util.Index} of features we wish to retain.\n@return A new {@link Dataset} wheres each datapoint contains only features\nwhich were in goodFeatures."
] |
private void processDeferredRelationship(DeferredRelationship dr) throws MPXJException
{
String data = dr.getData();
Task task = dr.getTask();
int length = data.length();
if (length != 0)
{
int start = 0;
int end = 0;
while (end != length)
{
end = data.indexOf(m_delimiter, start);
if (end == -1)
{
end = length;
}
populateRelation(dr.getField(), task, data.substring(start, end).trim());
start = end + 1;
}
}
} | [
"This method processes a single deferred relationship list.\n\n@param dr deferred relationship list data\n@throws MPXJException"
] | [
"Generate a PageMetadata object for the page represented by the specified pagination token.\n\n@param paginationToken opaque pagination token\n@param initialParameters the initial view query parameters (i.e. for the page 1 request).\n@param <K> the view key type\n@param <V> the view value type\n@return PageMetadata object for the given page",
"Finds the next valid line of words in the stream and extracts them.\n\n@return List of valid words on the line. null if the end of the file has been reached.\n@throws java.io.IOException",
"Returns the instance.\n@return InterceptorFactory",
"This method retrieves the data at the given offset and returns\nit as a String, assuming the underlying data is composed of\nsingle byte characters.\n\n@param offset offset of required data\n@return string containing required data",
"Given the key, figures out which partition on the local node hosts the key.\n\n@param key\n@return",
"Scans the given token global token stream for a list of sub-token\nstreams representing those portions of the global stream that\nmay contain date time information\n\n@param stream\n@return",
"Returns a string representation of map of chunk id to number of chunks\n\n@return String of map of chunk id to number of chunks",
"Use this API to fetch all the nsfeature resources that are configured on netscaler.",
"Log a warning message with a throwable."
] |
@RequestMapping(value = "/api/profile", method = RequestMethod.GET)
public
@ResponseBody
HashMap<String, Object> getList(Model model) throws Exception {
logger.info("Using a GET request to list profiles");
return Utils.getJQGridJSON(profileService.findAllProfiles(), "profiles");
} | [
"Obtain collection of profiles\n\n@param model\n@return\n@throws Exception"
] | [
"The transform method for this DataTransformer\n@param cr a reference to DataPipe from which to read the current map",
"Generate a results file for each test in each suite.\n@param outputDirectory The target directory for the generated file(s).",
"Get all backup data\n\n@param model\n@return\n@throws Exception",
"Create a structured Record instance from the flat text data.\nNull is returned if errors are encountered during parse.\n\n@param text flat text data\n@return Record instance",
"Append the path to the StringBuilder.\n\n@param result the string builder to add the path to.",
"Legacy conversion.\n@param map\n@return Properties",
"Register child resources associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition",
"Scans given directory for files passing given filter, adds the results into given list.",
"Use this API to fetch cachepolicylabel_policybinding_binding resources of given name ."
] |
public ItemRequest<Project> removeFollowers(String project) {
String path = String.format("/projects/%s/removeFollowers", project);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | [
"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"
] | [
"remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.\n\nThe operation is performed in two steps - first all the files are moved to a backup folder, and afterwards backup folder is removed.\nIf an error occurs in the first step of the operation, all files are restored and the operation ends with status {@code false}.\nIf an error occurs in the second step, the operation ends with status {@code false}, but the files are not rolled back.\n\n@throws IOException if an error occurred",
"URLDecode a string\n@param s\n@return",
"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",
"Add a greeting to the specified guestbook.",
"Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels",
"Gets the Symmetric Kullback-Leibler distance.\nThis metric is valid only for real and positive P and Q.\n\n@param p P vector.\n@param q Q vector.\n@return The Symmetric Kullback Leibler distance between p and q.",
"Associate an input stream with the operation. Closing the input stream\nis the responsibility of the caller.\n\n@param in the input stream. Cannot be {@code null}\n@return a builder than can be used to continue building the operation",
"Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges",
"Calculates the length of the next block of RTF data.\n\n@param text RTF data\n@param offset current offset into this data\n@return block length"
] |
public static String fancyStringF(double value, DecimalFormat format, int length, int significant) {
String formatted = fancyString(value, format, length, significant);
int n = length-formatted.length();
if( n > 0 ) {
StringBuilder builder = new StringBuilder(n);
for (int i = 0; i < n; i++) {
builder.append(' ');
}
return formatted + builder.toString();
} else {
return formatted;
}
} | [
"Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string"
] | [
"Log a warning for the given operation at the provided address for the given attributes, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attributes attributes we that have problems about",
"Calculate a cache key.\n@param sql to use\n@param columnIndexes to use\n@return cache key to use.",
"Checks the extents specifications and removes unnecessary entries.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Creates a new Box Developer Edition connection with App User token levaraging BoxConfig.\n@param userId the user ID to use for an App User.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection.",
"Sets a new image\n\n@param BufferedImage imagem",
"Returns the \"msgCount\" belief\n\n@return int - the count",
"Initialise an extension module's extensions in the extension registry\n\n@param extensionRegistry the extension registry\n@param module the name of the module containing the extensions\n@param rootRegistration The parent registration of the extensions. For a server or domain.xml extension, this will be the root resource registration. For a host.xml extension, this will be the host resource registration\n@param extensionRegistryType The type of the registry",
"Returns the log message id used by this checker. This is used to group it so that all attributes failing a type of rejction\nend up in the same error message. This default implementation uses the formatted log message with an empty attribute map as the id.\n\n@return the log message id",
"Used when setting the \"visible\" field in the response. See the \"List Conversations\" docs for details\n@param filters Filter strings to be applied to the visibility of conversations\n@return this to continue building options"
] |
public void transform(DataPipe cr) {
Map<String, String> map = cr.getDataMap();
for (String key : map.keySet()) {
String value = map.get(key);
if (value.equals("#{customplaceholder}")) {
// Generate a random number
int ran = rand.nextInt();
map.put(key, String.valueOf(ran));
} else if (value.equals("#{divideBy2}")) {
String i = map.get("var_out_V3");
String result = String.valueOf(Integer.valueOf(i) / 2);
map.put(key, result);
}
}
} | [
"Replace known tags in the current data values with actual values as appropriate\n\n@param cr a reference to DataPipe from which to read the current map"
] | [
"Acquire the exclusive lock allowing the acquisition to be interrupted.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@throws InterruptedException - if the acquiring thread is interrupted.\n@throws IllegalArgumentException if {@code permit} is null.",
"Put a spatial object in the cache and index it.\n\n@param key key for object\n@param object object itself\n@param envelope envelope for object",
"Decodes stream data based on content encoding\n@param contentEncoding\n@param bytes\n@return String representing the stream data",
"Resets the handler data to a basic state.",
"Main executable method of Crawljax CLI.\n\n@param args\nthe arguments.",
"refresh credentials if CredentialProvider set",
"Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class",
"Parser for actual conditions\n\n@param feed\n@return",
"Deletes the concrete representation of the specified object in the underlying\npersistence system. This method is intended for use in top-level api or\nby internal calls.\n\n@param obj The object to delete.\n@param ignoreReferences With this flag the automatic deletion/unlinking\nof references can be suppressed (independent of the used auto-delete setting in metadata),\nexcept {@link org.apache.ojb.broker.metadata.SuperReferenceDescriptor}\nthese kind of reference (descriptor) will always be performed. If <em>true</em>\nall \"normal\" referenced objects will be ignored, only the specified object is handled.\n@throws PersistenceBrokerException"
] |
@Override
public String replace(File file, String flickrId, boolean async) throws FlickrException {
Payload payload = new Payload(file, flickrId);
return sendReplaceRequest(async, payload);
} | [
"Replace a photo from a File.\n\n@param file\n@param flickrId\n@param async\n@return photoId or ticketId\n@throws FlickrException"
] | [
"Appends a line separator node that will only be effective if the current line contains non-whitespace text.\n\n@return the given parent node",
"Get a property as a json array or throw exception.\n\n@param key the property name",
"A convenient way of creating a map on the fly.\n\n@param <K> the key type\n@param <V> the value type\n@param entries\nMap.Entry objects to be added to the map\n@return a LinkedHashMap with the supplied entries",
"Use this API to update Interface.",
"Creates a method signature.\n\n@param method Method instance\n@return method signature",
"Put the given value to the appropriate id in the stack, using the version\nof the current list node identified by that id.\n\n@param id\n@param element element to set\n@return element that was replaced by the new element\n@throws ObsoleteVersionException when an update fails",
"Writes resource baseline data.\n\n@param xmlResource MSPDI resource\n@param mpxjResource MPXJ resource",
"Retrieve a value from the map, ensuring that a key exists in the map\nwith the specified name.\n\n@param name column name\n@return column value",
"Get a lower-scoped token restricted to a resource for the list of scopes that are passed.\n@param scopes the list of scopes to which the new token should be restricted for\n@param resource the resource for which the new token has to be obtained\n@return scopedToken which has access token and other details"
] |
public static DMatrixSparseCSC diag(double... values ) {
int N = values.length;
return diag(new DMatrixSparseCSC(N,N,N),values,0,N);
} | [
"Returns a diagonal matrix with the specified diagonal elements.\n@param values values of diagonal elements\n@return A diagonal matrix"
] | [
"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.",
"Checks if maintenance mode is enabled for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@return true if maintenance mode is enabled",
"Simply appends the given parameters and returns it to obtain a cache key\n@param sql\n@param resultSetConcurrency\n@param resultSetHoldability\n@param resultSetType\n@return cache key to use",
"Use this API to unset the properties of bridgetable resources.\nProperties that need to be unset are specified in args array.",
"get current total used capacity.\n\n@return the total used capacity",
"I pulled this out of internal store so that when doing multiple table\ninheritance, i can recurse this function.\n\n@param obj\n@param cld\n@param oid BRJ: what is it good for ???\n@param insert\n@param ignoreReferences",
"Handles subscription verification callback from Facebook.\n@param subscription The subscription name.\n@param challenge A challenge that Facebook expects to be returned.\n@param verifyToken A verification token that must match with the subscription's token given when the controller was created.\n@return The challenge if the verification token matches; blank string otherwise.",
"Record the duration of a get_all operation, along with how many values\nwere requested, how may were actually returned and the size of the values\nreturned.",
"Delete with retry.\n\n@param file\n@return <tt>true</tt> if the file was successfully deleted."
] |
@Override
public String toNormalizedString() {
String result;
if(hasNoStringCache() || (result = getStringCache().normalizedString) == null) {
getStringCache().normalizedString = result = toNormalizedString(IPv6StringCache.normalizedParams);
}
return result;
} | [
"The normalized string returned by this method is consistent with java.net.Inet6address.\nIPs are not compressed nor mixed in this representation."
] | [
"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",
"Do some magic to turn request parameters into a context object",
"Remove the S3 file that contains the domain controller data.\n\n@param directoryName the name of the directory that contains the S3 file",
"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.",
"Uncompresses the textual contents in the given map and and writes them to the files\ndenoted by the keys of the map.\n\n@param dir The base directory into which the files will be written\n@param contents The map containing the contents indexed by the filename\n@throws IOException If an error occurred",
"Use this API to unset the properties of filterhtmlinjectionparameter resource.\nProperties that need to be unset are specified in args array.",
"Dump data for all non-summary tasks to stdout.\n\n@param name file name",
"Sets the first occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception",
"Extract the outline level from a task's WBS attribute.\n\n@param task Task instance\n@return outline level"
] |
public void deleteMetadata(String templateName) {
String scope = Metadata.scopeBasedOnType(templateName);
this.deleteMetadata(templateName, scope);
} | [
"Deletes the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name."
] | [
"Given a string which is either the name of a predefined tab configuration or a configuration string, returns\nthe corresponding tab configuration.\n\n@param configStr a configuration string or predefined configuration name\n\n@return the gallery tab configuration",
"Removes a value from the list box. Nothing is done if the value isn't on\nthe list box.\n\n@param value the value to be removed from the list\n@param reload perform a 'material select' reload to update the DOM.",
"Normalizes the matrix such that the Frobenius norm is equal to one.\n\n@param A The matrix that is to be normalized.",
"Consumes the version field from the given input and raises an exception if the record is in a newer version,\nwritten by a newer version of Hibernate OGM.\n\n@param input the input to read from\n@param supportedVersion the type version supported by this version of OGM\n@param externalizedType the type to be unmarshalled\n\n@throws IOException if an error occurs while reading the input",
"Joins a collection in a string using a delimiter\n@param col Collection\n@param delim Delimiter\n@return String",
"Adds a foreignkey to this table.\n\n@param relationName The name of the relation represented by the foreignkey\n@param remoteTable The referenced table\n@param localColumns The local columns\n@param remoteColumns The remote columns",
"Find the next match of the pattern on the tree\n\n@return whether there is a match somewhere in the tree",
"Notifies that a content item is inserted.\n\n@param position the position of the content item.",
"creates a bounds object with both point parsed from the json and set it\nto the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException"
] |
public static AdminClient getAdminClient(String url) {
ClientConfig config = new ClientConfig().setBootstrapUrls(url)
.setConnectionTimeout(5, TimeUnit.SECONDS);
AdminClientConfig adminConfig = new AdminClientConfig().setAdminSocketTimeoutSec(5);
return new AdminClient(adminConfig, config);
} | [
"Utility function that constructs AdminClient.\n\n@param url URL pointing to the bootstrap node\n@return Newly constructed AdminClient"
] | [
"Examines the list of variables for any unknown variables and throws an exception if one is found",
"Internal method used to locate an remove an item from a list Relations.\n\n@param relationList list of Relation instances\n@param targetTask target relationship task\n@param type target relationship type\n@param lag target relationship lag\n@return true if a relationship was removed",
"Get the last date to keep logs from, by a given current date.\n@param currentDate the date of today\n@return the last date to keep log files from.",
"Gets currently visible user.\n\n@return List of user",
"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",
"Reads baseline values for the current resource.\n\n@param xmlResource MSPDI resource instance\n@param mpxjResource MPXJ resource instance",
"Removes a value from the list.\n\n@param list the list\n@param value value to remove",
"Returns the value of this product under the given model.\n\n@param evaluationTime Evaluation time.\n@param model The model.\n@return Value of this product und the given model.",
"Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance"
] |
private void readTable(InputStream is, SynchroTable table) throws IOException
{
int skip = table.getOffset() - m_offset;
if (skip != 0)
{
StreamHelper.skip(is, skip);
m_offset += skip;
}
String tableName = DatatypeConverter.getString(is);
int tableNameLength = 2 + tableName.length();
m_offset += tableNameLength;
int dataLength;
if (table.getLength() == -1)
{
dataLength = is.available();
}
else
{
dataLength = table.getLength() - tableNameLength;
}
SynchroLogger.log("READ", tableName);
byte[] compressedTableData = new byte[dataLength];
is.read(compressedTableData);
m_offset += dataLength;
Inflater inflater = new Inflater();
inflater.setInput(compressedTableData);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(compressedTableData.length);
byte[] buffer = new byte[1024];
while (!inflater.finished())
{
int count;
try
{
count = inflater.inflate(buffer);
}
catch (DataFormatException ex)
{
throw new IOException(ex);
}
outputStream.write(buffer, 0, count);
}
outputStream.close();
byte[] uncompressedTableData = outputStream.toByteArray();
SynchroLogger.log(uncompressedTableData);
m_tableData.put(table.getName(), uncompressedTableData);
} | [
"Read data for a single table and store it.\n\n@param is input stream\n@param table table header"
] | [
"Add profile to database, return collection of profile data. Called when 'enter' is hit in the UI\ninstead of 'submit' button\n\n@param model\n@param name\n@return\n@throws Exception",
"Add exceptions to the calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param gpCalendar GanttProject calendar",
"Increases the internal array's length by the specified amount. Previous values are preserved.\nThe length value is not modified since this does not change the 'meaning' of the array, just\nincreases the amount of data which can be stored in it.\n\nthis.data = new data_type[ data.length + amount ]\n\n\n@param amount Number of elements added to the internal array's length",
"Returns a list of files in given addon passing given filter.",
"This method returns an array containing all of the unique identifiers\nfor which data has been stored in the Var2Data block.\n\n@return array of unique identifiers",
"Function to clear all the metadata related to the given store\ndefinitions. This is needed when a put on 'stores.xml' is called, thus\nreplacing the existing state.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will handle concurrency related issues.\n\n@param storeNamesToDelete",
"Add an object into cache by key. The key will be used in conjunction with session id if\nthere is a session instance\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached",
"File URLs whose protocol are in these list will be processed as jars\ncontaining classes\n\n@param fileProtocols\nComma separated list of file protocols that will be considered\nas jar files and scanned",
"append human message to JsonRtn class\n\n@param jsonRtn\n@return"
] |
public DefaultStreamingEndpoint languages(List<String> languages) {
addPostParameter(Constants.LANGUAGE_PARAM, Joiner.on(',').join(languages));
return this;
} | [
"Filter for public tweets on these languages.\n\n@param languages\nValid BCP 47 (http://tools.ietf.org/html/bcp47) language identifiers,\nand may represent any of the languages listed on Twitter's advanced search page\n(https://twitter.com/search-advanced), or \"und\" if no language could be detected.\nThese strings should NOT be url-encoded.\n@return this"
] | [
"adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported",
"Calculate the summed conditional likelihood of this data by summing\nconditional estimates.",
"Checks the preconditions for creating a new StrRegExReplace processor.\n\n@param regex\nthe supplied regular expression\n@param replacement\nthe supplied replacement text\n@throws IllegalArgumentException\nif regex is empty\n@throws NullPointerException\nif regex or replacement is null",
"Invalidating just the GVRView associated with the GVRViewSceneObject\nincorrectly set the clip rectangle to just that view. To fix this,\nwe have to create a full screen android View and invalidate this\nto restore the clip rectangle.\n@return full screen View object",
"Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print",
"Use this API to fetch all the autoscaleprofile resources that are configured on netscaler.",
"This method writes resource data to an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Build a stack trace for this path. This can be used in generating more meaningful exceptions\nwhile using Crawljax in conjunction with JUnit for example.\n\n@return a array of StackTraceElements denoting the steps taken by this path. The first\nelement [0] denotes the last {@link Eventable} on this path while the last item\ndenotes the first {@link Eventable} executed.",
"Returns the active logged in user."
] |
public static boolean hasAnyAnnotation(AnnotatedNode node, String... names) {
for (String name : names) {
if (hasAnnotation(node, name)) {
return true;
}
}
return false;
} | [
"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"
] | [
"This method calculates the total amount of working time in a single\nday, which intersects with the supplied time range.\n\n@param hours collection of working hours in a day\n@param startDate time range start\n@param endDate time range end\n@return length of time in milliseconds",
"used for encoding queries or form data",
"Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name",
"View that redirects the top level window to the URL defined in postDeclineUrl property after user declines to authorize application.\nMay be overridden for custom views, particularly in the case where the post-decline view should be rendered in-canvas.\n@return a view to display after a user declines authoriation. Defaults as a redirect to postDeclineUrl",
"Renders the document to the specified output stream.",
"Execute pull docker image on agent\n\n@param launcher\n@param imageTag\n@param username\n@param password\n@param host\n@return\n@throws IOException\n@throws InterruptedException",
"Optional operations to do before the multiple-threads start indexing\n\n@param backend",
"Starts given docker machine.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n@param machineName\nto be started.",
"Adds an alias to the currently configured site.\n\n@param alias the URL of the alias server\n@param redirect <code>true</code> to always redirect to main URL\n@param offset the optional time offset for this alias"
] |
private void cascadeMarkedForDeletion()
{
List alreadyPrepared = new ArrayList();
for(int i = 0; i < markedForDeletionList.size(); i++)
{
ObjectEnvelope mod = (ObjectEnvelope) markedForDeletionList.get(i);
// if the object wasn't associated with another object, start cascade delete
if(!isNewAssociatedObject(mod.getIdentity()))
{
cascadeDeleteFor(mod, alreadyPrepared);
alreadyPrepared.clear();
}
}
markedForDeletionList.clear();
} | [
"Starts recursive delete on all delete objects object graph"
] | [
"Get the GroupDiscussInterface.\n\n@return The GroupDiscussInterface",
"Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n@throws Exception",
"Compute Cholesky decomposition of A\n\n@param A symmetric, positive definite matrix (only upper half is used)\n@return upper triangular matrix U such that A = U' * U",
"Parse a macro defintion.\n\n\"macro NAME( var0 , var1 ) = 5+var0+var1'",
"Execute blocking for a prepared result.\n\n@param operation the operation to execute\n@param client the protocol client\n@return the prepared operation\n@throws IOException\n@throws InterruptedException",
"Set the TableAlias for aPath\n@param aPath\n@param hintClasses\n@param TableAlias",
"calls _initMH on the method handler and then stores the result in the\nmethodHandler field as then new methodHandler",
"Removes an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return this metadata object.",
"Scales the weights of this crfclassifier by the specified weight\n\n@param scale"
] |
public static String expandLine(CharSequence self, int tabStop) {
String s = self.toString();
int index;
while ((index = s.indexOf('\t')) != -1) {
StringBuilder builder = new StringBuilder(s);
int count = tabStop - index % tabStop;
builder.deleteCharAt(index);
for (int i = 0; i < count; i++) builder.insert(index, " ");
s = builder.toString();
}
return s;
} | [
"Expands all tabs into spaces. Assumes the CharSequence represents a single line of text.\n\n@param self A line to expand\n@param tabStop The number of spaces a tab represents\n@return The expanded toString() of this CharSequence\n@see #expandLine(String, int)\n@since 1.8.2"
] | [
"Retrieve a string value.\n\n@param data byte array\n@param offset offset into byte array\n@return string value",
"Plots the rotated trajectory, spline and support points.",
"If the DefaultActionInvocation has been executed before and the Result is\nan instance of ActionChainResult, this method will walk down the chain of\nActionChainResults until it finds a non-chain result, which will be\nreturned. If the DefaultActionInvocation's result has not been executed\nbefore, the Result instance will be created and populated with the result\nparams.\n\n@return a Result instance\n@throws Exception",
"Use this API to fetch auditnslogpolicy_systemglobal_binding resources of given name .",
"Start speech recognizer.\n\n@param speechListener",
"Remove the report directory.",
"Use this API to fetch all the inat resources that are configured on netscaler.",
"Formats a logging event to a writer.\n\n@param event\nlogging event to be formatted.",
"set ViewPager scroller to change animation duration when sliding"
] |
public boolean matches(PathElement pe) {
return pe.key.equals(key) && (isWildcard() || pe.value.equals(value));
} | [
"Determine whether the given element matches this element.\nAn element matches this element when keys are equal, values are equal\nor this element value is a wildcard.\n@param pe the element to check\n@return {@code true} if the element matches"
] | [
"Load a cubemap texture asynchronously.\n\nThis is the implementation of\n{@link GVRAssetLoader#loadCubemapTexture(GVRAndroidResource.TextureCallback, GVRAndroidResource, int)}\n- it will usually be more convenient (and more efficient) to call that\ndirectly.\n\n@param context\nThe GVRF context\n@param textureCache\nTexture cache - may be {@code null}\n@param callback\nAsynchronous notifications\n@param resource\nBasically, a stream containing a compressed texture. Taking a\n{@link GVRAndroidResource} parameter eliminates six overloads.\n@param priority\nThis request's priority. Please see the notes on asynchronous\npriorities in the <a href=\"package-summary.html#async\">package\ndescription</a>.\n@return A {@link Future} that you can pass to methods like\n{@link GVRShaderData#setMainTexture(Future)}",
"Generates a full list of all parents and their children, in order.\n\n@param parentList A list of the parents from\nthe {@link ExpandableRecyclerAdapter}\n@return A list of all parents and their children, expanded",
"Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException",
"Sets the baseline duration text value.\n\n@param baselineNumber baseline number\n@param value baseline duration text value",
"Counts a single page of the specified gender. If this is the first page\nof that gender on this site, a suitable key is added to the list of the\nsite's genders.\n\n@param gender\nthe gender to count\n@param siteRecord\nthe site record to count it for",
"Un-serialize a Json into Module\n@param module String\n@return Module\n@throws IOException",
"Insert entity object. The caller must first initialize the primary key\nfield.",
"Given a resource field number, this method returns the resource field name.\n\n@param key resource field number\n@return resource field name",
"Deletes a path from the filesystem\n\nIf the path is a directory its contents\nwill be recursively deleted before it itself\nis deleted.\n\nNote that removal of a directory is not an atomic-operation\nand so if an error occurs during removal, some of the directories\ndescendants may have already been removed\n\n@throws IOException if an error occurs whilst removing a file or directory"
] |
private void checkRateLimit(String quotaKey, Tracked trackedOp) {
String quotaValue = null;
try {
if(!metadataStore.getQuotaEnforcingEnabledUnlocked()) {
return;
}
quotaValue = quotaStore.cacheGet(quotaKey);
// Store may not have any quotas
if(quotaValue == null) {
return;
}
// But, if it does
float currentRate = getThroughput(trackedOp);
float allowedRate = Float.parseFloat(quotaValue);
// TODO the histogram should be reasonably accurate to do all
// these things.. (ghost qps and all)
// Report the current quota usage level
quotaStats.reportQuotaUsed(trackedOp, Utils.safeGetPercentage(currentRate, allowedRate));
// check if we have exceeded rate.
if(currentRate > allowedRate) {
quotaStats.reportRateLimitedOp(trackedOp);
throw new QuotaExceededException("Exceeded rate limit for " + quotaKey
+ ". Maximum allowed : " + allowedRate
+ " Current: " + currentRate);
}
} catch(NumberFormatException nfe) {
// move on, if we cannot parse quota value properly
logger.debug("Invalid formatting of quota value for key " + quotaKey + " : "
+ quotaValue);
}
} | [
"Ensure the current throughput levels for the tracked operation does not\nexceed set quota limits. Throws an exception if exceeded quota.\n\n@param quotaKey\n@param trackedOp"
] | [
"Edit the text of a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to edit.\n@param commentText\nUpdate the comment to this text.\n@throws FlickrException",
"Use this API to unlink sslcertkey.",
"Internal method which performs the authenticated request by preparing the auth request with\nthe provided auth info and request.",
"Recovers the state of synchronization for a namespace in case a system failure happened.\nThe goal is to revert the namespace to a known, good state. This method itself is resilient\nto failures, since it doesn't delete any documents from the undo collection until the\ncollection is in the desired state with respect to those documents.",
"Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value",
"This method is used to retrieve the calendar associated\nwith a task. If no calendar is associated with a task, this method\nreturns null.\n\n@param task MSPDI task\n@return calendar instance",
"commit all envelopes against the current broker",
"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",
"Returns all migrations starting from and excluding the given version. Usually you want to provide the version of\nthe database here to get all migrations that need to be executed. In case there is no script with a newer\nversion than the one given, an empty list is returned.\n\n@param version the version that is currently in the database\n@return all versions since the given version or an empty list if no newer script is available. Never null.\nDoes not include the given version."
] |
public static sslcipher[] get(nitro_service service, String ciphergroupname[]) throws Exception{
if (ciphergroupname !=null && ciphergroupname.length>0) {
sslcipher response[] = new sslcipher[ciphergroupname.length];
sslcipher obj[] = new sslcipher[ciphergroupname.length];
for (int i=0;i<ciphergroupname.length;i++) {
obj[i] = new sslcipher();
obj[i].set_ciphergroupname(ciphergroupname[i]);
response[i] = (sslcipher) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"Use this API to fetch sslcipher resources of given names ."
] | [
"Use this API to fetch sslcertkey resource of given name .",
"Add a rollback loader for a give patch.\n\n@param patchId the patch id.\n@param target the patchable target\n@throws XMLStreamException\n@throws IOException",
"returns a sorted array of fields",
"Build a String representation of given arguments.",
"Merges individual days together into time spans where the\nsame work is undertaken each day.\n\n@param list assignment data",
"Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the highest to the lowest score.\nDescending lexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements",
"This method processes any extended attributes associated with a\nresource assignment.\n\n@param xml MSPDI resource assignment instance\n@param mpx MPX task instance",
"Retrieves the task mode.\n\n@return task mode",
"Create a classname from a given path\n\n@param path\n@return"
] |
public double getDurationMs() {
double durationMs = 0;
for (Duration duration : durations) {
if (duration.taskFinished()) {
durationMs += duration.getDurationMS();
}
}
return durationMs;
} | [
"Returns the duration of the measured tasks in ms"
] | [
"Binds a script bundle to scene graph rooted at a scene object.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param rootSceneObject\nThe root of the scene object tree to which the scripts are bound.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if a script processing error occurs.",
"Copy the contents of this buffer to the destination LBuffer\n@param srcOffset\n@param dest\n@param destOffset\n@param size",
"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",
"Create the exception assignment map.\n\n@param rows calendar rows\n@return exception assignment map",
"returns the bytesize of the give bitmap",
"Add a simple property to the map file.\n\n@param writer xml stream writer\n@param name property name\n@param propertyType property type\n@param readMethod read method name\n@param writeMethod write method name\n@throws XMLStreamException",
"Determine the X coordinate within the component at which the specified beat begins.\n\n@param beat the beat number whose position is desired\n@return the horizontal position within the component coordinate space where that beat begins\n@throws IllegalArgumentException if the beat number exceeds the number of beats in the track.",
"Start the rendering of the scalebar.",
"Adds all pairs from 'fromMap' to 'toMap' excluding once that matching the pattern"
] |
public static base_response add(nitro_service client, locationfile resource) throws Exception {
locationfile addresource = new locationfile();
addresource.Locationfile = resource.Locationfile;
addresource.format = resource.format;
return addresource.add_resource(client);
} | [
"Use this API to add locationfile."
] | [
"Get the bytes which represent the payload of this field, without the leading type tag and length header, as\na newly-allocated byte array.\n\n@return a new byte array containing a copy of the bytes this field contains",
"Read the header from the Phoenix file.\n\n@param stream input stream\n@return raw header data",
"Use this API to update autoscaleaction resources.",
"This method retrieves a String 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 string containing required data",
"Converts a sequence of unicode code points to a sequence of Java characters.\n\n@return the number of chars written to the destination buffer",
"Detect new objects.",
"Push an event which describes a purchase made.\n\n@param eventName Has to be specified as \"Charged\". Anything other than this\nwill result in an {@link InvalidEventNameException} being thrown.\n@param chargeDetails A {@link HashMap}, with keys as strings, and values as {@link String},\n{@link Integer}, {@link Long}, {@link Boolean}, {@link Float}, {@link Double},\n{@link java.util.Date}, or {@link Character}\n@param items An {@link ArrayList} which contains up to 15 {@link HashMap} objects,\nwhere each HashMap object describes a particular item purchased\n@throws InvalidEventNameException Thrown if the event name is not \"Charged\"\n@deprecated use {@link CleverTapAPI#pushChargedEvent(HashMap chargeDetails, ArrayList items)}",
"Iterates through the given CharSequence line by line, splitting each line using\nthe given regex delimiter. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see #splitEachLine(CharSequence, java.util.regex.Pattern, groovy.lang.Closure)\n@since 1.8.2",
"xml -> object\n\n@param message\n@param childClass\n@return"
] |
protected void destroy() {
ContextLogger.LOG.contextCleared(this);
final BeanStore beanStore = getBeanStore();
if (beanStore == null) {
throw ContextLogger.LOG.noBeanStoreAvailable(this);
}
for (BeanIdentifier id : beanStore) {
destroyContextualInstance(beanStore.get(id));
}
beanStore.clear();
} | [
"Destroys the context"
] | [
"Create an info object from an authscope object.\n\n@param authscope the authscope",
"Process StepStartedEvent. New step will be created and added to\nstepStorage.\n\n@param event to process",
"Converts the string representation of the days bit field into an integer.\n\n@param days string bit field\n@return integer bit field",
"Use this API to fetch bridgegroup_vlan_binding resources of given name .",
"Sets the name of the attribute group with which this attribute is associated.\n\n@param attributeGroup the attribute group name. Cannot be an empty string but can be {@code null}\nif the attribute is not associated with a group.\n@return a builder that can be used to continue building the attribute definition",
"Complete both operations and commands.",
"Calculates the beginLine of a violation report.\n\n@param pmdViolation The violation for which the beginLine should be calculated.\n@return The beginLine is assumed to be the line with the smallest number. However, if the smallest number is\nout-of-range (non-positive), it takes the other number.",
"Get a collection of methods declared on this object by method name and parameter count.\n\n@param name the name of the method\n@param paramCount the number of parameters\n@return the (possibly empty) collection of methods with the given name and parameter count",
"Loads the schemas associated to this catalog."
] |
public static boolean isConstructorCall(Expression expression, List<String> classNames) {
return expression instanceof ConstructorCallExpression && classNames.contains(expression.getType().getName());
} | [
"Return true if the expression is a constructor call on any of the named classes, with any number of parameters.\n@param expression - the expression\n@param classNames - the possible List of class names\n@return as described"
] | [
"Returns the AirMapView implementation as requested by the mapType argument. Use this method if\nyou need to request a specific AirMapView implementation that is not necessarily the preferred\ntype. For example, you can use it to explicit request a web-based map implementation.\n\n@param mapType Map type for the requested AirMapView implementation.\n@return An {@link AirMapViewBuilder} for the requested {@link AirMapViewTypes} mapType.",
"Create a new instance of a single input function from an operator character\n@param op Which operation\n@param input Input variable\n@return Resulting operation",
"Retrieve a calendar exception which applies to this date.\n\n@param date target date\n@return calendar exception, or null if none match this date",
"Gets a list of registered docker images from the images cache, if it has been\nregistered to the cache for a specific build-info ID and if a docker manifest has been captured for it\nby the build-info proxy.\nAdditionally, the methods also removes the returned images from the cache.\n@param buildInfoId\n@return",
"Add a file to notify the script that asked to stop the print that it is now done processing the remain\njobs.",
"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}.",
"Retrieve the field location for a specific field.\n\n@param type field type\n@return field location",
"Use this API to fetch authenticationradiuspolicy_authenticationvserver_binding resources of given name .",
"Executes a given SPARQL query and returns a stream with the result in\nJSON format.\n\n@param query\n@return\n@throws IOException"
] |
public String getUniqueFilename(String baseFileName, String extension, boolean cleanBaseFileName, String... ancestorFolders)
{
if (cleanBaseFileName)
{
baseFileName = PathUtil.cleanFileName(baseFileName);
}
if (ancestorFolders != null)
{
Path pathToFile = Paths.get("", Stream.of(ancestorFolders).map(ancestor -> PathUtil.cleanFileName(ancestor)).toArray(String[]::new)).resolve(baseFileName);
baseFileName = pathToFile.toString();
}
String filename = baseFileName + "." + extension;
// FIXME this looks nasty
while (usedFilenames.contains(filename))
{
filename = baseFileName + "." + index.getAndIncrement() + "." + extension;
}
usedFilenames.add(filename);
return filename;
} | [
"Returns a unique file name\n@param baseFileName the requested base name for the file\n@param extension the requested extension for the file\n@param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (i.e. 'jboss-web' should not be cleaned to avoid '-' to become '_')\n@param ancestorFolders specify the ancestor folders for the file (if there's no ancestor folder, just pass 'null' value)\n@return a String representing the unique file generated"
] | [
"Generate query parameters for a forward page with the specified start key.\n\n@param initialQueryParameters page 1 query parameters\n@param startkey the startkey for the forward page\n@param startkey_docid the doc id for the startkey (in case of duplicate keys)\n@param <K> the view key type\n@param <V> the view value type\n@return the query parameters for the forward page",
"Harvest a single value that was returned by a callable statement.\n\n@param obj the object that will receive the value that is harvested.\n@param callable the CallableStatement that contains the value to harvest\n@param fmd the FieldDescriptor that identifies the field where the\nharvested value will be stord.\n@param index the parameter index.\n\n@throws PersistenceBrokerSQLException if a problem occurs.",
"Process the start of this element.\n\n@param attributes The attribute list for this element\n@param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace\naware or the element has no namespace\n@param name the local name if the parser is namespace aware, or just the element name otherwise\n@throws Exception if something goes wrong",
"Return true if the values of the two vectors are equal when cast as ints.\n\n@param a first vector to compare\n@param b second vector to compare\n@return true if the values of the two vectors are equal when cast as ints",
"Add a new profile with the profileName given.\n\n@param profileName name of new profile\n@return newly created profile\n@throws Exception exception",
"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.",
"Clear tmpData in subtree rooted in this node.",
"Command-line version of the classifier. See the class\ncomments for examples of use, and SeqClassifierFlags\nfor more information on supported flags.",
"This method determines whether the cost rate table should be written.\nA default cost rate table should not be written to the file.\n\n@param entry cost rate table entry\n@param from from date\n@return boolean flag"
] |
public void generateMapFile(File jarFile, String mapFileName, boolean mapClassMethods) throws XMLStreamException, IOException, ClassNotFoundException, IntrospectionException
{
m_responseList = new LinkedList<String>();
writeMapFile(mapFileName, jarFile, mapClassMethods);
} | [
"Generate a map file from a jar file.\n\n@param jarFile jar file\n@param mapFileName map file name\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws XMLStreamException\n@throws IOException\n@throws ClassNotFoundException\n@throws IntrospectionException"
] | [
"Resizes the array that represents this bit vector.\n\n@param newArraySize\nnew array size",
"region Override Methods",
"read messages beginning from offset\n\n@param offset next message offset\n@param length the max package size\n@return a MessageSet object with length data or empty\n@see MessageSet#Empty\n@throws IOException any exception",
"Validate arguments and state.",
"Checks the query-customizer setting of the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Utility function that fetches user defined store definitions\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch store definitions from\n@return The map container that maps store names to store definitions",
"Sign off a group of connections from the registry by key\n\n@param key\nthe key\n@param connections\na collection of websocket connections",
"Retrieve the next available field.\n\n@return FieldType instance for the next available field",
"Returns all categories that are direct children of the current main category.\n\n@return all categories that are direct children of the current main category."
] |
public void fireResourceReadEvent(Resource resource)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.resourceRead(resource);
}
}
} | [
"This method is called to alert project listeners to the fact that\na resource has been read from a project file.\n\n@param resource resource instance"
] | [
"Set the name of the schema containing the schedule tables.\n\n@param schema schema name.",
"Use this API to fetch snmpalarm resources of given names .",
"Returns a copy of this year-quarter with the new year and quarter, checking\nto see if a new object is in fact required.\n\n@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR\n@param newQuarter the quarter-of-year to represent, validated not null\n@return the year-quarter, not null",
"Removes a tag from the resource.\n@param key the key of the tag to remove\n@return the next stage of the definition/update",
"Returns the latest change events for a given namespace.\n\n@param namespace the namespace to get events for.\n@return the latest change events for a given namespace.",
"Returns the screen height in pixels\n\n@param context is the context to get the resources\n@return the screen height in pixels",
"Creates an operation to read a resource.\n\n@param address the address to create the read for\n@param recursive whether to search recursively or not\n\n@return the operation",
"Returns a collection view of this map's values.\n\n@return a collection view of this map's values.",
"Convert an Integer value into a String.\n\n@param value Integer value\n@return String value"
] |
public List<Dependency> getModuleDependencies(final String moduleName, final String moduleVersion, final Boolean fullRecursive, final Boolean corporate, final Boolean thirdParty) throws GrapesCommunicationException {
final Client client = getClient();
final WebResource resource = client.resource(serverURL).path(RequestUtils.getArtifactDependencies(moduleName, moduleVersion));
final ClientResponse response = resource.queryParam(ServerAPI.SCOPE_COMPILE_PARAM, "true")
.queryParam(ServerAPI.SCOPE_PROVIDED_PARAM, "true")
.queryParam(ServerAPI.SCOPE_RUNTIME_PARAM, "true")
.queryParam(ServerAPI.SCOPE_TEST_PARAM, "true")
.queryParam(ServerAPI.RECURSIVE_PARAM, fullRecursive.toString())
.queryParam(ServerAPI.SHOW_CORPORATE_PARAM, corporate.toString())
.queryParam(ServerAPI.SHOW_THIRPARTY_PARAM, thirdParty.toString())
.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);
client.destroy();
if(ClientResponse.Status.OK.getStatusCode() != response.getStatus()){
final String message = String.format(FAILED_TO_GET_MODULE, "get module ancestors ", moduleName, moduleVersion);
if(LOG.isErrorEnabled()) {
LOG.error(String.format(HTTP_STATUS_TEMPLATE_MSG, message, response.getStatus()));
}
throw new GrapesCommunicationException(message, response.getStatus());
}
return response.getEntity(new GenericType<List<Dependency>>(){});
} | [
"Return the list of module dependencies\n\n@param moduleName\n@param moduleVersion\n@param fullRecursive\n@param corporate\n@param thirdParty\n@return List<Dependency>\n@throws GrapesCommunicationException"
] | [
"Recursively update parent task dates.\n\n@param parentTask parent task",
"Process dump file data from the given input stream. The method can\nrecover from an errors that occurred while processing an input stream,\nwhich is assumed to contain the JSON serialization of a list of JSON\nentities, with each entity serialization in one line. To recover from the\nprevious error, the first line is skipped.\n\n@param inputStream\nthe stream to read from\n@throws IOException\nif there is a problem reading the stream",
"Merge a subtree.\n\n@param targetRegistry the target registry\n@param subTree the subtree",
"Return the trimmed source line corresponding to the specified AST node\n\n@param node - the Groovy AST node",
"Method called to indicate persisting the properties file is now complete.\n\n@throws IOException",
"Use this API to fetch lbmonitor_binding resource of given name .",
"Use this API to fetch all the appfwhtmlerrorpage resources that are configured on netscaler.",
"Set the menu view from a layout resource.\n\n@param layoutResId Resource ID to be inflated.",
"Returns the primary message codewords for mode 3.\n\n@param postcode the postal code\n@param country the country code\n@param service the service code\n@return the primary message, as codewords"
] |
public synchronized void createImportationDeclaration(String deviceId, String deviceType, String deviceSubType) {
Map<String, Object> metadata = new HashMap<String, Object>();
metadata.put(Constants.DEVICE_ID, deviceId);
metadata.put(Constants.DEVICE_TYPE, deviceType);
metadata.put(Constants.DEVICE_TYPE_SUB, deviceSubType);
metadata.put("scope", "generic");
ImportDeclaration declaration = ImportDeclarationBuilder.fromMetadata(metadata).build();
importDeclarations.put(deviceId, declaration);
registerImportDeclaration(declaration);
} | [
"Create an import declaration and delegates its registration for an upper class."
] | [
"This handler will be triggered when there's no search result",
"This method processes a single deferred relationship list.\n\n@param dr deferred relationship list data\n@throws MPXJException",
"Process TestCaseStartedEvent. New testCase will be created and added\nto suite as child.\n\n@param event to process",
"Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1",
"Lookup the group for the specified URL.\n\n@param url\nThe url\n@return The group\n@throws FlickrException",
"Use this API to fetch authenticationnegotiatepolicy_binding resource of given name .",
"Returns next and previous favorites for a photo in a user's favorites\n\n@param photoId\nThe photo id\n@param userId\nThe user's ID\n@see <a href=\"http://www.flickr.com/services/api/flickr.favorites.getContext.html\">flickr.favorites.getContext</a>",
"Only sets and gets that are by row and column are used.",
"Will prompt a user the \"Add to Homescreen\" feature\n\n@param callback A callback function after the method has been executed."
] |
public static BoxLegalHoldAssignment.Info create(BoxAPIConnection api,
String policyID, String resourceType, String resourceID) {
URL url = ASSIGNMENTS_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, "POST");
JsonObject requestJSON = new JsonObject()
.add("policy_id", policyID)
.add("assign_to", new JsonObject()
.add("type", resourceType)
.add("id", resourceID));
request.setBody(requestJSON.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
BoxLegalHoldAssignment createdAssignment = new BoxLegalHoldAssignment(api, responseJSON.get("id").asString());
return createdAssignment.new Info(responseJSON);
} | [
"Creates new legal hold policy assignment.\n@param api the API connection to be used by the resource.\n@param policyID ID of policy to create assignment for.\n@param resourceType type of target resource. Can be 'file_version', 'file', 'folder', or 'user'.\n@param resourceID ID of the target resource.\n@return info about created legal hold policy assignment."
] | [
"Used to populate Map with given annotations\n\n@param annotations initial value for annotations",
"Use this API to unset the properties of vridparam resource.\nProperties that need to be unset are specified in args array.",
"Waits the given amount of time in seconds for a managed domain to start. A domain is considered started when each\nof the servers in the domain are started unless the server is disabled.\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",
"Replies the elements of the given map except the pair with the given key.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param key the key to remove.\n@return the map with the content of the map except the key.\n@since 2.15",
"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",
"Find the logging profile attached to any resource.\n\n@param resourceRoot the root resource\n\n@return the logging profile name or {@code null} if one was not found",
"All the attributes needed either by the processors for each datasource row or by the jasper template.\n\n@param attributes the attributes.",
"Joins the given parts to recover the original secret.\n\n<p><b>N.B.:</b> There is no way to determine whether or not the returned value is actually the\noriginal secret. If the parts are incorrect, or are under the threshold value used to split the\nsecret, a random value will be returned.\n\n@param parts a map of part IDs to part values\n@return the original secret\n@throws IllegalArgumentException if {@code parts} is empty or contains values of varying\nlengths",
"Sets whether an individual list value is selected.\n\n@param value the value of the item to be selected or unselected\n@param selected <code>true</code> to select the item"
] |
public void start(GVRAccessibilitySpeechListener speechListener) {
mTts.setSpeechListener(speechListener);
mTts.getSpeechRecognizer().startListening(mTts.getSpeechRecognizerIntent());
} | [
"Start speech recognizer.\n\n@param speechListener"
] | [
"Process an MPP file to make it anonymous.\n\n@param input input file name\n@param output output file name\n@throws Exception",
"once animation is setup, start the animation record the beginning and\nending time for the animation",
"Creates the button for converting an XML bundle in a property bundle.\n@return the created button.",
"Initialize the ui elements for the management part.",
"Parse the string representation of a double.\n\n@param value string representation\n@return Java representation\n@throws ParseException",
"Performs a null edit on an entity. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param currentDocument\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"Sets the current collection definition derived from the current member, and optionally some attributes.\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=\"attributes\" optional=\"true\" description=\"Attributes of the collection as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\ncollection on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe collection\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\ncollection\"\[email protected] name=\"collection-class\" optional=\"true\" description=\"The type of the collection if not a\njava.util type or an array\"\[email protected] name=\"database-foreignkey\" optional=\"true\" description=\"Whether a database foreignkey shall be created\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the collection\"\[email protected] name=\"element-class-ref\" optional=\"true\" description=\"The fully qualified name of\nthe element type\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The name of the\nforeign keys (columns when an indirection table is given)\"\[email protected] name=\"foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the foreign keys as a comma-separated list if using an indirection table\"\[email protected] name=\"indirection-table\" optional=\"true\" description=\"The name of the indirection\ntable for m:n associations\"\[email protected] name=\"indirection-table-documentation\" optional=\"true\" description=\"Documentation\non the indirection table\"\[email protected] name=\"indirection-table-primarykeys\" optional=\"true\" description=\"Whether the\nfields referencing the collection and element classes, should also be primarykeys\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the collection is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the collection\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"query-customizer\" optional=\"true\" description=\"The query customizer for this collection\"\[email protected] name=\"query-customizer-attributes\" optional=\"true\" description=\"Attributes for the query customizer\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\ncollection\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The name of the\nforeign key columns pointing to the elements if using an indirection table\"\[email protected] name=\"remote-foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the remote foreign keys as a comma-separated list if using an indirection table\"",
"Ensures that the start and end dates for ranges fit within the\nworking times for a given day.\n\n@param calendar current calendar\n@param list assignment data",
"Returns the index of the eigenvalue which has the largest magnitude.\n\n@return index of the largest magnitude eigen value."
] |
@Override
public Symmetry454Date dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"Obtains a local date in Symmetry454 calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Symmetry454 era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Symmetry454 local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code IsoEra}"
] | [
"Remove all non replica clock entries from the list of versioned values\nprovided\n\n@param vals list of versioned values to prune replicas from\n@param keyReplicas list of current replicas for the given key\n@param didPrune flag to mark if we did actually prune something\n@return pruned list",
"Delete by id.\n\n@param id the id",
"Used to parse the dividend dates. Returns null if the date cannot be\nparsed.\n\n@param date String received that represents the date\n@return Calendar object representing the parsed date",
"Initialize the pattern controllers.",
"Use this API to fetch ipset_nsip_binding resources of given name .",
"Use this API to update callhome.",
"Get the time zone for a specific exchange suffix\n\n@param suffix suffix for the exchange in YahooFinance\n@return time zone of the exchange",
"Gets all of the column names for a result meta data\n\n@param rsmd Resultset metadata\n@return Array of column names\n@throws Exception exception",
"Gets a design document using the id and revision from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}"
] |
public void generateWBS(Task parent)
{
String wbs;
if (parent == null)
{
if (NumberHelper.getInt(getUniqueID()) == 0)
{
wbs = "0";
}
else
{
wbs = Integer.toString(getParentFile().getChildTasks().size() + 1);
}
}
else
{
wbs = parent.getWBS();
//
// Apparently I added the next lines to support MPX files generated by Artemis, back in 2005
// Unfortunately I have no test data which exercises this code, and it now breaks
// otherwise valid WBS values read (in this case) from XER files. So it's commented out
// until someone complains about their 2005-era Artemis MPX files not working!
//
// int index = wbs.lastIndexOf(".0");
// if (index != -1)
// {
// wbs = wbs.substring(0, index);
// }
int childTaskCount = parent.getChildTasks().size() + 1;
if (wbs.equals("0"))
{
wbs = Integer.toString(childTaskCount);
}
else
{
wbs += ("." + childTaskCount);
}
}
setWBS(wbs);
} | [
"This method is used to automatically generate a value\nfor the WBS field of this task.\n\n@param parent Parent Task"
] | [
"When creating barcode columns\n@return",
"Read a Synchro string from an input stream.\n\n@param is input stream\n@return String instance",
"Test for convergence by seeing if the element with the largest change\nis smaller than the tolerance. In some test cases it alternated between\nthe + and - values of the eigen vector. When this happens it seems to have \"converged\"\nto a non-dominant eigen vector. At least in the case I looked at. I haven't devoted\na lot of time into this issue...",
"Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data",
"Sets the body filter for this ID\n\n@param pathId ID of path\n@param bodyFilter Body filter to set",
"Return the structured backup data\n\n@return Backup of current configuration\n@throws Exception exception",
"Return a String of length a minimum of totalChars characters by\npadding the input String str at the right end with spaces.\nIf str is already longer\nthan totalChars, it is returned unchanged.",
"Associate an input stream with the operation. Closing the input stream\nis the responsibility of the caller.\n\n@param in the input stream. Cannot be {@code null}\n@return a builder than can be used to continue building the operation",
"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"
] |
public static base_response delete(nitro_service client, String fipskeyname) throws Exception {
sslfipskey deleteresource = new sslfipskey();
deleteresource.fipskeyname = fipskeyname;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete sslfipskey of given name."
] | [
"Use this API to update bridgetable resources.",
"Retrieves state and metrics information for individual node.\n\n@param name node name\n@return node information",
"Push docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host",
"Sets the given value on an the receivers's accessible field with the given name.\n\n@param receiver the receiver, never <code>null</code>\n@param fieldName the field's name, never <code>null</code>\n@param value the value to set\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#set(Object, Object)}\n@throws IllegalArgumentException see {@link Field#set(Object, Object)}",
"Maps a field index to an AssignmentField instance.\n\n@param fields array of fields used as the basis for the mapping.\n@param index required field index\n@return AssignmnetField instance",
"Renders a given graphic into a new image, scaled to fit the new size and rotated.",
"returns an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searched objects\n@param query the query",
"Use this API to fetch sslciphersuite resource of given name .",
"Use this API to fetch all the lbvserver resources that are configured on netscaler."
] |
private void internalWriteNameValuePair(String name, String value) throws IOException
{
writeComma();
writeNewLineIndent();
writeName(name);
if (m_pretty)
{
m_writer.write(' ');
}
m_writer.write(value);
} | [
"Core write attribute implementation.\n\n@param name attribute name\n@param value attribute value"
] | [
"Rethrows platform specific OperationCanceledExceptions and unwraps OperationCanceledErrors. Does nothing for any other type of Throwable.",
"Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.",
"Join to internal threads and wait millis time per thread or until all\nthreads are finished if millis is 0.\n\n@param millis the time to wait in milliseconds for the threads to join; a timeout of 0 means to wait forever.\n@throws InterruptedException if any thread has interrupted the current thread.\nThe interrupted status of the current thread is cleared when this exception is thrown.",
"Read the given source byte array, then overwrite this buffer's contents\n\n@param src source byte array\n@param srcOffset offset in source byte array to read from\n@param destOffset offset in this buffer to read to\n@param length max number of bytes to read\n@return the number of bytes read",
"Changes the message of this comment.\n@param newMessage the new message for this comment.\n@return updated info about this comment.",
"Restores a trashed folder back to its original location.\n@param folderID the ID of the trashed folder.\n@return info about the restored folder.",
"Encodes the given URI query parameter with the given encoding.\n@param queryParam the query parameter to be encoded\n@param encoding the character encoding to encode to\n@return the encoded query parameter\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Adds mappings for each declared field in the mapped class. Any fields\nalready mapped by addColumn are skipped.",
"1.5 and on, 2.0 and on, 3.0 and on."
] |
@Override public int getItemViewType(int position) {
T content = getItem(position);
return rendererBuilder.getItemViewType(content);
} | [
"Indicate to the RecyclerView the type of Renderer used to one position using a numeric value.\n\n@param position to analyze.\n@return the id associated to the Renderer used to render the content given a position."
] | [
"Alternative implementation for the drift. For experimental purposes.\n\n@param timeIndex\n@param componentIndex\n@param realizationAtTimeIndex\n@param realizationPredictor\n@return",
"Is invoked on the leaf deletion only.\n\n@param left left page.\n@param right right page.\n@return true if the left page ought to be merged with the right one.",
"Used to parse the dividend dates. Returns null if the date cannot be\nparsed.\n\n@param date String received that represents the date\n@return Calendar object representing the parsed date",
"The keywords to include in the PDF metadata.\n\n@param keywords the keywords of the PDF.",
"Obtains a local date in Pax calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Pax era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Pax local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code PaxEra}",
"Retrieve an instance of the TaskField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return TaskField instance",
"Extracts the bindingId from a Server.\n@param server\n@return",
"Orders first by word, then by lemma, then by tag.\n\n@param wordLemmaTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)",
"domain.xml"
] |
public boolean checkContains(String uri, String[] patterns) {
for (String pattern : patterns) {
if (pattern.length() > 0) {
if (uri.contains(pattern)) {
return true;
}
}
}
return false;
} | [
"Check whether the URL contains one of the patterns.\n\n@param uri URI\n@param patterns possible patterns\n@return true when URL contains one of the patterns"
] | [
"Reads the integer representation of calendar hours for a given\nday and populates the calendar.\n\n@param calendar parent calendar\n@param day target day\n@param hours working hours",
"crates a StencilSet object and add it to the current diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Use this API to fetch the statistics of all cmppolicylabel_stats resources that are configured on netscaler.",
"The selectionStrategy given as String argument is selected as locatorSelectionStrategy.\nIf selectionStrategy is null, the defaultLocatorSelectionStrategy is used instead.\nThen the new locatorSelectionStrategy is connected to the locatorClient and the matcher.\nA new LocatorTargetSelector is created, set to the locatorSelectionStrategy and then set\nas selector in the conduitSelectorHolder.\n\n@param conduitSelectorHolder\n@param matcher\n@param selectionStrategy",
"Retrieves a prompt value.\n\n@param field field type\n@param block criteria data block\n@return prompt value",
"Account for key being fetched.\n\n@param key",
"Adds a file with the provided description.",
"checks if the triangle is not re-entrant",
"Performs the actual spell check query using Solr.\n\n@param request the spell check request\n\n@return Results of the Solr spell check of type SpellCheckResponse or null if something goes wrong."
] |
public static URL classFileUrl(Class<?> clazz) throws IOException {
ClassLoader cl = clazz.getClassLoader();
if (cl == null) {
cl = ClassLoader.getSystemClassLoader();
}
URL res = cl.getResource(clazz.getName().replace('.', '/') + ".class");
if (res == null) {
throw new IllegalArgumentException("Unable to locate class file for " + clazz);
}
return res;
} | [
"Returns the URL of the class file where the given class has been loaded from.\n\n@throws IllegalArgumentException\nif failed to determine.\n@since 2.24"
] | [
"Converts a batch indexing into the sample, to a batch indexing into the\noriginal function.\n\n@param batch The batch indexing into the sample.\n@return A new batch indexing into the original function, containing only\nthe indices from the sample.",
"A document that is paused no longer has remote updates applied to it.\nAny local updates to this document cause it to be resumed. An example of pausing a document\nis when a conflict is being resolved for that document and the handler throws an exception.\n\nThis method allows you to resume sync for a document.\n\n@param namespace namespace for the document\n@param documentId the id of the document to resume syncing\n@return true if successfully resumed, false if the document\ncould not be found or there was an error resuming",
"updates the groupname in the table given the id\n\n@param newGroupName new group name\n@param id ID of group",
"Update the default time unit for durations based on data read from the file.\n\n@param column column data",
"Code common to both XER and database readers to extract\ncurrency format data.\n\n@param row row containing currency data",
"Parse a boolean.\n\n@param value boolean\n@return Boolean value",
"Get siblings of the same type as element from parent.\n\n@param parent parent node.\n@param element element.\n@return List of sibling (from element) under parent",
"Prints a cluster xml to a file.\n\n@param outputDirName\n@param fileName\n@param cluster",
"Gets the a singleton reference to the SPIProvider returned by the SPIProviderResolver\nretrieved using the default server integration classloader.\n\n@return this class instance"
] |
@Api
public void setUrl(String url) throws LayerException {
try {
this.url = url;
Map<String, Object> params = new HashMap<String, Object>();
params.put("url", url);
DataStore store = DataStoreFactory.create(params);
setDataStore(store);
} catch (IOException ioe) {
throw new LayerException(ioe, ExceptionCode.INVALID_SHAPE_FILE_URL, url);
}
} | [
"Set the url for the shape file.\n\n@param url shape file url\n@throws LayerException file cannot be accessed\n@since 1.7.1"
] | [
"Set the parent from which this week is derived.\n\n@param parent parent week",
"Use this API to fetch a dnsglobal_binding resource .",
"Use this API to fetch csvserver_spilloverpolicy_binding resources of given name .",
"Initializes the queue that tracks the next set of nodes with no dependencies or\nwhose dependencies are resolved.",
"This method processes any extended attributes associated with a task.\n\n@param xml MSPDI task instance\n@param mpx MPX task instance",
"Use this API to fetch appfwpolicy_csvserver_binding resources of given name .",
"Extract child task data.\n\n@param task MPXJ task\n@param row Synchro task data",
"Called whenever a rebalance task completes. This means one task is done\nand some number of partition stores have been migrated.\n\n@param taskId\n@param partitionStoresMigrated Number of partition stores moved by this\ncompleted task.",
"Creates a Set out of the given keys\n\n@param <K> the key type\n@param keys\nthe keys\n@return a Set containing the given keys"
] |
@SuppressWarnings("deprecation")
@Deprecated
public final void validateAndSet(ModelNode operationObject, final ModelNode model) throws OperationFailedException {
validateOperation(operationObject);
for (AttributeDefinition ad : this.parameters) {
ad.validateAndSet(operationObject, model);
}
} | [
"validates operation against the definition and sets model for the parameters passed.\n\n@param operationObject model node of type {@link ModelType#OBJECT}, typically representing an operation request\n@param model model node in which the value should be stored\n@throws OperationFailedException if the value is not valid\n\n@deprecated Not used by the WildFly management kernel; will be removed in a future release"
] | [
"Shows the Loader component",
"Method called when the renderer is going to be created. This method has the responsibility of\ninflate the xml layout using the layoutInflater and the parent ViewGroup, set itself to the\ntag and call setUpView and hookListeners methods.\n\n@param content to render. If you are using Renderers with RecyclerView widget the content will\nbe null in this method.\n@param layoutInflater used to inflate the view.\n@param parent used to inflate the view.",
"Retrieve a UUID in the form required by Primavera PMXML.\n\n@param guid UUID instance\n@return formatted UUID",
"Write a calendar.\n\n@param record calendar instance\n@throws IOException",
"Get the primitive attributes for the associated object.\n\n@return attributes for associated objects\n@deprecated replaced by {@link #getAllAttributes()} after introduction of nested associations",
"Tests an observer method to see if it is transactional.\n\n@param observer The observer method\n@return true if the observer method is annotated as transactional",
"Tests an observer method to see if it is transactional.\n\n@param observer The observer method\n@return true if the observer method is annotated as transactional",
"Adds this vector to v1 and places the result in this vector.\n\n@param v1\nright-hand vector",
"Determines the address for the host being used.\n\n@param client the client used to communicate with the server\n\n@return the address of the host\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to determine the host name fails"
] |
protected Date getPickerDate() {
try {
JsDate pickerDate = getPicker().get("select").obj;
return new Date((long) pickerDate.getTime());
} catch (Exception e) {
e.printStackTrace();
return null;
}
} | [
"Get the pickers date."
] | [
"Writes the value key to the serialized characteristic\n\n@param builder The JSON builder to add the value to\n@param value The value to add",
"Unmarshal test suite from given file.",
"Creates a block matrix the same size as A_inv, inverts the matrix and copies the results back\nonto A_inv.\n\n@param A_inv Where the inverted matrix saved. Modified.",
"This method is called to format a rate.\n\n@param value rate value\n@return formatted rate",
"Use this API to add dospolicy resources.",
"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",
"Enables a custom response\n\n@param model\n@param custom\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"Check whether we have diverged from what we would predict from the last update that was sent to a particular\ntrack position listener.\n\n@param lastUpdate the last update that was sent to the listener\n@param currentUpdate the latest update available for the same player\n\n@return {@code true }if the listener will have diverged by more than our permitted amount of slack, and so\nshould be updated",
"Return the name of the current conf set\n@return the conf set name"
] |
@SuppressWarnings("deprecation")
public ResponseFromManager sendTaskToExecutionManager(ParallelTask task) {
ResponseFromManager commandResponseFromManager = null;
ActorRef executionManager = null;
try {
// Start new job
logger.info("!!STARTED sendAgentCommandToManager : "
+ task.getTaskId() + " at "
+ PcDateUtils.getNowDateTimeStr());
executionManager = ActorConfig.createAndGetActorSystem().actorOf(
Props.create(ExecutionManager.class, task),
"ExecutionManager-" + task.getTaskId());
final FiniteDuration duration = Duration.create(task.getConfig()
.getTimeoutAskManagerSec(), TimeUnit.SECONDS);
// Timeout timeout = new
// Timeout(FiniteDuration.parse("300 seconds"));
Future<Object> future = Patterns.ask(executionManager,
new InitialRequestToManager(task), new Timeout(duration));
// set ref
task.executionManager = executionManager;
commandResponseFromManager = (ResponseFromManager) Await.result(
future, duration);
logger.info("!!COMPLETED sendTaskToExecutionManager : "
+ task.getTaskId() + " at "
+ PcDateUtils.getNowDateTimeStr()
+ " \t\t GenericResponseMap in future size: "
+ commandResponseFromManager.getResponseCount());
} catch (Exception ex) {
logger.error("Exception in sendTaskToExecutionManager {} details {}: ",
ex, ex);
} finally {
// stop the manager
if (executionManager != null && !executionManager.isTerminated()) {
ActorConfig.createAndGetActorSystem().stop(executionManager);
}
if (task.getConfig().isAutoSaveLogToLocal()) {
task.saveLogToLocal();
}
}
return commandResponseFromManager;
} | [
"Send parallel task to execution manager.\n\n@param task\nthe parallel task\n@return the batch response from manager"
] | [
"Send message to all connections labeled with tag specified.\n\n@param message the message to be sent\n@param tag the string that tag the connections to be sent\n@param excludeSelf specify whether the connection of this context should be send\n@return this context",
"Deletes the first element from the receiver that matches the specified element.\nDoes nothing, if no such matching element is contained.\n\nTests elements for equality or identity as specified by <tt>testForEquality</tt>.\nWhen testing for equality, two elements <tt>e1</tt> and\n<tt>e2</tt> are <i>equal</i> if <tt>(e1==null ? e2==null :\ne1.equals(e2))</tt>.)\n\n@param testForEquality if true -> tests for equality, otherwise for identity.\n@param element the element to be deleted.",
"Checks the preconditions for creating a new IsIncludedIn processor with a Set of Objects.\n\n@param possibleValues\nthe Set of possible values\n@throws NullPointerException\nif possibleValues is null\n@throws IllegalArgumentException\nif possibleValues is empty",
"Register the given object under the package name of the object's class\nwith the given type name.\n\nthis method using the platform mbean server as returned by\nManagementFactory.getPlatformMBeanServer()\n\n@param typeName The name of the type to register\n@param obj The object to register as an mbean",
"Gets the Symmetric Kullback-Leibler distance.\nThis metric is valid only for real and positive P and Q.\n\n@param p P vector.\n@param q Q vector.\n@return The Symmetric Kullback Leibler distance between p and q.",
"Adjust submatrices and helper data structures for the input matrix. Must be called\nbefore the decomposition can be computed.\n\n@param orig",
"Add a line symbolizer definition to the rule.\n\n@param styleJson The old style.",
"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",
"Builds the path for a closed arc, returning a PolygonOptions that can be\nfurther customised before use.\n\n@param center\n@param start\n@param end\n@param arcType Pass in either ArcType.CHORD or ArcType.ROUND\n@return PolygonOptions with the paths element populated."
] |
public List getFeedback()
{
List<?> messages = new ArrayList();
for ( ValueSource vs : valueSources )
{
List feedback = vs.getFeedback();
if ( feedback != null && !feedback.isEmpty() )
{
messages.addAll( feedback );
}
}
return messages;
} | [
"Return any feedback messages and errors that were generated - but\nsuppressed - during the interpolation process. Since unresolvable\nexpressions will be left in the source string as-is, this feedback is\noptional, and will only be useful for debugging interpolation problems.\n\n@return a {@link List} that may be interspersed with {@link String} and\n{@link Throwable} instances."
] | [
"Authenticates the API connection by obtaining access and refresh tokens using the auth code that was obtained\nfrom the first half of OAuth.\n@param authCode the auth code obtained from the first half of the OAuth process.",
"Returns the complete tag record for a single tag.\n\n@param tag The tag to get.\n@return Request object",
"Returns true if all pixels in the array have the same color",
"Generate a path select string\n\n@return Select query string",
"Determines whether the given type is an array type.\n\n@param type the given type\n@return true if the given type is a subclass of java.lang.Class or implements GenericArrayType",
"Does the headset the device is docked into have a dedicated home key\n@return",
"Converts milliseconds into a calendar object.\n\n@param millis a time given in milliseconds after epoch\n@return the calendar object for the given time",
"Set the diffuse light intensity.\n\nThis designates the color of the diffuse reflection.\nIt is multiplied by the material diffuse color to derive\nthe hue of the diffuse reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code diffuse_intensity} to control the intensity of diffuse light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)",
"Generate and return the list of statements to create a database table and any associated features."
] |
private Object getAttributeRecursively(Object feature, String name) throws LayerException {
if (feature == null) {
return null;
}
// Split up properties: the first and the rest.
String[] properties = name.split(SEPARATOR_REGEXP, 2);
Object tempFeature;
// If the first property is the identifier:
if (properties[0].equals(getFeatureInfo().getIdentifier().getName())) {
tempFeature = getId(feature);
} else {
Entity entity = entityMapper.asEntity(feature);
HibernateEntity child = (HibernateEntity) entity.getChild(properties[0]);
tempFeature = child == null ? null : child.getObject();
}
// Detect if the first property is a collection (one-to-many):
if (tempFeature instanceof Collection<?>) {
Collection<?> features = (Collection<?>) tempFeature;
Object[] values = new Object[features.size()];
int count = 0;
for (Object value : features) {
if (properties.length == 1) {
values[count++] = value;
} else {
values[count++] = getAttributeRecursively(value, properties[1]);
}
}
return values;
} else { // Else first property is not a collection (one-to-many):
if (properties.length == 1 || tempFeature == null) {
return tempFeature;
} else {
return getAttributeRecursively(tempFeature, properties[1]);
}
}
} | [
"A recursive getAttribute method. In case a one-to-many is passed, an array will be returned.\n\n@param feature The feature wherein to search for the attribute\n@param name The attribute's full name. (can be attr1.attr2)\n@return Returns the value. In case a one-to-many is passed along the way, an array will be returned.\n@throws LayerException oops"
] | [
"Flag that the processor has completed execution.\n\n@param processorGraphNode the node that has finished.",
"Read ClassDescriptors from the given InputStream.\n@see #mergeDescriptorRepository",
"Get prototype name.\n\n@return prototype name",
"Set the timeout for idle connections. Voldemort client caches all\nconnections to the Voldemort server. This setting allows the a connection\nto be dropped, if it is idle for more than this time.\n\nThis could be useful in the following cases 1) Voldemort client is not\ndirectly connected to the server and is connected via a proxy or\nfirewall. The Proxy or firewall could drop the connection silently. If\nthe connection is dropped, then client will see operations fail with a\ntimeout. Setting this property enables the Voldemort client to tear down\nthe connection before a firewall could drop it. 2) Voldemort server\ncaches the connection and each connection has an associated memory cost.\nSetting this property on all clients, enable the clients to prune the\nconnections and there by freeing up the server connections.\n\nthrows IllegalArgumentException if the timeout is less than 10 minutes.\n\nCurrently it can't be set below 10 minutes to avoid the racing risk of\ncontention between connection checkout and selector trying to close it.\nThis is intended for low throughput scenarios.\n\n@param idleConnectionTimeout\nzero or negative number to disable the feature ( default -1)\ntimeout\n@param unit {@link TimeUnit}\n@return ClientConfig object for chained set\n\nthrows {@link IllegalArgumentException} if the timeout is greater\nthan 0, but less than 10 minutes.",
"Returns the key value in the given array.\n\n@param keyIndex the index of the scale key",
"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",
"Returns the count of all inbox messages for the user\n@return int - count of all inbox messages",
"Returns the default shared instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object",
"Replace error msg.\n\n@param origMsg\nthe orig msg\n@return the string"
] |
public static String next(CharSequence self) {
StringBuilder buffer = new StringBuilder(self);
if (buffer.length() == 0) {
buffer.append(Character.MIN_VALUE);
} else {
char last = buffer.charAt(buffer.length() - 1);
if (last == Character.MAX_VALUE) {
buffer.append(Character.MIN_VALUE);
} else {
char next = last;
next++;
buffer.setCharAt(buffer.length() - 1, next);
}
}
return buffer.toString();
} | [
"This method is called by the ++ operator for the class CharSequence.\nIt increments the last character in the given CharSequence. If the last\ncharacter in the CharSequence is Character.MAX_VALUE a Character.MIN_VALUE\nwill be appended. The empty CharSequence is incremented to a string\nconsisting of the character Character.MIN_VALUE.\n\n@param self a CharSequence\n@return a value obtained by incrementing the toString() of the CharSequence\n@since 1.8.2"
] | [
"a helper method to enable the keyboardUtil for a specific activity\nor disable it. note this will cause some frame drops because of the\nlistener.\n\n@param activity\n@param enable",
"Retrieve the state object associated with the specified interceptor instance and property\nname on this request context.\n\n@param interceptor the interceptor instance\n@param stateName the name key that the state object was stored under\n@param stateType class of the type the stored state should be returned as\n@param <T> the type the stored state should be returned as\n@return the stored state object\n@see #setState(HttpConnectionInterceptor, String, Object)\n@since 2.6.0",
"Entry point for processing saved view state.\n\n@param file project file\n@param varData view state var data\n@param fixedData view state fixed data\n@throws IOException",
"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)",
"Support the range subscript operator for GString\n\n@param text a GString\n@param range a Range\n@return the String of characters corresponding to the provided range\n@since 2.3.7",
"Checks if a given number is in the range of a short.\n\n@param number\na number which should be in the range of a short (positive or negative)\n\n@see java.lang.Short#MIN_VALUE\n@see java.lang.Short#MAX_VALUE\n\n@return number as a short (rounding might occur)",
"Collect environment variables and system properties under with filter constrains",
"Adds a license to an artifact if the license exist into the database\n\n@param gavc String\n@param licenseId String",
"Makes an ancestor filter."
] |
public static boolean isJavaLangType(String s) {
return getJavaDefaultTypes().contains(s) && Character.isUpperCase(s.charAt(0));
} | [
"Tests whether the given string is the name of a java.lang type."
] | [
"Each string item rendering requires the border and a space on both sides.\n\n12 3 12 3 12 34\n+----- +-------- +------+\nabc venkat last\n\n@param colCount\n@param colMaxLenList\n@param data\n@return",
"Creates typed parser\n@param contentType class of parsed object\n@param <T> type of parsed object\n@return parser of objects of given type",
"Saves changes in properties file. It reads the property file into memory, modifies it and saves it back to the file.\n\n@throws IOException",
"Use this API to fetch vpnvserver_responderpolicy_binding resources of given name .",
"Method used to read the sub project details from a byte array.\n\n@param data byte array\n@param uniqueIDOffset offset of unique ID\n@param filePathOffset offset of file path\n@param fileNameOffset offset of file name\n@param subprojectIndex index of the subproject, used to calculate unique id offset\n@return new SubProject instance",
"Sets any application-specific custom fields. The values\nare presented to the application and the iPhone doesn't\ndisplay them automatically.\n\nThis can be used to pass specific values (urls, ids, etc) to\nthe application in addition to the notification message\nitself.\n\n@param key the custom field name\n@param value the custom field value\n@return this",
"Get the photos for the specified group pool, optionally filtering by taf.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param groupId\nThe group ID\n@param userId\nThe user ID (may be null)\n@param tags\nThe optional tags (may be null)\n@param extras\nSet of extra-attributes to include (may be null)\n@param perPage\nThe number of photos per page (0 to ignore)\n@param page\nThe page offset (0 to ignore)\n@return A Collection of Photo objects\n@throws FlickrException",
"Sets the position of a UIObject",
"Load the related repositories, plugins and a promotion config associated to the buildId.\nCalled from the UI.\n\n@param buildId - The unique build id.\n@return LoadBuildsResponse e.g. list of repositories, plugins and a promotion config."
] |
private static List<Integer> stripNodeIds(List<Node> nodeList) {
List<Integer> nodeidList = new ArrayList<Integer>();
if(nodeList != null) {
for(Node node: nodeList) {
nodeidList.add(node.getId());
}
}
return nodeidList;
} | [
"Helper method to get a list of node ids.\n\n@param nodeList"
] | [
"Notifies that an existing content item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.",
"Used for DI frameworks to inject values into stages.",
"Return true if the AST expression has not already been visited. If it is\nthe first visit, register the expression so that the next visit will return false.\n\n@param expression - the AST expression to check\n@return true if the AST expression has NOT already been visited",
"Retrieve list of resource extended attributes.\n\n@return list of extended attributes",
"Determines how many primary partitions each node within each zone should\nhave. The list of integers returned per zone is the same length as the\nnumber of nodes in that zone.\n\n@param nextCandidateCluster\n@param targetPartitionsPerZone\n@return A map of zoneId to list of target number of partitions per node\nwithin zone.",
"Adds a word to the end of the token list\n@param word word which is to be added\n@return The new Token created around symbol",
"If the \"org.talend.esb.sam.agent.log.messageContent\" property value is \"true\" then log the message content\nIf it is \"false\" then skip the message content logging\nElse fall back to global property \"log.messageContent\"\n\n@param message\n@param logMessageContent\n@param logMessageContentOverride\n@return",
"Retrieves the work variance.\n\n@return work variance",
"Create an error image.\n\n@param area The size of the image"
] |
public void setCurrencySymbol(String symbol)
{
if (symbol == null)
{
symbol = DEFAULT_CURRENCY_SYMBOL;
}
set(ProjectField.CURRENCY_SYMBOL, symbol);
} | [
"Sets currency symbol.\n\n@param symbol currency symbol"
] | [
"Parses a String comprised of 0 or more comma-delimited key=value pairs.\n\n@param s the string to parse\n@return the Map of parsed key value pairs",
"Performs backward pass of Batch Normalization layer. Returns x gradient,\nbnScale gradient and bnBias gradient",
"Readable yyyyMMdd representation of a day, which is also sortable.",
"Set the end type as derived from other values.",
"Retrieve the correct calendar for a resource.\n\n@param calendarID calendar ID\n@return calendar for resource",
"This method writes a resource's availability table.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource",
"Compares two annotated parameters and returns true if they are equal",
"Get a bean from the application context. Returns null if the bean does not exist.\n@param name name of bean\n@param requiredType type of bean\n@return the bean or null",
"Use this API to fetch responderpolicy resource of given name ."
] |
public TimephasedWorkContainer getBaselineWork(ResourceAssignment assignment, ProjectCalendar calendar, TimephasedWorkNormaliser normaliser, byte[] data, boolean raw)
{
TimephasedWorkContainer result = null;
if (data != null && data.length > 0)
{
LinkedList<TimephasedWork> list = null;
//System.out.println(ByteArrayHelper.hexdump(data, false));
int index = 8; // 8 byte header
int blockSize = 40;
double previousCumulativeWorkPerformedInMinutes = 0;
Date blockStartDate = MPPUtility.getTimestampFromTenths(data, index + 36);
index += blockSize;
TimephasedWork work = null;
while (index + blockSize <= data.length)
{
double cumulativeWorkInMinutes = (double) ((long) MPPUtility.getDouble(data, index + 20)) / 1000;
if (!Duration.durationValueEquals(cumulativeWorkInMinutes, previousCumulativeWorkPerformedInMinutes))
{
//double unknownWorkThisPeriodInMinutes = ((long) MPPUtility.getDouble(data, index + 0)) / 1000;
double normalActualWorkThisPeriodInMinutes = ((double) MPPUtility.getInt(data, index + 8)) / 10;
double normalRemainingWorkThisPeriodInMinutes = ((double) MPPUtility.getInt(data, index + 28)) / 10;
double workThisPeriodInMinutes = cumulativeWorkInMinutes - previousCumulativeWorkPerformedInMinutes;
double overtimeWorkThisPeriodInMinutes = workThisPeriodInMinutes - (normalActualWorkThisPeriodInMinutes + normalRemainingWorkThisPeriodInMinutes);
double overtimeFactor = overtimeWorkThisPeriodInMinutes / (normalActualWorkThisPeriodInMinutes + normalRemainingWorkThisPeriodInMinutes);
double normalWorkPerDayInMinutes = 480;
double overtimeWorkPerDayInMinutes = normalWorkPerDayInMinutes * overtimeFactor;
work = new TimephasedWork();
work.setFinish(MPPUtility.getTimestampFromTenths(data, index + 16));
work.setStart(blockStartDate);
work.setTotalAmount(Duration.getInstance(workThisPeriodInMinutes, TimeUnit.MINUTES));
work.setAmountPerDay(Duration.getInstance(normalWorkPerDayInMinutes + overtimeWorkPerDayInMinutes, TimeUnit.MINUTES));
previousCumulativeWorkPerformedInMinutes = cumulativeWorkInMinutes;
if (list == null)
{
list = new LinkedList<TimephasedWork>();
}
list.add(work);
//System.out.println(work);
}
blockStartDate = MPPUtility.getTimestampFromTenths(data, index + 36);
index += blockSize;
}
if (list != null)
{
if (work != null)
{
work.setFinish(assignment.getFinish());
}
result = new DefaultTimephasedWorkContainer(calendar, normaliser, list, raw);
}
}
return result;
} | [
"Extracts baseline work from the MPP file for a specific baseline.\nReturns null if no baseline work is present, otherwise returns\na list of timephased work items.\n\n@param assignment parent assignment\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work"
] | [
"Returns a flag indicating if also unreleased resources should be found.\n@return A flag indicating if also unreleased resources should be found.",
"Calculate the summed conditional likelihood of this data by summing\nconditional estimates.",
"Returns true if this entity's primary key is not null, and for numeric\nfields, is non-zero.",
"Reads baseline values for the current resource.\n\n@param xmlResource MSPDI resource instance\n@param mpxjResource MPXJ resource instance",
"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.",
"Use this API to fetch vlan_nsip_binding resources of given name .",
"Use this API to clear bridgetable.",
"Unmarshals the XML content and adds the file to the bundle files.\n@throws CmsException thrown if reading the file or unmarshaling fails.",
"Given a HTTPResponce, process it, throwing an error if needed and return a Token for the next\nrequest."
] |
@Override
public AccountingDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"Obtains a local date in Accounting calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Accounting era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Accounting local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code AccountingEra}"
] | [
"Helper method to retrieve a canonical revision for git commits migrated from SVN. Migrated commits are\ndetected by the presence of 'git-svn-id' in the commit message.\n\n@param revision the commit/revision to inspect\n@param branch the name of the branch it came from\n@return the original SVN revision if it was a migrated commit from the branch specified, otherwise the git revision",
"Check whether the patch can be applied to a given target.\n\n@param condition the conditions\n@param target the target\n@throws PatchingException",
"Validates an operation against its description provider\n\n@param operation The operation to validate\n@throws IllegalArgumentException if the operation is not valid",
"Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events.",
"Discard the changes.",
"Returns an array of all the singular values",
"This essentially ensures that we only store a single Vertex for each unique \"Set\" of tags.",
"This method is called if the data set has been scrolled.",
"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"
] |
public boolean equalId(Element otherElement) {
if (getElementId() == null || otherElement.getElementId() == null) {
return false;
}
return getElementId().equalsIgnoreCase(otherElement.getElementId());
} | [
"Are both Id's the same?\n\n@param otherElement the other element to compare\n@return true if id == otherElement.id"
] | [
"Finds the preferred provider for the given service. The preferred\nprovider is the last one added to the set of providers.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@return\nThe last provider added for the service if any exists.\nOtherwise, it returns <tt>null</tt>.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>",
"Determine which field the Activity ID has been mapped to.\n\n@param map field map\n@return field",
"Creates the database.\n\n@throws PlatformException If some error occurred",
"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",
"Adds version information.",
"Creates a collaboration whitelist for a Box User with a given ID.\n@param api the API connection to be used by the collaboration whitelist.\n@param userID the ID of the Box User to add to the collaboration whitelist.\n@return information about the collaboration whitelist created for user.",
"Returns a Bic object holding the value of the specified String.\n\n@param bic the String to be parsed.\n@return a Bic object holding the value represented by the string argument.\n@throws BicFormatException if the String doesn't contain parsable Bic.\nUnsupportedCountryException if bic's country is not supported.",
"Removes all currently assigned labels for this Datum then adds all\nof the given Labels.",
"Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts."
] |
public void read(InputStream is) throws IOException
{
byte[] headerBlock = new byte[20];
is.read(headerBlock);
int headerLength = PEPUtility.getShort(headerBlock, 8);
int recordCount = PEPUtility.getInt(headerBlock, 10);
int recordLength = PEPUtility.getInt(headerBlock, 16);
StreamHelper.skip(is, headerLength - headerBlock.length);
byte[] record = new byte[recordLength];
for (int recordIndex = 1; recordIndex <= recordCount; recordIndex++)
{
is.read(record);
readRow(recordIndex, record);
}
} | [
"Reads the table data from an input stream and breaks\nit down into rows.\n\n@param is input stream"
] | [
"Returns the yield value such that the sum of cash flows of the bond discounted with the yield curve\ncoincides with a given price.\n\n@param bondPrice The target price as double.\n@param model The model under which the product is valued.\n@return The optimal yield value.",
"Process a device update once it has been received. Track it as the most recent update from its address,\nand notify any registered listeners, including master listeners if it results in changes to tracked state,\nsuch as the current master player and tempo. Also handles the Baroque dance of handing off the tempo master\nrole from or to another device.",
"Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations",
"Only sets and gets that are by row and column are used.",
"Returns the parsed story from the given path\n\n@param configuration the Configuration used to run story\n@param storyPath the story path\n@return The parsed Story",
"Appends the GROUP BY clause for the Query\n@param groupByFields\n@param buf",
"Remove an write lock.",
"Gets the Chi Square distance between two normalized histograms.\n\n@param histogram1 Histogram.\n@param histogram2 Histogram.\n@return The Chi Square distance between x and y.",
"Instantiates the templates specified by @Template within @Templates"
] |
public static Map<String,List<Long>> readHints(File hints) throws IOException {
Map<String,List<Long>> result = new HashMap<>();
InputStream is = new FileInputStream(hints);
mergeHints(is, result);
return result;
} | [
"Read hints from a file."
] | [
"Make a sort order for use in a query.",
"Print an earned value method.\n\n@param value EarnedValueMethod instance\n@return earned value method value",
"Checks that arguments and parameter types match.\n@param params method parameters\n@param args type arguments\n@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is\nnot of the exact type but still match",
"Method to get the file writer required for the .story files\n\n@param scenarioName\n@param aux_package_path\n@param dest_dir\n@return The file writer that generates the .story files for each test\n@throws BeastException",
"Checks that index is valid an throw an exception if not.\n\n@param type the type\n@param index the index to check",
"Return a named object associated with the specified key.",
"Starts the ephemeral node and waits for it to be created\n\n@param node Node to start\n@param maxWaitSec Maximum time in seconds to wait",
"Retrieve URL without parameters\n\n@param sourceURI source URI\n@return URL without parameters",
"Returns the bill for the month specified.\n\n@param month for which bill to retrieve.\n@param year for which bill to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations."
] |
void notifyMwRevisionProcessors(MwRevision mwRevision, boolean isCurrent) {
if (mwRevision == null || mwRevision.getPageId() <= 0) {
return;
}
for (MwRevisionProcessorBroker.RevisionSubscription rs : this.revisionSubscriptions) {
if (rs.onlyCurrentRevisions == isCurrent
&& (rs.model == null || mwRevision.getModel().equals(
rs.model))) {
rs.mwRevisionProcessor.processRevision(mwRevision);
}
}
} | [
"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"
] | [
"Set the custom projection matrix with individual matrix elements.",
"Use this API to fetch all the nstimeout resources that are configured on netscaler.",
"below is testing code",
"Clone layer information considering what may be copied to the client.\n\n@param original layer info\n@return cloned copy including only allowed information",
"Returns a projection object for specifying the fields to retrieve during a specific find operation.",
"Rotate the specified photo. The only allowed values for degrees are 90, 180 and 270.\n\n@param photoId\nThe photo ID\n@param degrees\nThe degrees to rotate (90, 170 or 270)",
"Checks if the given AnnotatedType is sensible, otherwise provides warnings.",
"Extract child task data.\n\n@param task MPXJ task\n@param row Synchro task data",
"Set the model used by the right table.\n\n@param model table model"
] |
public final void updateLastCheckTime(final String id, final long lastCheckTime) {
final CriteriaBuilder builder = getSession().getCriteriaBuilder();
final CriteriaUpdate<PrintJobStatusExtImpl> update =
builder.createCriteriaUpdate(PrintJobStatusExtImpl.class);
final Root<PrintJobStatusExtImpl> root = update.from(PrintJobStatusExtImpl.class);
update.where(builder.equal(root.get("referenceId"), id));
update.set(root.get("lastCheckTime"), lastCheckTime);
getSession().createQuery(update).executeUpdate();
} | [
"Update the lastCheckTime of the given record.\n\n@param id the id\n@param lastCheckTime the new value"
] | [
"Bessel function of the second kind, of order 1.\n\n@param x Value.\n@return Y value.",
"Checks whether a user account can be locked because of inactivity.\n\n@param cms the CMS context\n@param user the user to check\n@return true if the user may be locked after being inactive for too long",
"Get the domain controller data from the given byte buffer.\n\n@param buffer the byte buffer\n@return the domain controller data\n@throws Exception",
"Scales a process type\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param processType type of process to maintain\n@param quantity number of processes to maintain",
"Handles logging tasks related to a failure to connect to a remote HC.\n@param uri the URI at which the connection attempt was made. Can be {@code null} indicating a failure to discover the HC\n@param discoveryOption the {@code DiscoveryOption} used to determine {@code uri}\n@param moreOptions {@code true} if there are more untried discovery options\n@param e the exception",
"Permanently deletes a trashed file.\n@param fileID the ID of the trashed folder to permanently delete.",
"Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.",
"Receives a PropertyColumn and returns a JRDesignField",
"Sets the set of site filters based on the given string.\n\n@param filters\ncomma-separates list of site keys, or \"-\" to filter all site\nlinks"
] |
public void writeFinalResults() {
printStatus();
try (PrintStream out = new PrintStream(
ExampleHelpers
.openExampleFileOuputStream("life-expectancies.csv"))) {
for (int i = 0; i < lifeSpans.length; i++) {
if (peopleCount[i] != 0) {
out.println(i + "," + (double) lifeSpans[i]
/ peopleCount[i] + "," + peopleCount[i]);
}
}
} catch (IOException e) {
e.printStackTrace();
}
} | [
"Writes the results of the processing to a file."
] | [
"Obtains a database connection, retrying if necessary.\n@param connectionHandle\n@return A DB connection.\n@throws SQLException",
"Creates a new DMatrixRMaj around the provided data. The data must encode\na row-major matrix. Any modification to the returned matrix will modify the\nprovided data.\n\n@param numRows Number of rows in the matrix.\n@param numCols Number of columns in the matrix.\n@param data Data that is being wrapped. Referenced Saved.\n@return A matrix which references the provided data internally.",
"Logs the time taken by this rule and adds this to the total time taken for this phase",
"Before closing the PersistenceBroker ensure that the session\ncache is cleared",
"This function helps handle the following case\n\n<OL>\n<LI>TX1 locls r1 col1\n<LI>TX1 fails before unlocking\n<LI>TX2 attempts to write r1:col1 w/o reading it\n</OL>\n\n<p>\nIn this case TX2 would not roll back TX1, because it never read the column. This function\nattempts to handle this case if TX2 fails. Only doing this in case of failures is cheaper than\ntrying to always read unread columns.\n\n@param cd Commit data",
"Ask the specified player for the waveform preview in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param trackReference uniquely identifies the desired waveform preview\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nwaveform updates will use available caches only\n\n@return the waveform preview found, if any",
"Return a list of photos for a user at a specific latitude, longitude and accuracy.\n\n@param location\n@param extras\n@param perPage\n@param page\n@return The collection of Photo objects\n@throws FlickrException\n@see com.flickr4java.flickr.photos.Extras",
"Magnitude of complex number.\n\n@param z Complex number.\n@return Magnitude of complex number.",
"Computes A-B\n\n@param listA\n@param listB\n@return"
] |
public static Artifact getIdlArtifact(Artifact artifact, ArtifactFactory artifactFactory,
ArtifactResolver artifactResolver,
ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepos,
String classifier)
throws MojoExecutionException {
Artifact idlArtifact = artifactFactory.createArtifactWithClassifier(
artifact.getGroupId(),
artifact.getArtifactId(),
artifact.getVersion(),
"jar",
classifier);
try {
artifactResolver.resolve(idlArtifact, remoteRepos, localRepository);
return idlArtifact;
} catch (final ArtifactResolutionException e) {
throw new MojoExecutionException(
"Failed to resolve one or more idl artifacts:\n\n" + e.getMessage(), e);
} catch (final ArtifactNotFoundException e) {
throw new MojoExecutionException(
"Failed to resolve one or more idl artifacts:\n\n" + e.getMessage(), e);
}
} | [
"Resolves an idl jar for the artifact.\n@return Returns idl artifact\n@throws MojoExecutionException is idl jar is not present for the artifact."
] | [
"Sets the fieldConversion.\n@param fieldConversionClassName The fieldConversion to set",
"Deletes the concrete representation of the specified object in the underlying\npersistence system. This method is intended for use in top-level api or\nby internal calls.\n\n@param obj The object to delete.\n@param ignoreReferences With this flag the automatic deletion/unlinking\nof references can be suppressed (independent of the used auto-delete setting in metadata),\nexcept {@link org.apache.ojb.broker.metadata.SuperReferenceDescriptor}\nthese kind of reference (descriptor) will always be performed. If <em>true</em>\nall \"normal\" referenced objects will be ignored, only the specified object is handled.\n@throws PersistenceBrokerException",
"Appends the String representation of the given operand to this CharSequence.\n\n@param left a CharSequence\n@param value any Object\n@return the original toString() of the CharSequence with the object appended\n@since 1.8.2",
"Sets the CircularImageView's border width in pixels.\n@param borderWidth Width in pixels for the border.",
"Parses the result and returns the failure description. If the result was successful, an empty string is\nreturned.\n\n@param result the result of executing an operation\n\n@return the failure message or an empty string",
"Get the Attribute metadata for an MBean by name.\n@return the {@link Map} of {@link String} attribute names to {@link MBeanAttributeInfo} values.",
"Re-maps a provided collection.\n\n@param <T_Result>\ntype of result\n@param <T_Source>\ntype of source\n@param source\nfor mapping\n@param mapper\nelement mapper\n@return mapped source",
"Stops the server. This method does nothing if the server is stopped already.",
"Returns the configured fields of the current field configuration.\n\n@return the configured fields of the current field configuration"
] |
public static void validate(final String bic) throws BicFormatException,
UnsupportedCountryException {
try {
validateEmpty(bic);
validateLength(bic);
validateCase(bic);
validateBankCode(bic);
validateCountryCode(bic);
validateLocationCode(bic);
if(hasBranchCode(bic)) {
validateBranchCode(bic);
}
} catch (UnsupportedCountryException e) {
throw e;
} catch (RuntimeException e) {
throw new BicFormatException(UNKNOWN, e.getMessage());
}
} | [
"Validates bic.\n\n@param bic to be validated.\n@throws BicFormatException if bic is invalid.\nUnsupportedCountryException if bic's country is not supported."
] | [
"Use this API to update systemuser.",
"Use this API to fetch all the dnstxtrec resources that are configured on netscaler.",
"Convert element to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed",
"Sets a custom configuration attribute.\n@param attributeName the attribute name. Names starting with\n{@link #JDBC_PROPERTY_NAME_PREFIX} will be used (without the prefix) by the\nConnectionFactory when creating connections from DriverManager\n(not used for external DataSource connections). Names starting with\n{@link #DBCP_PROPERTY_NAME_PREFIX} to Commons DBCP (if used, also without prefix).\n@param attributeValue the attribute value",
"Use this API to link sslcertkey.",
"Get the node that has been selected by the user, or null if\nnothing is selected.\n@return The node or <code>null</code>",
"Write the domain controller data to a byte buffer.\n\n@param data the domain controller data\n@return the byte buffer\n@throws Exception",
"Parse a currency symbol position from a string representation.\n\n@param value String representation\n@return CurrencySymbolPosition instance",
"Converts a standard optimizer to one which the given amount of l1 or l2 regularization."
] |
public void animate(GVRHybridObject object, float animationTime)
{
GVRMeshMorph morph = (GVRMeshMorph) mTarget;
mKeyInterpolator.animate(animationTime * mDuration, mCurrentValues);
morph.setWeights(mCurrentValues);
} | [
"Computes the blend weights for the given time and\nupdates them in the target."
] | [
"Creates a REST client used to perform Voldemort operations against the\nCoordinator\n\n@param storeName Name of the store to perform the operations on\n@param resolver Custom resolver as specified by the application\n@return",
"Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name .",
"Log a warning for the resource at the provided address and the given attributes, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param message custom error message to append\n@param attributes attributes we that have problems about",
"Create a Vendor from a Callable",
"Creates a new block box from the given element with the given parent. No style is assigned to the resulting box.\n@param parent The parent box in the tree of boxes.\n@param n The element that this box belongs to.\n@param replaced When set to <code>true</code>, a replaced block box will be created. Otherwise, a normal non-replaced block will be created.\n@return The new block box.",
"Creates a string representation of the given node. Useful for debugging.\n\n@return a debug string for the given node.",
"Adds tags to the If-Match header.\n\n@param tag the tag to add, may be null. This means the same as adding {@link Tag#ALL}\n@throws IllegalArgumentException if ALL is supplied more than once, or you add a null tag more than once.\n@return a new Conditionals object with the If-Match tag added.",
"Extract the outline level from a task's WBS attribute.\n\n@param task Task instance\n@return outline level",
"Returns the name of the operation.\n\n@param op the operation\n\n@return the name of the operation\n\n@throws IllegalArgumentException if the operation was not defined."
] |
public CliCommandBuilder setTimeout(final int timeout) {
if (timeout > 0) {
addCliArgument(CliArgument.TIMEOUT, Integer.toString(timeout));
} else {
addCliArgument(CliArgument.TIMEOUT, null);
}
return this;
} | [
"Sets the timeout used when connecting to the server.\n\n@param timeout the time out to use\n\n@return the builder"
] | [
"Pass a model object and return a SoyMapData if a model object happens\nto be a SoyMapData.\n\nAn implementation will also check if a passed in object is a Map and return\na SoyMapData wrapping that map",
"Retrieve a calendar exception which applies to this date.\n\n@param date target date\n@return calendar exception, or null if none match this date",
"Indicate whether the given URI matches this template.\n@param uri the URI to match to\n@return {@code true} if it matches; {@code false} otherwise",
"Use this API to update tmtrafficaction.",
"Update the default time unit for work based on data read from the file.\n\n@param column column data",
"Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value",
"Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return",
"Set the background color of the progress spinner disc.\n\n@param colorRes Resource id of the color.",
"Gets the Java subclass of GVRShader which implements\nthis shader type.\n@param ctx GVRContext shader is associated with\n@return GVRShader class implementing the shader type"
] |
private long getTime(Date start, Date end, long target, boolean after)
{
long total = 0;
if (start != null && end != null)
{
Date startTime = DateHelper.getCanonicalTime(start);
Date endTime = DateHelper.getCanonicalTime(end);
Date startDay = DateHelper.getDayStartDate(start);
Date finishDay = DateHelper.getDayStartDate(end);
//
// Handle the case where the end of the range is at midnight -
// this will show up as the start and end days not matching
//
if (startDay.getTime() != finishDay.getTime())
{
endTime = DateHelper.addDays(endTime, 1);
}
int diff = DateHelper.compare(startTime, endTime, target);
if (diff == 0)
{
if (after == true)
{
total = (endTime.getTime() - target);
}
else
{
total = (target - startTime.getTime());
}
}
else
{
if ((after == true && diff < 0) || (after == false && diff > 0))
{
total = (endTime.getTime() - startTime.getTime());
}
}
}
return (total);
} | [
"Calculates how much of a time range is before or after a\ntarget intersection point.\n\n@param start time range start\n@param end time range end\n@param target target intersection point\n@param after true if time after target required, false for time before\n@return length of time in milliseconds"
] | [
"Returns the \"short rate\" from timeIndex to timeIndex+1.\n\n@param timeIndex The time index (corresponding to {@link getTime()).\n@return The \"short rate\" from timeIndex to timeIndex+1.\n@throws CalculationException Thrown if simulation failed.",
"Override this method to change the default splash screen size or\nposition.\n\nThis method will be called <em>before</em> {@link #onInit(GVRContext)\nonInit()} and before the normal render pipeline starts up. In particular,\nthis means that any {@linkplain GVRAnimation animations} will not start\nuntil the first {@link #onStep()} and normal rendering starts.\n\n@param splashScreen\nThe splash object created from\n{@link #getSplashTexture(GVRContext)},\n{@link #getSplashMesh(GVRContext)}, and\n{@link #getSplashShader(GVRContext)}.\n\n@since 1.6.4",
"Get the server redirects belonging to a server group\n\n@param profileId ID of profile\n@param serverGroupId ID of server group\n@return Collection of ServerRedirect for a server group",
"Extract a list of time entries.\n\n@param shiftData string representation of time entries\n@return list of time entry rows",
"Throws if the given file is null, is not a file or directory, or is an empty directory.",
"Gets the file from which boot operations should be parsed.\n@return the file. Will not be {@code null}",
"Sets the current switch index based on object name.\nThis function finds the child of the scene object\nthis component is attached to and sets the switch\nindex to reference it so this is the object that\nwill be displayed.\n\nIf it is out of range, none of the children will be shown.\n@param childName name of child to select\n@see GVRSceneObject#getChildByIndex(int)",
"Implements the AAD Algorithm\n@return HashMap where the key is the internal index of the random variable with respect to which the partial derivative was computed. This key then gives access to the actual derivative.",
"A document that is paused no longer has remote updates applied to it.\nAny local updates to this document cause it to be resumed. An example of pausing a document\nis when a conflict is being resolved for that document and the handler throws an exception.\n\nThis method allows you to resume sync for a document.\n\n@param namespace namespace for the document\n@param documentId the id of the document to resume syncing\n@return true if successfully resumed, false if the document\ncould not be found or there was an error resuming"
] |
@Override
public <T> Producer<T> createProducer(final Bean<X> declaringBean, final Bean<T> bean, DisposalMethod<X, T> disposalMethod) {
EnhancedAnnotatedField<T, X> enhancedField = getManager().getServices().get(MemberTransformer.class).loadEnhancedMember(field, getManager().getId());
return new ProducerFieldProducer<X, T>(enhancedField, disposalMethod) {
@Override
public AnnotatedField<X> getAnnotated() {
return field;
}
@Override
public BeanManagerImpl getBeanManager() {
return getManager();
}
@Override
public Bean<X> getDeclaringBean() {
return declaringBean;
}
@Override
public Bean<T> getBean() {
return bean;
}
};
} | [
"Producers returned from this method are not validated. Internal use only."
] | [
"Converts a vector from eigen space into sample space.\n\n@param eigenData Eigen space data.\n@return Sample space projection.",
"Issue the database statements to create the table associated with a class.\n\n@param connectionSource\nAssociated connection source.\n@param dataClass\nThe class for which a table will be created.\n@return The number of statements executed to do so.",
"Check to see whether a packet starts with the standard header bytes, followed by a known byte identifying it.\nIf so, return the kind of packet that has been recognized.\n\n@param packet a packet that has just been received\n@param port the port on which the packet has been received\n\n@return the type of packet that was recognized, or {@code null} if the packet was not recognized",
"Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Random matrix",
"Generic method used to create a field map from a block of data.\n\n@param data field map data",
"Runs a queued task, if the queue is not already empty.\n\nNote that this will decrement the request count if there are no queued tasks to be run\n\n@param hasPermit If the caller has already called {@link #beginRequest(boolean force)}",
"Obtains a Coptic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Add a source and destination.\n\n@param source Source path to be routed. Routed path can have named wild-card pattern with braces \"{}\".\n@param destination Destination of the path.",
"Send a request to another handler internal to the server, getting back the response body and response code.\n\n@param request request to send to another handler.\n@return {@link InternalHttpResponse} containing the response code and body."
] |
public static Command newQuery(String identifier,
String name,
Object[] arguments) {
return getCommandFactoryProvider().newQuery( identifier,
name,
arguments );
} | [
"Executes a query using the given parameters. The query results will be added to the\nExecutionResults using the given identifier.\n\n@param identifier\nThe identifier to be used for the results when added to the ExecutionResults\n@param name\nThe name of the query to execute\n@param arguments\nThe arguments to be used for the query parameters\n@return"
] | [
"a small static helper to set the text color to a textView null save\n\n@param colorHolder\n@param textView\n@param colorDefault",
"Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declared in the\ninterface.\n@param args an array of objects containing the values of the arguments\npassed in the method invocation on the proxy instance. If a\nparameter type is a primitive type, the type of the array\nelement is a wrapper class.\n@return the resulting value of the method invocation.\n@throws Throwable if the method invocation fails.",
"Returns true if the given item document lacks a label for at least one of\nthe languages covered.\n\n@param itemDocument\n@return true if some label is missing",
"Retrieve all Collection attributes of a given instance, and make all of the Proxy Collections\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs",
"Blocks until the server has started successfully or an exception is\nthrown.\n\n@throws VoldemortException if a problem occurs during start-up wrapping\nthe original exception.",
"Use this API to fetch the statistics of all nspbr6_stats resources that are configured on netscaler.",
"Checks if the selected template context is \"templatemapper\".\n\n@param request the current request\n@return true if the selected template context is \"templatemapper\"",
"Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this hazard curve.\n@param times Array of times as doubles.\n@param givenSurvivalProbabilities Array of corresponding survival probabilities.\n@return A new discount factor object.",
"Read the version number.\n\n@param is input stream"
] |
public static Comparator getComparator()
{
return new Comparator()
{
public int compare(Object o1, Object o2)
{
FieldDescriptor fmd1 = (FieldDescriptor) o1;
FieldDescriptor fmd2 = (FieldDescriptor) o2;
if (fmd1.getColNo() < fmd2.getColNo())
{
return -1;
}
else if (fmd1.getColNo() > fmd2.getColNo())
{
return 1;
}
else
{
return 0;
}
}
};
} | [
"returns a comparator that allows to sort a Vector of FieldMappingDecriptors\naccording to their m_Order entries."
] | [
"Get the GroupDiscussInterface.\n\n@return The GroupDiscussInterface",
"Get FieldDescriptor from Reference",
"Fall-back for types that are not handled by a subclasse's dispatch method.",
"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",
"Get an integer property override value.\n@param name the {@link CircuitBreaker} name.\n@param key the property override key.\n@return the property override value, or null if it is not found.",
"Initializes module enablement.\n\n@see ModuleEnablement",
"Parses an RgbaColor from a hexadecimal value.\n\n@return returns the parsed color",
"Converts string to UUID and returns it, or null if the conversion is not possible.\n\n@param uuid the potential UUID string\n@return the UUID, or null if conversion is not possible",
"This method retrieves an int value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of an integer\n@return int value"
] |
private ServerDetails createInitialDeployDetailsFromOldDeployDetails(ServerDetails oldDeployerDetails) {
RepositoryConf oldDeployRepositoryConfig = oldDeployerDetails.getDeployReleaseRepository();
RepositoryConf oldSnapshotDeployRepositoryConfig = oldDeployerDetails.getDeploySnapshotRepository();
RepositoryConf deployReleaseRepos = oldDeployRepositoryConfig == null ? RepositoryConf.emptyRepositoryConfig : oldDeployRepositoryConfig;
RepositoryConf deploySnapshotRepos = oldSnapshotDeployRepositoryConfig == null ? RepositoryConf.emptyRepositoryConfig : oldSnapshotDeployRepositoryConfig;
return new ServerDetails(oldDeployerDetails.getArtifactoryName(), oldDeployerDetails.getArtifactoryUrl(),
deployReleaseRepos, deploySnapshotRepos, null, null, null, null);
} | [
"Creates a new ServerDetails object for deployer, this will take URL and name from the oldDeployer ServerDetails"
] | [
"Use this API to save cachecontentgroup resources.",
"Extract the parent WBS from a WBS.\n\n@param wbs current WBS\n@return parent WBS",
"Verify JUnit presence and version.",
"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",
"convolution data type",
"Adds a class to the unit.",
"Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string",
"Walk through the object graph of the specified insert object. Was used for\nrecursive object graph walk.",
"Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid"
] |
public void clipTile(InternalTile tile, double scale, Coordinate panOrigin) throws GeomajasException {
log.debug("clipTile before {}", tile);
List<InternalFeature> orgFeatures = tile.getFeatures();
tile.setFeatures(new ArrayList<InternalFeature>());
Geometry maxScreenBbox = null; // The tile's maximum bounds in screen space. Used for clipping.
for (InternalFeature feature : orgFeatures) {
// clip feature if necessary
if (exceedsScreenDimensions(feature, scale)) {
log.debug("feature {} exceeds screen dimensions", feature);
InternalFeatureImpl vectorFeature = (InternalFeatureImpl) feature.clone();
tile.setClipped(true);
vectorFeature.setClipped(true);
if (null == maxScreenBbox) {
maxScreenBbox = JTS.toGeometry(getMaxScreenEnvelope(tile, panOrigin));
}
Geometry clipped = maxScreenBbox.intersection(feature.getGeometry());
vectorFeature.setClippedGeometry(clipped);
tile.addFeature(vectorFeature);
} else {
tile.addFeature(feature);
}
}
log.debug("clipTile after {}", tile);
} | [
"Apply clipping to the features in a tile. The tile and its features should already be in map space.\n\n@param tile\ntile to put features in\n@param scale\nscale\n@param panOrigin\nWhen panning on the client, only this parameter changes. So we need to be aware of it as we calculate\nthe maxScreenEnvelope.\n@throws GeomajasException oops"
] | [
"Returns a handle to the pool. Useful to obtain a handle to the\nstatistics for example.\n@return pool",
"Assigns a list of nodes in the cluster represented by this failure\ndetector configuration.\n\n@param nodes Collection of Node instances, usually determined from the\nCluster; must be non-null",
"Return a list of Flickr supported blogging services.\n\nThis method does not require authentication.\n\n@return List of Services\n@throws FlickrException",
"Updates metadata versions on stores.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param oldStoreDefs List of old store definitions\n@param newStoreDefs List of new store definitions",
"returns array with all allowed values\n@return allowed values",
"Check exactly the week check-boxes representing the given weeks.\n@param weeksToCheck the weeks selected.",
"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}",
"A package of the specified class will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClass\n@return self",
"Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClasses\n@return self"
] |
static String[] tokenize(String str) {
char sep = '.';
int start = 0;
int len = str.length();
int count = 0;
for (int pos = 0; pos < len; pos++) {
if (str.charAt(pos) == sep) {
if (pos != start) {
count++;
}
start = pos + 1;
}
}
if (len != start) {
count++;
}
String[] l = new String[count];
count = 0;
start = 0;
for (int pos = 0; pos < len; pos++) {
if (str.charAt(pos) == sep) {
if (pos != start) {
String tok = str.substring(start, pos);
l[count++] = tok;
}
start = pos + 1;
}
}
if (len != start) {
String tok = str.substring(start);
l[count/* ++ */] = tok;
}
return l;
} | [
"Tokenize the the string as a package hierarchy\n\n@param str\n@return"
] | [
"Based on a provided locale return a SoyMsgBundle file.\n\nIf a passed in locale object is \"Optional.absent()\",\nthe implementation will return Optional.absent() as well\n@param locale - maybe locale\n@return maybe soy msg bundle",
"Use this API to fetch server_service_binding resources of given name .",
"Cancel the pause operation",
"Return a stream of resources from a response\n\n@param response the response\n@param <R> the resource type\n@param <U> the response type\n@return a stream of resources from the response",
"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.",
"Use this API to fetch autoscalepolicy_binding resource of given name .",
"Utility function that fetches user defined store definitions\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch store definitions from\n@return The map container that maps store names to store definitions",
"Utility function that pauses and asks for confirmation on dangerous\noperations.\n\n@param confirm User has already confirmed in command-line input\n@param opDesc Description of the dangerous operation\n@throws IOException\n@return True if user confirms the operation in either command-line input\nor here.",
"Get a collection of public photos for the specified user ID.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param userId\nThe User ID\n@param extras\nSet of extra-attributes to include (may be null)\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return The PhotoList collection\n@throws FlickrException"
] |
public synchronized boolean hasNext()
{
try
{
if (!isHasCalledCheck())
{
setHasCalledCheck(true);
setHasNext(getRsAndStmt().m_rs.next());
if (!getHasNext())
{
autoReleaseDbResources();
}
}
}
catch (Exception ex)
{
setHasNext(false);
autoReleaseDbResources();
if(ex instanceof ResourceClosedException)
{
throw (ResourceClosedException)ex;
}
if(ex instanceof SQLException)
{
throw new PersistenceBrokerSQLException("Calling ResultSet.next() failed", (SQLException) ex);
}
else
{
throw new PersistenceBrokerException("Can't get next row from ResultSet", ex);
}
}
if (logger.isDebugEnabled())
logger.debug("hasNext() -> " + getHasNext());
return getHasNext();
} | [
"returns true if there are still more rows in the underlying ResultSet.\nReturns false if ResultSet is exhausted."
] | [
"Set the weekdays at which the event should take place.\n@param weekDays the weekdays at which the event should take place.",
"Finds the parent group of the given one and returns it\n\n@param group Group for which the parent is needed\n@return The parent group of the given one. If the given one is the first one, it returns the same group",
"Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null",
"Make a copy.",
"Execute a request through Odo processing\n\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@param history",
"Count the number of non-zero elements in R",
"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",
"Utility function that fetches partitions.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return all partitions on cluster",
"Retrieves a list of Terms of Service that belong to your Enterprise as an Iterable.\n@param api api the API connection to be used by the resource.\n@param termsOfServiceType the type of terms of service to be retrieved. Can be set to \"managed\" or \"external\"\n@return the Iterable of Terms of Service in an Enterprise that match the filter parameters."
] |
public final boolean getBoolean(String name)
{
boolean result = false;
Boolean value = (Boolean) getObject(name);
if (value != null)
{
result = BooleanHelper.getBoolean(value);
}
return result;
} | [
"Retrieve a boolean value.\n\n@param name column name\n@return boolean value"
] | [
"Deletes the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name.",
"Returns the connection count by key specified in this registry\n\nNote it might count connections that are closed but not removed from registry yet\n\n@param key\nthe key\n@return connection count by key",
"Return all option names that not already have a value\nand is enabled",
"Use this API to fetch all the csparameter resources that are configured on netscaler.",
"is ready to service requests",
"General API\n-> compile each of supplied files\n-> recompile any required types for which we have an incomplete principle structure",
"Create a deep copy.\n\n@param bindAddress overwrites bind address when creating deep copy.\n@return a copy of the server setup configuration.",
"Use this API to fetch all the vridparam resources that are configured on netscaler.",
"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."
] |
protected static Map<String, List<Statement>> addStatementToGroups(Statement statement, Map<String, List<Statement>> claims) {
Map<String, List<Statement>> newGroups = new HashMap<>(claims);
String pid = statement.getMainSnak().getPropertyId().getId();
if(newGroups.containsKey(pid)) {
List<Statement> newGroup = new ArrayList<>(newGroups.get(pid).size());
boolean statementReplaced = false;
for(Statement existingStatement : newGroups.get(pid)) {
if(existingStatement.getStatementId().equals(statement.getStatementId()) &&
!existingStatement.getStatementId().isEmpty()) {
statementReplaced = true;
newGroup.add(statement);
} else {
newGroup.add(existingStatement);
}
}
if(!statementReplaced) {
newGroup.add(statement);
}
newGroups.put(pid, newGroup);
} else {
newGroups.put(pid, Collections.singletonList(statement));
}
return newGroups;
} | [
"Adds a Statement to a given collection of statement groups.\nIf the statement id is not null and matches that of an existing statement,\nthis statement will be replaced.\n\n@param statement\n@param claims\n@return"
] | [
"Utility function that copies a string array and add another string to\nfirst\n\n@param arr Original array of strings\n@param add\n@return Copied array of strings",
"Method to be implemented by the RendererBuilder subtypes. In this method the library user will\ndefine the mapping between content and renderer class.\n\n@param content used to map object to Renderers.\n@return the class associated to the renderer.",
"Replace bad xml charactes in given array by space\n\n@param cbuf buffer to replace in\n@param off Offset from which to start reading characters\n@param len Number of characters to be replaced",
"Returns a string representation of map of chunk id to number of chunks\n\n@return String of map of chunk id to number of chunks",
"Send a device lost announcement to all registered listeners.\n\n@param announcement the last message received from the vanished device",
"Validates that we only have allowable filters.\n\n<p>Note that equality and ancestor filters are allowed, however they may result in\ninefficient sharding.",
"Tests correctness. Try\nfrom=1000, to=10000\nfrom=200, to=1000\nfrom=16, to=1000\nfrom=1000, to=Integer.MAX_VALUE",
"Pauses the playback of a sound.",
"Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory"
] |
private FieldType findForeignFieldType(Class<?> clazz, Class<?> foreignClass, Dao<?, ?> foreignDao)
throws SQLException {
String foreignColumnName = fieldConfig.getForeignCollectionForeignFieldName();
for (FieldType fieldType : foreignDao.getTableInfo().getFieldTypes()) {
if (fieldType.getType() == foreignClass
&& (foreignColumnName == null || fieldType.getField().getName().equals(foreignColumnName))) {
if (!fieldType.fieldConfig.isForeign() && !fieldType.fieldConfig.isForeignAutoRefresh()) {
// this may never be reached
throw new SQLException("Foreign collection object " + clazz + " for field '" + field.getName()
+ "' contains a field of class " + foreignClass + " but it's not foreign");
}
return fieldType;
}
}
// build our complex error message
StringBuilder sb = new StringBuilder();
sb.append("Foreign collection class ").append(clazz.getName());
sb.append(" for field '").append(field.getName()).append("' column-name does not contain a foreign field");
if (foreignColumnName != null) {
sb.append(" named '").append(foreignColumnName).append('\'');
}
sb.append(" of class ").append(foreignClass.getName());
throw new SQLException(sb.toString());
} | [
"If we have a class Foo with a collection of Bar's then we go through Bar's DAO looking for a Foo field. We need\nthis field to build the query that is able to find all Bar's that have foo_id that matches our id."
] | [
"When using a map rotation, there might be tiles that are outside the rotated map area. To avoid to load\nthese tiles, this method checks if a tile is really required to draw the map.",
"Print all relations for a given's class's tag\n@param tagname the tag containing the given relation\n@param from the source class\n@param edgetype the dot edge specification",
"Adds the given value to the set.\n\n@return true if the value was actually new",
"This one picks up on Dan2 ideas, but seeks to make less distinctions\nmid sequence by sorting for long words, but to maintain extra\ndistinctions for short words, by always recording the class of the\nfirst and last two characters of the word.\nCompared to chris2 on which it is based,\nit uses more Unicode classes, and so collapses things like\npunctuation more, and might work better with real unicode.\n\n@param s The String to find the word shape of\n@param omitIfInBoundary If true, character classes present in the\nfirst or last two (i.e., BOUNDARY_SIZE) letters\nof the word are not also registered\nas classes that appear in the middle of the word.\n@param knownLCWords If non-null and non-empty, tag with a \"k\" suffix words\nthat are in this list when lowercased (representing\nthat the word is \"known\" as a lowercase word).\n@return A word shape for the word.",
"Use this API to unset the properties of clusterinstance resources.\nProperties that need to be unset are specified in args array.",
"Generates new individual particle radius based on min and max radius setting.\n\n@return new particle radius",
"Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index whose value is to be returned\n@return The value of the specified element.",
"Writes a DTD that can be used for data XML files matching the current model to the given writer.\n\n@param output The writer to write the DTD to",
"Use this API to fetch appfwprofile_csrftag_binding resources of given name ."
] |
private JSONArray getApplicablePathNames (String requestUrl, Integer requestType) throws Exception {
RequestInformation requestInfo = requestInformation.get();
List<EndpointOverride> applicablePaths;
JSONArray pathNames = new JSONArray();
// Get all paths that match the request
applicablePaths = PathOverrideService.getInstance().getSelectedPaths(Constants.OVERRIDE_TYPE_REQUEST, requestInfo.client,
requestInfo.profile,
requestUrl + "?" + requestInfo.originalRequestInfo.getQueryString(),
requestType, true);
// Extract just the path name from each path
for (EndpointOverride path : applicablePaths) {
JSONObject pathName = new JSONObject();
pathName.put("name", path.getPathName());
pathNames.put(pathName);
}
return pathNames;
} | [
"Get the names of the paths that would apply to the request\n\n@param requestUrl URL of the request\n@param requestType Type of the request: GET, POST, PUT, or DELETE as integer\n@return JSONArray of path names\n@throws Exception"
] | [
"Parses command-line and checks if metadata is consistent across all\nnodes.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"Creates typed parser\n@param contentType class of parsed object\n@param <T> type of parsed object\n@return parser of objects of given type",
"Checks to see if the token is an integer scalar\n\n@return true if integer or false if not",
"Returns all the elements in the sorted set with a score in the given range.\nIn contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered\nfrom high to low scores.\nThe elements having the same score are returned in reverse lexicographical order.\n@param scoreRange\n@return elements in the specified score range",
"Gets the current page\n@return",
"Return the NTSC gray level of an RGB value.\n@param rgb1 the input pixel\n@return the gray level (0-255)",
"Use this API to fetch tmtrafficpolicy_tmglobal_binding resources of given name .",
"Searches for a declared method with a given name. If the class declares multiple methods with the given name,\nthere is no guarantee as of which methods is returned. Null is returned if the class does not declare a method\nwith the given name.\n@param clazz the given class\n@param methodName the given method name\n@return method method with the given name declared by the given class or null if no such method exists",
"Returns formatted version of Iban.\n\n@return A string representing formatted Iban for printing."
] |
public static double getDaycount(LocalDate startDate, LocalDate endDate, String convention) {
DayCountConventionInterface daycountConvention = getDayCountConvention(convention);
return daycountConvention.getDaycount(startDate, endDate);
} | [
"Return the number of days between startDate and endDate given the\nspecific daycount convention.\n\n@param startDate The start date given as a {@link org.threeten.bp.LocalDate}.\n@param endDate The end date given as a {@link org.threeten.bp.LocalDate}.\n@param convention A convention string.\n@return The number of days within the given period."
] | [
"adds a FIELDDESCRIPTOR to this ClassDescriptor.\n@param fld",
"Compares two annotated types and returns true if they are the same",
"Copies all elements from input into output which are > tol.\n@param input (Input) input matrix. Not modified.\n@param output (Output) Output matrix. Modified and shaped to match input.\n@param tol Tolerance for defining zero",
"Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed.",
"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",
"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.",
"Support the range subscript operator for String\n\n@param text a String\n@param range a Range\n@return a substring corresponding to the Range\n@since 1.0",
"Creates metadata on this folder using a specified template.\n\n@param templateName the name of the metadata template.\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Use this API to fetch all the nsacl6 resources that are configured on netscaler."
] |
public static appfwjsoncontenttype[] get(nitro_service service, String jsoncontenttypevalue[]) throws Exception{
if (jsoncontenttypevalue !=null && jsoncontenttypevalue.length>0) {
appfwjsoncontenttype response[] = new appfwjsoncontenttype[jsoncontenttypevalue.length];
appfwjsoncontenttype obj[] = new appfwjsoncontenttype[jsoncontenttypevalue.length];
for (int i=0;i<jsoncontenttypevalue.length;i++) {
obj[i] = new appfwjsoncontenttype();
obj[i].set_jsoncontenttypevalue(jsoncontenttypevalue[i]);
response[i] = (appfwjsoncontenttype) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"Use this API to fetch appfwjsoncontenttype resources of given names ."
] | [
"Recursively add indirect subclasses to a class record.\n\n@param directSuperClass\nthe superclass to add (together with its own superclasses)\n@param subClassRecord\nthe subclass to add to",
"Return the map bounds rotated with the set rotation. The bounds are adapted to rounding changes of the\nsize of the set paint area.\n\n@return Rotated bounds.",
"Determine if a CharSequence can be parsed as a BigInteger.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigInteger(String)\n@since 1.8.2",
"Processes and computes column counts of A\n\n@param A (Input) Upper triangular matrix\n@param parent (Input) Elimination tree.\n@param post (Input) Post order permutation of elimination tree. See {@link TriangularSolver_DSCC#postorder}\n@param counts (Output) Storage for column counts.",
"A smoothed step function. A cubic function is used to smooth the step between two thresholds.\n@param a the lower threshold position\n@param b the upper threshold position\n@param x the input parameter\n@return the output value",
"Upload a photo from an InputStream.\n\n@param in\n@param metaData\n@return photoId or ticketId\n@throws FlickrException",
"Check position type.\n\n@param type the type\n@return the boolean",
"Creates an immutable map. A copy of the given map is used. As a result, it is safe to modify the source map afterwards.\n\n@param map the given map\n@return an immutable map",
"Use this API to add dnssuffix."
] |
public static synchronized void clearDaoCache() {
if (classMap != null) {
classMap.clear();
classMap = null;
}
if (tableConfigMap != null) {
tableConfigMap.clear();
tableConfigMap = null;
}
} | [
"Clear out our DAO caches."
] | [
"Notifies that a content item is changed.\n\n@param position the position.",
"Execute push docker image on agent\n\n@param launcher\n@param log\n@param imageTag\n@param username\n@param password\n@param host @return\n@throws IOException\n@throws InterruptedException",
"Decompiles the given .class file and creates the specified output source file.\n\n@param classFilePath the .class file to be decompiled.\n@param outputDir The directory where decompiled .java files will be placed.",
"Start the initialization.\n\n@param id\n@param manager\n@param bootstrap\n@return the initialized Weld container",
"Use this API to fetch dnspolicylabel resource of given name .",
"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.",
"Remove a role from the list of defined roles.\n\n@param roleName - The name of the role to be removed.\n@return A key that can be used to undo the removal.",
"slave=true",
"Checks the preconditions for creating a new RequireSubStr processor with a List of Strings.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif requiredSubStrings or one of its elements is null\n@throws IllegalArgumentException\nif requiredSubStrings is empty"
] |
public DockerContainerObjectBuilder<T> withContainerObjectClass(Class<T> containerObjectClass) {
if (containerObjectClass == null) {
throw new IllegalArgumentException("container object class cannot be null");
}
this.containerObjectClass = containerObjectClass;
//First we check if this ContainerObject is defining a @CubeDockerFile in static method
final List<Method> methodsWithCubeDockerFile =
ReflectionUtil.getMethodsWithAnnotation(containerObjectClass, CubeDockerFile.class);
if (methodsWithCubeDockerFile.size() > 1) {
throw new IllegalArgumentException(
String.format(
"More than one %s annotation found and only one was expected. Methods where annotation was found are: %s",
CubeDockerFile.class.getSimpleName(), methodsWithCubeDockerFile));
}
classHasMethodWithCubeDockerFile = !methodsWithCubeDockerFile.isEmpty();
classDefinesCubeDockerFile = containerObjectClass.isAnnotationPresent(CubeDockerFile.class);
classDefinesImage = containerObjectClass.isAnnotationPresent(Image.class);
if (classHasMethodWithCubeDockerFile) {
methodWithCubeDockerFile = methodsWithCubeDockerFile.get(0);
boolean isMethodStatic = Modifier.isStatic(methodWithCubeDockerFile.getModifiers());
boolean methodHasNoArguments = methodWithCubeDockerFile.getParameterCount() == 0;
boolean methodReturnsAnArchive = Archive.class.isAssignableFrom(methodWithCubeDockerFile.getReturnType());
if (!isMethodStatic || !methodHasNoArguments || !methodReturnsAnArchive) {
throw new IllegalArgumentException(
String.format("Method %s annotated with %s is expected to be static, no args and return %s.",
methodWithCubeDockerFile, CubeDockerFile.class.getSimpleName(), Archive.class.getSimpleName()));
}
}
// User has defined @CubeDockerfile on the class and a method
if (classHasMethodWithCubeDockerFile && classDefinesCubeDockerFile) {
throw new IllegalArgumentException(
String.format(
"More than one %s annotation found and only one was expected. Both class and method %s has the annotation.",
CubeDockerFile.class.getSimpleName(), methodWithCubeDockerFile));
}
// User has defined @CubeDockerfile and @Image
if ((classHasMethodWithCubeDockerFile || classDefinesCubeDockerFile) && classDefinesImage) {
throw new IllegalArgumentException(
String.format("Container Object %s has defined %s annotation and %s annotation together.",
containerObjectClass.getSimpleName(), Image.class.getSimpleName(),
CubeDockerFile.class.getSimpleName()));
}
// User has not defined either @CubeDockerfile or @Image
if (!classDefinesCubeDockerFile && !classDefinesImage && !classHasMethodWithCubeDockerFile) {
throw new IllegalArgumentException(
String.format("Container Object %s is not annotated with either %s or %s annotations.",
containerObjectClass.getName(), CubeDockerFile.class.getSimpleName(), Image.class.getSimpleName()));
}
return this;
} | [
"Specifies the container object class to be instantiated\n\n@param containerObjectClass\ncontainer object class to be instantiated\n\n@return the current builder instance"
] | [
"Format a calendar instance that is parseable from JavaScript, according to ISO-8601.\n\n@param cal the calendar to format to a JSON string\n@return a formatted date in the form of a string",
"Read project calendars.",
"Copy a path recursively.\n@param source a Path pointing to a file or a directory that must exist\n@param target a Path pointing to a directory where the contents will be copied.\n@param overwrite overwrite existing files - if set to false fails if the target file already exists.\n@throws IOException",
"Add roles for given role parent item.\n\n@param ouItem group parent item",
"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",
"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",
"Get a fallback handler.\n\n@param header the protocol header\n@return the fallback handler",
"Use this API to update clusternodegroup resources.",
"Extract Primavera project data and export in another format.\n\n@param driverClass JDBC driver class name\n@param connectionString JDBC connection string\n@param projectID project ID\n@param outputFile output file\n@throws Exception"
] |
public static String getValue(Element element) {
if (element != null) {
Node dataNode = element.getFirstChild();
if (dataNode != null) {
return ((Text) dataNode).getData();
}
}
return null;
} | [
"Get the text value for the specified element. If the element is null, or the element's body is empty then this method will return null.\n\n@param element\nThe Element\n@return The value String or null"
] | [
"Make sure the result index points to the next available key in the scan result, if exists.",
"get specific property value of job.\n\n@param id the id\n@param property the property name/path\n@return the property value",
"Use this API to unset the properties of aaaparameter resource.\nProperties that need to be unset are specified in args array.",
"Returns the artifact available versions\n\n@param gavc String\n@return List<String>",
"Print classes that were parts of relationships, but not parsed by javadoc",
"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",
"Given a read-only store name and a directory, swaps it in while returning\nthe directory path being swapped out\n\n@param storeName The name of the read-only store\n@param directory The directory being swapped in\n@return The directory path which was swapped out\n@throws VoldemortException",
"Get an image using the specified URL suffix.\n\n@deprecated\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException",
"Removes all commas from the token list"
] |
public RedwoodConfiguration rootHandler(final LogRecordHandler handler){
tasks.add(new Runnable(){ public void run(){ Redwood.appendHandler(handler); } });
Redwood.appendHandler(handler);
return this;
} | [
"Add a custom Log Record Handler to the root of the tree\n@param handler The handler to add\n@return this"
] | [
"Serializes the given object in JSON and returns the resulting string. In\ncase of errors, null is returned. In particular, this happens if the\nobject is not based on a Jackson-annotated class. An error is logged in\nthis case.\n\n@param object\nobject to serialize\n@return JSON serialization or null",
"Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance",
"Sets the bounds of a UIObject, moving and sizing to match the\nbounds specified. Currently used for the itemhover and useful\nfor other absolutely positioned elements.",
"Get PhoneNumber object\n\n@return PhonenUmber | null on error",
"Installs a provider either in the scope or the pool of unbound providers.\n\n@param clazz the class for which to install the provider.\n@param bindingName the name, possibly {@code null}, for which to install the scoped provider.\n@param internalProvider the internal provider to install.\n@param isBound whether or not the provider is bound to the scope or belongs to the pool of unbound providers.\n@param isTestProvider whether or not is a test provider, installed through a Test Module that should override\nexisting providers for the same class-bindingname.\n@param <T> the type of {@code clazz}.\n\nNote to maintainers : we don't use this method directly, both {@link #installBoundProvider(Class, String, InternalProviderImpl, boolean)}\nand {@link #installUnBoundProvider(Class, String, InternalProviderImpl)}\nare a facade of this method and make the calls more clear.",
"Count the number of queued resource requests for a specific pool.\n\n@param key The key\n@return The count of queued resource requests. Returns 0 if no queue\nexists for given key.",
"Send parallel task to execution manager.\n\n@param task\nthe parallel task\n@return the batch response from manager",
"Allows to access the names of the current defined roundings.\n\n@param providers the providers and ordering to be used. By default providers and ordering as defined in\n#getDefaultProviders is used.\n@return the set of custom rounding ids, never {@code null}.",
"Sets the replace var map to single target.\n\n@param replacementVarMapList\nthe replacement var map list\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder"
] |
public static final Integer getInteger(String value)
{
Integer result;
try
{
result = Integer.valueOf(Integer.parseInt(value));
}
catch (Exception ex)
{
result = null;
}
return (result);
} | [
"Converts a string representation of an integer into an Integer object.\nSilently ignores any parse exceptions and returns null.\n\n@param value String representation of an integer\n@return Integer instance"
] | [
"Use this API to delete clusterinstance of given name.",
"Executes a given SPARQL query and returns a stream with the result in\nJSON format.\n\n@param query\n@return\n@throws IOException",
"Check if the print has not been asked to stop taking new jobs.\n\n@return true if it's OK to take new jobs.",
"Overridden method always creating a new instance\n\n@param contextual The bean to create\n@param creationalContext The creation context",
"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.",
"This method is called to alert project listeners to the fact that\na resource has been written to a project file.\n\n@param resource resource instance",
"Returns the default privacy level for geographic information attached to the user's photos.\n\n@return privacy-level\n@throws FlickrException\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_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PRIVATE",
"Helper method to Close all open socket connections and checkin back to\nthe pool\n\n@param storeNamesToCleanUp List of stores to be cleanedup from the current\nstreaming session",
"Checks if there's exactly one option that exists among all opts.\n\n@param options OptionSet to checked\n@param opts List of options to be checked\n@throws VoldemortException"
] |
public static String getCountryCodeAndCheckDigit(final String iban) {
return iban.substring(COUNTRY_CODE_INDEX,
COUNTRY_CODE_INDEX + COUNTRY_CODE_LENGTH + CHECK_DIGIT_LENGTH);
} | [
"Returns iban's country code and check digit.\n\n@param iban String\n@return countryCodeAndCheckDigit String"
] | [
"for testing purpose",
"Before cluster management operations, i.e. remember and disable quota\nenforcement settings",
"Use this API to fetch all the inatparam resources that are configured on netscaler.",
"Return the AnnotationNode for the named annotation, or else null.\nSupports Groovy 1.5 and Groovy 1.6.\n@param node - the AnnotatedNode\n@param name - the name of the annotation\n@return the AnnotationNode or else null",
"Serialize this `AppDescriptor` and output byte array\n\n@return\nserialize this `AppDescriptor` into byte array",
"Gets the host-ignore data for a slave host running the given version.\n\n@param major the kernel management API major version\n@param minor the kernel management API minor version\n@param micro the kernel management API micro version\n\n@return the host-ignore data, or {@code null} if there is no matching registration",
"Retrieve the default aliases to be applied to MPXJ task and resource fields.\n\n@return map of aliases",
"Creates the publish button.\n\n@param updateListener the update listener\n@return the publish button",
"Calcs the bonding size of given mesh.\n\n@param mesh Mesh to calc its bouding size.\n@return The bounding size for x, y and z axis."
] |
public static long getVisibilityCacheWeight(FluoConfiguration conf) {
long size = conf.getLong(VISIBILITY_CACHE_WEIGHT, VISIBILITY_CACHE_WEIGHT_DEFAULT);
if (size <= 0) {
throw new IllegalArgumentException(
"Cache size must be positive for " + VISIBILITY_CACHE_WEIGHT);
}
return size;
} | [
"Gets the visibility cache weight\n\n@param conf The FluoConfiguration\n@return The size of the cache value from the property value {@value #VISIBILITY_CACHE_WEIGHT}\nif it is set, else the value of the default value\n{@value #VISIBILITY_CACHE_WEIGHT_DEFAULT}"
] | [
"Opens the favorite dialog.\n\n@param explorer the explorer instance (null if not currently in explorer)",
"Emit a string event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)",
"Add server redirect to a profile\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@param groupId group ID\n@return ID of added ServerRedirect\n@throws Exception exception",
"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",
"Print an extended attribute value.\n\n@param writer parent MSPDIWriter instance\n@param value attribute value\n@param type type of the value being passed\n@return string representation",
"Removes the specified objects.\n\n@param collection The collection to remove.",
"Add roles for given role parent item.\n\n@param ouItem group parent item",
"Serializes this RuleSet in an XML document.\n\n@param destination The writer to which the XML document shall be written.",
"Queries a Search Index and returns ungrouped results. In case the query\nused grouping, an empty list is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the search query as a {@code List<T> }"
] |
public List<BindingInfo> getQueueBindings(String vhost, String queue) {
final URI uri = uriWithPath("./queues/" + encodePathSegment(vhost) +
"/" + encodePathSegment(queue) + "/bindings");
final BindingInfo[] result = this.rt.getForObject(uri, BindingInfo[].class);
return asListOrNull(result);
} | [
"Returns a list of bindings where provided queue is the destination.\n\n@param vhost vhost of the exchange\n@param queue destination queue name\n@return list of bindings"
] | [
"Replies to this comment with another message.\n@param message the message for the reply.\n@return info about the newly created reply comment.",
"Session connect generate channel.\n\n@param session\nthe session\n@return the channel\n@throws JSchException\nthe j sch exception",
"Replaces the first substring of this CharSequence that matches the given\nregular expression with the given replacement.\n\n@param self a CharSequence\n@param regex the capturing regex\n@param replacement the CharSequence to be substituted for each match\n@return a CharSequence with replaced content\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceFirst(String, String)\n@since 1.8.2",
"Sets the text alignment for all cells in the table.\n@param textAlignment new text alignment\n@throws NullPointerException if the argument was null\n@return this to allow chaining\n@throws {@link NullPointerException} if the argument was null",
"mark a node as blacklisted\n\n@param nodeId Integer node id of the node to be blacklisted",
"this method is not intended to be called by clients\n@since 2.12",
"Read a Synchro time from an input stream.\n\n@param is input stream\n@return Date instance",
"Allows direct access to the Undertow.Builder for custom configuration\n\n@param serverConfigurationFunction the serverConfigurationFunction",
"This is a convenience method which allows all projects in an\nXER file to be read in a single pass.\n\n@param is input stream\n@param linkCrossProjectRelations add Relation links that cross ProjectFile boundaries\n@return list of ProjectFile instances\n@throws MPXJException"
] |
@NonNull public Context getContext() {
if (searchView != null) {
return searchView.getContext();
} else if (supportView != null) {
return supportView.getContext();
}
throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
} | [
"Returns the context the view is running in, through which it can\naccess the current theme, resources, etc.\n\n@return The view's Context."
] | [
"Calculates the next snapshot version based on the current release version\n\n@param fromVersion The version to bump to next development version\n@return The next calculated development (snapshot) version",
"Gets the first group of a regex\n@param pattern Pattern\n@param str String to find\n@return the matching group",
"Convert a Identification to a By used in WebDriver Drivers.\n\n@return the correct By specification of the current Identification.",
"Reads the header data from a block.\n\n@param buffer block data\n@param offset current offset into block data\n@param postHeaderSkipBytes bytes to skip after reading the header\n@return current BlockHeader instance",
"Returns the names of the involved fields when post processing.\n\n@return the names of the involved fields",
"Use this API to fetch a aaaglobal_binding resource .",
"Get a sub-list of this list\n@param fromIndex index of the first element in the sub-list (inclusive)\n@param toIndex index of the last element in the sub-list (inclusive)\n@return the sub-list",
"Add an object into cache by key with expiration time specified\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached\n@param expiration\nthe seconds after which the object will be evicted from the cache",
"Reads a string of single byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nReading begins at the supplied offset into the array.\n\n@param data byte array of data\n@param offset offset into the array\n@return string value"
] |
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 ."
] | [
"Adds the word.\n\n@param w the w\n@throws ParseException the parse exception",
"Exception handler if we are unable to parse a json value into a java representation\n\n@param expectedType Name of the expected Type\n@param type Type of the json node\n@return SpinJsonDataFormatException",
"Set the meta data for the photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param title\nThe new title\n@param description\nThe new description\n@throws FlickrException",
"Determine the enum value corresponding to the track source slot found in the packet.\n\n@return the proper value",
"This method opens the named project, applies the named filter\nand displays the filtered list of tasks or resources. If an\ninvalid filter name is supplied, a list of valid filter names\nis shown.\n\n@param filename input file name\n@param filtername input filter name",
"Read properties from the active profiles.\n\nGoes through all active profiles (in the order the\nprofiles are defined in settings.xml) and extracts\nthe desired properties (if present). The prefix is\nused when looking up properties in the profile but\nnot in the returned map.\n\n@param prefix The prefix to use or null if no prefix should be used\n@param properties The properties to read\n\n@return A map containing the values for the properties that were found",
"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",
"Changes the vertex buffer associated with this mesh.\n@param vbuf new vertex buffer to use\n@see #setVertices(float[])\n@see #getVertexBuffer()\n@see #getVertices()",
"Parses the buffer into body content\n@param in ByteBuffer to parse\n@return a ByteBuffer with the parsed body content. Buffer in may not be depleted. If more data is\nneeded, null is returned. In the case of content complete, an empty ByteBuffer is returned.\n@throws BaseExceptions.ParserException"
] |
public ScheduleDescriptor generateScheduleDescriptor(LocalDate startDate, LocalDate endDate) {
return new ScheduleDescriptor(startDate, endDate, getFrequency(), getDaycountConvention(), getShortPeriodConvention(), getDateRollConvention(),
getBusinessdayCalendar(), getFixingOffsetDays(), getPaymentOffsetDays(), isUseEndOfMonth());
} | [
"Generate a schedule descriptor for the given start and end date.\n\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule descriptor"
] | [
"Remove all controllers but leave input manager running.\n@return number of controllers removed",
"Translate the operation address.\n\n@param op the operation\n@return the new operation",
"Performs a HTTP DELETE request.\n\n@return {@link Response}",
"Curries a function that takes four arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes three arguments. Never <code>null</code>.",
"Handles logging tasks related to a failure to connect to a remote HC.\n@param uri the URI at which the connection attempt was made. Can be {@code null} indicating a failure to discover the HC\n@param discoveryOption the {@code DiscoveryOption} used to determine {@code uri}\n@param moreOptions {@code true} if there are more untried discovery options\n@param e the exception",
"Setting the type of Checkbox.",
"Calculate start dates for a yearly recurrence.\n\n@param calendar current date\n@param dates array of start dates",
"Send a tempo changed announcement to all registered master listeners.\n\n@param tempo the new master tempo",
"Read a short int from an input stream.\n\n@param is input stream\n@return int value"
] |
private static JsonObject getFieldJsonObject(Field field) {
JsonObject fieldObj = new JsonObject();
fieldObj.add("type", field.getType());
fieldObj.add("key", field.getKey());
fieldObj.add("displayName", field.getDisplayName());
String fieldDesc = field.getDescription();
if (fieldDesc != null) {
fieldObj.add("description", field.getDescription());
}
Boolean fieldIsHidden = field.getIsHidden();
if (fieldIsHidden != null) {
fieldObj.add("hidden", field.getIsHidden());
}
JsonArray array = new JsonArray();
List<String> options = field.getOptions();
if (options != null && !options.isEmpty()) {
for (String option : options) {
JsonObject optionObj = new JsonObject();
optionObj.add("key", option);
array.add(optionObj);
}
fieldObj.add("options", array);
}
return fieldObj;
} | [
"Gets the JsonObject representation of the given field object.\n@param field represents a template field\n@return the json object"
] | [
"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.",
"we only use the registrationList map if the object is not a proxy. During the\nreference locking, we will materialize objects and they will enter the registered for\nlock map.",
"The entity instance is not in the session cache\n\nCopied from Loader#instanceNotYetLoaded",
"Gets Widget layout dimension\n@param axis The {@linkplain Layout.Axis axis} to obtain layout size for\n@return dimension",
"If this represents an ip address, returns that address.\nIf this represents a host, returns the resolved ip address of that host.\nOtherwise, returns null, but only for strings that are considered valid address strings but cannot be converted to address objects.\n\nThis method will throw exceptions for invalid formats and failures to resolve the address. The equivalent method {@link #getAddress()} will simply return null rather than throw those exceptions.\n\nIf you wish to get the represented address and avoid DNS resolution, use {@link #asAddress()} or {@link #asAddressString()}\n\n@return",
"Ensures that the given collection descriptor has the collection-class property if necessary.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If collection-class is given for an array or if no collection-class is given but required",
"Read a nested table. Instantiates the supplied reader class to\nextract the data.\n\n@param reader table reader class\n@return table rows",
"The smallest granularity of rebalancing where-in we move partitions for a\nsub-set of stores. Finally at the end of the movement, the node is\nremoved out of rebalance state\n\n<br>\n\nAlso any errors + rollback procedures are performed at this level itself.\n\n<pre>\n| Case | hasRO | hasRW | finishedRO | Action |\n| 0 | t | t | t | rollback cluster change + swap |\n| 1 | t | t | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 2 | t | f | t | won't be triggered since hasRW is false |\n| 3 | t | f | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 4 | f | t | t | rollback cluster change |\n| 5 | f | t | f | won't be triggered |\n| 6 | f | f | t | won't be triggered |\n| 7 | f | f | f | won't be triggered |\n</pre>\n\n@param batchId Rebalance batch id\n@param batchRollbackCluster Cluster to rollback to if we have a problem\n@param rebalanceTaskPlanList The list of rebalance partition plans\n@param hasReadOnlyStores Are we rebalancing any read-only stores?\n@param hasReadWriteStores Are we rebalancing any read-write stores?\n@param finishedReadOnlyStores Have we finished rebalancing of read-only\nstores?",
"Send a packet to the target device telling it to load the specified track from the specified source player.\n\n@param target an update from the player that you want to have load a track\n@param rekordboxId the identifier of a track within the source player's rekordbox database\n@param sourcePlayer the device number of the player from which the track should be loaded\n@param sourceSlot the media slot from which the track should be loaded\n@param sourceType the type of track to be loaded\n\n@throws IOException if there is a problem sending the command\n@throws IllegalStateException if the {@code VirtualCdj} is not active"
] |
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"
] | [
"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",
"Creates an immutable list that consists of the elements in the given array. A copy of the given array is used which means\nthat any modifications to the given array will not affect the immutable list.\n\n@param elements the given array of elements\n@return an immutable list",
"calculate the point a's angle of rectangle consist of point a,point b, point c;\n\n@param vertex\n@param A\n@param B\n@return",
"Cancel on target hosts.\n\n@param targetHosts\nthe target hosts\n@return true, if successful",
"Used to get the complex value of a matrix element.\n@param row The row of the element.\n@param col The column of the element.\n@param output Storage for the value",
"Main method to run the bot.\n\n@param args\n@throws LoginFailedException\n@throws IOException\n@throws MediaWikiApiErrorException",
"The specified interface must not contain methods, that changes the state of this object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@param settings\nsettings to generate code\n@return generated source code as string in a result wrapper",
"Show books.\n\n@param booksList the books list",
"Notifies that multiple content items are removed.\n\n@param positionStart the position.\n@param itemCount the item count."
] |
public static String entityToString(HttpEntity entity) throws IOException {
if (entity != null) {
InputStream is = entity.getContent();
return IOUtils.toString(is, "UTF-8");
}
return "";
} | [
"Converts the http entity to string. If entity is null, returns empty string.\n@param entity\n@return\n@throws IOException"
] | [
"Add fields to the text index configuration.\n\n@param fields the {@link TextIndex.Field} configurations to add\n@return the builder for chaining",
"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",
"Convert Collection to Set\n@param collection Collection\n@return Set",
"Generate the specified output file by merging the specified\nVelocity template with the supplied context.",
"Gets the Kumar-Johnson divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Kumar-Johnson divergence between p and q.",
"Returns all entries in no particular order.",
"Establishes a thread that on one second intervals reports the number of remaining WorkBlocks enqueued and the\ntotal number of lines written and reported by consumers",
"Writes this address as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix.",
"Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops"
] |
public void beforeCompletion()
{
// avoid redundant calls
if(beforeCompletionCall) return;
log.info("Method beforeCompletion was called");
int status = Status.STATUS_UNKNOWN;
try
{
JTATxManager mgr = (JTATxManager) getImplementation().getTxManager();
status = mgr.getJTATransaction().getStatus();
// ensure proper work, check all possible status
// normally only check for 'STATUS_MARKED_ROLLBACK' is necessary
if(status == Status.STATUS_MARKED_ROLLBACK
|| status == Status.STATUS_ROLLEDBACK
|| status == Status.STATUS_ROLLING_BACK
|| status == Status.STATUS_UNKNOWN
|| status == Status.STATUS_NO_TRANSACTION)
{
log.error("Synchronization#beforeCompletion: Can't prepare for commit, because tx status was "
+ TxUtil.getStatusString(status) + ". Do internal cleanup only.");
}
else
{
if(log.isDebugEnabled())
{
log.debug("Synchronization#beforeCompletion: Prepare for commit");
}
// write objects to database
prepareCommit();
}
}
catch(Exception e)
{
log.error("Synchronization#beforeCompletion: Error while prepare for commit", e);
if(e instanceof LockNotGrantedException)
{
throw (LockNotGrantedException) e;
}
else if(e instanceof TransactionAbortedException)
{
throw (TransactionAbortedException) e;
}
else if(e instanceof ODMGRuntimeException)
{
throw (ODMGRuntimeException) e;
}
else
{
throw new ODMGRuntimeException("Method beforeCompletion() fails, status of JTA-tx was "
+ TxUtil.getStatusString(status) + ", message: " + e.getMessage());
}
}
finally
{
beforeCompletionCall = true;
setInExternTransaction(false);
internalCleanup();
}
} | [
"FOR internal use. This method was called before the external transaction was completed.\n\nThis method was called by the JTA-TxManager before the JTA-tx prepare call. Within this method\nwe prepare odmg for commit and pass all modified persistent objects to DB and release/close the used\nconnection. We have to close the connection in this method, because the TxManager does prepare for commit\nafter this method and all used DataSource-connections have to be closed before.\n\n@see javax.transaction.Synchronization"
] | [
"Returns true if the specified name is NOT allowed. It isn't allowed if it matches a built in operator\nor if it contains a restricted character.",
"creates a point array of all dockers and add it to the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Join a group as a public member.\n\nNote: if a group has rules - the client must display the rules to the user and the user must accept them prior to joining the group. The acceptRules\nparameter indicates that the user has accepted those rules.\n\n@param groupId\n- the id of the group to join\n@param acceptRules\n- if a group has rules, true indicates the user has accepted the rules\n\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.join.html\">flickr.groups.join</a>",
"Creates a new section in a project.\n\nReturns the full record of the newly created section.\n\n@param project The project to create the section in\n@return Request object",
"Converts the suggestions from the Solrj format to JSON format.\n\n@param response The SpellCheckResponse object containing the spellcheck results.\n@return The spellcheck suggestions as JSON object or null if something goes wrong.",
"Iterate RMI Targets Map and remove entries loaded by protected ClassLoader",
"Write the given long value as a 4 byte unsigned integer. Overflow is\nignored.\n\n@param buffer The buffer to write to\n@param index The position in the buffer at which to begin writing\n@param value The value to write",
"Adds special accessors for private constants so that inner classes can retrieve them.",
"Add image with a exception message in the PDF document.\n\n@param context\nPDF context\n@param e\nexception to put in image"
] |
protected PatchEntry resolveForElement(final PatchElement element) throws PatchingException {
assert state == State.NEW;
final PatchElementProvider provider = element.getProvider();
final String layerName = provider.getName();
final LayerType layerType = provider.getLayerType();
final Map<String, PatchEntry> map;
if (layerType == LayerType.Layer) {
map = layers;
} else {
map = addOns;
}
PatchEntry entry = map.get(layerName);
if (entry == null) {
final InstallationManager.MutablePatchingTarget target = modification.resolve(layerName, layerType);
if (target == null) {
throw PatchLogger.ROOT_LOGGER.noSuchLayer(layerName);
}
entry = new PatchEntry(target, element);
map.put(layerName, entry);
}
// Maintain the most recent element
entry.updateElement(element);
return entry;
} | [
"Get the target entry for a given patch element.\n\n@param element the patch element\n@return the patch entry\n@throws PatchingException"
] | [
"Gets the value of the project property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the project property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetProject().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ProjectListType.Project }",
"Handles the response of the getVersion request.\n@param incomingMessage the response message to process.",
"Counts the number of documents in the collection.\n\n@return a task containing the number of documents in the collection",
"A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used\nbootstrap CL instead.\n\n@return the base CL to use.",
"Function to serialize the given list of Vector clocks into a string. If\nsomething goes wrong, it returns an empty string.\n\n@param vectorClocks The Vector clock list to serialize\n@return The string (JSON) version of the specified Vector clock",
"Get the first non-white Y point\n@param img Image in memory\n@return the trimmed y start",
"This is a generic function for retrieving any config value. The returned value\nis the one the server is operating with, no matter whether it comes from defaults\nor from the user-supplied configuration.\n\nThis function only provides access to configs which are deemed safe to share\npublicly (i.e.: not security-related configs). The list of configs which are\nconsidered off-limit can itself be configured via '{@value #RESTRICTED_CONFIGS}'.\n\n@param key config key for which to retrieve the value.\n@return the value for the requested config key, in String format.\nMay return null if the key exists and its value is explicitly set to null.\n@throws UndefinedPropertyException if the requested key does not exist in the config.\n@throws ConfigurationException if the requested key is not publicly available.",
"Sets number of pages. If the index of currently selected page is bigger than the total number\nof pages, first page will be selected instead.\n@return difference between the previous number of pages and new one. Negative value is\nreturned if new number of pages is less then it was before.",
"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"
] |
public Iterator<K> tailIterator(@NotNull final K key) {
return new Iterator<K>() {
private Stack<TreePos<K>> stack;
private boolean hasNext;
private boolean hasNextValid;
@Override
public boolean hasNext() {
if (hasNextValid) {
return hasNext;
}
hasNextValid = true;
if (stack == null) {
Node<K> root = getRoot();
if (root == null) {
hasNext = false;
return hasNext;
}
stack = new Stack<>();
if (!root.getLess(key, stack)) {
stack.push(new TreePos<>(root));
}
}
TreePos<K> treePos = stack.peek();
if (treePos.node.isLeaf()) {
while (treePos.pos >= (treePos.node.isTernary() ? 2 : 1)) {
stack.pop();
if (stack.isEmpty()) {
hasNext = false;
return hasNext;
}
treePos = stack.peek();
}
} else {
if (treePos.pos == 0) {
treePos = new TreePos<>(treePos.node.getFirstChild());
} else if (treePos.pos == 1) {
treePos = new TreePos<>(treePos.node.getSecondChild());
} else {
treePos = new TreePos<>(treePos.node.getThirdChild());
}
stack.push(treePos);
while (!treePos.node.isLeaf()) {
treePos = new TreePos<>(treePos.node.getFirstChild());
stack.push(treePos);
}
}
treePos.pos++;
hasNext = true;
return hasNext;
}
@Override
public K next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
hasNextValid = false;
TreePos<K> treePos = stack.peek();
// treePos.pos must be 1 or 2 here
return treePos.pos == 1 ? treePos.node.getFirstKey() : treePos.node.getSecondKey();
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
} | [
"Returns an iterator that iterates over all elements greater or equal to key in ascending order\n\n@param key key\n@return iterator"
] | [
"Sets the texture this render target will render to.\nIf no texture is provided, the render target will\nnot render anything.\n@param texture GVRRenderTexture to render to.",
"What is something came in between when we last checked and when this method is called",
"This method is used to extract the resource hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param resource resource instance\n@param data hyperlink data block",
"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.",
"Adds to this set all of the elements in the specified members array\n@param members the members to add\n@return the number of members actually added",
"Set a knot blend type.\n@param n the knot index\n@param type the knot blend type\n@see #getKnotBlend",
"Layout children inside the layout container",
"Ends the transition",
"Add key value pair to extra info\n\n@param key Key of new item\n@param value New value to add"
] |
public static List<ClassReference> analyze(WildcardImportResolver importResolver, Set<String> libraryPaths, Set<String> sourcePaths,
Path sourceFile)
{
ASTParser parser = ASTParser.newParser(AST.JLS11);
parser.setEnvironment(libraryPaths.toArray(new String[libraryPaths.size()]), sourcePaths.toArray(new String[sourcePaths.size()]), null, true);
parser.setBindingsRecovery(false);
parser.setResolveBindings(true);
Map options = JavaCore.getOptions();
JavaCore.setComplianceOptions(JavaCore.VERSION_1_8, options);
parser.setCompilerOptions(options);
String fileName = sourceFile.getFileName().toString();
parser.setUnitName(fileName);
try
{
parser.setSource(FileUtils.readFileToString(sourceFile.toFile()).toCharArray());
}
catch (IOException e)
{
throw new ASTException("Failed to get source for file: " + sourceFile.toString() + " due to: " + e.getMessage(), e);
}
parser.setKind(ASTParser.K_COMPILATION_UNIT);
CompilationUnit cu = (CompilationUnit) parser.createAST(null);
ReferenceResolvingVisitor visitor = new ReferenceResolvingVisitor(importResolver, cu, sourceFile.toString());
cu.accept(visitor);
return visitor.getJavaClassReferences();
} | [
"Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either\njar files or references to directories containing class files.\n\nThe sourcePaths must be a reference to the top level directory for sources (eg, for a file\nsrc/main/java/org/example/Foo.java, the source path would be src/main/java).\n\nThe wildcard resolver provides a fallback for processing wildcard imports that the underlying parser was unable\nto resolve."
] | [
"Handles retrieval of primitive char type.\n\n@param field required field\n@param defaultValue default value if field is missing\n@return char value",
"Returns the screen height in pixels\n\n@param context is the context to get the resources\n@return the screen height in pixels",
"Return the List of Arguments for the specified MethodCallExpression or a ConstructorCallExpression.\nThe returned List contains either ConstantExpression or MapEntryExpression objects.\n@param methodCall - the AST MethodCallExpression or ConstructorCalLExpression\n@return the List of argument objects",
"Returns the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.\n\n@param namespace the namespace referring to the undo collection.\n@return the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.",
"Converts a string representation of an integer into an Integer object.\nSilently ignores any parse exceptions and returns null.\n\n@param value String representation of an integer\n@return Integer instance",
"remove drag support from the given Component.\n@param c the Component to remove",
"Generate a map of UUID values to field types.\n\n@return UUID field value map",
"Generates an organization regarding the parameters.\n\n@param name String\n@return Organization",
"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"
] |
private UserAlias getUserAlias(Object attribute)
{
if (m_userAlias != null)
{
return m_userAlias;
}
if (!(attribute instanceof String))
{
return null;
}
if (m_alias == null)
{
return null;
}
if (m_aliasPath == null)
{
boolean allPathsAliased = true;
return new UserAlias(m_alias, (String)attribute, allPathsAliased);
}
return new UserAlias(m_alias, (String)attribute, m_aliasPath);
} | [
"Retrieves or if necessary, creates a user alias to be used\nby a child criteria\n@param attribute The alias to set"
] | [
"Creates a new SimpleMatrix with the specified DMatrixRMaj used as its internal matrix. This means\nthat the reference is saved and calls made to the returned SimpleMatrix will modify the passed in DMatrixRMaj.\n\n@param internalMat The internal DMatrixRMaj of the returned SimpleMatrix. Will be modified.",
"Use this API to fetch a rewriteglobal_binding resource .",
"Builds a string that serializes a list of objects separated by the pipe\ncharacter. The toString methods are used to turn objects into strings.\nThis operation is commonly used to build parameter lists for API\nrequests.\n\n@param objects\nthe objects to implode\n@return string of imploded objects",
"Encode a path in a manner suitable for a GET request\n@param in The path to encode, eg \"a/document\"\n@return The encoded path eg \"a%2Fdocument\"",
"Gets the path used for the results of XSLT Transforms.",
"Convenience method dispatches this object to the source appender, which\nwill result in the custom message being appended to the new file.\n\n@param message\nThe custom logging message to be appended.",
"Examine the given model node, resolving any expressions found within, including within child nodes.\n\n@param node the node\n@return a node with all expressions resolved\n@throws OperationFailedException if an expression cannot be resolved",
"Executes the API action \"wbsetaliases\" for the given parameters.\n\n@param id\nthe id of the entity to be edited; if used, the site and title\nparameters must be null\n@param site\nwhen selecting an entity by title, the site key for the title,\ne.g., \"enwiki\"; if used, title must also be given but id must\nbe null\n@param title\nstring used to select an entity by title; if used, site must\nalso be given but id must be null\n@param newEntity\nused for creating a new entity of a given type; the value\nindicates the intended entity type; possible values include\n\"item\" and \"property\"; if used, the parameters id, site, and\ntitle must be null\n@param language\nthe language code for the label\n@param add\nthe values of the aliases to add. They will be merged with the\nexisting aliases. This parameter cannot be used in conjunction\nwith \"set\".\n@param remove\nthe values of the aliases to remove. Other aliases will be retained.\nThis parameter cannot be used in conjunction with \"set\".\n@param set\nthe values of the aliases to set. This will erase any existing\naliases in this language and replace them by the given list.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Examines the list of variables for any unknown variables and throws an exception if one is found"
] |
public void signOff(String key, Collection<WebSocketConnection> connections) {
if (connections.isEmpty()) {
return;
}
ConcurrentMap<WebSocketConnection, WebSocketConnection> bag = ensureConnectionList(key);
bag.keySet().removeAll(connections);
} | [
"Sign off a group of connections from the registry by key\n\n@param key\nthe key\n@param connections\na collection of websocket connections"
] | [
"Get a property as a string or defaultValue.\n\n@param key the property name\n@param defaultValue the default value",
"Saves the loaded XML bundle as property bundle.\n@throws UnsupportedEncodingException thrown if localizations from the XML bundle could not be loaded correctly.\n@throws CmsException thrown if any of the interactions with the VFS fails.\n@throws IOException thrown if localizations from the XML bundle could not be loaded correctly.",
"Possibly coalesces the newest change event to match the user's original intent. For example,\nan unsynchronized insert and update is still an insert.\n\n@param lastUncommittedChangeEvent the last change event known about for a document.\n@param newestChangeEvent the newest change event known about for a document.\n@return the possibly coalesced change event.",
"Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add.",
"Use this API to fetch authenticationldappolicy_authenticationvserver_binding resources of given name .",
"Get distance between geographical coordinates\n@param point1 Point1\n@param point2 Point2\n@return Distance (double)",
"Open the log file for writing.",
"Visit all child nodes but not this one.\n\n@param visitor The visitor to use.",
"Returns the input to parse including the whitespace left to the cursor position since\nit may be relevant to the list of proposals for whitespace sensitive languages."
] |
public static base_response unset(nitro_service client, filterhtmlinjectionparameter resource, String[] args) throws Exception{
filterhtmlinjectionparameter unsetresource = new filterhtmlinjectionparameter();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of filterhtmlinjectionparameter resource.\nProperties that need to be unset are specified in args array."
] | [
"Check that each emitted notification is properly described by its source.",
"Writes and reads the XOP attachment using a CXF JAX-RS Proxy\nThe proxy automatically sets the \"mtom-enabled\" property by checking\nthe CXF EndpointProperty set on the XopAttachment interface.\n\n@throws Exception",
"Get a boolean value from the values or null.\n\n@param key the look up key of the value",
"Creates a player wrapper for the Android MediaPlayer.",
"Use this API to delete onlinkipv6prefix of given name.",
"Reads all text up to next XML tag and returns it as a String.\n\n@return the String of the text read, which may be empty.",
"Merge the given maps.\n\n<p>\nThe replied map is a view on the given two maps.\nIf a key exists in the two maps, the replied value is the value of the right operand.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n<p>\nThe replied map is unmodifiable.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@since 2.15",
"Checks if request is intended for Gerrit host.",
"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}"
] |
public static boolean isMessageContentToBeLogged(final Message message, final boolean logMessageContent,
boolean logMessageContentOverride) {
/*
* If controlling of logging behavior is not allowed externally
* then log according to global property value
*/
if (!logMessageContentOverride) {
return logMessageContent;
}
Object logMessageContentExtObj = message.getContextualProperty(EXTERNAL_PROPERTY_NAME);
if (null == logMessageContentExtObj) {
return logMessageContent;
} else if (logMessageContentExtObj instanceof Boolean) {
return ((Boolean) logMessageContentExtObj).booleanValue();
} else if (logMessageContentExtObj instanceof String) {
String logMessageContentExtVal = (String) logMessageContentExtObj;
if (logMessageContentExtVal.equalsIgnoreCase("true")) {
return true;
} else if (logMessageContentExtVal.equalsIgnoreCase("false")) {
return false;
} else {
return logMessageContent;
}
} else {
return logMessageContent;
}
} | [
"If the \"org.talend.esb.sam.agent.log.messageContent\" property value is \"true\" then log the message content\nIf it is \"false\" then skip the message content logging\nElse fall back to global property \"log.messageContent\"\n\n@param message\n@param logMessageContent\n@param logMessageContentOverride\n@return"
] | [
"callers of doLogin should be serialized before calling in.",
"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",
"Group results by the specified field.\n\n@param fieldName by which to group results\n@param isNumber whether field isNumeric.\n@return this for additional parameter setting or to query",
"Reply used in error cases. set the response header as null.\n\n@param errorMessage the error message\n@param stackTrace the stack trace\n@param statusCode the status code\n@param statusCodeInt the status code int",
"Assign FK value to all n-side objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation",
"Function to perform the forward pass for batch convolution",
"Retrieves the working hours on the given date.\n\n@param date required date\n@param cal optional calendar instance\n@param day optional day instance\n@return working hours",
"Determines the constraints relating to a task.\n\n@param row row data\n@param task Task instance",
"Use this API to fetch all the Interface resources that are configured on netscaler."
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.