query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static BoxUser.Info createEnterpriseUser(BoxAPIConnection api, String login, String name,
CreateUserParams params) {
JsonObject requestJSON = new JsonObject();
requestJSON.add("login", login);
requestJSON.add("name", name);
if (params != null) {
if (params.getRole() != null) {
requestJSON.add("role", params.getRole().toJSONValue());
}
if (params.getStatus() != null) {
requestJSON.add("status", params.getStatus().toJSONValue());
}
requestJSON.add("language", params.getLanguage());
requestJSON.add("is_sync_enabled", params.getIsSyncEnabled());
requestJSON.add("job_title", params.getJobTitle());
requestJSON.add("phone", params.getPhone());
requestJSON.add("address", params.getAddress());
requestJSON.add("space_amount", params.getSpaceAmount());
requestJSON.add("can_see_managed_users", params.getCanSeeManagedUsers());
requestJSON.add("timezone", params.getTimezone());
requestJSON.add("is_exempt_from_device_limits", params.getIsExemptFromDeviceLimits());
requestJSON.add("is_exempt_from_login_verification", params.getIsExemptFromLoginVerification());
requestJSON.add("is_platform_access_only", params.getIsPlatformAccessOnly());
requestJSON.add("external_app_user_id", params.getExternalAppUserId());
}
URL url = USERS_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, "POST");
request.setBody(requestJSON.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
BoxUser createdUser = new BoxUser(api, responseJSON.get("id").asString());
return createdUser.new Info(responseJSON);
} | [
"Provisions a new user in an enterprise with additional user information.\n@param api the API connection to be used by the created user.\n@param login the email address the user will use to login.\n@param name the name of the user.\n@param params additional user information.\n@return the created user's info."
] | [
"Converts a parameter map to the parameter string.\n@param parameters the parameter map.\n@return the parameter string.",
"Generate random velocities for every particle. The direction is obtained by assuming\nthe position of a particle as a vector. This normalised vector is scaled by\nthe speed range.\n\n@return",
"Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads\nhave actually been paused if possible.\n\n@throws LocalOperationException if the method is called while no upload is going on.",
"Reads the detail container resources which are connected by relations to the given resource.\n\n@param cms the current CMS context\n@param res the detail content\n\n@return the list of detail only container resources\n\n@throws CmsException if something goes wrong",
"Use this API to fetch inat resource of given name .",
"Creates a general purpose solver. Use this if you are not sure what you need.\n\n@param numRows The number of rows that the decomposition is optimized for.\n@param numCols The number of columns that the decomposition is optimized for.",
"Gets information about all of the group memberships for this group.\nDoes not support paging.\n@return a collection of information about the group memberships for this group.",
"Calculate Euclidean distance between two points.\n\n@param anotherPoint Point to calculate distance to.\n@return Euclidean distance between this point and anotherPoint points.",
"Gets the JsonObject representation of the given field object.\n@param field represents a template field\n@return the json object"
] |
public static BoxStoragePolicyAssignment.Info create(BoxAPIConnection api, String policyID, String userID) {
URL url = STORAGE_POLICY_ASSIGNMENT_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, HttpMethod.POST);
JsonObject requestJSON = new JsonObject()
.add("storage_policy", new JsonObject()
.add("type", "storage_policy")
.add("id", policyID))
.add("assigned_to", new JsonObject()
.add("type", "user")
.add("id", userID));
request.setBody(requestJSON.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
BoxStoragePolicyAssignment storagePolicyAssignment = new BoxStoragePolicyAssignment(api,
responseJSON.get("id").asString());
return storagePolicyAssignment.new Info(responseJSON);
} | [
"Create a BoxStoragePolicyAssignment for a BoxStoragePolicy.\n@param api the API connection to be used by the resource.\n@param policyID the policy ID of the BoxStoragePolicy.\n@param userID the user ID of the to assign the BoxStoragePolicy to.\n@return the information about the BoxStoragePolicyAssignment created."
] | [
"Puts the cached security context in the thread local.\n\n@param context the cache context",
"Override this method to supply a custom splash screen image.\n\n@param gvrContext\nThe new {@link GVRContext}\n@return Texture to display\n\n@since 1.6.4",
"Creates a server setup based on provided properties.\n\n@param properties the properties.\n@return the server setup, or an empty array.",
"Use this API to add gslbsite.",
"absolute for basicJDBCSupport\n@param row",
"Convert a method name into a property name.\n\n@param method target method\n@return property name",
"This method retrieves a byte array containing the data at the\ngiven index in the block. If no data is found at the given index\nthis method returns null.\n\n@param index index of the data item to be retrieved\n@return byte array containing the requested data",
"Convenience method to allow a cause. Grrrr.",
"Loads the tag definitions from the files with a \".tags.xml\" suffix from the addons."
] |
public final void unregisterView(final View view) {
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
if (null != mRenderableViewGroup && view.getParent() == mRenderableViewGroup) {
mRenderableViewGroup.removeView(view);
}
}
});
} | [
"Remove a child view of Android hierarchy view .\n\n@param view View to be removed."
] | [
"Retrieves the default calendar for this project based on the calendar name\ngiven in the project properties. If a calendar of this name cannot be found, then\nthe first calendar listed for the project will be returned. If the\nproject contains no calendars, then a default calendar is added.\n\n@return default projectCalendar instance",
"Build copyright map once.",
"Download a file asynchronously.\n@param url the URL pointing to the file\n@param retrofit the retrofit client\n@return an Observable pointing to the content of the file",
"Reports a given exception as a RuntimeException, since the interface does\nnot allow us to throw checked exceptions directly.\n\n@param e\nthe exception to report\n@throws RuntimeException\nin all cases",
"Generate the init script from the Artifactory URL.\n\n@return The generated script.",
"Helper method used to peel off spurious wrappings of DateTimeException\n\n@param e DateTimeException to peel\n\n@return DateTimeException that does not have another DateTimeException as its cause.",
"Read custom property definitions for tasks.\n\n@param gpTasks GanttProject tasks",
"Connects to a child JVM process\n\n@param p the process to which to connect\n@param startAgent whether to installed the JMX agent in the target process if not already in place\n@return an {@link MBeanServerConnection} to the process's MBean server",
"Extracts warnings that are returned in an API response.\n\n@param root\nroot node of the JSON result"
] |
public static auditsyslogpolicy_aaauser_binding[] get(nitro_service service, String name) throws Exception{
auditsyslogpolicy_aaauser_binding obj = new auditsyslogpolicy_aaauser_binding();
obj.set_name(name);
auditsyslogpolicy_aaauser_binding response[] = (auditsyslogpolicy_aaauser_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch auditsyslogpolicy_aaauser_binding resources of given name ."
] | [
"Multiplies all positions with a factor v\n@param v Multiplication factor",
"Retrieves the real subject from the underlying RDBMS. Override this\nmethod if the object is to be materialized in a specific way.\n\n@return The real subject of the proxy",
"Shows the given step.\n\n@param step the step",
"Distributed process finish.\n\n@param rb the rb\n@param mtasFields the mtas fields\n@throws IOException Signals that an I/O exception has occurred.",
"A simple convinience function that decomposes the matrix but automatically checks the input ti make\nsure is not being modified.\n\n@param decomp Decomposition which is being wrapped\n@param M THe matrix being decomposed.\n@param <T> Matrix type.\n@return If the decomposition was successful or not.",
"Check if values in the column \"property\" are written to the bundle descriptor.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle descriptor.",
"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",
"Sets a quota for a users.\n\n@param user the user.\n@param quota the quota.",
"Generate a weighted score based on position for matches of URI parts.\nThe matches are weighted in descending order from left to right.\nExact match is weighted higher than group match, and group match is weighted higher than wildcard match.\n\n@param requestUriParts the parts of request URI\n@param destUriParts the parts of destination URI\n@return weighted score"
] |
public void await() {
boolean intr = false;
final Object lock = this.lock;
try {
synchronized (lock) {
while (! readClosed) {
try {
lock.wait();
} catch (InterruptedException e) {
intr = true;
}
}
}
} finally {
if (intr) {
Thread.currentThread().interrupt();
}
}
} | [
"Wait for the read side to close. Used when the writer needs to know when\nthe reader finishes consuming a message."
] | [
"Update artifact provider\n\n@param gavc String\n@param provider String",
"Find the path.\n\n@param start key of first node in the path\n@param end key of last node in the path\n@return string containing the nodes keys in the path separated by arrow symbol",
"Load the given class using the default constructor\n\n@param className The name of the class\n@return The class object",
"XER files can contain multiple projects when there are cross-project dependencies.\nAs the UniversalProjectReader is designed just to read a single project, we need\nto select one project from those available in the XER file.\nThe original project selected for export by the user will have its \"export flag\"\nset to true. We'll return the first project we find where the export flag is\nset to true, otherwise we'll just return the first project we find in the file.\n\n@param stream schedule data\n@return ProjectFile instance",
"Verify that the given queues are all valid.\n\n@param queues the given queues",
"Use this API to fetch appqoepolicy resource of given name .",
"In-place scaling of a row in A\n\n@param alpha scale factor\n@param A matrix\n@param row which row in A",
"Write an integer field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Extracts out a matrix from source given a sub matrix with arbitrary rows and columns specified in\ntwo array lists\n\n@param src Source matrix. Not modified.\n@param rows array of row indexes\n@param rowsSize maximum element in row array\n@param cols array of column indexes\n@param colsSize maximum element in column array\n@param dst output matrix. Must be correct shape."
] |
public Where<T, ID> raw(String rawStatement, ArgumentHolder... args) {
for (ArgumentHolder arg : args) {
String columnName = arg.getColumnName();
if (columnName == null) {
if (arg.getSqlType() == null) {
throw new IllegalArgumentException("Either the column name or SqlType must be set on each argument");
}
} else {
arg.setMetaInfo(findColumnFieldType(columnName));
}
}
addClause(new Raw(rawStatement, args));
return this;
} | [
"Add a raw statement as part of the where that can be anything that the database supports. Using more structured\nmethods is recommended but this gives more control over the query and allows you to utilize database specific\nfeatures.\n\n@param rawStatement\nThe statement that we should insert into the WHERE.\n\n@param args\nOptional arguments that correspond to any ? specified in the rawStatement. Each of the arguments must\nhave either the corresponding columnName or the sql-type set. <b>WARNING,</b> you cannot use the\n{@code SelectArg(\"columnName\")} constructor since that sets the _value_, not the name. Use\n{@code new SelectArg(\"column-name\", null);}."
] | [
"Delete the partition steal information from the rebalancer state\n\n@param stealInfo The steal information to delete",
"We have received notification that a device is no longer on the network, so clear out all its beat grids.\n\n@param announcement the packet which reported the device’s disappearance",
"Log unexpected column structure.",
"Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content",
"Curries a procedure that takes two arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes one argument. Never <code>null</code>.",
"Associate the specified value with the specified key in this map.\nIf the map previously contained a mapping for this key, the old\nvalue is replaced and returned.\n\n@param key the key with which the value is to be associated\n@param value the value to be associated with this key\n@return the value previously mapped to the key, or null",
"Copies information between specified streams and then closes\nboth of the streams.\n@throws java.io.IOException",
"Get the number of views, comments and favorites on a collection for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n(Required) The id (from the URL!) of the collection to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionStats.htm\"",
"Collection of JRVariable\n\n@param variables\n@return"
] |
private double goldenMean(double a, double b) {
if (geometric) {
return a * Math.pow(b / a, GOLDEN_SECTION);
} else {
return a + (b - a) * GOLDEN_SECTION;
}
} | [
"The point that is the GOLDEN_SECTION along the way from a to b.\na may be less or greater than b, you find the point 60-odd percent\nof the way from a to b.\n\n@param a Interval minimum\n@param b Interval maximum\n@return The GOLDEN_SECTION along the way from a to b."
] | [
"Use this API to add inat.",
"Samples a batch of indices in the range [0, numExamples) with replacement.",
"Generates a Map of query parameters for Module regarding the filters\n\n@return Map<String, Object>",
"Gets a tokenizer from a reader.",
"Get the spin scripting environment\n\n@param language the language name\n@return the environment script as string or null if the language is\nnot in the set of languages supported by spin.",
"Notification that a state transition failed.\n\n@param state the failed transition",
"XER files can contain multiple projects when there are cross-project dependencies.\nAs the UniversalProjectReader is designed just to read a single project, we need\nto select one project from those available in the XER file.\nThe original project selected for export by the user will have its \"export flag\"\nset to true. We'll return the first project we find where the export flag is\nset to true, otherwise we'll just return the first project we find in the file.\n\n@param stream schedule data\n@return ProjectFile instance",
"Should be called after all rows have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return",
"Checks if the required option exists.\n\n@param options OptionSet to checked\n@param opt Required option to check\n@throws VoldemortException"
] |
public DiscreteInterval plus(DiscreteInterval other) {
return new DiscreteInterval(this.min + other.min, this.max + other.max);
} | [
"Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum"
] | [
"Create a HashSet with the given initial values.\n\n@param values The values\n@param <T> The type.",
"Use this API to add responderpolicy.",
"Creates an encryptor for queryable text strings that uses standard password-based encryption. Uses a shared, or\nconstant 16 byte initialization vector so encrypting the same data results in the same encryption result. This is\ndone to allow encrypted data to be queried against. Encrypted text is hex-encoded.\n\n@param password the password used to generate the encryptor's secret key; should not be shared\n@param salt a hex-encoded, random, site-global salt value to use to generate the secret key",
"Checks if the object with the given identity has been deleted\nwithin the transaction.\n@param id The identity\n@return true if the object has been deleted\n@throws PersistenceBrokerException",
"Produce an iterator over the input values in sorted order. Sorting will\noccur in the fixed space configured in the constructor, data will be\ndumped to disk as necessary.\n\n@param input An iterator over the input values\n@return An iterator over the values",
"Add new control at the control bar with specified touch listener, resource and position.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener\n@param position control position in the bar",
"Checks that a field exists and contains a non-null value.\n@param fieldName the name of the field to check existence/value of.\n@return true if the field exists in the result set and has a non-null value; false otherwise.",
"Read the name of a table and prepare to populate it with column data.\n\n@param startIndex start of the block\n@param blockLength length of the block",
"Create a temporary directory with the same attributes as its parent directory.\n@param dir\nthe path to directory in which to create the directory\n@param prefix\nthe prefix string to be used in generating the directory's name;\nmay be {@code null}\n@return the path to the newly created directory that did not exist before\nthis method was invoked\n@throws IOException"
] |
private void processProjectID()
{
if (m_projectID == null)
{
List<Row> rows = getRows("project", null, null);
if (!rows.isEmpty())
{
Row row = rows.get(0);
m_projectID = row.getInteger("proj_id");
}
}
} | [
"If the user has not specified a project ID, this method\nretrieves the ID of the first project in the file."
] | [
"Use this API to add sslaction resources.",
"Use this API to fetch tunneltrafficpolicy resource of given name .",
"Prints associations recovered from the fields of a class. An association is inferred only\nif another relation between the two classes is not already in the graph.\n@param classes",
"Retrieve a number of rows matching the supplied query.\n\n@param sql query statement\n@return result set\n@throws SQLException",
"Call the no-arg constructor for the given class\n\n@param <T> The type of the thing to construct\n@param klass The class\n@return The constructed thing",
"Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time.",
"Get the known locations where the secure keyring can be located.\nLooks through known locations of the GNU PG secure keyring.\n\n@return The location of the PGP secure keyring if it was found,\nnull otherwise",
"Returns a single template.\n\n@param id id of the template to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Parses an RgbaColor from an rgb value.\n\n@return the parsed color"
] |
private void checkOrMarkPrivateAccess(Expression source, MethodNode mn) {
if (mn==null) {
return;
}
ClassNode declaringClass = mn.getDeclaringClass();
ClassNode enclosingClassNode = typeCheckingContext.getEnclosingClassNode();
if (declaringClass != enclosingClassNode || typeCheckingContext.getEnclosingClosure() != null) {
int mods = mn.getModifiers();
boolean sameModule = declaringClass.getModule() == enclosingClassNode.getModule();
String packageName = declaringClass.getPackageName();
if (packageName==null) {
packageName = "";
}
if ((Modifier.isPrivate(mods) && sameModule)
|| (Modifier.isProtected(mods) && !packageName.equals(enclosingClassNode.getPackageName()))) {
addPrivateFieldOrMethodAccess(source, sameModule? declaringClass : enclosingClassNode, StaticTypesMarker.PV_METHODS_ACCESS, mn);
}
}
} | [
"Given a method node, checks if we are calling a private method from an inner class."
] | [
"Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return",
"This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type",
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response",
"Reads timephased assignment data.\n\n@param calendar current calendar\n@param assignment assignment data\n@param type flag indicating if this is planned or complete work\n@return list of timephased resource assignment instances",
"Use this API to fetch statistics of gslbdomain_stats resource of given name .",
"Given a HTTPResponce, process it, throwing an error if needed and return a Token for the next\nrequest.",
"Return the most appropriate log type. This should _never_ return null.",
"Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance",
"Close off the connection.\n\n@throws SQLException"
] |
public static String formatConnectionEstablishmentMessage(final String connectionName, final String host, final String connectionReason) {
return CON_ESTABLISHMENT_FORMAT.format(new Object[] { connectionName, host, connectionReason });
} | [
"Helper method for formatting connection establishment messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] <connectionReason>\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG."
] | [
"Selects the specified value in the list.\n\n@param value the new value\n@param fireEvents if true, a ValueChangeEvent event will be fired\n@see #setAddMissingValue",
"Computes the rank of a matrix using the specified tolerance.\n\n@param A Matrix whose rank is to be calculated. Not modified.\n@param threshold The numerical threshold used to determine a singular value.\n@return The matrix's rank.",
"Triggers expansion of the parent.",
"Perform a security check against OpenCms.\n\n@param cms The OpenCms object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user",
"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",
"Checks if two claims are equivalent in the sense that they have the same\nmain snak and the same qualifiers, but possibly in a different order.\n\n@param claim1\n@param claim2\n@return true if claims are equivalent",
"Send a device lost announcement to all registered listeners.\n\n@param announcement the last message received from the vanished device",
"Performs a query to retrieve all the design documents defined in the database.\n\n@return a list of the design documents from the database\n@throws IOException if there was an error communicating with the server\n@since 2.5.0",
"Add a calendar day node.\n\n@param parentNode parent node\n@param calendar ProjectCalendar instance\n@param day calendar day"
] |
public static ServiceActivator create(final ModelNode endpointConfig, final URI managementURI, final String serverName, final String serverProcessName,
final String authKey, final boolean managementSubsystemEndpoint, final Supplier<SSLContext> sslContextSupplier) {
return new DomainServerCommunicationServices(endpointConfig, managementURI, serverName, serverProcessName, authKey, managementSubsystemEndpoint, sslContextSupplier);
} | [
"Create a new service activator for the domain server communication services.\n\n@param endpointConfig the endpoint configuration\n@param managementURI the management connection URI\n@param serverName the server name\n@param serverProcessName the server process name\n@param authKey the authentication key\n@param managementSubsystemEndpoint whether to use the mgmt subsystem endpoint or not\n@return the service activator"
] | [
"Use this API to update vserver.",
"Request a scoped transactional token.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@return a BoxAPIConnection which can be used to perform transactional requests.",
"Sets the specified date attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Send ourselves \"updates\" about any tracks that were loaded before we started, or before we were requesting\ndetails, since we missed them.",
"Adds a new Token to the end of the linked list",
"Generates a vector clock with the provided values\n\n@param serverIds servers in the clock\n@param clockValue value of the clock for each server entry\n@param timestamp ts value to be set for the clock\n@return",
"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",
"Calculate the highlight color. Saturate at 0xff to make sure that high values\ndon't result in aliasing.\n\n@param _Slice The Slice which will be highlighted.",
"Clear the selection of all items.\n@param requestLayout request layout after clear selection if the flag is true, no layout\nrequested otherwise\n@return {@code true} if at least one item was deselected,\n{@code false} otherwise."
] |
static void doDifference(
Map<String, String> left,
Map<String, String> right,
Map<String, String> onlyOnLeft,
Map<String, String> onlyOnRight,
Map<String, String> updated
) {
onlyOnRight.clear();
onlyOnRight.putAll(right);
for (Map.Entry<String, String> entry : left.entrySet()) {
String leftKey = entry.getKey();
String leftValue = entry.getValue();
if (right.containsKey(leftKey)) {
String rightValue = onlyOnRight.remove(leftKey);
if (!leftValue.equals(rightValue)) {
updated.put(leftKey, leftValue);
}
} else {
onlyOnLeft.put(leftKey, leftValue);
}
}
} | [
"calculate the difference of the two maps, so we know what was added, removed & updated\n@param left\n@param right\n@param onlyOnLeft\n@param onlyOnRight\n@param updated"
] | [
"convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"Prepares the CmsObject for jumping to this favorite location, and returns the appropriate URL.\n\n@param cms the CmsObject to initialize for jumping to the favorite\n@return the link for the favorite location\n\n@throws CmsException if something goes wrong",
"Checks to see if the two matrices are inverses of each other.\n\n@param a A matrix. Not modified.\n@param b A matrix. Not modified.",
"This method maps the currency symbol position from the\nrepresentation used in the MPP file to the representation\nused by MPX.\n\n@param value MPP symbol position\n@return MPX symbol position",
"Unmark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to unmark",
"Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise.",
"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",
"Use this API to delete sslcertkey resources of given names.",
"Process TestCaseStartedEvent. New testCase will be created and added\nto suite as child.\n\n@param event to process"
] |
private static long createLongSeed(byte[] seed)
{
if (seed == null || seed.length != SEED_SIZE_BYTES)
{
throw new IllegalArgumentException("Java RNG requires a 64-bit (8-byte) seed.");
}
return BinaryUtils.convertBytesToLong(seed, 0);
} | [
"Helper method to convert seed bytes into the long value required by the\nsuper class."
] | [
"Creates a searchable item that represents a metadata field found for a track.\n\n@param menuItem the rendered menu item containing the searchable metadata field\n@return the searchable metadata field",
"Gets the persistence broker used by this indirection handler.\nIf no PBKey is available a runtime exception will be thrown.\n\n@return a PersistenceBroker",
"Helper method to check if log4j is already configured",
"Set the position of the given Matcher to the given index.\n\n@param matcher a Matcher\n@param idx the index number\n@since 1.0",
"Whether this association contains no rows.\n\n@return {@code true} if this association contains no rows, {@code false} otherwise",
"Returns if a request should be retried based on the retry count, current response,\nand the current strategy.\n\n@param retryCount The current retry attempt count.\n@param response The exception that caused the retry conditions to occur.\n@return true if the request should be retried; false otherwise.",
"Remove a DAO from the cache. This is necessary if we've registered it already but it throws an exception during\nconfiguration.",
"This method is called to format a date. It will return the null text\nif a null value is supplied.\n\n@param value date value\n@return formatted date value",
"Create an import declaration and delegates its registration for an upper class."
] |
public static systemcollectionparam get(nitro_service service) throws Exception{
systemcollectionparam obj = new systemcollectionparam();
systemcollectionparam[] response = (systemcollectionparam[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler."
] | [
"Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws IOException on consume error",
"Compiles the allowable actions for a file or folder.\n\n@param cms the current CMS context\n@param file the resource for which we want the allowable actions\n\n@return the allowable actions for the given resource",
"Associate the batched Children with their owner object.\nLoop over owners",
"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",
"Parses the input stream to read the header\n\n@param input data input to read from\n@return the parsed protocol header\n@throws IOException",
"Convert the Primavera string representation of a UUID into a Java UUID instance.\n\n@param value Primavera UUID\n@return Java UUID instance",
"Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list",
"Set the buttons size.",
"Decide whether failure should trigger a rollback.\n\n@param cause\nthe cause of the failure, or {@code null} if failure is not\nthe result of catching a throwable\n@return the result action"
] |
private static void listResources(ProjectFile file)
{
for (Resource resource : file.getResources())
{
System.out.println("Resource: " + resource.getName() + " (Unique ID=" + resource.getUniqueID() + ") Start=" + resource.getStart() + " Finish=" + resource.getFinish());
}
System.out.println();
} | [
"This method lists all resources defined in the file.\n\n@param file MPX file"
] | [
"Use this API to delete snmpmanager.",
"Query zipcode from Yahoo to find associated WOEID",
"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",
"Find a given range object in a list of ranges by a value in that range. Does a binary\nsearch over the ranges but instead of checking for equality looks within the range.\nTakes the array size as an option in case the array grows while searching happens\n@param <T> Range type\n@param ranges data list\n@param value value in the list\n@param arraySize the max search index of the list\n@return search result of range\nTODO: This should move into SegmentList.scala",
"Sets the server groups for the deployment.\n\n@param serverGroups the server groups to set\n\n@return this deployment",
"Check that the parameter string is not null or empty\n\n@param value\nString value to be checked.\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@throws IllegalArgumentException\nIf the key is null or empty.",
"Sets a string-valued additional info entry on the user.\n\n@param username the name of the user\n@param infoName the additional info key\n@param value the additional info value\n\n@throws CmsException if something goes wrong",
"Get a writer implementation to push data into Canvas.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param <T> A writer implementation\n@return A writer implementation class",
"Sets a string that will be prepended to the JAR file's data.\n\n@param value the prefix, or {@code null} for none.\n@return {@code this}"
] |
@NonNull
@Override
public File getParent(@NonNull final File from) {
if (from.getPath().equals(getRoot().getPath())) {
// Already at root, we can't go higher
return from;
} else if (from.getParentFile() != null) {
return from.getParentFile();
} else {
return from;
}
} | [
"Return the path to the parent directory. Should return the root if\nfrom is root.\n\n@param from either a file or directory\n@return the parent directory"
] | [
"Read an individual GanttProject resource assignment.\n\n@param gpAllocation GanttProject resource assignment.",
"Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable",
"Deletes the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name.",
"Return fallback if first string is null or empty",
"Processes the template if the property value of the current object on the specified level equals the given value.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"\[email protected] name=\"value\" optional=\"false\" description=\"The value to check for\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"",
"Send a sync command to all registered listeners.\n\n@param command the byte which identifies the type of sync command we received",
"Retrieves from all the Jenkins agents all the docker images, which have been registered for a specific build-info ID\nOnly images for which manifests have been captured are returned.\n\n@param buildInfoId\n@return\n@throws IOException\n@throws InterruptedException",
"Get the filters ImporterServiceFilter and ImportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid.",
"Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened"
] |
public static final Integer getInteger(Number value)
{
Integer result = null;
if (value != null)
{
if (value instanceof Integer)
{
result = (Integer) value;
}
else
{
result = Integer.valueOf((int) Math.round(value.doubleValue()));
}
}
return (result);
} | [
"Utility method used to convert an arbitrary Number into an Integer.\n\n@param value Number instance\n@return Integer instance"
] | [
"Calculate the signature by which we can reliably recognize a loaded track.\n\n@param title the track title\n@param artist the track artist, or {@code null} if there is no artist\n@param duration the duration of the track in seconds\n@param waveformDetail the monochrome waveform detail of the track\n@param beatGrid the beat grid of the track\n\n@return the SHA-1 hash of all the arguments supplied, or {@code null} if any either {@code waveFormDetail} or {@code beatGrid} were {@code null}",
"We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException",
"Constructs a valid request and passes it on to the next handler. It also\ncreates the 'Store' object corresponding to the store name specified in\nthe REST request.\n\n@param requestValidator The Validator object used to construct the\nrequest object\n@param ctx Context of the Netty channel\n@param messageEvent Message Event used to write the response / exception",
"Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail",
"Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.",
"Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object.",
"Adds the class descriptor to this model.\n\n@param classDef The class descriptor\n@return The class descriptor or <code>null</code> if there is no such class in this model",
"Flushes all changes to disk.",
"Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm."
] |
public void replaceItem(@NonNull final T oldObject, @NonNull final T newObject) {
synchronized (mLock) {
final int position = getPosition(oldObject);
if (position == -1) {
// not found, don't replace
return;
}
mObjects.remove(position);
mObjects.add(position, newObject);
if (isItemTheSame(oldObject, newObject)) {
if (isContentTheSame(oldObject, newObject)) {
// visible content hasn't changed, don't notify
return;
}
// item with same stable id has changed
notifyItemChanged(position, newObject);
} else {
// item replaced with another one with a different id
notifyItemRemoved(position);
notifyItemInserted(position);
}
}
} | [
"replaces the old with the new item. The new item will not be added when the old one is not\nfound.\n\n@param oldObject will be removed\n@param newObject is added only when hte old item is removed"
] | [
"Recursively loads the metadata for this node",
"Translate the string to bytes using the given encoding\n\n@param string The string to translate\n@param encoding The encoding to use\n@return The bytes that make up the string",
"Adds new holes to the polygon.\n\n@param holes holes, must be contained in the exterior ring and must not overlap or\nintersect another hole\n@return this for chaining",
"Set the face to be culled\n\n@param cullFace\n{@code GVRCullFaceEnum.Back} Tells Graphics API to discard\nback faces, {@code GVRCullFaceEnum.Front} Tells Graphics API\nto discard front faces, {@code GVRCullFaceEnum.None} Tells\nGraphics API to not discard any face\n@param passIndex\nThe rendering pass to set cull face state",
"Creates a statement with parameters that should work with most RDBMS.",
"Returns whether this host should ignore operations from the master domain controller that target\nthe given address.\n\n@param address the resource address. Cannot be {@code null}\n\n@return {@code true} if the operation should be ignored; {@code false} otherwise",
"Each element of the second array is added to each element of the first.",
"Log a byte array as a hex dump.\n\n@param data byte array",
"This method is called to alert project listeners to the fact that\na resource assignment has been written to a project file.\n\n@param resourceAssignment resourceAssignment instance"
] |
@Override
public void start(String[] arguments) {
boolean notStarted = !started.getAndSet(true);
if (notStarted) {
start(new SingleInstanceWorkloadStrategy(job, name, arguments, endpointRegistry, execService));
}
} | [
"Starts the one and only job instance in a separate Thread. Should be called exactly one time before\nthe operation is stopped.\n\n@param arguments {@inheritDoc}"
] | [
"Print the class's operations m",
"Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException",
"Check if the the nodeId is present in the cluster managed by the metadata store\nor throw an exception.\n\n@param nodeId The nodeId to check existence of",
"Returns a client object for a clientId\n\n@param clientId ID of client to return\n@return Client or null\n@throws Exception exception",
"Accessor method used to retrieve a Boolean object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Retrieve column font details from a block of property data.\n\n@param data property data\n@param offset offset into property data\n@param fontBases map of font bases\n@return ColumnFontStyle instance",
"Returns the DBCP DataSource for the specified connection descriptor,\nafter creating a new DataSource if needed.\n@param jcd the descriptor for which to return a DataSource\n@return a DataSource, after creating a new pool if needed.\nGuaranteed to never be null.\n@throws LookupException if pool is not in cache and cannot be created",
"Add a new PropertyChangeListener to this node for a specific property.\nThis functionality has\nbeen borrowed from the java.beans package, though this class has\nnothing to do with a bean",
"Use this API to disable clusterinstance of given name."
] |
@Nullable
public final Credentials toCredentials(final AuthScope authscope) {
try {
if (!matches(MatchInfo.fromAuthScope(authscope))) {
return null;
}
} catch (UnknownHostException | MalformedURLException | SocketException e) {
throw new RuntimeException(e);
}
if (this.username == null) {
return null;
}
final String passwordString;
if (this.password != null) {
passwordString = new String(this.password);
} else {
passwordString = null;
}
return new UsernamePasswordCredentials(this.username, passwordString);
} | [
"Check if this applies to the provided authorization scope and return the credentials for that scope or\nnull if it doesn't apply to the scope.\n\n@param authscope the scope to test against."
] | [
"Obtains a local date in Ethiopic calendar system from the\nera, year-of-era, month-of-year and day-of-month fields.\n\n@param era the Ethiopic era, not null\n@param yearOfEra the year-of-era\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code EthiopicEra}",
"Prep for a new connection\n@return if stats are enabled, return the nanoTime when this connection was requested.\n@throws SQLException",
"Starts the named animation.\n@see GVRAvatar#stop(String)\n@see GVRAnimationEngine#start(GVRAnimation)",
"Main method of the class, which handles the process of creating the tests\n\n@param requirementsFolder\n, it is the folder where the plain text given by the client is\nstored\n@param platformName\n, to choose the MAS platform (JADE, JADEX, etc.)\n@param src_test_dir\n, the folder where our classes are created\n@param tests_package\n, the name of the package where the stories are created\n@param casemanager_package\n, the path where casemanager must be created\n@param loggingPropFile\n, properties file\n@throws Exception\n, if any error is found in the configuration",
"Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p",
"Verifies that the connection is still alive. Returns true if it\nis, false if it is not. If the connection is broken we try\nclosing everything, too, so that the caller need only open a new\nconnection.",
"Add a dependency task group for this model.\n\n@param dependency the dependency.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependency task group",
"Sets the name of the designated bone.\n\n@param boneindex zero based index of bone to rotate.\n@param bonename string with name of bone.\n. * @see #getBoneName",
"removes an Object from the cache.\n\n@param oid the Identity of the object to be removed."
] |
public int getCurrentMethodOrdinal(int overrideId, int pathId, String clientUUID, String[] filters) throws Exception {
int currentOrdinal = 0;
List<EnabledEndpoint> enabledEndpoints = getEnabledEndpoints(pathId, clientUUID, filters);
for (EnabledEndpoint enabledEndpoint : enabledEndpoints) {
if (enabledEndpoint.getOverrideId() == overrideId) {
currentOrdinal++;
}
}
return currentOrdinal;
} | [
"Get the ordinal value for the last of a particular override on a path\n\n@param overrideId Id of the override to check\n@param pathId Path the override is on\n@param clientUUID UUID of the client\n@param filters If supplied, only endpoints ending with values in filters are returned\n@return The integer ordinal\n@throws Exception"
] | [
"Compute \"sent\" date\n\n@param msg Message to take sent date from. May be null to use default\n@param defaultVal Default if sent date is not present\n@return Sent date or now if no date could be found",
"Use this API to fetch statistics of spilloverpolicy_stats resource of given name .",
"Use this API to delete application.",
"Returns a canonical type for a given class.\n\nIf the class is a raw type of a parameterized class, the matching {@link ParameterizedType} (with unresolved type\nvariables) is resolved.\n\nIf the class is an array then the component type of the array is canonicalized\n\nOtherwise, the class is returned.\n\n@return",
"Issue the database statements to drop the table associated with a class.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param dataClass\nThe class for which a table will be dropped.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.",
"Write a string attribute.\n\n@param name attribute name\n@param value attribute value",
"read broker info for watching topics\n\n@param zkClient the zookeeper client\n@param topics topic names\n@return topic->(brokerid-0,brokerid-1...brokerid2-0,brokerid2-1...)",
"Load resource content from given path into variable with\ntype specified by `spec`.\n\n@param resourcePath the resource path\n@param spec {@link BeanSpec} specifies the return value type\n@return the resource content in a specified type or `null` if resource not found\n@throws UnexpectedException if return value type not supported",
"Retrieve the configuration of the named template.\n\n@param name the template name;"
] |
private void readResources(Storepoint phoenixProject)
{
Resources resources = phoenixProject.getResources();
if (resources != null)
{
for (net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource res : resources.getResource())
{
Resource resource = readResource(res);
readAssignments(resource, res);
}
}
} | [
"This method extracts resource data from a Phoenix file.\n\n@param phoenixProject parent node for resources"
] | [
"Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided",
"Returns the spread value such that the sum of cash flows of the bond discounted with a given reference curve\nwith the additional spread coincides with a given price.\n\n@param bondPrice The target price as double.\n@param referenceCurve The reference curve used for discounting the coupon payments.\n@param model The model under which the product is valued.\n@return The optimal spread value.",
"Set the Log4j appender.\n\n@param appender the log4j appender",
"Creates a color item that represents a color field fond for a track.\n\n@param colorId the key of the color as found in the database\n@param label the corresponding color label as found in the database (or sent in the dbserver message)\n\n@return the color metadata field",
"Deletes a vertex from this list.",
"Sets the duration for the animations in this animator.\n\n@param start the animation will start playing from the specified time\n@param end the animation will stop playing at the specified time\n\n@see GVRAnimation#setDuration(float, float)",
"Store the deployment contents and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException",
"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 }",
"Obtains a British Cutover zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover zoned date-time, not null\n@throws DateTimeException if unable to create the date-time"
] |
public <CT> CT callBatchTasks(ConnectionSource connectionSource, Callable<CT> callable) throws SQLException {
if (connectionSource.isSingleConnection(tableInfo.getTableName())) {
synchronized (this) {
return doCallBatchTasks(connectionSource, callable);
}
} else {
return doCallBatchTasks(connectionSource, callable);
}
} | [
"Call batch tasks inside of a connection which may, or may not, have been \"saved\"."
] | [
"Add the given pair into the map.\n\n<p>\nIf the pair key already exists in the map, its value is replaced\nby the value in the pair, and the old value in the map is returned.\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 entry the entry (key, value) to add into the map.\n@return the value previously associated to the key, or <code>null</code>\nif the key was not present in the map before the addition.\n@since 2.15",
"Returns iban length for the specified country.\n\n@param countryCode {@link org.iban4j.CountryCode}\n@return the length of the iban for the specified country.",
"Trim the trailing spaces.\n\n@param line",
"try to find a field in class c, recurse through class hierarchy if necessary\n\n@throws NoSuchFieldException if no Field was found into the class hierarchy",
"Use this API to add route6 resources.",
"Returns the primary message codewords for mode 2.\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",
"Sets the value for the API's \"languages\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters",
"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",
"Remove write.lock file in the data directory to ensure the index is unlocked.\n@param dataDir the data directory of the Solr index that should be unlocked."
] |
public BoxRetentionPolicyAssignment.Info assignTo(BoxFolder folder) {
return BoxRetentionPolicyAssignment.createAssignmentToFolder(this.getAPI(), this.getID(), folder.getID());
} | [
"Assigns this retention policy to folder.\n@param folder the folder to assign policy to.\n@return info about created assignment."
] | [
"Control whether the Virtual CDJ sends status packets to the other players. Most uses of Beat Link will not\nrequire this level of activity. However, if you want to be able to take over the tempo master role, and control\nthe tempo and beat alignment of other players, you will need to turn on this feature, which also requires that\nyou are using one of the standard player numbers, 1-4.\n\n@param send if {@code true} we will send status packets, and can participate in (and control) tempo and beat sync\n\n@throws IllegalStateException if the virtual CDJ is not running, or if it is not using a device number in the\nrange 1 through 4\n@throws IOException if there is a problem starting the {@link BeatFinder}",
"Generate a sql where-clause for the array of fields\n\n@param fields array containing all columns used in WHERE clause",
"Use this API to delete dnsaaaarec resources of given names.",
"checkpoint the transaction",
"List the indexes in the database. The returned object allows for listing indexes by type.\n\n@return indexes object with methods for getting indexes of a particular type",
"Remove a handler from the list\n@param toRemove The handler to remove. Any handler object that\nmatches this class will be removed.\n@return true if this handler was in the list.",
"Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws IOException on consume error",
"Use this API to fetch statistics of appfwprofile_stats resource of given name .",
"Adds a chain of vertices to the end of this list."
] |
public static Cluster swapPartitions(final Cluster nextCandidateCluster,
final int nodeIdA,
final int partitionIdA,
final int nodeIdB,
final int partitionIdB) {
Cluster returnCluster = Cluster.cloneCluster(nextCandidateCluster);
// Swap partitions between nodes!
returnCluster = UpdateClusterUtils.createUpdatedCluster(returnCluster,
nodeIdA,
Lists.newArrayList(partitionIdB));
returnCluster = UpdateClusterUtils.createUpdatedCluster(returnCluster,
nodeIdB,
Lists.newArrayList(partitionIdA));
return returnCluster;
} | [
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modified cluster metadata."
] | [
"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.",
"Sets the character translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator",
"Tells you if the expression is a spread operator call\n@param expression\nexpression\n@return\ntrue if is spread expression",
"Returns a the list of available version of an artifact\n\n@param gavc String\n@return List<String>",
"Look for a style in the named styles provided in the configuration.\n\n@param styleName the name of the style to look for.",
"Adds a classpath source which contains the given resource.\n\nTODO: [GH-213] this is extremely ugly; separate the code required to run on the\nforked JVM into an isolated bundle and either create it on-demand (in temp.\nfiles location?) or locate it in classpath somehow (in a portable way).",
"Checks to see if the token is an integer scalar\n\n@return true if integer or false if not",
"Handles an incoming request message.\nAn incoming request message is a message initiated by a node or the controller.\n@param incomingMessage the incoming message to process.",
"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"
] |
public static <T extends DMatrix> boolean decomposeSafe(DecompositionInterface<T> decomp, T M ) {
if( decomp.inputModified() ) {
return decomp.decompose(M.<T>copy());
} else {
return decomp.decompose(M);
}
} | [
"A simple convinience function that decomposes the matrix but automatically checks the input ti make\nsure is not being modified.\n\n@param decomp Decomposition which is being wrapped\n@param M THe matrix being decomposed.\n@param <T> Matrix type.\n@return If the decomposition was successful or not."
] | [
"Enables or disables sound.\nWhen sound is disabled, nothing is played but the\naudio sources remain intact.\n@param flag true to enable sound, false to disable.",
"Stops the processing and prints the final time.",
"This method writes predecessor data to a Planner file.\nWe have to deal with a slight anomaly in this method that is introduced\nby the MPX file format. It would be possible for someone to create an\nMPX file with both the predecessor list and the unique ID predecessor\nlist populated... which means that we must process both and avoid adding\nduplicate predecessors. Also interesting to note is that MSP98 populates\nthe predecessor list, not the unique ID predecessor list, as you might\nexpect.\n\n@param mpxjTask MPXJ task instance\n@param plannerTask planner task instance",
"Attaches the menu drawer to the content view.",
"Clean up the environment object for the given storage engine",
"Returns the path in the RFS where the Solr spellcheck files reside.\n@return String representation of Solrs spellcheck RFS path.",
"Sets the body of this request to a given JSON string.\n@param body the JSON string to use as the body.",
"Flush output streams.",
"Given a list of typedDependencies, returns true if the node \"node\" is the\ngovernor of a conj relation with a dependent which is not a preposition\n\n@param node\nA node in this GrammaticalStructure\n@param list\nA list of typedDependencies\n@return true If node is the governor of a conj relation in the list with\nthe dep not being a preposition"
] |
private void readResources(Document cdp)
{
for (Document.Resources.Resource resource : cdp.getResources().getResource())
{
readResource(resource);
}
} | [
"Reads resource data from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file"
] | [
"Take screenshot of the current window.\n\n@param target The target type/format of the Screenshot\n@return Screenshot of current window, in the requested format",
"Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() method on the JavascriptEnum\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property.",
"returns a unique String for given field.\nthe returned uid is unique accross all tables.",
"Retrieve the finish slack.\n\n@return finish slack",
"Saves messages to a xmlvfsbundle file.\n\n@throws CmsException thrown if writing to the file fails.",
"Decodes a signed request, returning the payload of the signed request as a specified type.\n@param signedRequest the value of the signed_request parameter sent by Facebook.\n@param type the type to bind the signed_request to.\n@param <T> the Java type to bind the signed_request to.\n@return the payload of the signed request as an object\n@throws SignedRequestException if there is an error decoding the signed request",
"Computes the eigenvalue of the provided tridiagonal matrix. Note that only the upper portion\nneeds to be tridiagonal. The bottom diagonal is assumed to be the same as the top.\n\n@param sideLength Number of rows and columns in the input matrix.\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@return true if it succeeds and false if it fails.",
"Answer the SQL-Clause for a BetweenCriteria\n\n@param alias\n@param pathInfo\n@param c BetweenCriteria\n@param buf",
"This method determines whether the given date falls in the range of\ndates covered by this exception. Note that this method assumes that both\nthe start and end date of this exception have been set.\n\n@param date Date to be tested\n@return Boolean value"
] |
public static void finishThread(){
//--Create Task
final long threadId = Thread.currentThread().getId();
Runnable finish = new Runnable(){
public void run(){
releaseThreadControl(threadId);
}
};
//--Run Task
if(isThreaded){
//(case: multithreaded)
attemptThreadControl( threadId, finish );
} else {
//(case: no threading)
throw new IllegalStateException("finishThreads() called outside of threaded environment");
}
} | [
"Signal that this thread will not log any more messages in the multithreaded\nenvironment"
] | [
"Sets the specified starting partition key.\n\n@param paging a paging state",
"Use this API to update aaaparameter.",
"Retrieves the earliest start date for all assigned tasks.\n\n@return start date",
"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)",
"Obtain the profile identifier.\n\n@param profileIdentifier Can be profile ID, or friendly name\n@return\n@throws Exception",
"This method lists any notes attached to resources.\n\n@param file MPX file",
"Returns the parsed story from the given text\n\n@param configuration the Configuration used to run story\n@param storyAsText the story text\n@param storyId the story Id, which will be returned as story path\n@return The parsed Story",
"Bessel function of the second kind, of order n.\n\n@param n Order.\n@param x Value.\n@return Y value.",
"This filter adds rounded corners to the image using the specified color as the background.\n\n@param radiusInner amount of pixels to use as radius.\n@param radiusOuter specifies the second value for the ellipse used for the radius. Use 0 for\nno value.\n@param color fill color for clipped region."
] |
public static BoxUser getCurrentUser(BoxAPIConnection api) {
URL url = GET_ME_URL.build(api.getBaseURL());
BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObject.readFrom(response.getJSON());
return new BoxUser(api, jsonObject.get("id").asString());
} | [
"Gets the current user.\n@param api the API connection of the current user.\n@return the current user."
] | [
"returns a sorted array of properties",
"Delete any log segments matching the given predicate function\n\n@throws IOException",
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)",
"Creates a tag directly from the working copy.\n\n@param tagUrl The URL of the tag to create.\n@param commitMessage Commit message\n@return The commit info upon successful operation.\n@throws IOException On IO of SVN failure",
"Throws an exception if the current thread is not a GL thread.\n\n@since 1.6.5",
"Load the given class using the default constructor\n\n@param className The name of the class\n@return The class object",
"Set the default host running the Odo instance to configure. Allows default profile methods and PathValueClient to\noperate on remote hosts\n\n@param hostName name of host",
"Merge a subtree.\n\n@param targetRegistry the target registry\n@param subTree the subtree",
"To store an object in a quick & dirty way."
] |
@Pure
public static <K, V> Map<K, V> operator_minus(Map<K, V> left, final Pair<? extends K, ? extends V> right) {
return Maps.filterEntries(left, new Predicate<Entry<K, V>>() {
@Override
public boolean apply(Entry<K, V> input) {
return !Objects.equal(input.getKey(), right.getKey()) || !Objects.equal(input.getValue(), right.getValue());
}
});
} | [
"Remove the given pair from a given map for obtaining a new map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\n</p>\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 left the map to consider.\n@param right the entry (key, value) to remove from the map.\n@return an immutable map with the content of the map and with the given entry.\n@throws IllegalArgumentException - when the right operand key exists in the left operand.\n@since 2.15"
] | [
"Stops the current debug server. Active connections are\nnot affected.",
"Use this API to update ipv6.",
"Function to update store definitions. Unlike the put method, this\nfunction does not delete any existing state. It only updates the state of\nthe stores specified in the given stores.xml\n\n@param valueBytes specifies the bytes of the stores.xml containing\nupdates for the specified stores",
"Read the project data and return a ProjectFile instance.\n\n@return ProjectFile instance",
"Create a JavadocComment, by formatting the text of the Javadoc using the given indentation.",
"Get replication document state for a given replication document ID.\n\n@param docId The replication document ID\n@return Replication document for {@code docId}",
"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",
"Gets the element at the given index.\n\n@param index the index\n@return the element\n\n@throws IndexOutOfBoundsException if the index is out of range (<tt>index < 0 || index >= size()</tt>)",
"Retrieve the configuration of the named template.\n\n@param name the template name;"
] |
@RequestMapping(value = "/api/profile", method = RequestMethod.POST)
public
@ResponseBody
HashMap<String, Object> addProfile(Model model, String name) throws Exception {
logger.info("Should be adding the profile name when I hit the enter button={}", name);
return Utils.getJQGridJSON(profileService.add(name), "profile");
} | [
"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 an Extent class to the current descriptor\n@param newExtentClassName name of the class to add",
"Make a copy of this Area of Interest.",
"if you want to convert some string to an object, you have an argument to parse",
"Creates a scatter query from the given user query\n\n@param query the user's query.\n@param numSplits the number of splits to create.",
"Returns requested content types or default content type if none found.\n\n@return Requested content types or default content type if none found.",
"Adds the download button.\n\n@param view layout which displays the log file",
"Decode '%HH'.",
"Assembles an avro format string that contains multiple fat client configs\nfrom map of store to properties\n\n@param mapStoreToProps A map of store names to their properties\n@return Avro string that contains multiple store configs",
"Replaces all characters in the second parameter found in the first\nparameter with the final character.\n@param value the string to replace characters in\n@param chars the characters to replace\n@param replacement the character to insert as replacement"
] |
protected <T, A> ActiveOperation<T, A> getActiveOperation(final Integer id) {
//noinspection unchecked
return (ActiveOperation<T, A>) activeRequests.get(id);
} | [
"Get the active operation.\n\n@param id the active operation id\n@return the active operation, {@code null} if if there is no registered operation"
] | [
"Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived",
"Get all backup data\n\n@param model\n@return\n@throws Exception",
"Adds a new point.\n\n@param point a point\n@return this for chaining",
"Sets the values of this input field. Only Applicable check-boxes and a radio buttons.\n\n@param values Values to set.",
"Adds a handler for a mouse type event on the map.\n\n@param obj The object that the event should be registered on.\n@param type Type of the event to register against.\n@param h Handler that will be called when the event occurs.",
"If a policy already exists on a folder, this will apply that policy to all existing files and sub folders within\nthe target folder.\n\n@param conflictResolution the desired behavior for conflict-resolution. Set to either none or overwrite.",
"Starts advertising on Hyperbahn at a fixed interval.\n\n@return a future that resolves to the response of the first advertise request",
"This method writes a single predecessor link to the MSPDI file.\n\n@param taskID The task UID\n@param type The predecessor type\n@param lag The lag duration\n@return A new link to be added to the MSPDI file",
"Create the time entry map.\n\n@param rows work pattern rows\n@return time entry map"
] |
public InputStream getInstance(DirectoryEntry directory, String name) throws IOException
{
DocumentEntry entry = (DocumentEntry) directory.getEntry(name);
InputStream stream;
if (m_encrypted)
{
stream = new EncryptedDocumentInputStream(entry, m_encryptionCode);
}
else
{
stream = new DocumentInputStream(entry);
}
return stream;
} | [
"Method used to instantiate the appropriate input stream reader,\na standard one, or one which can deal with \"encrypted\" data.\n\n@param directory directory entry\n@param name file name\n@return new input stream\n@throws IOException"
] | [
"Gracefully stop the engine",
"Write the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar instance\n@param mpxjCalendar MPXJ calendar instance",
"Saves messages to a propertyvfsbundle file.\n\n@throws CmsException thrown if writing to the file fails.",
"Updates the image information.",
"Add the extra parameters which are passed as report parameters. The type of the parameter is \"guessed\" from the\nfirst letter of the parameter name.\n\n@param model view model\n@param request servlet request",
"Implementation of FNV-1a hash algorithm.\n@see <a href=\"https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function\">\nttps://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function</a>\n@param doc the document to hash\n@return",
"Resets the helper's state.\n\n@return this {@link Searcher} for chaining.",
"Populates the project header.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException",
"Returns the List value of the field.\n\n@return the List value of the field. It returns a reference of the value if the type is <code>LIST</code>, if\nthe type is <code>LIST_MAP</code> it returns a copy of the value.\n@throws IllegalArgumentException if the value cannot be converted to List."
] |
public static Variable deserialize(String s,
VariableType variableType) {
return deserialize(s,
variableType,
null);
} | [
"Deserializes a variable, NOT checking whether the datatype is custom\n@param s\n@param variableType\n@return"
] | [
"Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)",
"Gets value of this function at the current point, computed on the given batch of examples.\n@param batch A set of indices indicating the examples over which the gradient should be computed.\n@return The value of the function at the point.",
"Use this API to Force hafailover.",
"Attach a script file to a scriptable target.\n\n@param target The scriptable target.\n@param scriptFile The script file object.",
"Removes any configured observers.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}",
"Login for a specific authentication, creating a new token.\n\n@param authentication authentication to assign to token\n@return token",
"Checks, if all values necessary for a specific pattern are valid.\n@return a flag, indicating if all values required for the pattern are valid.",
"Refresh this context with the specified configuration locations.\n\n@param configLocations\nlist of configuration resources (see implementation for specifics)\n@throws GeomajasException\nindicates a problem with the new location files (see cause)",
"Notifies that a content item is removed.\n\n@param position the position."
] |
public String getDbProperty(String key) {
// extract the database key out of the entire key
String databaseKey = key.substring(0, key.indexOf('.'));
Properties databaseProperties = getDatabaseProperties().get(databaseKey);
return databaseProperties.getProperty(key, "");
} | [
"Returns the value for a given key from the database properties.\n\n@param key the property key\n\n@return the string value for a given key"
] | [
"to avoid creation of unmaterializable proxies",
"Process calendar days of the week.\n\n@param calendar project calendar\n@param root calendar data",
"Called when remote end send a message to this connection\n@param receivedMessage the message received\n@return this context",
"Remove the given pair into the map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\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 entry the entry (key, value) to remove from the map.\n@return {@code true} if the pair was removed.\n@since 2.15",
"Called by the engine to trigger the cleanup at the end of a payload thread.",
"Add statistics about sent emails.\n\n@param recipients The list of recipients.\n@param storageUsed If a remote storage was used.",
"Determines the encoding block groups for the specified data.",
"Recursively descend through the hierarchy creating tasks.\n\n@param parent parent task\n@param parentName parent name\n@param rows rows to add as tasks to this parent",
"Remove custom overrides\n\n@param path_id ID of path containing custom override\n@param client_uuid UUID of the client\n@throws Exception exception"
] |
private void resetCalendar() {
_calendar = getCalendar();
if (_defaultTimeZone != null) {
_calendar.setTimeZone(_defaultTimeZone);
}
_currentYear = _calendar.get(Calendar.YEAR);
} | [
"Resets the calendar"
] | [
"Set the view frustum to pick against from the given projection matrix.\n\nIf the projection matrix is null, the picker will revert to picking\nobjects that are visible from the viewpoint of the scene's current camera.\nIf a matrix is given, the picker will pick objects that are visible\nfrom the viewpoint of it's owner the given projection matrix.\n\n@param projMatrix 4x4 projection matrix or null\n@see GVRScene#setPickVisible(boolean)",
"Recursively inspects the given objects and returns a node representing their differences. Both objects\nhave be have the same type.\n\n@param working This object will be treated as the successor of the `base` object.\n@param base This object will be treated as the predecessor of the <code>working</code> object.\n@return A node representing the differences between the given objects.",
"Hides the Loader component",
"these are the iterators used by MACAddress",
"Use this API to fetch all the spilloverpolicy resources that are configured on netscaler.",
"Assign FK value to target object by reading PK values of referenced object.\n\n@param targetObject real (non-proxy) target object\n@param cld {@link ClassDescriptor} of the real target object\n@param rds An {@link ObjectReferenceDescriptor} or {@link CollectionDescriptor}\nassociated with the real object.\n@param referencedObject referenced object or proxy\n@param insert Show if \"linking\" is done while insert or update.",
"Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor",
"Renders the document to the specified output stream.",
"Use this API to delete nsacl6 resources of given names."
] |
private void fireEventForNonWebModules(Type eventType, Object event, Annotation... qualifiers) {
try {
BeanDeploymentModules modules = deploymentManager.getServices().get(BeanDeploymentModules.class);
if (modules != null) {
// fire event for non-web modules
// web modules are handled by HttpContextLifecycle
for (BeanDeploymentModule module : modules) {
if (!module.isWebModule()) {
module.fireEvent(eventType, event, qualifiers);
}
}
}
} catch (Exception ignored) {
}
} | [
"Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events."
] | [
"add a converted object to the pool\n\n@param converter\nthe converter that made the conversion\n@param sourceObject\nthe source object that has been converted\n@param destinationType\nthe destination type\n@param convertedObject\nthe converted object",
"Get info for a given topic\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getInfo.html\">API Documentation</a>",
"Use this API to add nspbr6 resources.",
"A final cluster ought to be a super set of current cluster. I.e.,\nexisting node IDs ought to map to same server, but partition layout can\nhave changed and there may exist new nodes.\n\n@param currentCluster\n@param finalCluster",
"Cache key calculation.\n@param sql\n@param resultSetType\n@param resultSetConcurrency\n@return cache key",
"Given a rebalance-task info, convert it into the protobuf equivalent\n\n@param stealInfo Rebalance task info\n@return Protobuf equivalent of the same",
"Get a list of tags for the specified photo.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param photoId\nThe photo ID\n@return The collection of Tag objects",
"Internal method which is called when the user has finished editing the title.\n\n@param box the text box which has been edited",
"Read metadata by populating an instance of the target class\nusing SAXParser."
] |
public Object getProperty(String property) {
if(ExpandoMetaClass.isValidExpandoProperty(property)) {
if(property.equals(ExpandoMetaClass.STATIC_QUALIFIER) ||
property.equals(ExpandoMetaClass.CONSTRUCTOR) ||
myMetaClass.hasProperty(this, property) == null) {
return replaceDelegate().getProperty(property);
}
}
return myMetaClass.getProperty(this, property);
} | [
"this method mimics EMC behavior"
] | [
"Creates a collection from the given stream, casting each object to the\nprovided listener class. The returned collection must not necessarily be\nmutable.\n\n@param <T> Type of the listeners in the given list.\n@param listenerClass The class of the objects in the provided list.\n@param listeners The stream to obtain the listeners for the resulting\ncollection from.\n@param sizeHint Expected size of the input stream.\n@return A typed copy of the list.",
"Use this API to unset the properties of vridparam resource.\nProperties that need to be unset are specified in args array.",
"Returns an array with the width of the longest word per column calculated from the given table.\nDefault padding will be added per column.\nPadding for individual columns will be added if defined.\n@param rows the table rows for calculations\n@param colNumbers number of columns in the table\n@return array with width of longest word for each column, null if input table was null",
"Resizes an image to the specified width, changing width in the same proportion\n@param originalImage Image in memory\n@param widthOut The width to resize\n@return New Image in memory",
"Reads a single schema file.\n\n@param reader The schema reader\n@param schemaFile The schema file\n@return The model",
"Checks if the provided license is valid and could be stored into the database\n\n@param license the license to test\n@throws WebApplicationException if the data is corrupted",
"Convert an object to a set.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target set element type\n@return set",
"Returns the approximate size of slop to help in throttling\n\n@param slopVersioned The versioned slop whose size we want\n@return Size in bytes",
"Find all the values of the requested type.\n\n@param valueTypeToFind the type of the value to return.\n@param <T> the type of the value to find.\n@return the key, value pairs found."
] |
public ResponseFromManager generateUpdateExecuteTask(ParallelTask task) {
// add to map now; as can only pass final
ParallelTaskManager.getInstance().addTaskToInProgressMap(
task.getTaskId(), task);
logger.info("Added task {} to the running inprogress map...",
task.getTaskId());
boolean useReplacementVarMap = false;
boolean useReplacementVarMapNodeSpecific = false;
Map<String, StrStrMap> replacementVarMapNodeSpecific = null;
Map<String, String> replacementVarMap = null;
ResponseFromManager batchResponseFromManager = null;
switch (task.getRequestReplacementType()) {
case UNIFORM_VAR_REPLACEMENT:
useReplacementVarMap = true;
useReplacementVarMapNodeSpecific = false;
replacementVarMap = task.getReplacementVarMap();
break;
case TARGET_HOST_SPECIFIC_VAR_REPLACEMENT:
useReplacementVarMap = false;
useReplacementVarMapNodeSpecific = true;
replacementVarMapNodeSpecific = task
.getReplacementVarMapNodeSpecific();
break;
case NO_REPLACEMENT:
useReplacementVarMap = false;
useReplacementVarMapNodeSpecific = false;
break;
default:
logger.error("error request replacement type. default as no replacement");
}// end switch
// generate content in nodedata
InternalDataProvider dp = InternalDataProvider.getInstance();
dp.genNodeDataMap(task);
VarReplacementProvider.getInstance()
.updateRequestWithReplacement(task, useReplacementVarMap,
replacementVarMap, useReplacementVarMapNodeSpecific,
replacementVarMapNodeSpecific);
batchResponseFromManager =
sendTaskToExecutionManager(task);
removeTaskFromInProgressMap(task.getTaskId());
logger.info(
"Removed task {} from the running inprogress map... "
+ ". This task should be garbage collected if there are no other pointers.",
task.getTaskId());
return batchResponseFromManager;
} | [
"key function to execute a parallel task.\n\n@param task the parallel task\n@return the batch response from manager"
] | [
"Configure file logging and stop console logging.\n\n@param filename\nLog to this file.",
"This method is used to quote any special characters that appear in\nliteral text that is required as part of the currency format.\n\n@param literal Literal text\n@return literal text with special characters in quotes",
"Process the hours and exceptions for an individual calendar.\n\n@param calendar project calendar\n@param calendarData hours and exception rows for this calendar",
"Create an ephemeral node with the given path and data. Create parents if necessary.\n@param zkClient client of zookeeper\n@param path node path of zookeeper\n@param data node data",
"Performs the closure within a transaction using a cached connection.\nIf the closure takes a single argument, it will be called\nwith the connection, otherwise it will be called with no arguments.\n\n@param closure the given closure\n@throws SQLException if a database error occurs",
"Merge msg bundles together, creating new MsgBundle with merges msg bundles passed in as a method argument",
"Use this API to fetch auditsyslogpolicy_aaauser_binding resources of given name .",
"Remove a named object",
"Find and read the cache format entry in a metadata cache file.\n\n@return the content of the format entry, or {@code null} if none was found\n\n@throws IOException if there is a problem reading the file"
] |
public static <T> Object callMethod(Object obj,
Class<T> c,
String name,
Class<?>[] classes,
Object[] args) {
try {
Method m = getMethod(c, name, classes);
return m.invoke(obj, args);
} catch(InvocationTargetException e) {
throw getCause(e);
} catch(IllegalAccessException e) {
throw new IllegalStateException(e);
}
} | [
"Call the named method\n\n@param obj The object to call the method on\n@param c The class of the object\n@param name The name of the method\n@param args The method arguments\n@return The result of the method"
] | [
"Print a date.\n\n@param value Date instance\n@return string representation of a date",
"Returns new instance of OptionalValue with given value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue",
"Adds a submodule to the module.\n\n<P>\nINFO: If the module is promoted, all added submodule will be promoted.\n\n@param submodule Module",
"Populates default settings.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException",
"Initialize the key set for an xml bundle.",
"Writes the data collected about classes to a file.",
"Unilaterally merge an update description into this update description.\n@param otherDescription the update description to merge into this\n@return this merged update description",
"Use this API to unset the properties of responderparam resource.\nProperties that need to be unset are specified in args array.",
"Moves to the next step."
] |
private void readTasks(Project plannerProject) throws MPXJException
{
Tasks tasks = plannerProject.getTasks();
if (tasks != null)
{
for (net.sf.mpxj.planner.schema.Task task : tasks.getTask())
{
readTask(null, task);
}
for (net.sf.mpxj.planner.schema.Task task : tasks.getTask())
{
readPredecessors(task);
}
}
m_projectFile.updateStructure();
} | [
"This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file"
] | [
"This utility displays a list of available task filters, and a\nlist of available resource filters.\n\n@param project project file",
"Use this API to add dnssuffix.",
"Create a document that parses the tile's featureFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@return document\n@throws RenderException\noops",
"find the middle point of two intersect points in circle,only one point will be correct\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return",
"Compute the offset for the item in the layout based on the offsets of neighbors\nin the layout. The other offsets are not patched. If neighbors offsets have not\nbeen computed the offset of the item will not be set.\n@return true if the item fits the container, false otherwise",
"adds the qualified names to the require-bundle attribute, if not already\npresent.\n\n@param bundles - passing parameterized bundled (e.g. versions, etc.) is\nnot supported",
"Displays text which shows the valid command line parameters, and then exits.",
"Resolve the targeted license thanks to the license ID\nReturn null if no license is matching the licenseId\n\n@param licenseId\n@return DbLicense",
"Updates the existing cluster such that we remove partitions mentioned\nfrom the stealer node and add them to the donor node\n\n@param currentCluster Existing cluster metadata. Both stealer and donor\nnode should already exist in this metadata\n@param stealerNodeId Id of node for which we are stealing the partitions\n@param donatedPartitions List of partitions we are moving\n@return Updated cluster metadata"
] |
public boolean detectTierRichCss() {
boolean result = false;
//The following devices are explicitly ok.
//Note: 'High' BlackBerry devices ONLY
if (detectMobileQuick()) {
//Exclude iPhone Tier and e-Ink Kindle devices.
if (!detectTierIphone() && !detectKindle()) {
//The following devices are explicitly ok.
//Note: 'High' BlackBerry devices ONLY
//Older Windows 'Mobile' isn't good enough for iPhone Tier.
if (detectWebkit()
|| detectS60OssBrowser()
|| detectBlackBerryHigh()
|| detectWindowsMobile()
|| (userAgent.indexOf(engineTelecaQ) != -1)) {
result = true;
} // if detectWebkit()
} //if !detectTierIphone()
} //if detectMobileQuick()
return result;
} | [
"The quick way to detect for a tier of devices.\nThis method detects for devices which are likely to be capable\nof viewing CSS content optimized for the iPhone,\nbut may not necessarily support JavaScript.\nExcludes all iPhone Tier devices.\n@return detection of any device in the 'Rich CSS' Tier"
] | [
"Mbeans for FETCH_ENTRIES",
"Converts the given CharSequence into a List of Strings of one character.\n\n@param self a CharSequence\n@return a List of characters (a 1-character String)\n@see #toSet(String)\n@since 1.8.2",
"Gets information about this collaboration.\n\n@return info about this collaboration.",
"Drop down item view\n\n@param position position of item\n@param convertView View of item\n@param parent parent view of item's view\n@return covertView",
"Construct a Libor index for a given curve and schedule.\n\n@param forwardCurveName\n@param schedule\n@return The Libor index or null, if forwardCurveName is null.",
"Returns the rank of the decomposed matrix.\n\n@see SingularOps_DDRM#rank(SingularValueDecomposition_F64, double)\n\n@return The matrix's rank",
"Translate a path that has previously been unescaped and unquoted.\nThat is called at command execution when the calue is retrieved prior to be\nused as ModelNode value.\n@param path The unquoted, unescaped path.\n@return A path with ~ and default dir expanded.",
"Detects if the current browser is a BlackBerry Touch\ndevice, such as the Storm, Torch, and Bold Touch. Excludes the Playbook.\n@return detection of a Blackberry touchscreen device",
"Detects if the current browser is a BlackBerry device AND\nhas a more capable recent browser. Excludes the Playbook.\nExamples, Storm, Bold, Tour, Curve2\nExcludes the new BlackBerry OS 6 and 7 browser!!\n@return detection of a Blackberry device with a better browser"
] |
public static boolean queryHasResult(Statement stmt, String sql) {
try {
ResultSet rs = stmt.executeQuery(sql);
try {
return rs.next();
} finally {
rs.close();
}
} catch (SQLException e) {
throw new DukeException(e);
}
} | [
"Returns true if the query result has at least one row."
] | [
"Get the relative path.\n\n@return the relative path",
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"We have obtained a waveform preview for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this waveform preview\n@param preview the waveform preview which we retrieved",
"note this string is used by hashCode",
"Constraint that ensures that the field has precision and scale settings if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Attempts to substitute all the found expressions in the input\nwith their corresponding resolved values.\nIf any of the found expressions failed to resolve or\nif the input does not contain any expression, the input is returned as is.\n\n@param input the input string\n@return the input with resolved expressions or the original input in case\nthe input didn't contain any expressions or at least one of the\nexpressions could not be resolved",
"Create a patch element for the rollback patch.\n\n@param entry the entry\n@return the new patch element",
"checks if the 2 triangles shares a segment\n@author Doron Ganel & Eyal Roth(2009)\n@param t2 - a second triangle\n@return boolean",
"Launch Navigation Service residing in the navigation module"
] |
public T withDescription(String text, String languageCode) {
withDescription(factory.getMonolingualTextValue(text, languageCode));
return getThis();
} | [
"Adds an additional description to the constructed document.\n\n@param text\nthe text of the description\n@param languageCode\nthe language code of the description\n@return builder object to continue construction"
] | [
"Use this API to fetch the statistics of all ipseccounters_stats resources that are configured on netscaler.",
"Return true if the DeclarationExpression represents a 'final' variable declaration.\n\nNOTE: THIS IS A WORKAROUND.\n\nThere does not seem to be an easy way to determine whether the 'final' modifier has been\nspecified for a variable declaration. Return true if the 'final' is present before the variable name.",
"Validates for non-conflicting roles",
"Use this API to unset the properties of nsdiameter resource.\nProperties that need to be unset are specified in args array.",
"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",
"Emit a string event with parameters.\n\nThis will invoke all {@link SimpleEventListener} bound to the specified\nstring value given the listeners has the matching argument list.\n\nFor example, suppose we have the following simple event listener methods:\n\n```java\n{@literal @}On(\"USER-LOGIN\")\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}On(\"USER-LOGIN\")\npublic void checkDuplicateLoginAttempts(User user, Object... args) {...}\n\n{@literal @}On(\"USER-LOGIN\")\npublic void foo(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` and `checkDuplicateLoginAttempts` methods:\n\n```java\nUser user = ...;\neventBus.emit(\"USER-LOGIN\", user, System.currentTimeMills());\n```\n\nThe `foo(User)` will not invoked because:\n\n* The parameter list `(User, long)` does not match the declared argument list `(User)`.\nHere the `String` in the parameter list is taken out because it is used to indicate\nthe event, instead of being passing through to the event handler method.\n* The method `checkDuplicateLoginAttempts(User, Object ...)` will be invoked because\nit declares a varargs typed arguments, meaning it matches any parameters passed in.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener",
"Generate random velocities for every particle. The direction is obtained by assuming\nthe position of a particle as a vector. This normalised vector is scaled by\nthe speed range.\n\n@return",
"Calculate Euclidean distance between two points.\n\n@param anotherPoint Point to calculate distance to.\n@return Euclidean distance between this point and anotherPoint points.",
"Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record"
] |
private void processRequestHeaderOverrides(HttpMethod httpMethodProxyRequest) throws Exception {
RequestInformation requestInfo = requestInformation.get();
for (EndpointOverride selectedPath : requestInfo.selectedRequestPaths) {
List<EnabledEndpoint> points = selectedPath.getEnabledEndpoints();
for (EnabledEndpoint endpoint : points) {
if (endpoint.getOverrideId() == Constants.PLUGIN_REQUEST_HEADER_OVERRIDE_ADD) {
httpMethodProxyRequest.addRequestHeader(endpoint.getArguments()[0].toString(),
endpoint.getArguments()[1].toString());
requestInfo.modified = true;
} else if (endpoint.getOverrideId() == Constants.PLUGIN_REQUEST_HEADER_OVERRIDE_REMOVE) {
httpMethodProxyRequest.removeRequestHeader(endpoint.getArguments()[0].toString());
requestInfo.modified = true;
}
}
}
} | [
"Apply any applicable header overrides to request\n\n@param httpMethodProxyRequest\n@throws Exception"
] | [
"Obtain a dbserver client session that can be used to perform some task, call that task with the client,\nthen release the client.\n\n@param targetPlayer the player number whose dbserver we wish to communicate with\n@param task the activity that will be performed with exclusive access to a dbserver connection\n@param description a short description of the task being performed for error reporting if it fails,\nshould be a verb phrase like \"requesting track metadata\"\n@param <T> the type that will be returned by the task to be performed\n\n@return the value returned by the completed task\n\n@throws IOException if there is a problem communicating\n@throws Exception from the underlying {@code task}, if any",
"Gets the logger.\n\n@return Returns a Category",
"Return the containing group if it contains exactly one element.\n\n@since 2.14",
"For internal use! This method creates real new PB instances",
"Close the store.",
"Attempts to insert a colon so that a value without a colon can\nbe parsed.",
"Sets a parameter for the creator.",
"Inserts 'token' after 'where'. if where is null then it is inserted to the beginning of the list.\n@param where Where 'token' should be inserted after. if null the put at it at the beginning\n@param token The token that is to be inserted",
"A regular embedded is an element that it is embedded but it is not a key or a collection.\n\n@param keyColumnNames the column names representing the identifier of the entity\n@param column the column we want to check\n@return {@code true} if the column represent an attribute of a regular embedded element, {@code false} otherwise"
] |
public static String httpRequest(String stringUrl, String method, Map<String, String> parameters,
String input, String charset) throws IOException {
URL url = new URL(stringUrl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
conn.setRequestMethod(method);
if (parameters != null) {
for (Entry<String, String> entry : parameters.entrySet()) {
conn.addRequestProperty(entry.getKey(), entry.getValue());
}
}
if (input != null) {
OutputStream output = null;
try {
output = conn.getOutputStream();
output.write(input.getBytes(charset));
} finally {
if (output != null) {
output.close();
}
}
}
return MyStreamUtils.readContent(conn.getInputStream());
} | [
"Execute a HTTP request\n\n@param stringUrl URL\n@param method Method to use\n@param parameters Params\n@param input Input / Payload\n@param charset Input Charset\n@return response\n@throws IOException"
] | [
"Returns the getter method associated with the object's field.\n\n@param object\nthe object\n@param fieldName\nthe name of the field\n@return the getter method\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible",
"refresh all deliveries dependencies for a particular product",
"persist decorator and than continue to children without touching the model",
"create a path structure representing the object graph",
"Sets the provided filters.\n@param filters a map \"column id -> filter\".",
"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",
"Read the data for all of the tables we're interested in.\n\n@param tables list of all available tables\n@param is input stream",
"Here the search query is composed and executed.\nThe result is wrapped in an easily usable form.\nIt is exposed to the JSP via the tag's \"var\" attribute.\n@return The result object exposed via the tag's attribute \"var\".",
"Check the variable name and if not set, set it with the singleton variable being on the top of the stack."
] |
private String getInitials(String name)
{
String result = null;
if (name != null && name.length() != 0)
{
StringBuilder sb = new StringBuilder();
sb.append(name.charAt(0));
int index = 1;
while (true)
{
index = name.indexOf(' ', index);
if (index == -1)
{
break;
}
++index;
if (index < name.length() && name.charAt(index) != ' ')
{
sb.append(name.charAt(index));
}
++index;
}
result = sb.toString();
}
return result;
} | [
"Convert a name into initials.\n\n@param name source name\n@return initials"
] | [
"Retrieves an integer value from the extended data.\n\n@param type Type identifier\n@return integer value",
"Adds all fields declared directly in the object's class to the output\n@return this",
"Get the list of all nodes and the list of active nodes in the cluster.\n\n@return Membership object encapsulating lists of all nodes and the cluster nodes\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-_membership-\">\n_membership</a>",
"Use this API to update nd6ravariables resources.",
"try to find a field in class c, recurse through class hierarchy if necessary\n\n@throws NoSuchFieldException if no Field was found into the class hierarchy",
"Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault",
"Returns an iterator over the items in the trash.\n@return an iterator over the items in the trash.",
"Create a TableAlias for path or userAlias\n@param aTable\n@param aPath\n@param aUserAlias\n@return TableAlias",
"Get this property from the given object.\n@param object an array\n@return the length of the array object\n@throws IllegalArgumentException if object is not an array"
] |
protected BoxWatermark applyWatermark(URLTemplate itemUrl, String imprint) {
URL watermarkUrl = itemUrl.build(this.getAPI().getBaseURL(), this.getID());
URL url = WATERMARK_URL_TEMPLATE.build(watermarkUrl.toString());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");
JsonObject body = new JsonObject()
.add(BoxWatermark.WATERMARK_JSON_KEY, new JsonObject()
.add(BoxWatermark.WATERMARK_IMPRINT_JSON_KEY, imprint));
request.setBody(body.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
return new BoxWatermark(response.getJSON());
} | [
"Used to apply or update the watermark for the item.\n@param itemUrl url template for the item.\n@param imprint the value must be \"default\", as custom watermarks is not yet supported.\n@return the watermark associated with the item."
] | [
"List the slack values for each task.\n\n@param file ProjectFile instance",
"Use this API to delete route6 of given name.",
"Get the layer ID out of the request URL.\n\n@param request servlet request\n@return layer id",
"Helper method which supports creation of proper error messages.\n\n@param ex An exception to include or <em>null</em>.\n@param message The error message or <em>null</em>.\n@param objectToIdentify The current used object or <em>null</em>.\n@param topLevelClass The object top-level class or <em>null</em>.\n@param realClass The object real class or <em>null</em>.\n@param pks The associated PK values of the object or <em>null</em>.\n@return The generated exception.",
"Writes references that have been added recently. Auxiliary triples that\nare generated for serializing snaks in references will be written right\nafterwards. This will also trigger any other auxiliary triples to be\nwritten that the snak converter object may have buffered.\n\n@throws RDFHandlerException\nif there was a problem writing the restrictions",
"Read custom fields for a GanttProject resource.\n\n@param gpResource GanttProject resource\n@param mpxjResource MPXJ Resource instance",
"Converts an object to an instance of the target type.\n\n@param mapper the object mapper\n@param source the source to convert\n@param targetType the target class type\n@return target instance\n@see SquigglyUtils#objectify(ObjectMapper, Object, Class)",
"Finds the parent address, everything before the last address part.\n\n@param address the address to get the parent\n\n@return the parent address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty",
"Core implementation of matchPath. It is isolated so that it can be called\nfrom TokenizedPattern."
] |
public Integer getVarDataKey(FieldType type)
{
Integer result = null;
FieldItem item = m_map.get(type);
if (item != null)
{
result = item.getVarDataKey();
}
return result;
} | [
"Retrieve the var data key for a specific field.\n\n@param type field type\n@return var data key"
] | [
"Create a new file but fail if it already exists. The check for\nexistance of the file and it's creation are an atomic operation with\nrespect to other filesystem activities.",
"Adds a data set to IIM file.\n\n@param ds\ndata set id (see constants in IIM class)\n@param value\ndata set value. Null values are silently ignored.\n@throws SerializationException\nif value can't be serialized by data set's serializer\n@throws InvalidDataSetException\nif data set isn't defined",
"Clone a widget info map considering what may be copied to the client.\n\n@param widgetInfo widget info map\n@return cloned copy including only records which are not {@link ServerSideOnlyInfo}",
"Sets the origin and direction of the pick ray.\n\n@param ox X coordinate of origin.\n@param oy Y coordinate of origin.\n@param oz Z coordinate of origin.\n@param dx X coordinate of ray direction.\n@param dy Y coordinate of ray direction.\n@param dz Z coordinate of ray direction.\n\nThe coordinate system of the ray depends on the whether the\npicker is attached to a scene object or not. When attached\nto a scene object, the ray is in the coordinate system of\nthat object where (0, 0, 0) is the center of the scene object\nand (0, 0, 1) is it's positive Z axis. If not attached to an\nobject, the ray is in the coordinate system of the scene's\nmain camera with (0, 0, 0) at the viewer and (0, 0, -1)\nwhere the viewer is looking.\n@see #doPick()\n@see #getPickRay()\n@see #getWorldPickRay(Vector3f, Vector3f)",
"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",
"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",
"Use this API to add authenticationradiusaction resources.",
"Create a new file but fail if it already exists. The check for\nexistance of the file and it's creation are an atomic operation with\nrespect to other filesystem activities.",
"Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed"
] |
public List<Message> requestArtistMenuFrom(final SlotReference slotReference, final int sortOrder)
throws Exception {
ConnectionManager.ClientTask<List<Message>> task = new ConnectionManager.ClientTask<List<Message>>() {
@Override
public List<Message> useClient(Client client) throws Exception {
if (client.tryLockingForMenuOperations(MetadataFinder.MENU_TIMEOUT, TimeUnit.SECONDS)) {
try {
logger.debug("Requesting Artist menu.");
Message response = client.menuRequest(Message.KnownType.ARTIST_MENU_REQ, Message.MenuIdentifier.MAIN_MENU, slotReference.slot,
new NumberField(sortOrder));
return client.renderMenuItems(Message.MenuIdentifier.MAIN_MENU, slotReference.slot, CdjStatus.TrackType.REKORDBOX, response);
} finally {
client.unlockForMenuOperations();
}
} else {
throw new TimeoutException("Unable to lock player for menu operations.");
}
}
};
return ConnectionManager.getInstance().invokeWithClientSession(slotReference.player, task, "requesting artist menu");
} | [
"Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the artist menu\n\n@throws Exception if there is a problem obtaining the menu"
] | [
"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.",
"Creates the string mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param position\nthe position\n@throws IOException\nSignals that an I/O exception has occurred.",
"Returns the index of a key in the set.\n\n@param key The key to search for.\n@return Returns the index of the key if it exists, else a negative integer.",
"domain.xml",
"Returns all headers with the headers from the Payload\n\n@return All the headers",
"Tests if this enumeration contains more elements.\n@return <code>true</code> if and only if this enumeration object\ncontains at least one more element to provide;\n<code>false</code> otherwise.",
"Copies a classworlds file to a temporary location either on the local filesystem or on a slave depending on the\nnode type.\n\n@return The path of the classworlds.conf file",
"Returns an HTML table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.",
"Returns the value of the element with the minimum value\n@param A (Input) Matrix. Not modified.\n@return scalar"
] |
@SuppressWarnings("unchecked")
protected <T extends Indexable> T taskResult(String key) {
Indexable result = this.taskGroup.taskResult(key);
if (result == null) {
return null;
} else {
T castedResult = (T) result;
return castedResult;
}
} | [
"Get result of one of the task that belongs to this task's task group.\n\n@param key the task key\n@param <T> the actual type of the task result\n@return the task result, null will be returned if task has not produced a result yet"
] | [
"Check exactly the week check-boxes representing the given weeks.\n@param weeksToCheck the weeks selected.",
"trim \"act.\" from conf keys",
"Saves the messages for all languages that were opened in the editor.\n\n@throws CmsException thrown if saving fails.",
"Create a patch element for the rollback patch.\n\n@param entry the entry\n@return the new patch element",
"Standard doclet entry point\n@param root\n@return",
"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",
"Use this API to fetch the statistics of all cmppolicylabel_stats resources that are configured on netscaler.",
"Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected",
"Establish a new master tempo, and if it is a change from the existing one, report it to the listeners.\n\n@param newTempo the newly reported master tempo."
] |
public static base_response delete(nitro_service client, sslcertkey resource) throws Exception {
sslcertkey deleteresource = new sslcertkey();
deleteresource.certkey = resource.certkey;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete sslcertkey."
] | [
"Computes the determinant for the specified matrix. It must be square and have\nthe same width and height as what was specified in the constructor.\n\n@param mat The matrix whose determinant is to be computed.\n@return The determinant.",
"Deletes the metadata on this folder associated with a specified scope and template.\n\n@param templateName the metadata template type name.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").",
"Use this API to unset the properties of rnatparam resource.\nProperties that need to be unset are specified in args array.",
"Return a list of place IDs for a query string.\n\nThe flickr.places.find method is not a geocoder. It will round \"up\" to the nearest place type to which place IDs apply. For example, if you pass it a\nstreet level address it will return the city that contains the address rather than the street, or building, itself.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param query\n@return PlacesList\n@throws FlickrException",
"Call the onQueryExecuteTimeLimitExceeded hook if necessary\n@param sql sql statement that took too long\n@param queryStartTime time when query was started.",
"Bind a prepared statment that represents a call to a procedure or\nuser-defined function.\n\n@param stmt the statement to bind.\n@param cld the class descriptor of the object that triggered the\ninvocation of the procedure or user-defined function.\n@param obj the object that triggered the invocation of the procedure\nor user-defined function.\n@param proc the procedure descriptor that provides information about\nthe arguments that shoudl be passed to the procedure or\nuser-defined function",
"When creating barcode columns\n@return",
"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",
"Returns a diagonal matrix with the specified diagonal elements.\n@param values values of diagonal elements\n@return A diagonal matrix"
] |
private void remove(String directoryName) {
if ((directoryName == null) || (conn == null))
return;
String key = S3Util.sanitize(directoryName) + "/" + S3Util.sanitize(DC_FILE_NAME);
try {
Map headers = new TreeMap();
headers.put("Content-Type", Arrays.asList("text/plain"));
if (usingPreSignedUrls()) {
conn.delete(pre_signed_delete_url).connection.getResponseMessage();
} else {
conn.delete(location, key, headers).connection.getResponseMessage();
}
}
catch(Exception e) {
ROOT_LOGGER.cannotRemoveS3File(e);
}
} | [
"Remove the S3 file that contains the domain controller data.\n\n@param directoryName the name of the directory that contains the S3 file"
] | [
"Adds an additional statement to the constructed document.\n\n@param statement\nthe additional statement\n@return builder object to continue construction",
"Waits for the current outstanding request retrying it with exponential backoff if it fails.\n\n@throws ClosedByInterruptException if request was interrupted\n@throws IOException In the event of FileNotFoundException, MalformedURLException\n@throws RetriesExhaustedException if exceeding the number of retries",
"Function to perform backward pooling",
"Mbeans for FETCH_ENTRIES",
"Use this API to update vridparam.",
"Inflate the main layout used to render videos in the list view.\n\n@param inflater LayoutInflater service to inflate.\n@param parent ViewGroup used to inflate xml.\n@return view inflated.",
"Inserts the specified objects at the specified index in the array.\n\n@param items The objects to insert into the array.\n@param index The index at which the object must be inserted.",
"Map event type enum.\n\n@param eventType the event type\n@return the event type enum",
"Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string"
] |
private Event createEvent(Endpoint endpoint, EventTypeEnum type) {
Event event = new Event();
MessageInfo messageInfo = new MessageInfo();
Originator originator = new Originator();
event.setMessageInfo(messageInfo);
event.setOriginator(originator);
Date date = new Date();
event.setTimestamp(date);
event.setEventType(type);
messageInfo.setPortType(
endpoint.getBinding().getBindingInfo().getService().getInterface().getName().toString());
String transportType = null;
if (endpoint.getBinding() instanceof SoapBinding) {
SoapBinding soapBinding = (SoapBinding)endpoint.getBinding();
if (soapBinding.getBindingInfo() instanceof SoapBindingInfo) {
SoapBindingInfo soapBindingInfo = (SoapBindingInfo)soapBinding.getBindingInfo();
transportType = soapBindingInfo.getTransportURI();
}
}
messageInfo.setTransportType((transportType != null) ? transportType : "Unknown transport type");
originator.setProcessId(Converter.getPID());
try {
InetAddress inetAddress = InetAddress.getLocalHost();
originator.setIp(inetAddress.getHostAddress());
originator.setHostname(inetAddress.getHostName());
} catch (UnknownHostException e) {
originator.setHostname("Unknown hostname");
originator.setIp("Unknown ip address");
}
String address = endpoint.getEndpointInfo().getAddress();
event.getCustomInfo().put("address", address);
return event;
} | [
"Creates the event for endpoint with specific type.\n\n@param endpoint the endpoint\n@param type the type\n@return the event"
] | [
"Sets the site root.\n\n@param siteRoot the site root",
"Round the size of a rectangle with double values.\n\n@param rectangle The rectangle.\n@return",
"Retrieve the document with the specified ID from the database and deserialize to an\ninstance of the POJO of type T.\n\n@param <T> object type\n@param classType the class of type T\n@param id the document id\n@return an object of type T\n@throws NoDocumentException if the document is not found in the database\n@see #find(Class, String, String)\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/document.html#read\"\ntarget=\"_blank\">Documents - read</a>",
"Set the pattern scheme to either \"by weekday\" or \"by day of month\".\n@param isByWeekDay flag, indicating if the pattern \"by weekday\" should be set.\n@param fireChange flag, indicating if a value change event should be fired.",
"Send ourselves \"updates\" about any tracks that were loaded before we started, or before we were requesting\ndetails, since we missed them.",
"Check the variable name and if not set, set it with the singleton variable name being on the top of the stack.",
"Generates a usable test specification for a given test definition\nUses the first bucket as the fallback value\n\n@param testDefinition a {@link TestDefinition}\n@return a {@link TestSpecification} which corresponding to given test definition.",
"Start pushing the element off to the right.",
"Animate de-selection of visible views and clear\nselected set."
] |
public static Object tryGetSingleton(Class<?> invokerClass, App app) {
Object singleton = app.singleton(invokerClass);
if (null == singleton) {
if (isGlobalOrStateless(invokerClass, new HashSet<Class>())) {
singleton = app.getInstance(invokerClass);
}
}
if (null != singleton) {
app.registerSingleton(singleton);
}
return singleton;
} | [
"If the `invokerClass` specified is singleton, or without field or all fields are\nstateless, then return an instance of the invoker class. Otherwise, return null\n@param invokerClass the invoker class\n@param app the app\n@return an instance of the invokerClass or `null` if invoker class is stateful class"
] | [
"If the belief its a count of some sort his counting its increased by one.\n\n@param bName\n- the name of the belief count.",
"Converts a duration to duration time units.\n\n@param value duration value\n@return duration time units",
"Gets the object whose index is the integer argument.\n\n@param i the integer index to be queried for the corresponding argument\n@return the object whose index is the integer argument.",
"Moves the given row down.\n\n@param row the row to move",
"Returns a lazily generated map from site paths of resources to the available locales for the resource.\n\n@return a lazily generated map from site paths of resources to the available locales for the resource.",
"Serializes the timing data to a \"~\" delimited file at outputPath.",
"Send post request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws IOException the io exception",
"Handles newlines by removing them and add new rows instead",
"Gets the index of the specified value.\n\n@param value the value of the item to be found\n@return the index of the value"
] |
private void writePredecessors(Task task)
{
List<Relation> relations = task.getPredecessors();
for (Relation mpxj : relations)
{
RelationshipType xml = m_factory.createRelationshipType();
m_project.getRelationship().add(xml);
xml.setLag(getDuration(mpxj.getLag()));
xml.setObjectId(Integer.valueOf(++m_relationshipObjectID));
xml.setPredecessorActivityObjectId(mpxj.getTargetTask().getUniqueID());
xml.setSuccessorActivityObjectId(mpxj.getSourceTask().getUniqueID());
xml.setPredecessorProjectObjectId(PROJECT_OBJECT_ID);
xml.setSuccessorProjectObjectId(PROJECT_OBJECT_ID);
xml.setType(RELATION_TYPE_MAP.get(mpxj.getType()));
}
} | [
"Writes task predecessor links to a PM XML file.\n\n@param task MPXJ Task instance"
] | [
"Modify a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder",
"Retrieve a table of data.\n\n@param type table type\n@return FastTrackTable instance",
"Returns new instance of OptionalString with given key and value\n@param key key of the returned OptionalString\n@param value wrapped string\n@return given object wrapped in OptionalString with given key",
"Reads the cost rate tables from the file.\n\n@param resource parent resource\n@param rates XML cot rate tables",
"Returns true if\n- includeTags is not empty and tag is in includeTags\n- includeTags is empty and tag is not in excludeTags\n@param tags Hint tags\n@param includeTags Include tags\n@param excludeTags Exclude tags\n@return has tag match",
"Comparator against other element.\n\n@param otherElement The other element.\n@param logging Whether to do logging.\n@return Whether the elements are equal.",
"get TypeSignature given the signature\n\n@param typeSignature\n@param useInternalFormFullyQualifiedName\nif true, fqn in parameterizedTypeSignature must be in the form\n'java/lang/Thread'. If false fqn must be of the form\n'java.lang.Thread'\n@return",
"Gets the value of the task property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the task property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetTask().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link GanttDesignerRemark.Task }",
"It is possible for the QR algorithm to get stuck in a loop because of symmetries. This happens\nmore often with larger matrices. By taking a random step it can break the symmetry and finish."
] |
@Pure
public static <K, V> Map<K, V> operator_minus(Map<K, V> left, final Map<? extends K, ? extends V> right) {
return Maps.filterEntries(left, new Predicate<Entry<K, V>>() {
@Override
public boolean apply(Entry<K, V> input) {
final V value = right.get(input.getKey());
if (value == null) {
return input.getValue() == null && right.containsKey(input.getKey());
}
return !Objects.equal(input.getValue(), value);
}
});
} | [
"Replies the elements of the left map without the pairs in the right map.\nIf the pair's values differ from\nthe value within the map, the map entry is not removed.\n\n<p>\nThe difference is an immutable\nsnapshot of the state of the maps at the time this method is called. It\nwill never change, even if the maps change at a later time.\n</p>\n\n<p>\nSince this method uses {@code HashMap} instances internally, the keys of\nthe supplied maps must be well-behaved with respect to\n{@link Object#equals} and {@link Object#hashCode}.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to update.\n@param right the pairs to remove.\n@return the map with the content of the left map except the pairs of the right map.\n@since 2.15"
] | [
"Use this API to add clusterinstance resources.",
"Sets the HTML entity translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining",
"Computes the distance from a point p to the plane of this face.\n\n@param p\nthe point\n@return distance from the point to the plane",
"convert a param object to a multimap.\n\n@param objectParams the parameters to convert.\n@return the corresponding Multimap.",
"Pop the record number from the front of the list, and parse it to ensure that\nit is a valid integer.\n\n@param list MPX record",
"Gets the site label for the entry.\n\n@param cms the current CMS context\n@param entry the entry\n@return the site label for the entry",
"Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory",
"Removes an Object from the cache.",
"Return the build string of this instance of finmath-lib.\nCurrently this is the Git commit hash.\n\n@return The build string of this instance of finmath-lib."
] |
private PoolingHttpClientConnectionManager createConnectionMgr() {
PoolingHttpClientConnectionManager connectionMgr;
// prepare SSLContext
SSLContext sslContext = buildSslContext();
ConnectionSocketFactory plainsf = PlainConnectionSocketFactory.getSocketFactory();
// we allow to disable host name verification against CA certificate,
// notice: in general this is insecure and should be avoided in production,
// (this type of configuration is useful for development purposes)
boolean noHostVerification = false;
LayeredConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(
sslContext,
noHostVerification ? NoopHostnameVerifier.INSTANCE : new DefaultHostnameVerifier()
);
Registry<ConnectionSocketFactory> r = RegistryBuilder.<ConnectionSocketFactory>create()
.register("http", plainsf)
.register("https", sslsf)
.build();
connectionMgr = new PoolingHttpClientConnectionManager(r, null, null,
null, connectionPoolTimeToLive, TimeUnit.SECONDS);
connectionMgr.setMaxTotal(maxConnectionsTotal);
connectionMgr.setDefaultMaxPerRoute(maxConnectionsPerRoute);
HttpHost localhost = new HttpHost("localhost", 80);
connectionMgr.setMaxPerRoute(new HttpRoute(localhost), maxConnectionsPerRoute);
return connectionMgr;
} | [
"Creates custom Http Client connection pool to be used by Http Client\n\n@return {@link PoolingHttpClientConnectionManager}"
] | [
"Obtains a local date in Symmetry010 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date",
"Use this API to update nstimeout.",
"Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List",
"as it is daemon thread\n\nTODO when release external resources should shutdown the scheduler.",
"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.",
"Loads the file content in the properties collection\n@param filePath The path of the file to be loaded",
"Returns the response error stream, handling the case when it contains gzipped data.\n@return gzip decoded (if needed) error stream or null",
"Start a managed server.\n\n@param factory the boot command factory",
"Read the version number.\n\n@param is input stream"
] |
@SuppressWarnings("unused")
public String getDevicePushToken(final PushType type) {
switch (type) {
case GCM:
return getCachedGCMToken();
case FCM:
return getCachedFCMToken();
default:
return null;
}
} | [
"Returns the device push token or null\n\n@param type com.clevertap.android.sdk.PushType (FCM or GCM)\n@return String device token or null\nNOTE: on initial install calling getDevicePushToken may return null, as the device token is\nnot yet available\nImplement CleverTapAPI.DevicePushTokenRefreshListener to get a callback once the token is\navailable"
] | [
"Close it and ignore any exceptions.",
"Two stage distribution, dry run and actual promotion to verify correctness.\n\n@param distributionBuilder\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException",
"The token was previously determined as potentially to-be-splitted thus we\nemit additional indentation or dedenting tokens.",
"Obtain the path ID for a profile\n\n@param identifier Can be the path ID, or friendly name\n@param profileId\n@return\n@throws Exception",
"Create a RemoteWebDriver backed EmbeddedBrowser.\n\n@param hubUrl Url of the server.\n@param filterAttributes the attributes to be filtered from DOM.\n@param crawlWaitReload the period to wait after a reload.\n@param crawlWaitEvent the period to wait after an event is fired.\n@return The EmbeddedBrowser.",
"Removes the given service provider factory from the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>",
"adds a FIELDDESCRIPTOR to this ClassDescriptor.\n@param fld",
"Loads treebank data from first argument and prints it.\n\n@param args Array of command-line arguments: specifies a filename",
"Generic method used to create a field map from a block of data.\n\n@param data field map data"
] |
public void histogramToStructure(int histogram[] ) {
col_idx[0] = 0;
int index = 0;
for (int i = 1; i <= numCols; i++) {
col_idx[i] = index += histogram[i-1];
}
nz_length = index;
growMaxLength( nz_length , false);
if( col_idx[numCols] != nz_length )
throw new RuntimeException("Egads");
} | [
"Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above."
] | [
"Creates a combined list of Entries using the provided mapping file, and sorts them by\nfirst by priority, then the number of tokens in the regex.\n\n@param mapping The path to a file of mappings\n@return a sorted list of Entries",
"Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"Returns the JRDesignGroup for the DJGroup passed\n@param jd\n@param layoutManager\n@param group\n@return",
"Return an instance of this class.\n\n@param container Solr CoreContainer container object in order to create a server object.\n\n@return instance of CmsSolrSpellchecker",
"Creates an operations that targets this handler.\n@param operationToValidate the operation that this handler will validate\n@return the validation operation",
"Applies the given filter to each of the given elems, and returns the\nlist of elems that were accepted. The runtime type of the returned\narray is the same as the passed in array.",
"Uploads a new file to this folder while reporting the progress to a ProgressListener.\n\n@param fileContent a stream containing the contents of the file to upload.\n@param name the name to give the uploaded file.\n@param fileSize the size of the file used for determining the progress of the upload.\n@param listener a listener for monitoring the upload's progress.\n@return the uploaded file's info.",
"After cluster management operations, i.e. reset quota and recover quota\nenforcement settings",
"Calculate the child size along the axis\n@param dataIndex data index\n@param axis {@link Axis}\n@return child size"
] |
public int count() {
int n = 0;
for (ConcurrentMap<?, ?> bag : registry.values()) {
n += bag.size();
}
return n;
} | [
"Returns the connection count in this registry.\n\nNote it might count connections that are closed but not removed from registry yet\n\n@return the connection count"
] | [
"A map of the header key value pairs. Keys are strings and values are either list of strings or a\nstring.\n\n@param headers the header map",
"Count the number of non-zero elements in V",
"Set a status message in the JTextComponent passed to this\nmodel.\n@param message The message that should be displayed.",
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"Convert a color to an angle.\n\n@param color The RGB value of the color to \"find\" on the color wheel.\n\n@return The angle (in rad) the \"normalized\" color is displayed on the\ncolor wheel.",
"If the burst mode is on, emit the particles only once.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps",
"Pause the current entry point, and invoke the provided listener when all current requests have finished.\n\nIf individual control point tracking is not enabled then the listener will be invoked straight away\n\n@param requestCountListener The listener to invoke",
"Get the SuggestionsInterface.\n\n@return The SuggestionsInterface",
"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"
] |
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"
] | [
"Pause component timer for current instance\n@param type - of component",
"Inserts a Parcelable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Parcelable object, or null\n@return this bundler instance to chain method calls",
"Assemble and send a packet that performs sync control, turning a device's sync mode on or off, or telling it\nto become the tempo master.\n\n@param target an update from the device whose sync state is to be set\n@param command the byte identifying the specific sync command to be sent\n\n@throws IOException if there is a problem sending the command to the device",
"This method displays the resource assignments for each task. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a task-by-task basis.\n\n@param file MPX file",
"Use this API to delete cacheselector of given name.",
"This method writes a resource's availability table.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource",
"Read a single resource assignment.\n\n@param resource MPXJ resource\n@param assignment Phoenix assignment",
"Gets the URL of the route with given name.\n@param routeName to return its URL\n@return URL backed by the route with given name.",
"Mark content as obsolete. If content was already marked for obsolescenceTimeout ms then it is removed.\n\n@param ref the content refrence to be marked as obsolete.\n\n@return true if the content refrence is removed, fale otherwise."
] |
public static<Z> Function0<Z> lift(Callable<Z> f) {
return bridge.lift(f);
} | [
"Lift a Java Callable to a Scala Function0\n\n@param f the function to lift\n\n@returns the Scala function"
] | [
"Returns the value of the identified field as a Float.\n@param fieldName the name of the field\n@return the value of the field as a Float\n@throws FqlException if the field cannot be expressed as an Float",
"Get the default providers list to be used.\n\n@return the default provider list and ordering, not null.",
"Returns the complete record for a single status update.\n\n@param projectStatus The project status update to get.\n@return Request object",
"Prepares the CmsObject for jumping to this favorite location, and returns the appropriate URL.\n\n@param cms the CmsObject to initialize for jumping to the favorite\n@return the link for the favorite location\n\n@throws CmsException if something goes wrong",
"Set new point coordinates somewhere on screen and apply new direction\n\n@param position the point position to apply new values to",
"Obtains a local date in Symmetry010 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date",
"Passes the Socket's InputStream and OutputStream to the closure. The\nstreams will be closed after the closure returns, even if an exception\nis thrown.\n\n@param socket a Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.2",
"Log a warning for the resource at the provided address and the given attributes. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attributes attributes we are warning about",
"Inserts a Bundle value into the mapping of the underlying Bundle, replacing any existing value\nfor the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Bundle object, or null\n@return this bundler instance to chain method calls"
] |
public static <T> FastEvent<T> of(Class<T> type, BeanManagerImpl manager, ObserverNotifier notifier, Annotation... qualifiers) {
ResolvedObservers<T> resolvedObserverMethods = notifier.<T> resolveObserverMethods(type, qualifiers);
if (resolvedObserverMethods.isMetadataRequired()) {
EventMetadata metadata = new EventMetadataImpl(type, null, qualifiers);
CurrentEventMetadata metadataService = manager.getServices().get(CurrentEventMetadata.class);
return new FastEventWithMetadataPropagation<T>(resolvedObserverMethods, metadata, metadataService);
} else {
return new FastEvent<T>(resolvedObserverMethods);
}
} | [
"Constructs a new FastEvent instance\n@param type the event type\n@param manager the bean manager\n@param notifier the notifier to be used for observer method resolution\n@param qualifiers the event qualifiers\n@return"
] | [
"Log the data for a single column.\n\n@param startIndex offset into buffer\n@param length length",
"Helper method to lookup a DAO if it has already been associated with the table-config. Otherwise this returns\nnull.",
"Converts a time in milliseconds to the appropriate x coordinate for drawing something at that time.\n\n@param milliseconds the time at which something should be drawn\n\n@return the component x coordinate at which it should be drawn",
"Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception",
"Removes a parameter from this configuration.\n\n@param key the parameter to remove",
"Un-serialize a Json into Module\n@param module String\n@return Module\n@throws IOException",
"The keywords to include in the PDF metadata.\n\n@param keywords the keywords of the PDF.",
"Get a signature for a list of parameters using the given shared secret.\n\n@param sharedSecret\nThe shared secret\n@param params\nThe parameters\n@return The signature String",
"Sets up internal data structures and creates a copy of the input matrix.\n\n@param A The input matrix. Not modified."
] |
final void compress(final File backupFile,
final AppenderRollingProperties properties) {
if (this.isCompressed(backupFile)) {
LogLog.debug("Backup log file " + backupFile.getName()
+ " is already compressed");
return; // try not to do unnecessary work
}
final long lastModified = backupFile.lastModified();
if (0L == lastModified) {
LogLog.debug("Backup log file " + backupFile.getName()
+ " may have been scavenged");
return; // backup file may have been scavenged
}
final File deflatedFile = this.createDeflatedFile(backupFile);
if (deflatedFile == null) {
LogLog.debug("Backup log file " + backupFile.getName()
+ " may have been scavenged");
return; // an error occurred creating the file
}
if (this.compress(backupFile, deflatedFile, properties)) {
deflatedFile.setLastModified(lastModified);
FileHelper.getInstance().deleteExisting(backupFile);
LogLog.debug("Compressed backup log file to " + deflatedFile.getName());
} else {
FileHelper.getInstance().deleteExisting(deflatedFile); // clean up
LogLog
.debug("Unable to compress backup log file " + backupFile.getName());
}
} | [
"Template method responsible for file compression checks, file creation, and\ndelegation to specific strategy implementations.\n\n@param backupFile\nThe file to be compressed.\n@param properties\nThe appender's configuration."
] | [
"Finds the column with the largest normal and makes that the first column\n\n@param j Current column being inspected",
"Adds a security property to be passed to the server.\n\n@param key the property key\n@param value the property value\n\n@return the builder",
"Enqueues a message for sending on the send thread.\n@param serialMessage the serial message to enqueue.",
"Use this API to fetch nstimer_binding resource of given name .",
"Use this API to fetch cmppolicylabel_cmppolicy_binding resources of given name .",
"Determines whether or not two axially aligned bounding boxes in\nthe same coordinate space intersect.\n@param bv1 first bounding volume to test.\n@param bv2 second bounding volume to test.\n@return true if the boxes intersect, false if not.",
"Add parameter to testCase\n\n@param context which can be changed",
"Use this API to add route6.",
"Navigate to this address in the given model node.\n\n@param model the model node\n@param create {@code true} to create the last part of the node if it does not exist\n@return the submodel\n@throws NoSuchElementException if the model contains no such element\n\n@deprecated manipulating a deep DMR node tree via PathAddress is no longer how the management layer works\ninternally, so this method has become legacy cruft. Management operation handlers\nshould obtain a {@link org.jboss.as.controller.registry.Resource Resource} from the\n{@link org.jboss.as.controller.OperationContext#readResource(PathAddress) OperationContext}\nand use the {@code Resource} API to access child resources"
] |
public void insert( Token where , Token token ) {
if( where == null ) {
// put at the front of the list
if( size == 0 )
push(token);
else {
first.previous = token;
token.previous = null;
token.next = first;
first = token;
size++;
}
} else if( where == last || null == last ) {
push(token);
} else {
token.next = where.next;
token.previous = where;
where.next.previous = token;
where.next = token;
size++;
}
} | [
"Inserts 'token' after 'where'. if where is null then it is inserted to the beginning of the list.\n@param where Where 'token' should be inserted after. if null the put at it at the beginning\n@param token The token that is to be inserted"
] | [
"Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise",
"This method is used to process an MPP8 file. This is the file format\nused by Project 98.\n\n@param reader parent file reader\n@param file Parent MPX file\n@param root Root of the POI file system.\n@throws MPXJException\n@throws IOException",
"Retrieves the timephased breakdown of actual cost.\n\n@return timephased actual cost",
"Command line method to walk the directories provided on the command line\nand print out their contents\n\n@param args Directory names",
"Compute eigenvalues. This is a routine not in ATLAS, but in the original\nLAPACK.",
"Obtains a local date in Symmetry010 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date",
"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",
"Apply modifications to a content task definition.\n\n@param patchId the patch id\n@param modifications the modifications\n@param definitions the task definitions\n@param filter the content item filter",
"Create a Deliverable inside the database that will track a file created by a JobInstance Must be called from inside a transaction\n\n@param path\nFilePath (relative to a root directory - cf. Node)\n@param originalFileName\nFileName\n@param fileFamily\nFile family (may be null). E.g.: \"daily report\"\n@param jobId\nJob Instance ID\n@param cnx\nthe DbConn to use."
] |
private float colorToAngle(int color) {
float[] colors = new float[3];
Color.colorToHSV(color, colors);
return (float) Math.toRadians(-colors[0]);
} | [
"Convert a color to an angle.\n\n@param color The RGB value of the color to \"find\" on the color wheel.\n\n@return The angle (in rad) the \"normalized\" color is displayed on the\ncolor wheel."
] | [
"Get the list of all nodes and the list of active nodes in the cluster.\n\n@return Membership object encapsulating lists of all nodes and the cluster nodes\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-_membership-\">\n_membership</a>",
"Checks to see if the specified off diagonal element is zero using a relative metric.",
"Returns a list of resource wrappers created from the input list of resources.\n\n@param cms the current OpenCms user context\n@param list the list to create the resource wrapper list from\n\n@return the list of wrapped resources.",
"This method reads an eight byte integer from the input array.\n\n@param data the input array\n@param offset offset of integer data in the array\n@return integer value",
"Randomize the gradient.",
"Convert an Object to a DateTime, without an Exception",
"Returns a compact representation of all of the stories on the task.\n\n@param task The task containing the stories to get.\n@return Request object",
"This method determines whether the given date falls in the range of\ndates covered by this exception. Note that this method assumes that both\nthe start and end date of this exception have been set.\n\n@param date Date to be tested\n@return Boolean value",
"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"
] |
@SuppressWarnings("WeakerAccess")
public boolean isPlaying() {
if (packetBytes.length >= 212) {
return (packetBytes[STATUS_FLAGS] & PLAYING_FLAG) > 0;
} else {
final PlayState1 state = getPlayState1();
return state == PlayState1.PLAYING || state == PlayState1.LOOPING ||
(state == PlayState1.SEARCHING && getPlayState2() == PlayState2.MOVING);
}
} | [
"Was the CDJ playing a track when this update was sent?\n\n@return true if the play flag was set, or, if this seems to be a non-nexus player, if <em>P<sub>1</sub></em>\nhas a value corresponding to a playing state."
] | [
"Given a class configures the binding between a class and a Renderer class.\n\n@param clazz to bind.\n@param prototype used as Renderer.\n@return the current RendererBuilder instance.",
"Use this API to fetch a vpnglobal_auditnslogpolicy_binding resources.",
"Converts assignment duration values from minutes to hours.\n\n@param list assignment data",
"Stops the processing and prints the final time.",
"Print duration in thousandths of minutes.\n\n@param duration Duration instance\n@return duration in thousandths of minutes",
"bootstrap method for method calls with \"this\" as receiver\n@deprecated since Groovy 2.1.0",
"Encodes the given URI scheme with the given encoding.\n@param scheme the scheme to be encoded\n@param encoding the character encoding to encode to\n@return the encoded scheme\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate",
"Get the element as a boolean.\n\n@param i the index of the element to access"
] |
private void processResources() throws IOException
{
CompanyReader reader = new CompanyReader(m_data.getTableData("Companies"));
reader.read();
for (MapRow companyRow : reader.getRows())
{
// TODO: need to sort by type as well as by name!
for (MapRow resourceRow : sort(companyRow.getRows("RESOURCES"), "NAME"))
{
processResource(resourceRow);
}
}
} | [
"Extract resource data."
] | [
"Sets the max.\n\n@param n the new max",
"Retrieves the value of the given accessible field of the given receiver.\n\n@param receiver the container of the field, not <code>null</code>\n@param fieldName the field's name, not <code>null</code>\n@return the value of the field\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#get(Object)}\n@throws IllegalArgumentException see {@link Field#get(Object)}",
"Use this API to fetch statistics of streamidentifier_stats resource of given name .",
"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.",
"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",
"Creates metadata on this file in the specified template type.\n\n@param typeName the metadata template type name.\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Parse a filter expression.\n\n@param filter the filter expression\n@return compiled nodes",
"Inserts a child task prior to a given sibling task.\n\n@param child new child task\n@param previousSibling sibling task",
"Has to be called when the scenario is finished in order to execute after methods."
] |
private ModelNode createCPUNode() throws OperationFailedException {
ModelNode cpu = new ModelNode().setEmptyObject();
cpu.get(ARCH).set(getProperty("os.arch"));
cpu.get(AVAILABLE_PROCESSORS).set(ProcessorInfo.availableProcessors());
return cpu;
} | [
"Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException"
] | [
"Removes the value from the Collection mapped to by this key, leaving the\nrest of the collection intact.\n\n@param key\nthe key to the Collection to remove the value from\n@param value\nthe value to remove",
"Scans the jar file and returns the paths that match the includes and excludes.\n\n@return A List of paths\n@throws An IllegalStateException when an I/O error occurs in reading the jar file.",
"Unmarshals the XML content and adds the file to the bundle files.\n@throws CmsException thrown if reading the file or unmarshaling fails.",
"Constraint that ensures that the proxy-prefetching-limit has a valid value.\n\n@param def The descriptor (class, reference, collection)\n@param checkLevel The current check level (this constraint is checked in basic and strict)",
"Verifies given web-hook information.\n\n@param signatureVersion\nsignature version received from web-hook\n@param signatureAlgorithm\nsignature algorithm received from web-hook\n@param primarySignature\nprimary signature received from web-hook\n@param secondarySignature\nsecondary signature received from web-hook\n@param webHookPayload\npayload of web-hook\n@param deliveryTimestamp\ndevilery timestamp received from web-hook\n@return true, if given payload is successfully verified against primary and secondary signatures, false otherwise",
"Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters",
"Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value",
"Execute the physical query and initialize the various entities and collections\n\n@param session the session\n@param qp the query parameters\n@param ogmLoadingContext the loading context\n@param returnProxies when {@code true}, get an existing proxy for each collection element (if there is one)\n@return the result of the query",
"Convert a floating point date to a LocalDate.\n\nNote: This method currently performs a rounding to the next day.\nIn a future extension intra-day time offsets may be considered.\n\nIf referenceDate is null, the method returns null.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param floatingPointDate The value to the time offset \\( t \\).\n@return The date resulting from adding Math.round(fixingTime*365.0) days to referenceDate."
] |
public void set(final Argument argument) {
if (argument != null) {
map.put(argument.getKey(), Collections.singleton(argument));
}
} | [
"Sets an argument to the collection of arguments. This guarantees only one value will be assigned to the\nargument key.\n\n@param argument the argument to add"
] | [
"Gets the actual type arguments of a Type\n\n@param type The type to examine\n@return The type arguments",
"Closes the connection to the dbserver. This instance can no longer be used after this action.",
"Configure the access permissions required to access this print job.\n\n@param template the containing print template which should have sufficient information to\nconfigure the access.\n@param context the application context",
"Return a long value from a prepared query.",
"Remove script for a given ID\n\n@param id ID of script\n@throws Exception exception",
"Core implementation of matchPath. It is isolated so that it can be called\nfrom TokenizedPattern.",
"resumed a given deployment\n\n@param deployment The deployment to resume",
"Converts a time represented as an integer to a Date instance.\n\n@param time integer time\n@return Date instance",
"Set the inner angle of the spotlight cone in degrees.\n\nBeyond the outer cone angle there is no illumination.\nThe underlying uniform \"outer_cone_angle\" is the cosine\nof this input angle. If the inner cone angle is larger than the outer cone angle\nthere will be unexpected results.\n@see #setInnerConeAngle(float)\n@see #getOuterConeAngle()"
] |
protected void beforeLoading()
{
if (_listeners != null)
{
CollectionProxyListener listener;
if (_perThreadDescriptorsEnabled) {
loadProfileIfNeeded();
}
for (int idx = _listeners.size() - 1; idx >= 0; idx--)
{
listener = (CollectionProxyListener)_listeners.get(idx);
listener.beforeLoading(this);
}
}
} | [
"Notifies all listeners that the data is about to be loaded."
] | [
"Overridden to ensure that our timestamp handling is as expected",
"copied and altered from TransactionHelper",
"Read the calendar data from a Gantt Designer file.\n\n@param gantt Gantt Designer file.",
"Returns the JSON datatype for the property datatype as represented by\nthe given WDTK datatype IRI string.\n\n@param datatypeIri\nthe WDTK datatype IRI string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known",
"Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise",
"Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value",
"Gets an exception reporting an unexpected XML attribute.\n\n@param reader a reference to the stream reader.\n@param index the attribute index.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.",
"Returns the Euclidean distance between this vector and vector v.\n\n@return distance between this vector and v",
"Add a new PropertyChangeListener to this node for a specific property.\nThis functionality has\nbeen borrowed from the java.beans package, though this class has\nnothing to do with a bean"
] |
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"
] | [
"Use this API to fetch all the vpnclientlessaccesspolicy resources that are configured on netscaler.",
"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.",
"Tests whether the two field descriptors are equal, i.e. have same name, same column\nand same jdbc-type.\n\n@param first The first field\n@param second The second field\n@return <code>true</code> if they are equal",
"Write a long attribute.\n\n@param name attribute name\n@param value attribute value",
"Retrieve the jdbc type for the field descriptor that is related\nto this argument.",
"all objects in list1 that are not in list2\n\n@param <T>\n@param list1\nFirst collection\n@param list2\nSecond collection\n@return The collection difference list1 - list2",
"This static method calculated the rho of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The rho of the option",
"Calculate start dates for a daily recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Performs the closure within a transaction using a cached connection.\nIf the closure takes a single argument, it will be called\nwith the connection, otherwise it will be called with no arguments.\n\n@param closure the given closure\n@throws SQLException if a database error occurs"
] |
public void linkOneToMany(Object obj, CollectionDescriptor cod, boolean insert)
{
Object referencedObjects = cod.getPersistentField().get(obj);
storeAndLinkOneToMany(true, obj, cod,referencedObjects, insert);
} | [
"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"
] | [
"Fluent API builder.\n\n@param cronExpression\n@return",
"make it public for CLI interaction to reuse JobContext",
"All the attributes needed either by the processors for each datasource row or by the jasper template.\n\n@param attributes the attributes.",
"Check if a position is within a circle\n\n@param x x position\n@param y y position\n@param centerX center x of circle\n@param centerY center y of circle\n@return true if within circle, false otherwise",
"Resolves the package type from the maven project.\n\n@param project the maven project\n\n@return the package type",
"Map content.\n\n@param dh the data handler\n@return the string",
"List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.",
"Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory",
"Map the Primavera UDF to a custom field.\n\n@param fieldType parent object type\n@param dataType UDF data type\n@param name UDF name\n@return FieldType instance"
] |
private ProjectFile handleDosExeFile(InputStream stream) throws Exception
{
File file = InputStreamHelper.writeStreamToTempFile(stream, ".tmp");
InputStream is = null;
try
{
is = new FileInputStream(file);
if (is.available() > 1350)
{
StreamHelper.skip(is, 1024);
// Bytes at offset 1024
byte[] data = new byte[2];
is.read(data);
if (matchesFingerprint(data, WINDOWS_NE_EXE_FINGERPRINT))
{
StreamHelper.skip(is, 286);
// Bytes at offset 1312
data = new byte[34];
is.read(data);
if (matchesFingerprint(data, PRX_FINGERPRINT))
{
is.close();
is = null;
return readProjectFile(new P3PRXFileReader(), file);
}
}
if (matchesFingerprint(data, STX_FINGERPRINT))
{
StreamHelper.skip(is, 31742);
// Bytes at offset 32768
data = new byte[4];
is.read(data);
if (matchesFingerprint(data, PRX3_FINGERPRINT))
{
is.close();
is = null;
return readProjectFile(new SureTrakSTXFileReader(), file);
}
}
}
return null;
}
finally
{
StreamHelper.closeQuietly(is);
FileHelper.deleteQuietly(file);
}
} | [
"This could be a self-extracting archive. If we understand the format, expand\nit and check the content for files we can read.\n\n@param stream schedule data\n@return ProjectFile instance"
] | [
"Converts the text stream data to HTML form.\n\n@param content the content to convert\n@return the HTML version of the content",
"Record a prepare operation.\n\n@param preparedOperation the prepared operation",
"Creates an element that represents a single positioned box with no content.\n@return the resulting DOM element",
"Use this API to fetch csvserver_cachepolicy_binding resources of given name .",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.",
"Use this API to fetch all the rsskeytype resources that are configured on netscaler.",
"Create the OJB_CLAZZ pseudo column based on CASE WHEN.\nThis column defines the Class to be instantiated.\n@param buf",
"Use this API to fetch cacheselector resource of given name .",
"Set the current playback position. This method can only be used in situations where the component is\ntied to a single player, and therefore always has a single playback position.\n\nWill cause part of the component to be redrawn if the position has\nchanged. This will be quickly overruled if a player is being monitored, but\ncan be used in other contexts.\n\n@param milliseconds how far into the track has been played\n\n@see #setPlaybackState"
] |
public static void showErrorDialog(String message, String details) {
Window window = prepareWindow(DialogWidth.wide);
window.setCaption("Error");
window.setContent(new CmsSetupErrorDialog(message, details, null, window));
A_CmsUI.get().addWindow(window);
} | [
"Shows error dialog, manually supplying details instead of getting them from an exception stack trace.\n\n@param message the error message\n@param details the details"
] | [
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added",
"Create and return a new Violation for this rule and the specified import className and alias\n@param sourceCode - the SourceCode\n@param className - the class name (as specified within the import statement)\n@param alias - the alias for the import statement\n@param violationMessage - the violation message; may be null\n@return a new Violation object",
"Use this API to fetch the statistics of all servicegroup_stats resources that are configured on netscaler.",
"Registers an event handler in the repository shared between Javascript\nand Java.\n\n@param h Event handler to be registered.\n@return Callback key that Javascript will use to find this handler.",
"Show multiple channels. All other channels will be unaffected.\n@param channels The channels to show",
"Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@param value\n@return ISO 8601 value (String)",
"Use this API to add nssimpleacl.",
"Internal method which is called when the user has finished editing the title.\n\n@param box the text box which has been edited",
"Write a size prefixed string where the size is stored as a 2 byte\nshort\n\n@param buffer The buffer to write to\n@param s The string to write"
] |
public void prepareServer() {
try {
server = new Server(0);
jettyHandler = new AbstractHandler() {
public void handle(String target, Request req, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
response.setContentType("text/plain");
String[] operands = request.getRequestURI().split("/");
String name = "";
String command = "";
String value = "";
//operands[0] = "", request starts with a "/"
if (operands.length >= 2) {
name = operands[1];
}
if (operands.length >= 3) {
command = operands[2];
}
if (operands.length >= 4) {
value = operands[3];
}
if (command.equals("report")) { //report a number of lines written
response.getWriter().write(makeReport(name, value));
} else if (command.equals("request") && value.equals("block")) { //request a new block of work
response.getWriter().write(requestBlock(name));
} else if (command.equals("request") && value.equals("name")) { //request a new name to report with
response.getWriter().write(requestName());
} else { //non recognized response
response.getWriter().write("exit");
}
((Request) request).setHandled(true);
}
};
server.setHandler(jettyHandler);
// Select any available port
server.start();
Connector[] connectors = server.getConnectors();
NetworkConnector nc = (NetworkConnector) connectors[0];
listeningPort = nc.getLocalPort();
hostName = InetAddress.getLocalHost().getHostName();
} catch (Exception e) {
e.printStackTrace();
}
} | [
"Prepares a Jetty server for communicating with consumers."
] | [
"Parses a code block with no parentheses and no commas. After it is done there should be a single token left,\nwhich is returned.",
"Sets ID field value.\n\n@param val value",
"Attach a component to this scene object.\n\nEach scene object has a list of components that may\nbe attached to it. Only one component of a particular type\ncan be attached. Components are retrieved based on their type.\n\n@return true if component is attached, false if a component of that class is already attached.\n@param component component to attach.\n@see GVRSceneObject#detachComponent(long)\n@see GVRSceneObject#getComponent(long)",
"Converts an XML file to an object.\n\n@param fileName The filename where to save it to.\n@return The object.\n@throws FileNotFoundException On error.",
"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",
"Adds the contents of a Java package to this JAR.\n\n@param clazz a class whose package we wish to add to the JAR.\n@param filter a filter to select particular classes\n@return {@code this}",
"Creates a new Collaboration Whitelist for a domain.\n@param api the API connection to be used by the resource.\n@param domain the domain to be added to a collaboration whitelist for a Box Enterprise.\n@param direction an enum representing the direction of the collaboration whitelist. Can be set to\ninbound, outbound, or both.\n@return information about the collaboration whitelist created.",
"Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits",
"Use this API to update ipv6."
] |
public static void writeObject(File file, Object object) throws IOException {
FileOutputStream fileOut = new FileOutputStream(file);
ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(fileOut));
try {
out.writeObject(object);
out.flush();
// Force sync
fileOut.getFD().sync();
} finally {
IoUtils.safeClose(out);
}
} | [
"To store an object in a quick & dirty way."
] | [
"Write exceptions into the format used by MSPDI files from\nProject 2007 onwards.\n\n@param calendar parent calendar\n@param exceptions list of exceptions",
"The Total Slack field contains the amount of time a task can be\ndelayed without delaying the project's finish date.\n\n@return string representing duration",
"Flag that the processor has started execution.\n\n@param processorGraphNode the node that has started.",
"Calculates all dates of the series.\n@return all dates of the series in milliseconds.",
"Add the declarationBinderRef to the ImportersManager, create the corresponding.\nBinderDescriptor.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder\n@throws InvalidFilterException",
"Internal function that uses recursion to create the list",
"Send a waveform detail update announcement to all registered listeners.\n\n@param player the player whose waveform detail has changed\n@param detail the new waveform detail, if any",
"Use this API to fetch all the protocolhttpband resources that are configured on netscaler.\nThis uses protocolhttpband_args which is a way to provide additional arguments while fetching the resources.",
"Find the next match of the pattern on the tree\n\n@return whether there is a match somewhere in the tree"
] |
private static void initInstance(final TransactionLogger instance, final Logger logger, final Logger auditor) {
instance.logger = logger;
instance.auditor = auditor;
instance.components = new LinkedHashMap<>();
instance.properties = new LinkedHashMap<>();
instance.total = new Component(TOTAL_COMPONENT);
instance.total.startTimer();
instance.componentsMultiThread = new ComponentsMultiThread();
instance.flowContext = FlowContextFactory.serializeNativeFlowContext();
} | [
"Initialize new instance\n@param instance\n@param logger\n@param auditor"
] | [
"Initializes the type and validates it",
"Joins with another IPv4 segment to produce a IPv6 segment.\n\n@param creator\n@param low\n@return",
"Creates a jrxml file\n\n@param dr\n@param layoutManager\n@param _parameters\n@param xmlEncoding (default is UTF-8 )\n@param outputStream\n@throws JRException",
"Deletes a template.\n\n@param id id of the template to delete.\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.",
"Use this API to add onlinkipv6prefix.",
"Perform the merge\n\n@param stereotypeAnnotations The stereotype annotations",
"Returns the current version info for a provided remote document.\n@param remoteDocument the remote BSON document from which to extract version info\n@return a DocumentVersionInfo",
"Retrieve a UUID in the form required by Primavera PMXML.\n\n@param guid UUID instance\n@return formatted UUID",
"Takes a model and an SCXMLFrontier and decomposes the Frontier into a Map of Strings to Strings\nThese strings can be sent over a network to get a Frontier past a 'gap'\n\n@param frontier the Frontier\n@param modelText the model\n@return the map of strings representing a decomposition"
] |
public RedwoodConfiguration hideChannels(final Object[] channels){
tasks.add(new Runnable() { public void run() { Redwood.hideChannels(channels); } });
return this;
} | [
"Hide the following channels.\n@param channels The names of the channels to hide.\n@return this"
] | [
"Updates the gatewayDirection attributes of all gateways.\n@param def",
"Whether the address has the well-known prefix for IPv4 translatable addresses as in rfc 6052 and 6144\n@return",
"Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list",
"Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity",
"Get replication document state for a given replication document ID.\n\n@param docId The replication document ID\n@return Replication document for {@code docId}",
"Validates this string is a valid address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws AddressStringException",
"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)}",
"Calculate the start variance.\n\n@return start variance",
"Marks a given list of statements for insertion into the current document.\nInserted statements can have an id if they should update an existing\nstatement, or use an empty string as id if they should be added. The\nmethod removes duplicates and avoids unnecessary modifications by\nchecking the current content of the given document before marking\nstatements for being written.\n\n@param currentDocument\nthe document with the current statements\n@param addStatements\nthe list of new statements to be added"
] |
public static base_responses delete(nitro_service client, appfwlearningdata resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
appfwlearningdata deleteresources[] = new appfwlearningdata[resources.length];
for (int i=0;i<resources.length;i++){
deleteresources[i] = new appfwlearningdata();
deleteresources[i].profilename = resources[i].profilename;
deleteresources[i].starturl = resources[i].starturl;
deleteresources[i].cookieconsistency = resources[i].cookieconsistency;
deleteresources[i].fieldconsistency = resources[i].fieldconsistency;
deleteresources[i].formactionurl_ffc = resources[i].formactionurl_ffc;
deleteresources[i].crosssitescripting = resources[i].crosssitescripting;
deleteresources[i].formactionurl_xss = resources[i].formactionurl_xss;
deleteresources[i].sqlinjection = resources[i].sqlinjection;
deleteresources[i].formactionurl_sql = resources[i].formactionurl_sql;
deleteresources[i].fieldformat = resources[i].fieldformat;
deleteresources[i].formactionurl_ff = resources[i].formactionurl_ff;
deleteresources[i].csrftag = resources[i].csrftag;
deleteresources[i].csrfformoriginurl = resources[i].csrfformoriginurl;
deleteresources[i].xmldoscheck = resources[i].xmldoscheck;
deleteresources[i].xmlwsicheck = resources[i].xmlwsicheck;
deleteresources[i].xmlattachmentcheck = resources[i].xmlattachmentcheck;
deleteresources[i].totalxmlrequests = resources[i].totalxmlrequests;
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | [
"Use this API to delete appfwlearningdata resources."
] | [
"Get a patch entry for either a layer or add-on.\n\n@param name the layer name\n@param addOn whether the target is an add-on\n@return the patch entry, {@code null} if it there is no such layer",
"Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is\nunique. Will create a transaction on the given entity manager.",
"Load a JSON file from the application's \"asset\" directory.\n\n@param context Valid {@link Context}\n@param asset Name of the JSON file\n@return New instance of {@link JSONObject}",
"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",
"Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance",
"Scans a path on the filesystem for resources inside the given classpath location.\n\n@param location The system-independent location on the classpath.\n@param locationUri The system-specific physical location URI.\n@return a sorted set containing all the resources inside the given location\n@throws IOException if an error accessing the filesystem happens",
"Resizes the array that represents this bit vector.\n\n@param newArraySize\nnew array size",
"Add views to the tree.\n\n@param parentNode parent tree node\n@param file views container",
"Reads a UUID from a JSON object.\n\nReturns null if the JSON value for the given key is not present or not a valid UUID\n\n@param obj the JSON object\n@param key the JSON key\n\n@return the UUID"
] |
private static InterestRateSwapLegProductDescriptor getSwapLegProductDescriptor(Element leg, String forwardCurveName, String discountCurveName,
DayCountConvention daycountConvention) {
boolean isFixed = leg.getElementsByTagName("interestType").item(0).getTextContent().equalsIgnoreCase("FIX");
ArrayList<Period> periods = new ArrayList<>();
ArrayList<Double> notionalsList = new ArrayList<>();
ArrayList<Double> rates = new ArrayList<>();
//extracting data for each period
NodeList periodsXML = leg.getElementsByTagName("incomePayment");
for(int periodIndex = 0; periodIndex < periodsXML.getLength(); periodIndex++) {
Element periodXML = (Element) periodsXML.item(periodIndex);
LocalDate startDate = LocalDate.parse(periodXML.getElementsByTagName("startDate").item(0).getTextContent());
LocalDate endDate = LocalDate.parse(periodXML.getElementsByTagName("endDate").item(0).getTextContent());
LocalDate fixingDate = startDate;
LocalDate paymentDate = LocalDate.parse(periodXML.getElementsByTagName("payDate").item(0).getTextContent());
if(! isFixed) {
fixingDate = LocalDate.parse(periodXML.getElementsByTagName("fixingDate").item(0).getTextContent());
}
periods.add(new Period(fixingDate, paymentDate, startDate, endDate));
double notional = Double.parseDouble(periodXML.getElementsByTagName("nominal").item(0).getTextContent());
notionalsList.add(new Double(notional));
if(isFixed) {
double fixedRate = Double.parseDouble(periodXML.getElementsByTagName("fixedRate").item(0).getTextContent());
rates.add(new Double(fixedRate));
} else {
rates.add(new Double(0));
}
}
ScheduleDescriptor schedule = new ScheduleDescriptor(periods, daycountConvention);
double[] notionals = notionalsList.stream().mapToDouble(Double::doubleValue).toArray();
double[] spreads = rates.stream().mapToDouble(Double::doubleValue).toArray();
return new InterestRateSwapLegProductDescriptor(forwardCurveName, discountCurveName, schedule, notionals, spreads, false);
} | [
"Construct an InterestRateSwapLegProductDescriptor from a node in a FIPXML file.\n\n@param leg The node containing the leg.\n@param forwardCurveName Forward curve name form outside the node.\n@param discountCurveName Discount curve name form outside the node.\n@param daycountConvention Daycount convention from outside the node.\n@return Descriptor of the swap leg."
] | [
"Returns a new Set containing all the objects in the specified array.",
"Retrieves the earliest start date for all assigned tasks.\n\n@return start date",
"Configures a RequestBuilder to send an RPC request when the RequestBuilder\nis intended to be returned through the asynchronous proxy interface.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a RequestBuilder object that is ready to have its\n{@link RequestBuilder#send()} method invoked.",
"Get the cached ETag for the given host and file\n@param host the host\n@param file the file\n@return the cached ETag or null if there is no ETag in the cache",
"Create an LBuffer from a given file.\n@param file\n@return\n@throws IOException",
"Aliases variables with an unknown type.\n@param variable The variable being aliased\n@param name Name of the variable",
"Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD\n@param _jasperPrint\n@param _format\n@param _parameters\n@return",
"Look up record by identity.",
"Add a column to be set to a value for UPDATE statements. This will generate something like columnName = 'value'\nwith the value escaped if necessary."
] |
private double convertTenor(int maturityInMonths, int tenorInMonths) {
Schedule schedule = fixMetaSchedule.generateSchedule(referenceDate, maturityInMonths, tenorInMonths);
return schedule.getPayment(schedule.getNumberOfPeriods()-1);
} | [
"Convert tenor given as offset in months to year fraction.\n\n@param maturityInMonths The maturity as offset in months.\n@param tenorInMonths The tenor as offset in months.\n@return THe tenor as year fraction."
] | [
"Main entry point. Reads a directory containing a P3 Btrieve database files\nand returns a map of table names and table content.\n\n@param directory directory containing the database\n@param prefix file name prefix used to identify files from the same database\n@return Map of table names to table data",
"This returns a string from decimal digit smallestDigit to decimal digit\nbiggest digit. Smallest digit is labeled 1, and the limits are\ninclusive.",
"Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails.",
"Extracts calendar data from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"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.",
"Calls the httpHandler method.",
"Gets the object whose index is the integer argument.\n\n@param i the integer index to be queried for the corresponding argument\n@return the object whose index is the integer argument.",
"Checks the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Determine if the exception is relative based on the recurrence type integer value.\n\n@param value integer value\n@return true if the recurrence is relative"
] |
public static List<DesignDocument> fromDirectory(File directory) throws FileNotFoundException {
List<DesignDocument> designDocuments = new ArrayList<DesignDocument>();
if (directory.isDirectory()) {
Collection<File> files = FileUtils.listFiles(directory, null, true);
for (File designDocFile : files) {
designDocuments.add(fromFile(designDocFile));
}
} else {
designDocuments.add(fromFile(directory));
}
return designDocuments;
} | [
"Deserialize a directory of javascript design documents to a List of DesignDocument objects.\n\n@param directory the directory containing javascript files\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read"
] | [
"Copied from AbstractEntityPersister",
"Internal method that finds the matching enum for a configured field that has the name argument.\n\n@return The matching enum value or null if blank enum name.\n@throws IllegalArgumentException\nIf the enum name is not known.",
"The connection timeout for making a connection to Twitter.",
"for testing purpose",
"Open the event stream\n\n@return true if successfully opened, false if not",
"Use this API to fetch a systemglobal_authenticationldappolicy_binding resources.",
"This returns a string from decimal digit smallestDigit to decimal digit\nbiggest digit. Smallest digit is labeled 1, and the limits are\ninclusive.",
"Throws an IllegalStateException when the given value is not null.\n@return the value",
"Update the default time unit for durations based on data read from the file.\n\n@param column column data"
] |
protected String getBundleJarPath() throws MalformedURLException {
Path path = PROPERTIES.getAllureHome().resolve("app/allure-bundle.jar").toAbsolutePath();
if (Files.notExists(path)) {
throw new AllureCommandException(String.format("Bundle not found by path <%s>", path));
}
return path.toUri().toURL().toString();
} | [
"Returns the bundle jar classpath element."
] | [
"Obtains a local date in Pax calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Pax local date, not null\n@throws DateTimeException if unable to create the date",
"Sets the value for the API's \"props\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters",
"Use this API to add tmtrafficaction resources.",
"Add the set with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The set of all packages to add.",
"Propagate onNoPick events to listeners\n@param picker GVRPicker which generated the event",
"Changes to cluster OR store definition metadata results in routing\nstrategies changing. These changes need to be propagated to all the\nlisteners.\n\n@param cluster The updated cluster metadata\n@param storeDefs The updated list of store definition",
"AND operation which takes the previous clause and the next clause and AND's them together.",
"Start pushing the element off to the right.",
"Reset the Where object so it can be re-used."
] |
public CollectionRequest<Task> findByTag(String tag) {
String path = String.format("/tags/%s/tasks", tag);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | [
"Returns the compact task records for all tasks with the given tag.\n\n@param tag The tag in which to search for tasks.\n@return Request object"
] | [
"Delete the proxy history for the active profile\n\n@throws Exception exception",
"Sets an element in at the specified index.",
"Get a collection of all of the user's groups.\n\n@return A Collection of Group objects\n@throws FlickrException",
"Encrypt a string with HMAC-SHA1 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output.",
"Parses an adl source into a differential archetype.\n\n@param adl contents of an adl source file\n@return parsed archetype\n@throws org.openehr.adl.parser.AdlParserException if an error occurred while parsing",
"a small static helper class to get the color from the colorHolder\n\n@param colorHolder\n@param ctx\n@return",
"Creates a collection from the given stream, casting each object to the\nprovided listener class. The returned collection must not necessarily be\nmutable.\n\n@param <T> Type of the listeners in the given list.\n@param listenerClass The class of the objects in the provided list.\n@param listeners The stream to obtain the listeners for the resulting\ncollection from.\n@param sizeHint Expected size of the input stream.\n@return A typed copy of the list.",
"Process a single outline code.\n\n@param parentRow outline code to task mapping table\n@throws SQLException",
"Get the raw data bytes of the device update packet.\n\n@return the data sent by the device to update its status"
] |
public DownloadRequest addCustomHeader(String key, String value) {
mCustomHeader.put(key, value);
return this;
} | [
"Adds custom header to request\n\n@param key\n@param value"
] | [
"Returns an entry of kind snippet with the given proposal and label and the prefix from the context, or null if the proposal is not valid.\n@since 2.16",
"Set the InputStream of request body data, of known length, to be sent to the server.\n\n@param input InputStream of request body data to be sent to the server\n@param inputLength Length of request body data to be sent to the server, in bytes\n@return an {@link HttpConnection} for method chaining\n@deprecated Use {@link #setRequestBody(InputStreamGenerator, long)}",
"Get the root build which triggered the current build. The build root is considered to be the one furthest one\naway from the current build which has the isPassIdentifiedDownstream active, if no parent build exists, check\nthat the current build needs an upstream identifier, if it does return it.\n\n@param currentBuild The current build.\n@return The root build with isPassIdentifiedDownstream active. Null if no upstream or non is found.",
"Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of the operation performed.\n@throws Exception Nitro exception is thrown.",
"Writes no-value restriction.\n\n@param rdfWriter\nthe writer to write the restrictions to\n@param propertyUri\nURI of the property to which the restriction applies\n@param rangeUri\nURI of the class or datatype to which the restriction applies\n@param subject\nnode representing the restriction\n@throws RDFHandlerException\nif there was a problem writing the RDF triples",
"Use this API to fetch sslocspresponder resource of given name .",
"Gets all tags that are \"prime\" tags.",
"Resets the resend counter and possibly resets the\nnode stage to DONE when previous initialization was\ncomplete.",
"Confirms a user with the given token and token id.\n\n@param token the confirmation token.\n@param tokenId the id of the confirmation token.\n@return A {@link Task} that completes when confirmation completes/fails."
] |
protected BufferedImage createErrorImage(final Rectangle area) {
final BufferedImage bufferedImage = new BufferedImage(area.width, area.height, TYPE_INT_ARGB_PRE);
final Graphics2D graphics = bufferedImage.createGraphics();
try {
graphics.setBackground(ColorParser.toColor(this.configuration.getTransparentTileErrorColor()));
graphics.clearRect(0, 0, area.width, area.height);
return bufferedImage;
} finally {
graphics.dispose();
}
} | [
"Create an error image.\n\n@param area The size of the image"
] | [
"Add the value to list of values to be used as part of the\nevaluation of this indicator.\n\n@param index position in the list\n@param value evaluation value",
"Returns a single sort option configuration as configured via the methods parameter, or null if the parameter does not specify a sort option.\n@param json The JSON sort option configuration.\n@return The sort option configuration, or null if the JSON could not be read.",
"Returns the u component of a coordinate from a texture coordinate set.\n\n@param vertex the vertex index\n@param coords the texture coordinate set\n@return the u component",
"Introspect the given object.\n\n@param obj object for introspection.\n\n@return a map containing object's field values.\n\n@throws IntrospectionException if an exception occurs during introspection\n@throws InvocationTargetException if property getter throws an exception\n@throws IllegalAccessException if property getter is inaccessible",
"Get the subsystem deployment model root.\n\n<p>\nIf the subsystem resource does not exist one will be created.\n</p>\n\n@param subsystemName the subsystem name.\n\n@return the model",
"Pump events from event stream.",
"read message from file\n\n@param readOffset offset in this channel(file);not the message offset\n@param size max data size\n@return messages sharding data with file log\n@throws IOException reading file failed",
"Handles the change of a value in the current translation.\n@param propertyId the property id of the column where the value has changed.",
"Add a task to the project.\n\n@return new task instance"
] |
public void setBit(int index, boolean set)
{
assertValidIndex(index);
int word = index / WORD_LENGTH;
int offset = index % WORD_LENGTH;
if (set)
{
data[word] |= (1 << offset);
}
else // Unset the bit.
{
data[word] &= ~(1 << offset);
}
} | [
"Sets the bit at the specified index.\n@param index The index of the bit to set (0 is the least-significant bit).\n@param set A boolean indicating whether the bit should be set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string."
] | [
"Checks if the specified longitude is correct.\n\n@param name the name of the longitude field\n@param longitude the value of the longitude field\n@return the longitude",
"Boyer Moore scan that proceeds forwards from the end of the file looking for the first LOCSIG",
"returns array with all allowed values\n@return allowed values",
"Renders the document to the specified output stream.",
"Print a work contour.\n\n@param value WorkContour instance\n@return work contour value",
"Traces the duration between origin time in the http Request and time just\nbefore being processed by the fat client\n\n@param operationType\n@param originTimeInMS - origin time in the Http Request\n@param requestReceivedTimeInMs - System Time in ms\n@param keyString",
"Recursively read a task, and any sub tasks.\n\n@param mpxjParent Parent for the MPXJ tasks\n@param gpTask GanttProject task",
"Use this API to fetch a aaaglobal_binding resource .",
"Finds and sets up the Listeners in the given rootView.\n\n@param rootView a View to traverse looking for listeners.\n@return the list of refinement attributes found on listeners."
] |
@Override
public void join(final long millis) throws InterruptedException {
for (final Thread thread : this.threads) {
thread.join(millis);
}
} | [
"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."
] | [
"Get list of replies\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A reply object\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html\">API Documentation</a>",
"Implement the persistence handler for storing the group properties.",
">>>>>> measureUntilFull helper methods",
"Handles the response of the Request node request.\n@param incomingMessage the response message to process.",
"Translate the given byte array into a string of 1s and 0s\n\n@param bytes The bytes to translate\n@return The string",
"The Baseline Start field shows the planned beginning date for a task at\nthe time you saved a baseline. Information in this field becomes available\nwhen you set a baseline.\n\n@return Date",
"Extract data for a single task.\n\n@param parent task parent\n@param row Synchro task data",
"Get the bar size.\n\n@param settings Parameters for rendering the scalebar.",
"This looks at the servlet attributes to get the list of response headers to remove while the response object gets created by the servlet"
] |
boolean lockSharedInterruptibly(final Integer permit, final long timeout, final TimeUnit unit) throws InterruptedException {
if (permit == null) {
throw new IllegalArgumentException();
}
return sync.tryAcquireSharedNanos(permit, unit.toNanos(timeout));
} | [
"Acquire the shared lock, with a max wait timeout to acquire.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the timeout scalar quantity.\n@param unit - see {@code TimeUnit} for quantities.\n@return {@code boolean} true on successful acquire.\n@throws InterruptedException - if the acquiring thread was interrupted.\n@throws IllegalArgumentException if {@code permit} is null."
] | [
"Obtain all groups\n\n@return All Groups",
"Configures a RequestBuilder to send an RPC request.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a RequestBuilder object that is ready to have its\n{@link RequestBuilder#send()} method invoked.",
"generate a message for loglevel DEBUG\n\n@param pObject the message Object",
"Gets the current user.\n@param api the API connection of the current user.\n@return the current user.",
"Create a directory at the given path if it does not exist yet.\n\n@param path\nthe path to the directory\n@throws IOException\nif it was not possible to create a directory at the given\npath",
"Return true if the class name is associated to an hidden class or matches a hide expression",
"Adds a new Pie Slice to the PieChart. After inserting and calculation of the highlighting color\na complete recalculation is initiated.\n\n@param _Slice The newly added PieSlice.",
"Given a symmetric matrix which is represented by a lower triangular matrix convert it back into\na full symmetric matrix.\n\n@param A (Input) Lower triangular matrix (Output) symmetric matrix",
"Remove a custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object"
] |
private void checkExtents(ClassDescriptorDef classDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
HashMap processedClasses = new HashMap();
InheritanceHelper helper = new InheritanceHelper();
ClassDescriptorDef curExtent;
boolean canBeRemoved;
for (Iterator it = classDef.getExtentClasses(); it.hasNext();)
{
curExtent = (ClassDescriptorDef)it.next();
canBeRemoved = false;
if (classDef.getName().equals(curExtent.getName()))
{
throw new ConstraintException("The class "+classDef.getName()+" specifies itself as an extent-class");
}
else if (processedClasses.containsKey(curExtent))
{
canBeRemoved = true;
}
else
{
try
{
if (!helper.isSameOrSubTypeOf(curExtent, classDef.getName(), false))
{
throw new ConstraintException("The class "+classDef.getName()+" specifies an extent-class "+curExtent.getName()+" that is not a sub-type of it");
}
// now we check whether we already have an extent for a base-class of this extent-class
for (Iterator processedIt = processedClasses.keySet().iterator(); processedIt.hasNext();)
{
if (helper.isSameOrSubTypeOf(curExtent, ((ClassDescriptorDef)processedIt.next()).getName(), false))
{
canBeRemoved = true;
break;
}
}
}
catch (ClassNotFoundException ex)
{
// won't happen because we don't use lookup of the actual classes
}
}
if (canBeRemoved)
{
it.remove();
}
processedClasses.put(curExtent, null);
}
} | [
"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"
] | [
"Find the the qualified container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback.",
"Before closing the PersistenceBroker ensure that the session\ncache is cleared",
"Convert an Object to a Date.",
"Returns the resource bundle for current Locale, i.e. locale set in the PageComponent.\nAlways create a new instance, this avoids getting the incorrect locale information.\n\n@return resourcebundle for internationalized messages",
"Perform the merge\n\n@param stereotypeAnnotations The stereotype annotations",
"Returns an identity matrix",
"Notifies that a header item is changed.\n\n@param position the position.",
"Always returns the original proxy object that was serialized.\n\n@return the proxy object\n@throws java.io.ObjectStreamException",
"Use this API to update bridgetable."
] |
public IOrientationState getOrientationStateFromParam(int orientation) {
switch (orientation) {
case Orientation.ORIENTATION_HORIZONTAL_BOTTOM:
return new OrientationStateHorizontalBottom();
case Orientation.ORIENTATION_HORIZONTAL_TOP:
return new OrientationStateHorizontalTop();
case Orientation.ORIENTATION_VERTICAL_LEFT:
return new OrientationStateVerticalLeft();
case Orientation.ORIENTATION_VERTICAL_RIGHT:
return new OrientationStateVerticalRight();
default:
return new OrientationStateHorizontalBottom();
}
} | [
"orientation state factory method"
] | [
"Given a rebalance-task info, convert it into the protobuf equivalent\n\n@param stealInfo Rebalance task info\n@return Protobuf equivalent of the same",
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"returns controller if a new device is found",
"Gets the site label for the entry.\n\n@param cms the current CMS context\n@param entry the entry\n@return the site label for the entry",
"Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@return The value of the element.",
"Returns the entry associated with the given key.\n\n@param key the key of the entry to look up\n@return the entry associated with that key, or null\nif the key is not in this map",
"performs a SELECT operation against RDBMS.\n@param query the query string.\n@param cld ClassDescriptor providing JDBC information.",
"Use this API to fetch appfwprofile_csrftag_binding resources of given name .",
"Sets the baseline finish text value.\n\n@param baselineNumber baseline number\n@param value baseline finish text value"
] |
public static List<Expression> getVariableExpressions(DeclarationExpression declarationExpression) {
Expression leftExpression = declarationExpression.getLeftExpression();
// !important: performance enhancement
if (leftExpression instanceof ArrayExpression) {
List<Expression> expressions = ((ArrayExpression) leftExpression).getExpressions();
return expressions.isEmpty() ? Arrays.asList(leftExpression) : expressions;
} else if (leftExpression instanceof ListExpression) {
List<Expression> expressions = ((ListExpression) leftExpression).getExpressions();
return expressions.isEmpty() ? Arrays.asList(leftExpression) : expressions;
} else if (leftExpression instanceof TupleExpression) {
List<Expression> expressions = ((TupleExpression) leftExpression).getExpressions();
return expressions.isEmpty() ? Arrays.asList(leftExpression) : expressions;
} else if (leftExpression instanceof VariableExpression) {
return Arrays.asList(leftExpression);
}
// todo: write warning
return Collections.emptyList();
} | [
"Return the List of VariableExpression objects referenced by the specified DeclarationExpression.\n@param declarationExpression - the DeclarationExpression\n@return the List of VariableExpression objects"
] | [
"Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException",
"Here we start a intern odmg-Transaction to hide transaction demarcation\nThis method could be invoked several times within a transaction, but only\nthe first call begin a intern odmg transaction",
"Required to close the connection reading on the terminal, otherwise\nit can't be interrupted.\n\n@throws InterruptedException",
"Processes the template for all procedure arguments of the current procedure.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Checks to see if another AbstractTransition's states is isCompatible for merging.\n\n@param another\n@return",
"Get Rule\nGet a rule using the Rule ID\n@param ruleId Rule ID. (required)\n@return RuleEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Updates the story and returns the full record for the updated story.\nOnly comment stories can have their text updated, and only comment stories and\nattachment stories can be pinned. Only one of `text` and `html_text` can be specified.\n\n@param story Globally unique identifier for the story.\n@return Request object",
"Get information about a partition in this database.\n\n@param partitionKey database partition key\n@return {@link com.cloudant.client.api.model.PartitionInfo} encapsulating the database partition info.\n@throws UnsupportedOperationException if called with {@code null} partition key.",
"Use this API to count linkset_interface_binding resources configued on NetScaler."
] |
private String getStringPredicate(String fieldName, List<String> filterValues, List<Object> prms)
{
if (filterValues != null && !filterValues.isEmpty())
{
String res = "";
for (String filterValue : filterValues)
{
if (filterValue == null)
{
continue;
}
if (!filterValue.isEmpty())
{
prms.add(filterValue);
if (filterValue.contains("%"))
{
res += String.format("(%s LIKE ?) OR ", fieldName);
}
else
{
res += String.format("(%s = ?) OR ", fieldName);
}
}
else
{
res += String.format("(%s IS NULL OR %s = '') OR ", fieldName, fieldName);
}
}
if (!res.isEmpty())
{
res = "AND (" + res.substring(0, res.length() - 4) + ") ";
return res;
}
}
return "";
} | [
"GetJob helper - String predicates are all created the same way, so this factors some code."
] | [
"Call the no-arg constructor for the given class\n\n@param <T> The type of the thing to construct\n@param klass The class\n@return The constructed thing",
"Read a text file from assets into a single string\n\n@param context\nA non-null Android Context\n@param asset\nThe asset file to read\n@return The contents or null on error.",
"Abort an active extern transaction associated with the given PB.",
"Compute the proportional padding for all items in the cache\n@param cache Cache data set\n@return the uniform padding amount",
"Gets the object whose index is the integer argument.\n\n@param i the integer index to be queried for the corresponding argument\n@return the object whose index is the integer argument.",
"This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type",
"Creates a map between a work pattern ID and a list of time entry rows.\n\n@param rows time entry rows\n@return time entry map",
"Calculated the numeraire relative value of an underlying swap leg.\n\n@param model The Monte Carlo model.\n@param legSchedule The schedule of the leg.\n@param paysFloat If true a floating rate is payed.\n@param swaprate The swaprate. May be 0.0 for pure floating leg.\n@param notional The notional.\n@return The sum of the numeraire relative cash flows.\n@throws CalculationException Thrown if underlying model failed to calculate stochastic process.",
"Throws an IllegalStateException when the given value is not true."
] |
public FluoMutationGenerator put(Column col, CharSequence value) {
return put(col, value.toString().getBytes(StandardCharsets.UTF_8));
} | [
"Puts value at given column\n\n@param value Will be encoded using UTF-8"
] | [
"Read correlation id from message.\n\n@param message the message\n@return the CorrelationId as string",
"Make all elements of a String array lower case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements lower case",
"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",
"Sets the publish queue shutdown time.\n\n@param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code>",
"Restores a BoxAPIConnection from a saved state.\n\n@see #save\n@param clientID the client ID to use with the connection.\n@param clientSecret the client secret to use with the connection.\n@param state the saved state that was created with {@link #save}.\n@return a restored API connection.",
"Process a single outline code.\n\n@param parentRow outline code to task mapping table\n@throws SQLException",
"Writes all data that was collected about properties to a json file.",
"Get bean manager from portlet context.\n\n@param ctx the portlet context\n@return bean manager if found",
"Consumes the next character in the request, checking that it matches the\nexpected one. This method should be used when the"
] |
protected boolean isSavedConnection(DatabaseConnection connection) {
NestedConnection currentSaved = specialConnection.get();
if (currentSaved == null) {
return false;
} else if (currentSaved.connection == connection) {
// ignore the release when we have a saved connection
return true;
} else {
return false;
}
} | [
"Return true if the connection being released is the one that has been saved."
] | [
"Modify the transform's current rotation in quaternion terms, around a\npivot other than the origin.\n\n@param quatW\n'W' component of the rotation quaternion.\n@param quatX\n'X' component of the rotation quaternion.\n@param quatY\n'Y' component of the rotation quaternion.\n@param quatZ\n'Z' component of the rotation quaternion.\n@param pivotX\n'X' component of the pivot's location.\n@param pivotY\n'Y' component of the pivot's location.\n@param pivotZ\n'Z' component of the pivot's location.",
"Returns the path to java executable.",
"Use this API to update nstimeout.",
"Returns the value of the identified field as a Float.\n@param fieldName the name of the field\n@return the value of the field as a Float\n@throws FqlException if the field cannot be expressed as an Float",
"Sums up the square of each element in the matrix. This is equivalent to the\nFrobenius norm squared.\n\n@param m Matrix.\n@return Sum of elements squared.",
"Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix.",
"Get all backup data\n\n@param model\n@return\n@throws Exception",
"Write a set of fields from a field container to a JSON file.\n@param objectName name of the object, or null if no name required\n@param container field container\n@param fields fields to write",
"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"
] |
private boolean isRelated(Task task, List<Relation> list)
{
boolean result = false;
for (Relation relation : list)
{
if (relation.getTargetTask().getUniqueID().intValue() == task.getUniqueID().intValue())
{
result = true;
break;
}
}
return result;
} | [
"Internal method used to test for the existence of a relationship\nwith a task.\n\n@param task target task\n@param list list of relationships\n@return boolean flag"
] | [
"Returns new instance of OptionalValue with given key and value\n@param key resource key of the created value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue with given key",
"Executes a API query action to get a new token.\nThe method only executes the action, without doing any\nchecks first. If errors occur, they are logged and null is returned.\n\n@param tokenType The kind of token to retrieve like \"csrf\" or \"login\"\n@return newly retrieved token or null if no token was retrieved",
"Removes all elements in the sorted set with a score in the given range.\n@param scoreRange\n@return the number of elements removed.",
"disables the current active id, enables the new one selected\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@param active true to make client active, false to make client inactive\n@throws Exception exception",
"Concats two arrays.\n\n@param first the first array\n@param second the second array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after the first one",
"Prints a currency symbol position value.\n\n@param value CurrencySymbolPosition instance\n@return currency symbol position",
"Validate an injection point\n\n@param ij the injection point to validate\n@param beanManager the bean manager",
"returns an Array with an Objects PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Performs a standard bidiagonal decomposition just on the outer blocks of the provided matrix\n\n@param blockLength\n@param A\n@param gammasU"
] |
protected void updateRotator(DMatrixRMaj Q , int m, int n, double c, double s) {
int rowA = m*Q.numCols;
int rowB = n*Q.numCols;
// for( int i = 0; i < Q.numCols; i++ ) {
// double a = Q.get(rowA+i);
// double b = Q.get(rowB+i);
// Q.set( rowA+i, c*a + s*b);
// Q.set( rowB+i, -s*a + c*b);
// }
// System.out.println("------ AFter Update Rotator "+m+" "+n);
// Q.print();
// System.out.println();
int endA = rowA + Q.numCols;
for( ; rowA != endA; rowA++ , rowB++ ) {
double a = Q.get(rowA);
double b = Q.get(rowB);
Q.set(rowA, c*a + s*b);
Q.set(rowB, -s*a + c*b);
}
} | [
"Multiplied a transpose orthogonal matrix Q by the specified rotator. This is used\nto update the U and V matrices. Updating the transpose of the matrix is faster\nsince it only modifies the rows.\n\n\n@param Q Orthogonal matrix\n@param m Coordinate of rotator.\n@param n Coordinate of rotator.\n@param c cosine of rotator.\n@param s sine of rotator."
] | [
"Gets a single byte return or -1 if no data is available.",
"Use this API to fetch all the tmsessionparameter resources that are configured on netscaler.",
"Utility function to zip the content of an entire folder, but not the folder itself.\n@param folder\n@param fileName optional\n@return success or not",
"Count the number of occurrences of a sub CharSequence.\n\n@param self a CharSequence\n@param text a sub CharSequence\n@return the number of occurrences of the given CharSequence inside this CharSequence\n@see #count(String, String)\n@since 1.8.2",
"Calls the stored procedure stored procedure throws an\nerror if it doesn't exist.\n@param broker\n@param cld\n@param sequenceName\n@return\n@throws LookupException\n@throws SQLException",
"Provisions a new user in an enterprise with additional user information.\n@param api the API connection to be used by the created user.\n@param login the email address the user will use to login.\n@param name the name of the user.\n@param params additional user information.\n@return the created user's info.",
"Create a mapping from entity names to entity ID values.",
"Generic version of getting value by key from the JobContext of current thread\n@param key the key\n@param clz the val class\n@param <T> the val type\n@return the value",
"Extracts the data for a single file from the input stream and writes\nit to a target directory.\n\n@param stream input stream\n@param dir target directory"
] |
Subsets and Splits