query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static int getLineCount(String str) {
if (null == str || str.isEmpty()) {
return 0;
}
int count = 1;
for (char c : str.toCharArray()) {
if ('\n' == c) {
count++;
}
}
return count;
} | [
"Counts the number of lines.\n\n@param str the input string\n@return Returns the number of lines terminated by '\\n' in string"
] | [
"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",
"Tells you if the given ASTNode is a VariableExpression with the given name.\n@param expression\nany AST Node\n@param pattern\na string pattern to match\n@return\ntrue if the node is a variable with the specified name",
"Use this API to fetch statistics of servicegroup_stats resource of given name .",
"Use this API to add nspbr6.",
"Gets the URL of the service with the given name that has been created during the current session.\n\n@param name to return its URL\n@return URL of the service.",
"Adds an ORDER BY item with a direction indicator.\n\n@param name\nName of the column by which to sort.\n@param ascending\nIf true, specifies the direction \"asc\", otherwise, specifies\nthe direction \"desc\".",
"This implementation returns whether the underlying asset exists.",
"Ensures that the given collection descriptor has a valid element-class-ref property.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If element-class-ref could not be determined or is invalid",
"Write the given pattern to given log in given logging level\n@param logger\n@param level\n@param pattern\n@param exception"
] |
private static Class<?> getGenericReturnType(Method method, Class<?> source, int typeIndex, int nestingLevel) {
return extractType(method.getGenericReturnType(), source, typeIndex, null, null, nestingLevel, 1);
} | [
"Extract the generic return type from the given method.\n@param method the method to check the return type for\n@param source the source class/interface defining the generic parameter types\n@param typeIndex the index of the type (e.g. 0 for Collections,\n0 for Map keys, 1 for Map values)\n@param nestingLevel the nesting level of the target type\n@return the generic type, or {@code null} if none"
] | [
"Adds an array of groupby fieldNames for ReportQueries.\n@param fieldNames The groupby to set\n@deprecated use QueryByCriteria#addGroupBy",
"If credentials are incorrect or not provided for Basic Auth, then Android\nmay throw this exception when an HTTP 401 is received. A separate exception\nis thrown for proxy authentication errors. Checking for this response and\nreturning the proper status.\n@param ex the exception raised from Android\n@return HTTP Status Code",
"Handles logging tasks related to a failure to connect to a remote HC.\n@param uri the URI at which the connection attempt was made. Can be {@code null} indicating a failure to discover the HC\n@param discoveryOption the {@code DiscoveryOption} used to determine {@code uri}\n@param moreOptions {@code true} if there are more untried discovery options\n@param e the exception",
"Read an element which contains only a single boolean attribute.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@return the boolean value\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.",
"this method will be invoked after methodToBeInvoked is invoked",
"JSObject will return the String \"undefined\" at certain times, so we\nneed to make sure we're not getting a value that looks valid, but isn't.\n\n@param val The value from Javascript to be checked.\n@return Either null or the value passed in.",
"Apply filter to an image.\n\n@param source FastBitmap",
"Returns the compression type of this kind of dump file using file suffixes\n\n@param fileName the name of the file\n@return compression type\n@throws IllegalArgumentException\nif the given dump file type is not known",
"Append Join for non SQL92 Syntax"
] |
@SuppressWarnings("boxing")
public OAuth1Token getAccessToken(OAuth1RequestToken oAuthRequestToken, String verifier) {
OAuth10aService service = new ServiceBuilder(apiKey)
.apiSecret(sharedSecret)
.build(FlickrApi.instance());
// Flickr seems to return invalid token sometimes so retry a few times.
// See http://www.flickr.com/groups/api/discuss/72157628028927244/
OAuth1Token accessToken = null;
boolean success = false;
for (int i = 0; i < maxGetTokenRetries && !success; i++) {
try {
accessToken = service.getAccessToken(oAuthRequestToken, verifier);
success = true;
} catch (OAuthException | IOException | InterruptedException | ExecutionException e) {
if (i == maxGetTokenRetries - 1) {
logger.error(String.format("OAuthService.getAccessToken failing after %d tries, re-throwing exception", i), e);
throw new FlickrRuntimeException(e);
} else {
logger.warn(String.format("OAuthService.getAccessToken failed, try number %d: %s", i, e.getMessage()));
try {
Thread.sleep(500);
} catch (InterruptedException ie) {
// Do nothing
}
}
}
}
return accessToken;
} | [
"Trade the request token for an access token, this is step three of authorization.\n@param oAuthRequestToken\nthis is the token returned by the {@link AuthInterface#getRequestToken} call.\n@param verifier"
] | [
"Use this API to delete sslcipher resources of given names.",
"generate a prepared DELETE-Statement for the Class\ndescribed by cld.\n@param cld the ClassDescriptor",
"Use this API to fetch aaapreauthenticationpolicy_aaaglobal_binding resources of given name .",
"Converts the List to PagedList.\n@param list list to be converted in to paged list\n@param <InnerT> the wrapper inner type\n@return the Paged list for the inner type.",
"Return an input stream to read the data from the named table.\n\n@param name table name\n@return InputStream instance\n@throws IOException",
"updates the groupname in the table given the id\n\n@param newGroupName new group name\n@param id ID of group",
"Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nmetadata updates will use available caches only\n\n@return the metadata found, if any",
"Fetch the specified expression from the cache or create it if necessary.\n\n@param expressionString the expression string\n@return the expression\n@throws ParseException oops",
"Copy one Gradient into another.\n@param g the Gradient to copy into"
] |
public void createRelationFieldMap(Props props)
{
byte[] fieldMapData = null;
for (Integer key : RELATION_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData == null)
{
populateDefaultData(getDefaultRelationData());
}
else
{
createFieldMap(fieldMapData);
}
} | [
"Creates a field map for relations.\n\n@param props props data"
] | [
"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)",
"This is needed when running on slaves.",
"Print a class's relations",
"create a new instance of class clazz.\nfirst use the public default constructor.\nIf this fails also try to use protected an private constructors.\n@param clazz the class to instantiate\n@return the fresh instance of class clazz\n@throws InstantiationException",
"Skips variable length blocks up to and including next zero length block.",
"Finds the first mesh in the given model.\n@param model root of a model loaded by the asset loader.\n@return GVRMesh found or null if model does not contain meshes\n@see #loadMesh(GVRAndroidResource.MeshCallback, GVRAndroidResource, int)",
"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.",
"performs a SQL SELECT statement against RDBMS.\n@param sql the query string.\n@param cld ClassDescriptor providing meta-information.",
"Notifies that a footer item is changed.\n\n@param position the position."
] |
public final File getBuildFileFor(
final Configuration configuration, final File jasperFileXml,
final String extension, final Logger logger) {
final String configurationAbsolutePath = configuration.getDirectory().getPath();
final int prefixToConfiguration = configurationAbsolutePath.length() + 1;
final String parentDir = jasperFileXml.getAbsoluteFile().getParent();
final String relativePathToFile;
if (configurationAbsolutePath.equals(parentDir)) {
relativePathToFile = FilenameUtils.getBaseName(jasperFileXml.getName());
} else {
final String relativePathToContainingDirectory = parentDir.substring(prefixToConfiguration);
relativePathToFile = relativePathToContainingDirectory + File.separator +
FilenameUtils.getBaseName(jasperFileXml.getName());
}
final File buildFile = new File(getJasperCompilation(configuration), relativePathToFile + extension);
if (!buildFile.getParentFile().exists() && !buildFile.getParentFile().mkdirs()) {
logger.error("Unable to create directory for containing compiled jasper report templates: {}",
buildFile.getParentFile());
}
return buildFile;
} | [
"Calculate the file to compile a jasper report template to.\n\n@param configuration the configuration for the current app.\n@param jasperFileXml the jasper report template in xml format.\n@param extension the extension of the compiled report template.\n@param logger the logger to log errors to if an occur."
] | [
"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",
"Applies the > operator to each element in A. Results are stored in a boolean matrix.\n\n@param A Input matrx\n@param value value each element is compared against\n@param output (Optional) Storage for results. Can be null. Is reshaped.\n@return Boolean matrix with results",
"Use this API to fetch dnstxtrec resources of given names .",
"Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries.",
"Find the logging profile attached to any resource.\n\n@param resourceRoot the root resource\n\n@return the logging profile name or {@code null} if one was not found",
"is there a faster algorithm out there? This one is a bit sluggish",
"Method to get the file writer required for the .story files\n\n@param scenarioName\n@param aux_package_path\n@param dest_dir\n@return The file writer that generates the .story files for each test\n@throws BeastException",
"Adds a foreignkey to this table.\n\n@param relationName The name of the relation represented by the foreignkey\n@param remoteTable The referenced table\n@param localColumns The local columns\n@param remoteColumns The remote columns",
"Use this API to fetch authenticationnegotiatepolicy_binding resource of given name ."
] |
public List<Message> requestFolderMenuFrom(final SlotReference slotReference, final int sortOrder, final int folderId)
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 Key menu.");
Message response = client.menuRequestTyped(Message.KnownType.FOLDER_MENU_REQ, Message.MenuIdentifier.MAIN_MENU, slotReference.slot,
CdjStatus.TrackType.UNANALYZED, new NumberField(sortOrder), new NumberField(folderId), new NumberField(0xffffff));
return client.renderMenuItems(Message.MenuIdentifier.MAIN_MENU, slotReference.slot, CdjStatus.TrackType.UNANALYZED, response);
} finally {
client.unlockForMenuOperations();
}
} else {
throw new TimeoutException("Unable to lock player for menu operations.");
}
}
};
return ConnectionManager.getInstance().invokeWithClientSession(slotReference.player, task, "requesting folder menu");
} | [
"Ask the specified player for a Folder menu for exploring its raw filesystem.\nThis is a request for unanalyzed items, so we do a typed menu request.\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@param folderId identifies the folder whose contents should be listed, use -1 to get the root folder\n\n@return the entries in the folder menu\n\n@throws Exception if there is a problem obtaining the menu"
] | [
"Closes the JDBC statement and its associated connection.",
"Enforces the correct srid on incoming features.\n\n@param feature\nobject to enforce srid on\n@throws LayerException\nproblem getting or setting srid",
"Return a list of unique values for a namespace and predicate.\n\nThis method does not require authentication.\n\n@param namespace\nThe namespace that all values should be restricted to.\n@param predicate\nThe predicate that all values should be restricted to.\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return NamespacesList\n@throws FlickrException",
"Write a calendar.\n\n@param record calendar instance\n@throws IOException",
"Open the connection to the server.\n\n@param url the url to connect to\n@return returns the input stream for the connection\n@throws IOException cannot get result",
"Generate random time stamps from the current time upto the next one second.\nPassed as texture coordinates to the vertex shader, an unused field is present\nwith every pair passed.\n\n@param totalTime\n@return",
"Replaces an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.",
"Removes a value from the list box. Nothing is done if the value isn't on\nthe list box.\n\n@param value the value to be removed from the list\n@param reload perform a 'material select' reload to update the DOM.",
"Add a photo to the user's favorites.\n\n@param photoId\nThe photo ID\n@throws FlickrException"
] |
public static base_response add(nitro_service client, spilloverpolicy resource) throws Exception {
spilloverpolicy addresource = new spilloverpolicy();
addresource.name = resource.name;
addresource.rule = resource.rule;
addresource.action = resource.action;
addresource.comment = resource.comment;
return addresource.add_resource(client);
} | [
"Use this API to add spilloverpolicy."
] | [
"Calculate the finish variance.\n\n@return finish variance",
"Sets the underlying write timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#writeTimeout(long, TimeUnit)",
"Writes an untagged OK response, with the supplied response code,\nand an optional message.\n\n@param responseCode The response code, included in [].\n@param message The message to follow the []",
"host.xml",
"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",
"Sets the provided square matrix to be a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param A The matrix that is to be modified. Must be square. Modified.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.",
"Used for DI frameworks to inject values into stages.",
"Prepare a batch api request using list of individual reuests.\n@param requests list of api requests that has to be executed in batch.",
"Creates a new GridLines instance.\n\n@param data data block\n@param offset offset into data block\n@return new GridLines instance"
] |
@RequestMapping(value = "/api/profile/{profileIdentifier}/clients/delete", method = RequestMethod.POST)
public
@ResponseBody
HashMap<String, Object> deleteClient(Model model,
@RequestParam("profileIdentifier") String profileIdentifier,
@RequestParam("clientUUID") String[] clientUUID) throws Exception {
logger.info("Attempting to remove clients from the profile: ", profileIdentifier);
logger.info("Attempting to remove the following clients: {}", Arrays.toString(clientUUID));
HashMap<String, Object> valueHash = new HashMap<String, Object>();
Integer profileId = ControllerUtils.convertProfileIdentifier(profileIdentifier);
for( int i = 0; i < clientUUID.length; i++ )
{
if (clientUUID[i].compareTo(Constants.PROFILE_CLIENT_DEFAULT_ID) == 0)
throw new Exception("Default client cannot be deleted");
clientService.remove(profileId, clientUUID[i]);
}
valueHash.put("clients", clientService.findAllClients(profileId));
return valueHash;
} | [
"Bulk delete clients from a profile.\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return returns the table of the remaining clients or an exception if deletion failed for some reason\n@throws Exception"
] | [
"will trigger workers to cancel then wait for it to report back.",
"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",
"return a HashMap with all properties, name as key, value as value\n@return the properties",
"Returns the value of the element with the largest value\n@param A (Input) Matrix. Not modified.\n@return scalar",
"Handles reports by consumers\n\n@param name the name of the reporting consumer\n@param report the number of lines the consumer has written since last report\n@return \"exit\" if maxScenarios has been reached, \"ok\" otherwise",
"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",
"Converts a collection of dates to a JSON array with the long representation of the dates as strings.\n@param dates the list to convert.\n@return JSON array with long values of dates as string",
"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.",
"Within a single zone, swaps one random partition on one random node with\nanother random partition on different random node.\n\n@param nextCandidateCluster\n@param zoneId Zone ID within which to shuffle partitions\n@return updated cluster"
] |
public static synchronized void addCachedDatabaseConfigs(Collection<DatabaseTableConfig<?>> configs) {
Map<Class<?>, DatabaseTableConfig<?>> newMap;
if (configMap == null) {
newMap = new HashMap<Class<?>, DatabaseTableConfig<?>>();
} else {
newMap = new HashMap<Class<?>, DatabaseTableConfig<?>>(configMap);
}
for (DatabaseTableConfig<?> config : configs) {
newMap.put(config.getDataClass(), config);
logger.info("Loaded configuration for {}", config.getDataClass());
}
configMap = newMap;
} | [
"This adds database table configurations to the internal cache which can be used to speed up DAO construction.\nThis is especially true of Android and other mobile platforms."
] | [
"Fetch flag resource by Country\n\n@param country Country\n@return int of resource | 0 value if not exists",
"Resolve an operation transformer entry.\n\n@param address the address\n@param operationName the operation name\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the transformer entry",
"Runs the module import script.\n\n@param cms the CMS context to use\n@param module the module for which to run the script",
"Returns the supplied string with any trailing '\\n' removed.",
"Use this API to fetch all the appfwlearningsettings resources that are configured on netscaler.",
"Checks if this child holds the current active state.\nIf the child is or contains the active state it is applied.",
"Gives an sequence of ByteBuffers of a specified range. Writing to these ByteBuffers modifies the contents of this LBuffer.\n@param offset\n@param size\n@return",
"Opens the jar, wraps any IOException.",
"Exports json encoded content to CrashReport object\n\n@param json valid json body.\n@return new instance of CrashReport"
] |
public static TestCaseStartedEvent withExecutorInfo(TestCaseStartedEvent event) {
event.getLabels().add(createHostLabel(getHostname()));
event.getLabels().add(createThreadLabel(format("%s.%s(%s)",
ManagementFactory.getRuntimeMXBean().getName(),
Thread.currentThread().getName(),
Thread.currentThread().getId())
));
return event;
} | [
"Add information about host and thread to specified test case started event\n\n@param event given event to update\n@return updated event"
] | [
"Returns screen height and width\n\n@param context\nAny non-null Android Context\n@param p\nOptional Point to reuse. If null, a new Point will be created.\n@return .x is screen width; .y is screen height.",
"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",
"Setter for property value. Doesn't affect entity version and doesn't\ninvalidate any of the cached entity iterables.\n\n@param localId entity local id.\n@param value property value.\n@param oldValue property old value\n@param propertyId property id",
"Adds all edges for a given object envelope vertex. All edges are\nadded to the edgeList map.\n@param vertex the Vertex object to find edges for",
"Compare the supplied plaintext password to a hashed password.\n\n@param passwd Plaintext password.\n@param hashed scrypt hashed password.\n\n@return true if passwd matches hashed value.",
"Get the FieldDescriptor for the PathInfo\n\n@param aTableAlias\n@param aPathInfo\n@return FieldDescriptor",
"Find the earliest task start date. We treat this as the\nstart date for the project.\n\n@return start date",
"Generate the next permutation and return a list containing\nthe elements in the appropriate order.\n@see #nextPermutationAsList(java.util.List)\n@see #nextPermutationAsArray()\n@return The next permutation as a list.",
"One of the two main methods in this class. Creates a RendererViewHolder instance with a\nRenderer inside ready to be used. The RendererBuilder to create a RendererViewHolder using the\ninformation given as parameter.\n\n@param viewGroup used to create the ViewHolder.\n@param viewType associated to the renderer.\n@return ViewHolder extension with the Renderer it has to use inside."
] |
private void writeStringField(String fieldName, Object value) throws IOException
{
String val = value.toString();
if (!val.isEmpty())
{
m_writer.writeNameValuePair(fieldName, val);
}
} | [
"Write a string field to the JSON file.\n\n@param fieldName field name\n@param value field value"
] | [
"Save the current file as the given type.\n\n@param file target file\n@param type file type",
"Stop finding beat grids for all active players.",
"Creates the publish button.\n\n@param updateListener the update listener\n@return the publish button",
"This produces the dotted hexadecimal format aaaa.bbbb.cccc",
"Get the configuration for a TMS layer by retrieving and parsing it's XML description file. The parsing is done\nusing JaxB.\n@param layer the tms layer to get capabilities for.\n@return Returns the description as a Java configuration object.\n@throws TmsLayerException\nIn case something went wrong trying to find or parse the XML description file.",
"Within a single zone, swaps one random partition on one random node with\nanother random partition on different random node.\n\n@param nextCandidateCluster\n@param zoneId Zone ID within which to shuffle partitions\n@return updated cluster",
"Restores the dropout descriptor to a previously saved-off state",
"simple echo implementation",
"Reconnect the sequence flows and the flow nodes.\nDone after the initial pass so that we have all the target information."
] |
public void loadClass(String className) throws Exception {
ClassInformation classInfo = classInformation.get(className);
logger.info("Loading plugin.: {}, {}", className, classInfo.pluginPath);
// get URL for proxylib
// need to load this also otherwise the annotations cannot be found later on
File libFile = new File(proxyLibPath);
URL libUrl = libFile.toURI().toURL();
// store the last modified time of the plugin
File pluginDirectoryFile = new File(classInfo.pluginPath);
classInfo.lastModified = pluginDirectoryFile.lastModified();
// load the plugin directory
URL classURL = new File(classInfo.pluginPath).toURI().toURL();
URL[] urls = new URL[] {classURL};
URLClassLoader child = new URLClassLoader(urls, this.getClass().getClassLoader());
// load the class
Class<?> cls = child.loadClass(className);
// put loaded class into classInfo
classInfo.loadedClass = cls;
classInfo.loaded = true;
classInformation.put(className, classInfo);
logger.info("Loaded plugin: {}, {} method(s)", cls.toString(), cls.getDeclaredMethods().length);
} | [
"Loads the specified class name and stores it in the hash\n\n@param className class name\n@throws Exception exception"
] | [
"Validations specific to PUT",
"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",
"Appends the String representation of the given operand to this CharSequence.\n\n@param left a CharSequence\n@param value any Object\n@return the original toString() of the CharSequence with the object appended\n@since 1.8.2",
"Saves a matrix to disk using Java binary serialization.\n\n@param A The matrix being saved.\n@param fileName Name of the file its being saved at.\n@throws java.io.IOException",
"Returns the value of the indicated property of the current object on the specified level.\n\n@param level The level\n@param name The name of the property\n@return The property value",
"cleanup tx and prepare for reuse",
"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",
"Get all parameter keys.\n@return a set of parameter keys",
"Get a list of path transformers for a given address.\n\n@param address the path address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return a list of path transformations"
] |
public static void doMetaUpdateVersionsOnStores(AdminClient adminClient,
List<StoreDefinition> oldStoreDefs,
List<StoreDefinition> newStoreDefs) {
Set<String> storeNamesUnion = new HashSet<String>();
Map<String, StoreDefinition> oldStoreDefinitionMap = new HashMap<String, StoreDefinition>();
Map<String, StoreDefinition> newStoreDefinitionMap = new HashMap<String, StoreDefinition>();
List<String> storesChanged = new ArrayList<String>();
for(StoreDefinition storeDef: oldStoreDefs) {
String storeName = storeDef.getName();
storeNamesUnion.add(storeName);
oldStoreDefinitionMap.put(storeName, storeDef);
}
for(StoreDefinition storeDef: newStoreDefs) {
String storeName = storeDef.getName();
storeNamesUnion.add(storeName);
newStoreDefinitionMap.put(storeName, storeDef);
}
for(String storeName: storeNamesUnion) {
StoreDefinition oldStoreDef = oldStoreDefinitionMap.get(storeName);
StoreDefinition newStoreDef = newStoreDefinitionMap.get(storeName);
if(oldStoreDef == null && newStoreDef != null || oldStoreDef != null
&& newStoreDef == null || oldStoreDef != null && newStoreDef != null
&& !oldStoreDef.equals(newStoreDef)) {
storesChanged.add(storeName);
}
}
System.out.println("Updating metadata version for the following stores: "
+ storesChanged);
try {
adminClient.metadataMgmtOps.updateMetadataversion(adminClient.getAdminClientCluster()
.getNodeIds(),
storesChanged);
} catch(Exception e) {
System.err.println("Error while updating metadata version for the specified store.");
}
} | [
"Updates metadata versions on stores.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param oldStoreDefs List of old store definitions\n@param newStoreDefs List of new store definitions"
] | [
"Peeks the current top of the stack or returns null if the stack is empty\n@return the current top of the stack or returns null if the stack is empty",
"Starts asynchronous check. Result will be delivered to the listener on the main thread.\n\n@param context\n@param appId application id from the oculus dashboard\n@param listener listener to invoke when the result is available\n@throws IllegalStateException in case the platform sdk cannot be initialized\n@throws IllegalArgumentException if listener is null",
"Calculates the LatLong position of the end point of a line the specified\ndistance from this LatLong, along the provided bearing, where North is 0,\nEast is 90 etc.\n\n@param bearing The bearing, in degrees, with North as 0, East as 90 etc.\n@param distance The distance in metres.\n@return A new LatLong indicating the end point.",
"Start check of execution time\n@param extra",
"Inserts a Serializable 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 Serializable object, or null\n@return this bundler instance to chain method calls",
"Is portlet env supported.\n\n@return true if portlet env is supported, false otherwise",
"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.",
"Moves our current playback position to the specified beat; this will be reflected in any status and beat packets\nthat we are sending. An incoming value less than one will jump us to the first beat.\n\n@param beat the beat that we should pretend to be playing",
"Manage the artifact add to the Module AbstractGraph\n\n@param graph\n@param depth"
] |
private void writeResources(Project project)
{
Project.Resources resources = m_factory.createProjectResources();
project.setResources(resources);
List<Project.Resources.Resource> list = resources.getResource();
for (Resource resource : m_projectFile.getResources())
{
list.add(writeResource(resource));
}
} | [
"This method writes resource data to an MSPDI file.\n\n@param project Root node of the MSPDI file"
] | [
"Adds a value to the list if does not already exists.\n\n@param list the list\n@param value value to add if not exists in the list",
"Gets a list of AssignmentRows based on the current Assignments\n@return",
"Returns the complete tag record for a single tag.\n\n@param tag The tag to get.\n@return Request object",
"Display a Notification message\n@param event",
"Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found",
"Adds OPT_D | OPT_DIR option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Given a field node, checks if we are calling a private field from an inner class.",
"Sets a new image\n\n@param BufferedImage imagem",
"Start a server.\n\n@return the http server\n@throws Exception the exception"
] |
private String resolveExpressionString(final String unresolvedString) throws OperationFailedException {
// parseAndResolve should only be providing expressions with no leading or trailing chars
assert unresolvedString.startsWith("${") && unresolvedString.endsWith("}");
// Default result is no change from input
String result = unresolvedString;
ModelNode resolveNode = new ModelNode(new ValueExpression(unresolvedString));
// Try plug-in resolution; i.e. vault
resolvePluggableExpression(resolveNode);
if (resolveNode.getType() == ModelType.EXPRESSION ) {
// resolvePluggableExpression did nothing. Try standard resolution
String resolvedString = resolveStandardExpression(resolveNode);
if (!unresolvedString.equals(resolvedString)) {
// resolveStandardExpression made progress
result = resolvedString;
} // else there is nothing more we can do with this string
} else {
// resolvePluggableExpression made progress
result = resolveNode.asString();
}
return result;
} | [
"Resolve the given string using any plugin and the DMR resolve method"
] | [
"Creates an instance of a NewEnterpriseBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewEnterpriseBean instance",
"Create an Product delivery\n\n@throws AuthenticationException, GrapesCommunicationException, IOException",
"Retrieves the table structure for an Asta PP file. Subclasses determine the exact contents of the structure\nfor a specific version of the Asta PP file.\n\n@return PP file table structure",
"Add a Opacity bar to the color wheel.\n\n@param bar The instance of the Opacity bar.",
"Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started.",
"Find the user by their email address.\n\nThis method does not require authentication.\n\n@param email\nThe email address\n@return The User\n@throws FlickrException",
"Commits the working copy.\n\n@param commitMessage@return The commit info upon successful operation.\n@throws IOException On IO of SVN failure",
"This method is called by the client to load the most recent list of resources.\nThis method should only be called by the service client.\n\n@param result the most recent list of resources.",
"Pretty print a progress update after each batch complete.\n\n@param batchCount current batch\n@param numBatches total number of batches\n@param partitionStoreCount partition stores migrated\n@param numPartitionStores total number of partition stores to migrate\n@param totalTimeMs total time, in milliseconds, of execution thus far."
] |
public static final BigDecimal printCurrency(Number value)
{
return (value == null || value.doubleValue() == 0 ? null : new BigDecimal(value.doubleValue() * 100));
} | [
"Print currency.\n\n@param value currency value\n@return currency value"
] | [
"Takes a string of the form \"x1=y1,x2=y2,...\" and returns Map\n@param map A string of the form \"x1=y1,x2=y2,...\"\n@return A Map m is returned such that m.get(xn) = yn",
"Runs the server.",
"as it is daemon thread\n\nTODO when release external resources should shutdown the scheduler.",
"Test for equality.\n@param obj1 the first object\n@param obj2 the second object\n@return true if both are null or the two objects are equal",
"A Maven stub is a Maven Project for which we have found information, but the project has not yet been located\nwithin the input application. If we have found an application of the same GAV within the input app, we should\nfill out this stub instead of creating a new one.",
"Find the fields in which the Activity ID and Activity Type are stored.",
"Get the underlying channel. This may block until the channel is set.\n\n@return the channel\n@throws IOException for any error",
"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",
"Returns the y-coordinate of a vertex tangent.\n\n@param vertex the vertex index\n@return the y coordinate"
] |
public static String getImageIdFromAgent(Launcher launcher, final String imageTag, final String host) throws IOException, InterruptedException {
return launcher.getChannel().call(new MasterToSlaveCallable<String, IOException>() {
public String call() throws IOException {
return DockerUtils.getImageIdFromTag(imageTag, host);
}
});
} | [
"Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return"
] | [
"marks the message as read",
"Use this API to delete nsip6 resources.",
"Reduce the given value to the nearest smaller 1 significant digit number starting with 1, 2 or 5.\n\n@param value the value to find a nice number for.\n@param scaleUnit the unit of the value.\n@param lockUnits if set, the values are not scaled to a \"nicer\" unit.",
"Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity",
"Adds a new point.\n\n@param point a point\n@return this for chaining",
"Get the cached entry or null if no valid cached entry is found.",
"Convenience method which allows all projects in the database to\nbe read in a single operation.\n\n@return list of ProjectFile instances\n@throws MPXJException",
"Check whether the URL start with one of the given prefixes.\n\n@param uri URI\n@param patterns possible prefixes\n@return true when URL starts with one of the prefixes",
"Utility function that constructs AdminClient.\n\n@param url URL pointing to the bootstrap node\n@return Newly constructed AdminClient"
] |
static GVRPickedObject makeHitMesh(long colliderPointer, float distance, float hitx, float hity, float hitz,
int faceIndex, float barycentricx, float barycentricy, float barycentricz,
float texu, float texv, float normalx, float normaly, float normalz)
{
GVRCollider collider = GVRCollider.lookup(colliderPointer);
if (collider == null)
{
Log.d(TAG, "makeHit: cannot find collider for %x", colliderPointer);
return null;
}
return new GVRPicker.GVRPickedObject(collider, new float[] { hitx, hity, hitz }, distance, faceIndex,
new float[] {barycentricx, barycentricy, barycentricz},
new float[]{ texu, texv },
new float[]{normalx, normaly, normalz});
} | [
"Internal utility to help JNI add hit objects to the pick list. Specifically for MeshColliders with picking\nfor UV, Barycentric, and normal coordinates enabled"
] | [
"Return true only if the node has any of the named annotations\n@param node - the AST Node to check\n@param names - the names of the annotations\n@return true only if the node has any of the named annotations",
"Create a new collaboration object.\n@param api the API connection used to make the request.\n@param accessibleBy the JSON object describing who should be collaborated.\n@param item the JSON object describing which item to collaborate.\n@param role the role to give the collaborators.\n@param notify the user/group should receive email notification of the collaboration or not.\n@param canViewPath the view path collaboration feature is enabled or not.\n@return info about the new collaboration.",
"Creates a rectangular matrix which is zero except along the diagonals.\n\n@param numRows Number of rows in the matrix.\n@param numCols NUmber of columns in the matrix.\n@return A matrix with diagonal elements equal to one.",
"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",
"changes the color of the image - more red and less blue\n\n@return new pixel array",
"Determines the offset code of a forward contract from a schedule. Rounds the average period length to full months.\n\n@param schedule The schedule.\n@return The offset code as String",
"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}",
"trim \"act.\" from conf keys",
"Clean obsolete contents from the content repository. It will first mark contents as obsolete then after some time\nif these contents are still obsolete they will be removed.\n\n@return a map containing the list of marked contents and the list of deleted contents."
] |
@Override
public final Integer optInt(final String key) {
final int result = this.obj.optInt(key, Integer.MIN_VALUE);
return result == Integer.MIN_VALUE ? null : result;
} | [
"Get a property as a int or null.\n\n@param key the property name"
] | [
"Create the log if it does not exist or return back exist log\n\n@param topic the topic name\n@param partition the partition id\n@return read or create a log\n@throws IOException any IOException",
"Encodes the given URI query with the given encoding.\n@param query the query to be encoded\n@param encoding the character encoding to encode to\n@return the encoded query\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Format event to string buffer.\n\n@param sbuf\nstring buffer to receive formatted event, may not be null.\n@param event\nevent to format, may not be null.",
"Declares additional internal data structures.",
"Use this API to fetch the statistics of all gslbdomain_stats resources that are configured on netscaler.",
"Use this API to fetch all the rnatparam resources that are configured on netscaler.",
"Called when remote end send a message to this connection\n@param receivedMessage the message received\n@return this context",
"Use this API to fetch service_dospolicy_binding resources of given name .",
"Get the waveform previews available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the previews associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the WaveformFinder is not running"
] |
private void updateSortedServices() {
List<T> copiedList = new ArrayList<T>(serviceMap.values());
sortedServices = Collections.unmodifiableList(copiedList);
if (changeListener != null) {
changeListener.changed();
}
} | [
"Update list of sorted services by copying it from the array and making it unmodifiable."
] | [
"Creates new row in table\n@param broker\n@param field\n@param sequenceName\n@param maxKey\n@throws Exception",
"Sets the Base Calendar field indicates which calendar is the base calendar\nfor a resource calendar. The list includes the three built-in calendars,\nas well as any new base calendars you have created in the Change Working\nTime dialog box.\n\n@param val calendar name",
"Build the operation transformers.\n\n@param registry the shared resource registry\n@return the operation transformers",
"This method returns the actual raw class associated with the specified\ntype.",
"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",
"Old REST client uses new REST service",
"Sets the duration for the animation to be played.\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@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code start} is either negative value, greater than\n{@code end} value or {@code end} is greater than duration",
"Returns values aggregated from all the delegates, without overriding\nvalues that already exist.\n\n@return The Map of aggregated values",
"Generate a call to the delegate object."
] |
public float getBoundsWidth() {
if (mSceneObject != null) {
GVRSceneObject.BoundingVolume v = mSceneObject.getBoundingVolume();
return v.maxCorner.x - v.minCorner.x;
}
return 0f;
} | [
"Gets Widget bounds width\n@return width"
] | [
"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",
"Main method of this class related to ListView widget. This method is the responsible of\nrecycle or create a new Renderer instance with all the needed information to implement the\nrendering. This method will validate all the attributes passed in the builder constructor and\nwill check if can recycle or has to create a new Renderer instance.\n\nThis method is used with ListView because the view recycling mechanism is implemented in this\nclass. RecyclerView widget will use buildRendererViewHolder method.\n\n@return ready to use Renderer instance.",
"Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return table rows",
"Configure all UI elements in the exceptions panel.",
"Retrieves the earliest start date for all assigned tasks.\n\n@return start date",
"When an alias for a field is added, index it here to allow lookup by alias and type.\n\n@param type field type\n@param alias field alias",
"Return the number of entries in the cue list that represent hot cues.\n\n@return the number of cue list entries that are hot cues",
"Checks if is file exist.\n\n@param filePath\nthe file path\n@return true, if is file exist",
"Compute the A matrix from the Q and R matrices.\n\n@return The A matrix."
] |
protected void associateBatched(Collection owners, Collection children)
{
CollectionDescriptor cds = getCollectionDescriptor();
PersistentField field = cds.getPersistentField();
PersistenceBroker pb = getBroker();
Class ownerTopLevelClass = pb.getTopLevelClass(getOwnerClassDescriptor().getClassOfObject());
Class collectionClass = cds.getCollectionClass(); // this collection type will be used:
HashMap ownerIdsToLists = new HashMap(owners.size());
IdentityFactory identityFactory = pb.serviceIdentity();
// initialize the owner list map
for (Iterator it = owners.iterator(); it.hasNext();)
{
Object owner = it.next();
ownerIdsToLists.put(identityFactory.buildIdentity(getOwnerClassDescriptor(), owner), new ArrayList());
}
// build the children lists for the owners
for (Iterator it = children.iterator(); it.hasNext();)
{
Object child = it.next();
// BRJ: use cld for real class, relatedObject could be Proxy
ClassDescriptor cld = getDescriptorRepository().getDescriptorFor(ProxyHelper.getRealClass(child));
Object[] fkValues = cds.getForeignKeyValues(child, cld);
Identity ownerId = identityFactory.buildIdentity(null, ownerTopLevelClass, fkValues);
List list = (List) ownerIdsToLists.get(ownerId);
if (list != null)
{
list.add(child);
}
}
// connect children list to owners
for (Iterator it = owners.iterator(); it.hasNext();)
{
Object result;
Object owner = it.next();
Identity ownerId = identityFactory.buildIdentity(owner);
List list = (List) ownerIdsToLists.get(ownerId);
if ((collectionClass == null) && field.getType().isArray())
{
int length = list.size();
Class itemtype = field.getType().getComponentType();
result = Array.newInstance(itemtype, length);
for (int j = 0; j < length; j++)
{
Array.set(result, j, list.get(j));
}
}
else
{
ManageableCollection col = createCollection(cds, collectionClass);
for (Iterator it2 = list.iterator(); it2.hasNext();)
{
col.ojbAdd(it2.next());
}
result = col;
}
Object value = field.get(owner);
if ((value instanceof CollectionProxyDefaultImpl) && (result instanceof Collection))
{
((CollectionProxyDefaultImpl) value).setData((Collection) result);
}
else
{
field.set(owner, result);
}
}
} | [
"associate the batched Children with their owner object loop over children"
] | [
"Set the time and value of the key at the given index\n@param keyIndex 0 based index of key\n@param time key time in seconds\n@param values key values",
"Sets this matrix equal to the matrix encoded in the array.\n\n@param numRows The number of rows.\n@param numCols The number of columns.\n@param rowMajor If the array is encoded in a row-major or a column-major format.\n@param data The formatted 1D array. Not modified.",
"Awaits at most 5 minutes until all pods meets the given predicate.\n\n@param filter used to wait to detect that a pod is up and running.",
"get all parts of module name apart from first",
"Whether this association contains no rows.\n\n@return {@code true} if this association contains no rows, {@code false} otherwise",
"Retrieve timephased baseline work. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present",
"Builds a batch-fetch capable loader based on the given persister, lock-mode, etc.\n\n@param persister The entity persister\n@param batchSize The maximum number of ids to batch-fetch at once\n@param lockMode The lock mode\n@param factory The SessionFactory\n@param influencers Any influencers that should affect the built query\n@param innerEntityLoaderBuilder Builder of the entity loader receiving the subset of batches\n\n@return The loader.",
"Retrieve the integer value used to represent a task field in an\nMPX file.\n\n@param value MPXJ task field value\n@return MPX field value",
"Sets the request body to the contents of a String.\n\n<p>If the contents of the body are large, then it may be more efficient to use an {@link InputStream} instead of\na String. Using a String requires that the entire body be in memory before sending the request.</p>\n\n@param body a String containing the contents of the body."
] |
private static int[] getErrorCorrection(int[] codewords, int ecclen) {
ReedSolomon rs = new ReedSolomon();
rs.init_gf(0x43);
rs.init_code(ecclen, 1);
rs.encode(codewords.length, codewords);
int[] results = new int[ecclen];
for (int i = 0; i < ecclen; i++) {
results[i] = rs.getResult(results.length - 1 - i);
}
return results;
} | [
"Returns the error correction codewords for the specified data codewords.\n\n@param codewords the codewords that we need error correction codewords for\n@param ecclen the number of error correction codewords needed\n@return the error correction codewords for the specified data codewords"
] | [
"Initialize the version properties map from the gradle.properties file, and the additional properties from the\ngradle.properties file.",
"Internal used method to retrieve object based on Identity.\n\n@param id\n@return\n@throws PersistenceBrokerException",
"returns null if no device is found.",
"Delivers the correct JSON Object for the Bounds\n\n@param bounds\n@throws org.json.JSONException",
"Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors",
"Retrieves all file version retentions matching given filters as an Iterable.\n@param api the API connection to be used by the resource.\n@param filter filters for the query stored in QueryFilter object.\n@param fields the fields to retrieve.\n@return an iterable contains information about all file version retentions matching given filter.",
"Extract a slice [from, to) of this buffer. This methods creates a copy of the specified region.\n@param from\n@param to\n@return",
"Create a smaller array from an existing one.\n\n@param strings an array containing element of type {@link String}\n@param begin the starting position of the sub-array\n@param length the number of element to consider\n@return a new array continaining only the selected elements",
"Use this API to save cacheobject."
] |
protected void beginDragging(MouseDownEvent event) {
m_dragging = true;
m_windowWidth = Window.getClientWidth();
m_clientLeft = Document.get().getBodyOffsetLeft();
m_clientTop = Document.get().getBodyOffsetTop();
DOM.setCapture(getElement());
m_dragStartX = event.getX();
m_dragStartY = event.getY();
addStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().dragging());
} | [
"Called on mouse down in the caption area, begins the dragging loop by\nturning on event capture.\n\n@see DOM#setCapture\n@see #continueDragging\n@param event the mouse down event that triggered dragging"
] | [
"Use this API to update tmtrafficaction resources.",
"Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string.",
"Use this API to fetch nstimer_binding resource of given name .",
"Updates the exceptions panel.",
"Gets the string describing the uniforms used by shaders of this type.\n@param ctx GVFContext shader is associated with\n@return uniform descriptor string\n@see #getTemplate(GVRContext) GVRShader#getUniformDescriptor()",
"Sets the RegExp pattern for the TextBox\n@param pattern\n@param invalidCharactersInNameErrorMessage",
"Computes the decomposition of the provided matrix. If no errors are detected then true is returned,\nfalse otherwise.\n@param A The matrix that is being decomposed. Not modified.\n@return If it detects any errors or not.",
"converts a java.net.URI into a string representation with empty authority, if absent and has file scheme.",
"Create a new path\n\n@param pathName friendly name of path\n@param pathValue path value or regex\n@param requestType path request type. \"GET\", \"POST\", etc"
] |
public static SimpleMatrix diag( Class type, double ...vals ) {
SimpleMatrix M = new SimpleMatrix(vals.length,vals.length,type);
for (int i = 0; i < vals.length; i++) {
M.set(i,i,vals[i]);
}
return M;
} | [
"Creates a real valued diagonal matrix of the specified type"
] | [
"Creates a producer field\n\n@param field The underlying method abstraction\n@param declaringBean The declaring bean abstraction\n@param beanManager the current manager\n@return A producer field",
"Returns the next index of the argument by decrementing 1 from the possibly parsed number\n\n@param description this String will be searched from the start for a number\n@param defaultIndex this will be returned if the match does not succeed\n@return the parsed index or the defaultIndex",
"Pauses the playback of a sound.",
"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",
"region Override Methods",
"Returns the target locales.\n\n@return the target locales, never null.",
"Returns the complete record for a single section.\n\n@param section The section to get.\n@return Request object",
"Get the collection of untagged photos.\n\nThis method requires authentication with 'read' permission.\n\n@param perPage\n@param page\n@return A Collection of Photos\n@throws FlickrException",
"Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string"
] |
private <T> MongoCollection<T> getLocalCollection(
final MongoNamespace namespace,
final Class<T> resultClass,
final CodecRegistry codecRegistry
) {
return localClient
.getDatabase(String.format("sync_user_%s", namespace.getDatabaseName()))
.getCollection(namespace.getCollectionName(), resultClass)
.withCodecRegistry(codecRegistry);
} | [
"Returns the local collection representing the given namespace.\n\n@param namespace the namespace referring to the local collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the local collection representing the given namespace."
] | [
"Convert Day instance to MPX day index.\n\n@param day Day instance\n@return day index",
"Converts the transpose of a row major matrix into a row major block matrix.\n\n@param src Original DMatrixRMaj. Not modified.\n@param dst Equivalent DMatrixRBlock. Modified.",
"The normalized string returned by this method is consistent with java.net.Inet6address.\n\nIPs are not compressed nor mixed in this representation. If this has a prefix length, that will be included in the string.",
"Added in Gerrit 2.11.",
"Return true if the class name is associated to an hidden class or matches a hide expression",
"Gets the file from which boot operations should be parsed.\n@return the file. Will not be {@code null}",
"Places a disabled marker file in the directory of the specified version.\n\n@param version to disable\n@throws PersistenceFailureException if the marker file could not be created (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).",
"Lookup the group for the specified URL.\n\n@param url\nThe url\n@return The group\n@throws FlickrException",
"generates a Meta Object Protocol method, that is used to call a non public\nmethod, or to make a call to super.\n\n@param mopCalls list of methods a mop call method should be generated for\n@param useThis true if \"this\" should be used for the naming"
] |
public static String stringMatcherByPattern(String input, String patternStr) {
String output = PcConstants.SYSTEM_FAIL_MATCH_REGEX;
// 20140105: fix the NPE issue
if (patternStr == null) {
logger.error("patternStr is NULL! (Expected when the aggregation rule is not defined at "
+ PcDateUtils.getNowDateTimeStrStandard());
return output;
}
if (input == null) {
logger.error("input (Expected when the response is null and now try to match on response) is NULL in stringMatcherByPattern() at "
+ PcDateUtils.getNowDateTimeStrStandard());
return output;
} else {
input = input.replace("\n", "").replace("\r", "");
}
logger.debug("input: " + input);
logger.debug("patternStr: " + patternStr);
Pattern patternMetric = Pattern.compile(patternStr, Pattern.MULTILINE);
final Matcher matcher = patternMetric.matcher(input);
if (matcher.matches()) {
output = matcher.group(1);
}
return output;
} | [
"this remove the linebreak.\n\n@param input\nthe input\n@param patternStr\nthe pattern str\n@return the string"
] | [
"Add a dependency to the graph\n\n@param dependency\n@param graph\n@param depth\n@param parentId",
"Disable all overrides for a specified path\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client",
"Update an existing feature. Made package private for testing purposes.\n\n@param feature feature to update\n@throws LayerException oops",
"Create a clone of this LevenbergMarquardt optimizer with a new vector for the\ntarget values and weights.\n\nThe clone will use the same objective function than this implementation,\ni.e., the implementation of {@link #setValues(RandomVariable[], RandomVariable[])} and\nthat of {@link #setDerivatives(RandomVariable[], RandomVariable[][])} is reused.\n\nThe initial values of the cloned optimizer will either be the original\ninitial values of this object or the best parameters obtained by this\noptimizer, the latter is used only if this optimized signals a {@link #done()}.\n\n@param newTargetVaues New list of target values.\n@param newWeights New list of weights.\n@param isUseBestParametersAsInitialParameters If true and this optimizer is done(), then the clone will use this.{@link #getBestFitParameters()} as initial parameters.\n@return A new LevenbergMarquardt optimizer, cloning this one except modified target values and weights.\n@throws CloneNotSupportedException Thrown if this optimizer cannot be cloned.",
"Pops the top event off the current event stack. This action has to be\nperformed immediately after the event has been dispatched to all\nlisteners.\n\n@param <L> Type of the listener.\n@param expected The Event which is expected at the top of the stack.\n@see #pushEvent(Event)",
"Microsoft Project bases the order of tasks displayed on their ID\nvalue. This method takes the hierarchical structure of tasks\nrepresented in MPXJ and renumbers the ID values to ensure that\nthis structure is displayed as expected in Microsoft Project. This\nis typically used to deal with the case where a hierarchical task\nstructure has been created programmatically in MPXJ.",
"Reduce the given value to the nearest smaller 1 significant digit number starting with 1, 2 or 5.\n\n@param value the value to find a nice number for.\n@param scaleUnit the unit of the value.\n@param lockUnits if set, the values are not scaled to a \"nicer\" unit.",
"Get the correct google api key.\nTries to read a workplace key first.\n\n@param cms CmsObject\n@param sitePath site path\n@return key value\n@throws CmsException exception",
"Reads the given text stream and compressed its content.\n\n@param stream The input stream\n@return A byte array containing the GZIP-compressed content of the stream\n@throws IOException If an error ocurred"
] |
private CompiledStatement assignStatementArguments(CompiledStatement stmt) throws SQLException {
boolean ok = false;
try {
if (limit != null) {
// we use this if SQL statement LIMITs are not supported by this database type
stmt.setMaxRows(limit.intValue());
}
// set any arguments if we are logging our object
Object[] argValues = null;
if (logger.isLevelEnabled(Level.TRACE) && argHolders.length > 0) {
argValues = new Object[argHolders.length];
}
for (int i = 0; i < argHolders.length; i++) {
Object argValue = argHolders[i].getSqlArgValue();
FieldType fieldType = argFieldTypes[i];
SqlType sqlType;
if (fieldType == null) {
sqlType = argHolders[i].getSqlType();
} else {
sqlType = fieldType.getSqlType();
}
stmt.setObject(i, argValue, sqlType);
if (argValues != null) {
argValues[i] = argValue;
}
}
logger.debug("prepared statement '{}' with {} args", statement, argHolders.length);
if (argValues != null) {
// need to do the (Object) cast to force args to be a single object
logger.trace("prepared statement arguments: {}", (Object) argValues);
}
ok = true;
return stmt;
} finally {
if (!ok) {
IOUtils.closeThrowSqlException(stmt, "statement");
}
}
} | [
"Assign arguments to the statement.\n\n@return The statement passed in or null if it had to be closed on error."
] | [
"Read an optional JSON array.\n@param json the JSON Object that has the array as element\n@param key the key for the array in the provided JSON object\n@return the array or null if reading the array fails.",
"Returns true if we should skip this bar, i.e. the bar only has a single child task.\n\n@param row bar row to test\n@return true if this bar should be skipped",
"Sets the parent node.\n\n@param parentNode The parent of this node. May be null, if this is a root node.",
"Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.",
"Adds a slash to a path if it doesn't end with a slash.\n\n@param folderName The path to append a possible slash.\n@return The new, correct path.",
"Make an individual Datum out of the data list info, focused at position\nloc.\n@param info A List of WordInfo objects\n@param loc The position in the info list to focus feature creation on\n@param featureFactory The factory that constructs features out of the item\n@return A Datum (BasicDatum) representing this data instance",
"Convert an object to another object with given type\n\n@param <T>\n@param source\nobject to convert\n@param typeReference\nreference to {@link java.lang.reflect.Type}\n@return the converted object if conversion failed\n@throws ConverterException",
"Returns a module\n\n@param moduleId String\n@return DbModule",
"All tests completed."
] |
public static final Date parseDate(String value)
{
Date result = null;
try
{
if (value != null && !value.isEmpty())
{
result = DATE_FORMAT.get().parse(value);
}
}
catch (ParseException ex)
{
// Ignore
}
return result;
} | [
"Parse a date value.\n\n@param value String representation\n@return Date instance"
] | [
"This function returns the first external IP address encountered\n\n@return IP address or null\n@throws Exception",
"Visits a method instruction. A method instruction is an instruction that\ninvokes a method.\n\n@param opcode\nthe opcode of the type instruction to be visited. This opcode\nis either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or\nINVOKEINTERFACE.\n@param owner\nthe internal name of the method's owner class (see\n{@link Type#getInternalName() getInternalName}).\n@param name\nthe method's name.\n@param desc\nthe method's descriptor (see {@link Type Type}).\n@param itf\nif the method's owner class is an interface.",
"Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.",
"Creates an immutable list that consists of the elements in the given collection. If the given collection is already an immutable list,\nit is returned directly.\n\n@param source the given collection\n@return an immutable list",
"Add utility routes the router\n\n@param router",
"Answer the counted size\n\n@return int",
"Use this API to fetch aaauser_binding resource of given name .",
"Enforces the correct srid on incoming features.\n\n@param feature\nobject to enforce srid on\n@throws LayerException\nproblem getting or setting srid",
"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"
] |
public static void startAndWait(PersistentNode node, int maxWaitSec) {
node.start();
int waitTime = 0;
try {
while (node.waitForInitialCreate(1, TimeUnit.SECONDS) == false) {
waitTime += 1;
log.info("Waited " + waitTime + " sec for ephemeral node to be created");
if (waitTime > maxWaitSec) {
throw new IllegalStateException("Failed to create ephemeral node");
}
}
} catch (InterruptedException e) {
throw new IllegalStateException(e);
}
} | [
"Starts the ephemeral node and waits for it to be created\n\n@param node Node to start\n@param maxWaitSec Maximum time in seconds to wait"
] | [
"Get a list of referrers from a given domain to a photo.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html\"",
"Handles incoming Application Update Request.\n@param incomingMessage the request message to process.",
"Private helper method which decodes the Stitch error from the body of an HTTP `Response`\nobject. If the error is successfully decoded, this function will throw the error for the end\nuser to eventually consume. If the error cannot be decoded, this is likely not an error from\nthe Stitch server, and this function will return an error message that the calling function\nshould use as the message of a StitchServiceException with an unknown code.",
"Sets the width and height of the canvas the text is drawn to.\n\n@param width\nwidth of the new canvas.\n\n@param height\nhegiht of the new canvas.",
"Matches an array value if it contains all the elements of the argument array\n@param rhs The arguments\n@return PredicateExpression: $all rhs",
"Register the ChangeHandler to become notified if the user changes the slider.\nThe Handler is called when the user releases the mouse only at the end of the slide\noperation.",
"Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string.",
"Initialize current thread's JobContext using specified copy\n@param origin the original job context",
"Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store"
] |
public boolean matches(PathAddress address) {
if (address == null) {
return false;
}
if (equals(address)) {
return true;
}
if (size() != address.size()) {
return false;
}
for (int i = 0; i < size(); i++) {
PathElement pe = getElement(i);
PathElement other = address.getElement(i);
if (!pe.matches(other)) {
// Could be a multiTarget with segments
if (pe.isMultiTarget() && !pe.isWildcard()) {
boolean matched = false;
for (String segment : pe.getSegments()) {
if (segment.equals(other.getValue())) {
matched = true;
break;
}
}
if (!matched) {
return false;
}
} else {
return false;
}
}
}
return true;
} | [
"Check if this path matches the address path.\nAn address matches this address if its path elements match or are valid\nmulti targets for this path elements. Addresses that are equal are matching.\n\n@param address The path to check against this path. If null, this method\nreturns false.\n@return true if the provided path matches, false otherwise."
] | [
"Gets the flags associated with this attribute.\n@return the flags. Will not return {@code null}",
"Obtains a local date in Symmetry010 calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Symmetry010 era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code IsoEra}",
"Parse parameters from this request using HTTP.\n\n@param req The ServletRequest containing all request parameters.\n@param cms The OpenCms object.\n@return CmsSpellcheckingRequest object that contains parsed parameters.",
"Enable clipping for the Widget. Widget content including its children will be clipped by a\nrectangular View Port. By default clipping is disabled.",
"Iterates through this file line by line, splitting each line using\nthe given regex separator. For each line, the given closure is called with\na single parameter being the list of strings computed by splitting the line\naround matches of the given regular expression.\nFinally the resources used for processing the file are closed.\n\n@param self a File\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see IOGroovyMethods#splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5",
"Resolves the gav using the resolver. If the gav corresponds to the project artifact and is an unresolved version\nfor a RELEASE or LATEST, the gav is resolved such it a release not newer than the project version is found that\noptionally corresponds to the provided version regex, if provided.\n\n<p>If the gav exactly matches the current project, the file of the artifact is found on the filesystem in\ntarget directory and the resolver is ignored.\n\n@param project the project to restrict by, if applicable\n@param gav the gav to resolve\n@param versionRegex the optional regex the version must match to be considered.\n@param resolver the version resolver to use\n@return the resolved artifact matching the criteria.\n@throws VersionRangeResolutionException on error\n@throws ArtifactResolutionException on error",
"symbol for filling padding position in output",
"Get range around median containing specified percentage of values.\n@param values Values.\n@param percent Values percentage around median.\n@return Returns the range which containes specifies percentage of values.",
"Processes one dump file with the given dump file processor, handling\nexceptions appropriately.\n\n@param dumpFile\nthe dump file to process\n@param dumpFileProcessor\nthe dump file processor to use"
] |
public static Object lookup(String jndiName)
{
if(log.isDebugEnabled()) log.debug("lookup("+jndiName+") was called");
try
{
return getContext().lookup(jndiName);
}
catch (NamingException e)
{
throw new OJBRuntimeException("Lookup failed for: " + jndiName, e);
}
catch(OJBRuntimeException e)
{
throw e;
}
} | [
"Lookup an object instance from JNDI context.\n\n@param jndiName JNDI lookup name\n@return Matching object or <em>null</em> if none found."
] | [
"Concat a List into a CSV String.\n@param list list to concat\n@return csv string",
"Reads baseline values for the current resource.\n\n@param xmlResource MSPDI resource instance\n@param mpxjResource MPXJ resource instance",
"Apply clipping to the features in a tile. The tile and its features should already be in map space.\n\n@param tile\ntile to put features in\n@param scale\nscale\n@param panOrigin\nWhen panning on the client, only this parameter changes. So we need to be aware of it as we calculate\nthe maxScreenEnvelope.\n@throws GeomajasException oops",
"Set an attribute.\n\n@param name attribute name.\n@param value attribute value.",
"Get a state handler for a given patching artifact.\n\n@param artifact the patching artifact\n@param <P>\n@param <S>\n@return the state handler, {@code null} if there is no handler registered for the given artifact",
"Validate that the overlay exists. If it doesn't exist, throws an\nexception if not in batch mode or if failInBatch is true. In batch mode,\nwe could be in the case that the overlay doesn't exist yet.",
"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",
"Start the drag operation of a scene object with a rigid body.\n\n@param sceneObject Scene object with a rigid body attached to it.\n@param hitX rel position in x-axis.\n@param hitY rel position in y-axis.\n@param hitZ rel position in z-axis.\n@return true if success, otherwise returns false.",
"Use this API to fetch all the vpnsessionaction resources that are configured on netscaler."
] |
public static ComplexNumber Function2D(int x, int y, double wavelength, double orientation, double phaseOffset, double gaussVariance, double aspectRatio) {
double X = x * Math.cos(orientation) + y * Math.sin(orientation);
double Y = -x * Math.sin(orientation) + y * Math.cos(orientation);
double envelope = Math.exp(-((X * X + aspectRatio * aspectRatio * Y * Y) / (2 * gaussVariance * gaussVariance)));
double real = Math.cos(2 * Math.PI * (X / wavelength) + phaseOffset);
double imaginary = Math.sin(2 * Math.PI * (X / wavelength) + phaseOffset);
return new ComplexNumber(envelope * real, envelope * imaginary);
} | [
"2-D Complex Gabor function.\n\n@param x X axis coordinate.\n@param y Y axis coordinate.\n@param wavelength Wavelength.\n@param orientation Orientation.\n@param phaseOffset Phase offset.\n@param gaussVariance Gaussian variance.\n@param aspectRatio Aspect ratio.\n@return Gabor response."
] | [
"gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeClassCacheEntry(String)\n@see #setClassCacheEntry(Class)\n@see #clearCache()",
"Straight conversion from an ObjectName to a PathAddress.\n\nThere may not necessarily be a Resource at this path address (if that correspond to a pattern) but it must\nmatch a model in the registry.\n\n@param domain the name of the caller's JMX domain\n@param registry the root resource for the management model\n@param name the ObjectName to convert\n\n@return the PathAddress, or {@code null} if no address matches the object name",
"Creates a new instance from the given configuration file.\n\n@throws IOException if failed to load the configuration from the specified file",
"This is a convenience method provided to allow a day to be set\nas working or non-working, by using the day number to\nidentify the required day.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"Sets the license for a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo to update the license for.\n@param licenseId\nThe license to apply, or 0 (zero) to remove the current license.\n@throws FlickrException",
"Call rollback on the underlying connection.",
"Stores all entries contained in the given map in the cache.",
"Wait for exclusive permit during a timeout in milliseconds.\n\n@return number of acquired permits if > 0",
"When it is time to actually close a client, do so, and clean up the related data structures.\n\n@param client the client which has been idle for long enough to be closed"
] |
public double getYield(double bondPrice, AnalyticModel model) {
GoldenSectionSearch search = new GoldenSectionSearch(-2.0, 2.0);
while(search.getAccuracy() > 1E-11 && !search.isDone()) {
double x = search.getNextPoint();
double fx=getValueWithGivenYield(0.0,x,model);
double y = (bondPrice-fx)*(bondPrice-fx);
search.setValue(y);
}
return search.getBestPoint();
} | [
"Returns the yield value such that the sum of cash flows of the bond discounted with the yield curve\ncoincides with a given price.\n\n@param bondPrice The target price as double.\n@param model The model under which the product is valued.\n@return The optimal yield value."
] | [
"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",
"Set the visibility of the object.\n\n@see Visibility\n@param visibility\nThe visibility of the object.\n@return {@code true} if the visibility was changed, {@code false} if it\nwasn't.",
"Helper function that drops all local databases for every client.",
"Read configuration from zookeeper",
"Allocates a database connection.\n\n@throws SQLException",
"Process a SQLite database PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance",
"Sets the replacement var map.\n\n@param replacementVarMap\nthe replacement var map\n@return the parallel task builder",
"This method is used to associate a child task with the current\ntask instance. It has package access, and has been designed to\nallow the hierarchical outline structure of tasks in an MPX\nfile to be constructed as the file is read in.\n\n@param child Child task.\n@param childOutlineLevel Outline level of the child task.",
"This method maps the task unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param taskFixedMeta Fixed meta data for this task\n@param taskFixedData Fixed data for this task\n@param taskVarData Variable task data\n@return Mapping between task identifiers and block position"
] |
protected void recycleChildren() {
for (ListItemHostWidget host: getAllHosts()) {
recycle(host);
}
mContent.onTransformChanged();
mContent.requestLayout();
} | [
"Recycle all views in the list. The host views might be reused for other data to\nsave resources on creating new widgets."
] | [
"Write calendar hours.\n\n@param parentCalendar parent calendar instance\n@param record calendar hours instance\n@throws IOException",
"Generates a Map of query parameters for Module regarding the filters\n\n@return Map<String, Object>",
"Serialize a parameterized object to an OutputStream.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType<MyModel<OtherModel>>() { }, os);\n@param os The OutputStream being written to.",
"Returns a compact representation of all of the tags the task has.\n\n@param task The task to get tags on.\n@return Request object",
"We will always try to gather as many results as possible and never throw an exception.\n\nTODO: Make MemberResponse hold an exception that we can populate if something bad happens so we always\nget to return something for a member in order to indicate a failure. Getting the result when there\nis an error should throw an exception.\n\n@param execSvc\n@param members\n@param callable\n@param maxWaitTime - a value of 0 indicates forever\n@param unit\n@return",
"Returns all values that can be selected in the widget.\n@param cms the current CMS object\n@param rootPath the root path to the currently edited xml file (sitemap config)\n@param allRemoved flag, indicating if all inheritedly available formatters should be disabled\n@return all values that can be selected in the widget.",
"Non-supported in JadeAgentIntrospector",
"Gets the instance associated with the current thread.",
"Returns the corporate dependencies of a module\n\n@param module Module\n@param corporateFilters List<String>\n@return List<Dependency>"
] |
protected NodeData createBodyStyle()
{
NodeData ret = createBlockStyle();
TermFactory tf = CSSFactory.getTermFactory();
ret.push(createDeclaration("background-color", tf.createColor(255, 255, 255)));
return ret;
} | [
"Creates a style definition used for the body element.\n@return The body style definition."
] | [
"Method which performs strength checks on password. It returns outcome which can be used by CLI.\n\n@param isAdminitrative - administrative checks are less restrictive. This means that weak password or one which violates restrictions is not indicated as failure.\nAdministrative checks are usually performed by admin changing/setting default password for user.\n@param userName - the name of user for which password is set.\n@param password - password.\n@return",
"Analyzes a failure thrown connecting to the master for causes that indicate\nsome problem not likely to be resolved by immediately retrying. If found,\nthrows an exception highlighting the underlying cause. If the cause is not\none of the ones understood by this method, the method returns normally.\n\n@throws org.jboss.as.domain.controller.SlaveRegistrationException if the remote HC rejected the request\n@throws IllegalStateException for other failures understood by this method",
"Use this API to link sslcertkey resources.",
"Gets currently visible user.\n\n@return List of user",
"Convert MPX day index to Day instance.\n\n@param day day index\n@return Day instance",
"Iterates over all the documents, adding each to the given target.\n\n@param target the collection to insert into\n@param <A> the collection type\n@return the target",
"Installs a path service.\n\n@param name the name to use for the service\n@param path the relative portion of the path\n@param possiblyAbsolute {@code true} if {@code path} may be an {@link #isAbsoluteUnixOrWindowsPath(String) absolute path}\nand should be {@link AbsolutePathService installed as such} if it is, with any\n{@code relativeTo} parameter ignored\n@param relativeTo the name of the path that {@code path} may be relative to\n@param serviceTarget the {@link ServiceTarget} to use to install the service\n@return the ServiceController for the path service",
"Finds all nWise combinations of a set of variables, each with a given domain of values\n\n@param nWise the number of variables in each combination\n@param coVariables the varisbles\n@param variableDomains the domains\n@return all nWise combinations of the set of variables",
"Use this API to fetch sslocspresponder resource of given name ."
] |
public static boolean setCustomRequestForDefaultClient(String profileName, String pathName, String customData) {
try {
return setCustomForDefaultClient(profileName, pathName, false, customData);
} catch (Exception e) {
e.printStackTrace();
}
return false;
} | [
"set custom request for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise"
] | [
"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.",
"Add properties to 'properties' map on transaction start\n@param type - of transaction",
"Add a range to an exception, ensure that we don't try to add null ranges.\n\n@param exception target exception\n@param start exception start\n@param finish exception finish",
"Adds a free connection.\n\n@param connectionHandle\n@throws SQLException on error",
"Counts the number of documents in the collection.\n\n@return a task containing the number of documents in the collection",
"This method maps the resource unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param rscFixedMeta resource fixed meta data\n@param rscFixedData resource fixed data\n@return map of resource IDs to resource data",
"Sets the quaternion of the keyframe.",
"Reads a time value. The time is represented as tenths of a\nminute since midnight.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value",
"Processes the template for the object cache of the current class definition.\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\""
] |
public static vpnsessionpolicy_aaauser_binding[] get(nitro_service service, String name) throws Exception{
vpnsessionpolicy_aaauser_binding obj = new vpnsessionpolicy_aaauser_binding();
obj.set_name(name);
vpnsessionpolicy_aaauser_binding response[] = (vpnsessionpolicy_aaauser_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch vpnsessionpolicy_aaauser_binding resources of given name ."
] | [
"create partitions in the broker\n\n@param topic topic name\n@param partitionNum partition numbers\n@param enlarge enlarge partition number if broker configuration has\nsetted\n@return partition number in the broker\n@throws IOException if an I/O error occurs",
"end class SAXErrorHandler",
"Sobel method to generate bump map from a height map\n\n@param input - A height map\n@return bump map",
"Add groups to the tree.\n\n@param parentNode parent tree node\n@param file group container",
"Make a copy.",
"Returns the Field for a given parent class and a dot-separated path of\nfield names.\n\n@param clazz\nParent class.\n@param path\nPath to the desired field.",
"Creates a new DMatrixRMaj around the provided data. The data must encode\na row-major matrix. Any modification to the returned matrix will modify the\nprovided data.\n\n@param numRows Number of rows in the matrix.\n@param numCols Number of columns in the matrix.\n@param data Data that is being wrapped. Referenced Saved.\n@return A matrix which references the provided data internally.",
"Compute 1-dimensional Perlin noise.\n@param x the x value\n@return noise value at x in the range -1..1",
"Adds a basic LHS OPERATOR RHS block.\n\n@param list parent criteria list\n@param block current block"
] |
public synchronized void cleanWaitTaskQueue() {
for (ParallelTask task : waitQ) {
task.setState(ParallelTaskState.COMPLETED_WITH_ERROR);
task.getTaskErrorMetas().add(
new TaskErrorMeta(TaskErrorType.USER_CANCELED, "NA"));
logger.info(
"task {} removed from wait q. This task has been marked as USER CANCELED.",
task.getTaskId());
}
waitQ.clear();
} | [
"Clean wait task queue."
] | [
"Extract calendar data from the file.\n\n@throws SQLException",
"Add a creatable \"post-run\" dependent for this task item.\n\n@param creatable the creatable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve created \"post-run\" dependent",
"Does the headset the device is docked into have a dedicated home key\n@return",
"The only indication that a task is a SubProject is the contents\nof the subproject file name field. We test these here then add a skeleton\nsubproject structure to match the way we do things with MPP files.",
"Helper method to get a list of node ids.\n\n@param nodeList",
"Pretty print a progress update after each batch complete.\n\n@param batchCount current batch\n@param numBatches total number of batches\n@param partitionStoreCount partition stores migrated\n@param numPartitionStores total number of partition stores to migrate\n@param totalTimeMs total time, in milliseconds, of execution thus far.",
"This method allows a pre-existing resource calendar to be attached to a\nresource.\n\n@param calendar resource calendar",
"Uninstall current location collection client.\n\n@return true if uninstall was successful",
"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"
] |
protected final void _onConnect(WebSocketContext context) {
if (null != connectionListener) {
connectionListener.onConnect(context);
}
connectionListenerManager.notifyFreeListeners(context, false);
Act.eventBus().emit(new WebSocketConnectEvent(context));
} | [
"Called by implementation class once websocket connection established\nat networking layer.\n@param context the websocket context"
] | [
"Use this API to change sslcertkey.",
"Converts an update description BSON document from a MongoDB Change Event into an\nUpdateDescription object.\n\n@param document the\n@return the converted UpdateDescription",
"Returns the index of the eigenvalue which has the smallest magnitude.\n\n@return index of the smallest magnitude eigen value.",
"helper to calculate the statusBar height\n\n@param context\n@param force pass true to get the height even if the device has no translucent statusBar\n@return",
"Call the onQueryExecuteTimeLimitExceeded hook if necessary\n@param sql sql statement that took too long\n@param queryStartTime time when query was started.",
"Remove all of the audio sources from the audio manager.\nThis will stop all sound from playing.",
"Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator",
"Gracefully stop the engine",
"Use this API to fetch authenticationradiuspolicy_vpnvserver_binding resources of given name ."
] |
public static Diagram parseJson(JSONObject json,
Boolean keepGlossaryLink) throws JSONException {
ArrayList<Shape> shapes = new ArrayList<Shape>();
HashMap<String, JSONObject> flatJSON = flatRessources(json);
for (String resourceId : flatJSON.keySet()) {
parseRessource(shapes,
flatJSON,
resourceId,
keepGlossaryLink);
}
String id = "canvas";
if (json.has("resourceId")) {
id = json.getString("resourceId");
shapes.remove(new Shape(id));
}
;
Diagram diagram = new Diagram(id);
// remove Diagram
// (Diagram)getShapeWithId(json.getString("resourceId"), shapes);
parseStencilSet(json,
diagram);
parseSsextensions(json,
diagram);
parseStencil(json,
diagram);
parseProperties(json,
diagram,
keepGlossaryLink);
parseChildShapes(shapes,
json,
diagram);
parseBounds(json,
diagram);
diagram.setShapes(shapes);
return diagram;
} | [
"do the parsing on an JSONObject, assumes that the json is hierarchical\nordered, so all shapes are reachable over child relations\n@param json hierarchical JSON object\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException"
] | [
"Populate the expanded exceptions list based on the main exceptions list.\nWhere we find recurring exception definitions, we generate individual\nexceptions for each recurrence to ensure that we account for them correctly.",
"seeks to a particular month\n\n@param direction the direction to seek: two possibilities\n'<' go backward\n'>' go forward\n\n@param seekAmount the amount to seek. Must be guaranteed to parse as an integer\n\n@param month the month to seek to. Must be guaranteed to parse as an integer\nbetween 1 and 12",
"Check from another ConcurrentGroupServerUpdatePolicy whose plans are meant to\nexecute once this policy's plans are successfully completed.\n\n@return <code>true</code> if the successor can proceed",
"Convert an Integer value into a String.\n\n@param value Integer value\n@return String value",
"Move sections relative to each other in a board view. One of\n`before_section` or `after_section` is required.\n\nSections cannot be moved between projects.\n\nAt this point in time, moving sections is not supported in list views, only board views.\n\nReturns an empty data block.\n\n@param project The project in which to reorder the given section\n@return Request object",
"Formats a resource type.\n\n@param resource MPXJ resource\n@return Primavera resource type",
"Returns a list of bindings where provided queue is the destination.\n\n@param vhost vhost of the exchange\n@param queue destination queue name\n@return list of bindings",
"Retrieve the next available field.\n\n@return FieldType instance for the next available field",
"Checks if a property's type is valid to be included in the report.\n@param _property the property.\n@return true if the property is is of a valid type."
] |
@SuppressForbidden("legitimate sysstreams.")
public static void warn(String message, Throwable t) {
PrintStream w = (warnings == null ? System.err : warnings);
try {
w.print("WARN: ");
w.print(message);
if (t != null) {
w.print(" -> ");
try {
t.printStackTrace(w);
} catch (OutOfMemoryError e) {
// Ignore, OOM.
w.print(t.getClass().getName());
w.print(": ");
w.print(t.getMessage());
w.println(" (stack unavailable; OOM)");
}
} else {
w.println();
}
w.flush();
} catch (OutOfMemoryError t2) {
w.println("ERROR: Couldn't even serialize a warning (out of memory).");
} catch (Throwable t2) {
// Can't do anything, really. Probably an OOM?
w.println("ERROR: Couldn't even serialize a warning.");
}
} | [
"Warning emitter. Uses whatever alternative non-event communication channel is."
] | [
"Write flow id to message.\n\n@param message the message\n@param flowId the flow id",
"This method is used to parse a string representation of a time\nunit, and return the appropriate constant value.\n\n@param units string representation of a time unit\n@param locale target locale\n@return numeric constant\n@throws MPXJException normally thrown when parsing fails",
"Add a path to a profile, returns the id\n\n@param id ID of profile\n@param pathname name of path\n@param actualPath value of path\n@return ID of path created\n@throws Exception exception",
"This method retrieves an integer of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required integer data",
"Removes CRs but returns LFs",
"Tests that the area is valid geojson, the style ref is valid or null and the display is non-null.",
"Enforces the correct srid on incoming features.\n\n@param feature\nobject to enforce srid on\n@throws LayerException\nproblem getting or setting srid",
"Convert subQuery to SQL\n@param subQuery the subQuery value of SelectionCriteria",
"Use this API to fetch hanode_routemonitor6_binding resources of given name ."
] |
static BsonDocument getDocumentVersionDoc(final BsonDocument document) {
if (document == null || !document.containsKey(DOCUMENT_VERSION_FIELD)) {
return null;
}
return document.getDocument(DOCUMENT_VERSION_FIELD, null);
} | [
"Returns the version document of the given document, if any; returns null otherwise.\n@param document the document to get the version from.\n@return the version of the given document, if any; returns null otherwise."
] | [
"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.",
"Use this API to save cachecontentgroup.",
"Creates the request.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception",
"Computes the null space using QR decomposition. This is much faster than using SVD\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"Sets the site root.\n\n@param siteRoot the site root",
"Sets the top padding character for all cells in the table.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining",
"A henson navigator is a class that helps a consumer to consume the navigation api that it\ndeclares in its dependencies. The henson navigator will wrap the intent builders. Thus, a\nhenson navigator, is driven by consumption of intent builders, whereas the henson classes are\ndriven by the production of an intent builder.\n\n<p>This task is created per android variant:\n\n<ul>\n<li>we scan the variant compile configuration for navigation api dependencies\n<li>we generate a henson navigator class for this variant that wraps the intent builders\n</ul>\n\n@param variant the variant for which to create a builder.\n@param hensonNavigatorPackageName the package name in which we create the class.",
"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)}",
"This method is used to change the credentials of CleverTap account Id and token programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token"
] |
public void updateUniqueCounters()
{
//
// Update task unique IDs
//
for (Task task : m_parent.getTasks())
{
int uniqueID = NumberHelper.getInt(task.getUniqueID());
if (uniqueID > m_taskUniqueID)
{
m_taskUniqueID = uniqueID;
}
}
//
// Update resource unique IDs
//
for (Resource resource : m_parent.getResources())
{
int uniqueID = NumberHelper.getInt(resource.getUniqueID());
if (uniqueID > m_resourceUniqueID)
{
m_resourceUniqueID = uniqueID;
}
}
//
// Update calendar unique IDs
//
for (ProjectCalendar calendar : m_parent.getCalendars())
{
int uniqueID = NumberHelper.getInt(calendar.getUniqueID());
if (uniqueID > m_calendarUniqueID)
{
m_calendarUniqueID = uniqueID;
}
}
//
// Update assignment unique IDs
//
for (ResourceAssignment assignment : m_parent.getResourceAssignments())
{
int uniqueID = NumberHelper.getInt(assignment.getUniqueID());
if (uniqueID > m_assignmentUniqueID)
{
m_assignmentUniqueID = uniqueID;
}
}
} | [
"This method is called to ensure that after a project file has been\nread, the cached unique ID values used to generate new unique IDs\nstart after the end of the existing set of unique IDs."
] | [
"Computes the ratio of the smallest value to the largest. Does not assume\nthe array is sorted first\n@param sv array\n@return smallest / largest",
"Get file size\n\n@return Long",
"Obtain the class of a given className\n\n@param className\n@return\n@throws Exception",
"Static factory method to build a JSON Patch out of a JSON representation.\n\n@param node the JSON representation of the generated JSON Patch\n@return a JSON Patch\n@throws IOException input is not a valid JSON patch\n@throws NullPointerException input is null",
"Returns a string that should be used as a label for the given item. The\nmethod also ensures that each label is used for only one class. Other\nclasses with the same label will have their QID added for disambiguation.\n\n@param entityIdValue\nthe item to label\n@return the label",
"Writes back hints file.",
"Use this API to fetch all the callhome resources that are configured on netscaler.",
"Print the visibility adornment of element e prefixed by\nany stereotypes",
"end class SAXErrorHandler"
] |
public static Cluster createUpdatedCluster(Cluster currentCluster,
int stealerNodeId,
List<Integer> donatedPartitions) {
Cluster updatedCluster = Cluster.cloneCluster(currentCluster);
// Go over every donated partition one by one
for(int donatedPartition: donatedPartitions) {
// Gets the donor Node that owns this donated partition
Node donorNode = updatedCluster.getNodeForPartitionId(donatedPartition);
Node stealerNode = updatedCluster.getNodeById(stealerNodeId);
if(donorNode == stealerNode) {
// Moving to the same location = No-op
continue;
}
// Update the list of partitions for this node
donorNode = removePartitionFromNode(donorNode, donatedPartition);
stealerNode = addPartitionToNode(stealerNode, donatedPartition);
// Sort the nodes
updatedCluster = updateCluster(updatedCluster,
Lists.newArrayList(donorNode, stealerNode));
}
return updatedCluster;
} | [
"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"
] | [
"Microsoft Project bases the order of tasks displayed on their ID\nvalue. This method takes the hierarchical structure of tasks\nrepresented in MPXJ and renumbers the ID values to ensure that\nthis structure is displayed as expected in Microsoft Project. This\nis typically used to deal with the case where a hierarchical task\nstructure has been created programmatically in MPXJ.",
"Method must be invoked upon completion of a rebalancing task. It is the\ntask's responsibility to do so.\n\n@param stealerId\n@param donorId",
"Use this API to fetch a appfwglobal_auditsyslogpolicy_binding resources.",
"Read the tag structure from the provided stream.",
"Extract raw table data from the input stream.\n\n@param is input stream",
"Removes from this set all of its elements that are contained in the specified members array\n@param members the members to remove\n@return the number of members actually removed",
"Print a date.\n\n@param value Date instance\n@return string representation of a date",
"Performs a similar transform on A-pI",
"Get the bar size.\n\n@param settings Parameters for rendering the scalebar."
] |
public static Number parseDouble(String value) throws ParseException
{
Number result = null;
value = parseString(value);
// If we still have a value
if (value != null && !value.isEmpty() && !value.equals("-1 -1"))
{
int index = value.indexOf("E+");
if (index != -1)
{
value = value.substring(0, index) + 'E' + value.substring(index + 2, value.length());
}
if (value.indexOf('E') != -1)
{
result = DOUBLE_FORMAT.get().parse(value);
}
else
{
result = Double.valueOf(value);
}
}
return result;
} | [
"Parse the string representation of a double.\n\n@param value string representation\n@return Java representation\n@throws ParseException"
] | [
"add a foreign key field",
"Access all of the elements of the collection that evaluate to true for the\nprovided query predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tAn iterator used to iterate over the elements that evaluated true for the predicate.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.",
"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",
"Returns a new iterator filtering any null references.\n\n@param unfiltered\nthe unfiltered iterator. May not be <code>null</code>.\n@return an unmodifiable iterator containing all elements of the original iterator without any <code>null</code>\nreferences. Never <code>null</code>.",
"Handler for week of month changes.\n@param event the change event.",
"The normalized string returned by this method is consistent with java.net.Inet6address.\nIPs are not compressed nor mixed in this representation.",
"Accessor method to retrieve a Boolean instance.\n\n@param field the index number of the field to be retrieved\n@param falseText locale specific text representing false\n@return the value of the required field",
"Checks if the given AnnotatedType is sensible, otherwise provides warnings.",
"Calculates the radius to a given boundedness value\n@param D Diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param B Boundedeness\n@return Confinement radius"
] |
public void delete(Object obj, boolean ignoreReferences) throws PersistenceBrokerException
{
if(isTxCheck() && !isInTransaction())
{
if(logger.isEnabledFor(Logger.ERROR))
{
String msg = "No running PB-tx found. Please, only delete objects in context of a PB-transaction" +
" to avoid side-effects - e.g. when rollback of complex objects.";
try
{
throw new Exception("** Delete object without active PersistenceBroker transaction **");
}
catch(Exception e)
{
logger.error(msg, e);
}
}
}
try
{
doDelete(obj, ignoreReferences);
}
finally
{
markedForDelete.clear();
}
} | [
"Deletes the concrete representation of the specified object in the underlying\npersistence system. This method is intended for use in top-level api or\nby internal calls.\n\n@param obj The object to delete.\n@param ignoreReferences With this flag the automatic deletion/unlinking\nof references can be suppressed (independent of the used auto-delete setting in metadata),\nexcept {@link org.apache.ojb.broker.metadata.SuperReferenceDescriptor}\nthese kind of reference (descriptor) will always be performed. If <em>true</em>\nall \"normal\" referenced objects will be ignored, only the specified object is handled.\n@throws PersistenceBrokerException"
] | [
"We have more input since wait started",
"Cancel the pause operation",
"This is a convenience method used to add a calendar called\n\"Standard\" to the project, and populate it with a default working week\nand default working hours.\n\n@return a new default calendar",
"Draw the specified geometry.\n\n@param geometry geometry to draw\n@param symbol symbol for geometry\n@param fillColor fill colour\n@param strokeColor stroke colour\n@param lineWidth line width\n@param clipRect clipping rectangle",
"Check if underlying connection was alive.",
"Use this API to fetch vpath resource of given name .",
"Receives a PropertyColumn and returns a JRDesignField",
"Remove a license from an artifact\n\n@param gavc String The artifact GAVC\n@param licenseId String The license id to be removed.",
"Creates a ServiceCall from an observable object.\n\n@param observable the observable to create from\n@param <T> the type of the response\n@return the created ServiceCall"
] |
private final Object getObject(String name)
{
if (m_map.containsKey(name) == false)
{
throw new IllegalArgumentException("Invalid column name " + name);
}
Object result = m_map.get(name);
return (result);
} | [
"Retrieve a value from the map, ensuring that a key exists in the map\nwith the specified name.\n\n@param name column name\n@return column value"
] | [
"Fetch flag resource by Country\n\n@param country Country\n@return int of resource | 0 value if not exists",
"set custom response for the default profile's default client\n\n@param pathName friendly name of path\n@param customData custom response/request data\n@return true if success, false otherwise",
"Redirect standard streams so that the output can be passed to listeners.",
"Delete the given file in a separate thread\n\n@param file The file to delete",
"Writes triples which conect properties with there corresponding rdf\nproperties for statements, simple statements, qualifiers, reference\nattributes and values.\n\n@param document\n@throws RDFHandlerException",
"Converts a parameter map to the parameter string.\n@param parameters the parameter map.\n@return the parameter string.",
"request token from GCM",
"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",
"Read holidays from the database and create calendar exceptions."
] |
public static int cudnnConvolutionForward(
cudnnHandle handle,
Pointer alpha,
cudnnTensorDescriptor xDesc,
Pointer x,
cudnnFilterDescriptor wDesc,
Pointer w,
cudnnConvolutionDescriptor convDesc,
int algo,
Pointer workSpace,
long workSpaceSizeInBytes,
Pointer beta,
cudnnTensorDescriptor yDesc,
Pointer y)
{
return checkResult(cudnnConvolutionForwardNative(handle, alpha, xDesc, x, wDesc, w, convDesc, algo, workSpace, workSpaceSizeInBytes, beta, yDesc, y));
} | [
"Function to perform the forward pass for batch convolution"
] | [
"Remove the nodes representing the entity and the embedded elements attached to it.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values of the key identifying the entity to remove",
"Log a warning for the given operation at the provided address for the given attributes, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attributes attributes we that have problems about",
"todo remove, here only for binary compatibility of elytron subsystem, drop once it is in.",
"Use this API to enable snmpalarm of given name.",
"Record the details of the media being cached, to make it easier to recognize, now that we have access to that\ninformation.\n\n@param slot the slot from which a metadata cache is being created\n@param zos the stream to which the ZipFile is being written\n@param channel the low-level channel to which the cache is being written\n\n@throws IOException if there is a problem writing the media details entry",
"Returns the name of the current object on the specified level.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"",
"Returns a source excerpt of a JavaDoc link to a method on this type.",
"Cleans up a extension module's subsystems from the resource registration model.\n\n@param rootResource the model root resource\n@param moduleName the name of the extension's module. Cannot be {@code null}\n@throws IllegalStateException if the extension still has subsystems present in {@code rootResource} or its children",
"Returns new boolean matrix with true or false values selected with equal probability.\n\n@param numRow Number of rows in the new matrix.\n@param numCol Number of columns in the new matrix.\n@param rand Random number generator used to fill the matrix.\n@return The randomly generated matrix."
] |
public Where<T, ID> reset() {
for (int i = 0; i < clauseStackLevel; i++) {
// help with gc
clauseStack[i] = null;
}
clauseStackLevel = 0;
return this;
} | [
"Reset the Where object so it can be re-used."
] | [
"Method to build Integration Flow for Mail. Suppress Warnings for\nMailInboundChannelAdapterSpec.\n@return Integration Flow object for Mail Source",
"Processes the template for all procedures of the current class definition.\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\"",
"Post-configure retreival of server engine.",
"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",
"Set the pattern scheme.\n@param isWeekDayBased flag, indicating if the week day based scheme should be set.",
"Get an CollectionDescriptor by name BRJ\n@param name\n@return CollectionDescriptor or null",
"Given a filesystem, path and buffer-size, read the file contents and\npresents it as a string\n\n@param fs Underlying filesystem\n@param path The file to read\n@param bufferSize The buffer size to use for reading\n@return The contents of the file as a string\n@throws IOException",
"Returns a list of the rekordbox IDs of the tracks contained in the cache.\n\n@return a list containing the rekordbox ID for each track present in the cache, in the order they appear",
"Concats an element and an array.\n\n@param firstElement the first element\n@param array the array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after the first element"
] |
public void startup() throws InterruptedException {
final int maxCacheConnectionPerThread = serverConfig.getMaxConnections() / processors.length;
logger.debug("start {} Processor threads",processors.length);
for (int i = 0; i < processors.length; i++) {
processors[i] = new Processor(handlerFactory, stats, maxRequestSize, maxCacheConnectionPerThread);
Utils.newThread("jafka-processor-" + i, processors[i], false).start();
}
Utils.newThread("jafka-acceptor", acceptor, false).start();
acceptor.awaitStartup();
} | [
"Start the socket server and waiting for finished\n\n@throws InterruptedException thread interrupted"
] | [
"Each element of the second array is added to each element of the first.",
"Decompiles a single type.\n\n@param metadataSystem\n@param typeName\n@return\n@throws IOException",
"Overridden to add transform.",
"Returns the query string currently in the text field.\n\n@return the query string",
"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",
"Set cached value for the attribute. Used for dynamically loaded values in the Acacia content editor.\n\n@param attribute the attribute for which the value should be cached\n@param value the value to cache",
"Merges individual days together into time spans where the\nsame work is undertaken each day.\n\n@param list assignment data",
"currently does not support paths with name constrains",
"Add a misc file.\n\n@param name the file name\n@param path the relative path\n@param newHash the new hash of the added content\n@param isDirectory whether the file is a directory or not\n@return the builder"
] |
public static Map<Integer, Integer>
getMapOfContiguousPartitionRunLengths(final Cluster cluster, int zoneId) {
Map<Integer, Integer> idToRunLength = getMapOfContiguousPartitions(cluster, zoneId);
Map<Integer, Integer> runLengthToCount = Maps.newHashMap();
if(idToRunLength.isEmpty()) {
return runLengthToCount;
}
for(int runLength: idToRunLength.values()) {
if(!runLengthToCount.containsKey(runLength)) {
runLengthToCount.put(runLength, 0);
}
runLengthToCount.put(runLength, runLengthToCount.get(runLength) + 1);
}
return runLengthToCount;
} | [
"Determines a histogram of contiguous runs of partitions within a zone.\nI.e., for each run length of contiguous partitions, how many such runs\nare there.\n\nDoes not correctly address \"wrap around\" of partition IDs (i.e., the fact\nthat partition ID 0 is \"next\" to partition ID 'max')\n\n@param cluster\n@param zoneId\n@return map of length of contiguous run of partitions to count of number\nof such runs."
] | [
"Reads a row of a CSV file and populates the bean, using the supplied name mapping to map column values to the\nappropriate fields. If processors are supplied then they are used, otherwise the raw String values will be used.\n\n@param bean\nthe bean to populate\n@param nameMapping\nthe name mapping array\n@param processors\nthe (optional) cell processors\n@return the populated bean, or null if EOF was reached\n@throws IllegalArgumentException\nif nameMapping.length != number of CSV columns read\n@throws IOException\nif an I/O error occurred\n@throws NullPointerException\nif bean or nameMapping are null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif there was a general exception while reading/processing\n@throws SuperCsvReflectionException\nif there was an reflection exception while mapping the values to the bean",
"Wrapped version of standard jdbc executeUpdate Pays attention to DB\nlocked exception and waits up to 1s\n\n@param query SQL query to execute\n@throws Exception - will throw an exception if we can never get a lock",
"Determines if a token stream contains only numeric tokens\n@param stream\n@return true if all tokens in the given stream can be parsed as an integer",
"Gets the Searcher for a given variant.\n\n@param variant an identifier to differentiate this Searcher from eventual others.\n@return the corresponding Searcher instance.\n@throws IllegalStateException if no searcher was {@link #create(Searchable) created} before for this {@code variant}.",
"Set the named roles which may be defined.\n\n@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values\n@since 1.10.0",
"This method writes extended attribute data for a task.\n\n@param xml MSPDI task\n@param mpx MPXJ task",
"Recurses the given folder and creates the FileModels vertices for the child files to the graph.",
"Add an additional binary type",
"Set the mesh to be tested against.\n\n@param mesh\nThe {@link GVRMesh} that the picking ray will test against."
] |
public ItemRequest<Task> delete(String task) {
String path = String.format("/tasks/%s", task);
return new ItemRequest<Task>(this, Task.class, path, "DELETE");
} | [
"A specific, existing task can be deleted by making a DELETE request on the\nURL for that task. Deleted tasks go into the \"trash\" of the user making\nthe delete request. Tasks can be recovered from the trash within a period\nof 30 days; afterward they are completely removed from the system.\n\nReturns an empty data record.\n\n@param task The task to delete.\n@return Request object"
] | [
"We need to make sure the terms are of the right type, otherwise they will not be serialized correctly.",
"Remove a server mapping from current profile by ID\n\n@param serverMappingId server mapping ID\n@return Collection of updated ServerRedirects",
"Gets the positions.\n\n@return the positions",
"List files in a path according to the specified filter.\n@param rootPath the path from which we are listing the files.\n@param filter the filter to be applied.\n@return the list of files / directory.\n@throws IOException",
"Recurses the given folder and adds references to these files to the graph as FileModels.\n\nWe don't set the parent file model in the case of the initial children, as the direct parent is really the archive itself. For example for file\n\"root.zip/pom.xml\" - the parent for pom.xml is root.zip, not the directory temporary directory that happens to hold it.",
"Constructs a triangule Face from vertices v0, v1, and v2.\n\n@param v0\nfirst vertex\n@param v1\nsecond vertex\n@param v2\nthird vertex",
"Not implemented.\n@param point1 Point1\n@param point2 Point2\n@return Throws an exception.",
"If credentials are incorrect or not provided for Basic Auth, then Android\nmay throw this exception when an HTTP 401 is received. A separate exception\nis thrown for proxy authentication errors. Checking for this response and\nreturning the proper status.\n@param ex the exception raised from Android\n@return HTTP Status Code",
"Sets selected page implicitly\n@param page new selected page\n@return true if the page has been selected successfully"
] |
public void checkin(AdminClient client) {
if (isClosed.get()) {
throw new IllegalStateException("Pool is closing");
}
if (client == null) {
throw new IllegalArgumentException("client is null");
}
boolean isCheckedIn = clientCache.offer(client);
if (!isCheckedIn) {
// Cache is already full, close this AdminClient
client.close();
}
} | [
"submit the adminClient after usage is completed.\nBehavior is undefined, if checkin is called with objects not retrieved\nfrom checkout.\n\n@param client AdminClient retrieved from checkout"
] | [
"Retrieves the registar linked to the bus.\nCreates a new registar is not present.\n\n@param bus\n@return",
"Creates a new child folder inside this folder.\n\n@param name the new folder's name.\n@return the created folder's info.",
"Create a clone of the Renderer. This method is the base of the prototype mechanism implemented\nto avoid create new objects from RendererBuilder. Pay an special attention implementing clone\nmethod in Renderer subtypes.\n\n@return a copy of the current renderer.",
"Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values",
"Call batch tasks inside of a connection which may, or may not, have been \"saved\".",
"Restores a trashed file back to its original location.\n@param fileID the ID of the trashed file.\n@return info about the restored file.",
"Retrieve configuration details for a given custom field.\n\n@param field required custom field\n@return configuration detail",
"Deletes an organization\n\n@param organizationId String",
"Prepares all files added for tus uploads.\n\n@param assemblyUrl the assembly url affiliated with the tus upload.\n@throws IOException when there's a failure with file retrieval.\n@throws ProtocolException when there's a failure with tus upload."
] |
private ArrayList handleDependentCollections(Identity oid, Object obj,
Object[] origCollections, Object[] newCollections,
Object[] newCollectionsOfObjects)
throws LockingException
{
ClassDescriptor mif = _pb.getClassDescriptor(obj.getClass());
Collection colDescs = mif.getCollectionDescriptors();
ArrayList newObjects = new ArrayList();
int count = 0;
for (Iterator it = colDescs.iterator(); it.hasNext(); count++)
{
CollectionDescriptor cds = (CollectionDescriptor) it.next();
if (cds.getOtmDependent())
{
ArrayList origList = (origCollections == null ? null
: (ArrayList) origCollections[count]);
ArrayList newList = (ArrayList) newCollections[count];
if (origList != null)
{
for (Iterator it2 = origList.iterator(); it2.hasNext(); )
{
Identity origOid = (Identity) it2.next();
if ((newList == null) || !newList.contains(origOid))
{
markDelete(origOid, oid, true);
}
}
}
if (newList != null)
{
int countElem = 0;
for (Iterator it2 = newList.iterator(); it2.hasNext(); countElem++)
{
Identity newOid = (Identity) it2.next();
if ((origList == null) || !origList.contains(newOid))
{
ContextEntry entry = (ContextEntry) _objects.get(newOid);
if (entry == null)
{
ArrayList relCol = (ArrayList)
newCollectionsOfObjects[count];
Object relObj = relCol.get(countElem);
insertInternal(newOid, relObj, LockType.WRITE_LOCK,
true, null, new Stack());
newObjects.add(newOid);
}
}
}
}
}
}
return newObjects;
} | [
"Mark for creation all objects that were included into dependent collections.\nMark for deletion all objects that were excluded from dependent collections."
] | [
"Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Confirms that both clusters have the same set of zones defined.\n\n@param lhs\n@param rhs",
"Reorder the objects in the table to resolve referential integrity dependencies.",
"Construct new root step. Used for inspect problems with Allure lifecycle\n\n@return new root step marked as broken",
"Computes the null space using SVD. Slowest bust most stable way to find the solution\n\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"Sets the default pattern values dependent on the provided start date.\n@param startDate the date, the default values are determined with.",
"Returns the index of each elem in a List.\n@param elems The list of items\n@return An array of indices",
"Send an album art update announcement to all registered listeners.",
"Prepare a parallel PING Task.\n\n@return the parallel task builder"
] |
public static wisite_farmname_binding[] get(nitro_service service, String sitepath) throws Exception{
wisite_farmname_binding obj = new wisite_farmname_binding();
obj.set_sitepath(sitepath);
wisite_farmname_binding response[] = (wisite_farmname_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch wisite_farmname_binding resources of given name ."
] | [
"Creates a list of all permutations for a set with N elements.\n\n@param N Number of elements in the list being permuted.\n@return A list containing all the permutations.",
"Determines the accessor method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name",
"Internal method used to retrieve a byte array from one\nor more embedded data blocks. Consecutive data blocks may\nneed to be concatenated by this method in order to retrieve\nthe complete set of data.\n\n@param blocks list of data blocks\n@param length expected length of the data\n@return byte array",
"Returns the maximum magnitude of the complex numbers\n@param u Array of complex numbers\n@param startU first index to consider in u\n@param length Number of complex numebrs to consider\n@return magnitude",
"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",
"Add a property.",
"Use this API to disable Interface of given name.",
"Expand a macro.\n\nThis will look up the macro definition from {@link #macros} map.\nIf not found then return passed in `macro` itself, otherwise return\nthe macro definition found.\n\n**note** if macro definition is not found and the string\n{@link #isMacro(String) comply to macro name convention}, then a\nwarn level message will be logged.\n\n@param macro the macro name\n@return macro definition or macro itself if no definition found.",
"Get ComponentsMultiThread of current instance\n@return componentsMultiThread"
] |
protected void appendWhereClause(StringBuffer stmt, Object[] columns)
{
stmt.append(" WHERE ");
for (int i = 0; i < columns.length; i++)
{
if (i > 0)
{
stmt.append(" AND ");
}
stmt.append(columns[i]);
stmt.append("=?");
}
} | [
"Generate a sql where-clause matching the contraints defined by the array of fields\n\n@param columns array containing all columns used in WHERE clause"
] | [
"Helper to read a mandatory String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read.\n@throws Exception thrown if the list of String values can not be read.",
"Detaches or removes the value from this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.",
"This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type",
"2-D Perlin noise function.\n\n@param x X Value.\n@param y Y Value.\n@return Returns function's value at point xy.",
"Create a Date instance representing a specific time.\n\n@param hour hour 0-23\n@param minutes minutes 0-59\n@return new Date instance",
"Adds two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the sum of specified complex numbers.",
"Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma",
"Renders the given FreeMarker template to given directory, using given variables.",
"Discard the changes."
] |
public static route6[] get(nitro_service service, route6_args args) throws Exception{
route6 obj = new route6();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
route6[] response = (route6[])obj.get_resources(service, option);
return response;
} | [
"Use this API to fetch all the route6 resources that are configured on netscaler.\nThis uses route6_args which is a way to provide additional arguments while fetching the resources."
] | [
"Performs an inline lower Cholesky decomposition on an inner row-major matrix. Only\nthe lower triangular portion of the matrix is read or written to.\n\n@param T Array containing an inner row-major matrix. Modified.\n@param indexT First index of the inner row-major matrix.\n@param n Number of rows and columns of the matrix.\n@return If the decomposition succeeded.",
"returns whether masking with the given mask results in a valid contiguous range for this segment,\nand if it does, if it matches the range obtained when masking the given values with the same mask.\n\n@param lowerValue\n@param upperValue\n@param mask\n@return",
"Obtains a Symmetry010 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Unchecks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already unchecked; {@code false} otherwise.",
"Extracts assignment baseline data.\n\n@param assignment xml assignment\n@param mpx mpxj assignment",
"Sets a single element of this vector. Elements 0, 1, and 2 correspond to\nx, y, and z.\n\n@param i\nelement index\n@param value\nelement value\n@return element value throws ArrayIndexOutOfBoundsException if i is not\nin the range 0 to 2.",
"Use this API to update vpnsessionaction.",
"Set the buttons size.",
"Use this API to add gslbservice."
] |
protected Object buildOrRefreshObject(Map row, ClassDescriptor targetClassDescriptor, Object targetObject)
{
Object result = targetObject;
FieldDescriptor fmd;
FieldDescriptor[] fields = targetClassDescriptor.getFieldDescriptor(true);
if(targetObject == null)
{
// 1. create new object instance if needed
result = ClassHelper.buildNewObjectInstance(targetClassDescriptor);
}
// 2. fill all scalar attributes of the new object
for (int i = 0; i < fields.length; i++)
{
fmd = fields[i];
fmd.getPersistentField().set(result, row.get(fmd.getColumnName()));
}
if(targetObject == null)
{
// 3. for new build objects, invoke the initialization method for the class if one is provided
Method initializationMethod = targetClassDescriptor.getInitializationMethod();
if (initializationMethod != null)
{
try
{
initializationMethod.invoke(result, NO_ARGS);
}
catch (Exception ex)
{
throw new PersistenceBrokerException("Unable to invoke initialization method:" + initializationMethod.getName() + " for class:" + m_cld.getClassOfObject(), ex);
}
}
}
return result;
} | [
"Creates an object instance according to clb, and fills its fileds width data provided by row.\n@param row A {@link Map} contain the Object/Row mapping for the object.\n@param targetClassDescriptor If the \"ojbConcreteClass\" feature was used, the target\n{@link org.apache.ojb.broker.metadata.ClassDescriptor} could differ from the descriptor\nthis class was associated - see {@link #selectClassDescriptor}.\n@param targetObject If 'null' a new object instance is build, else fields of object will\nbe refreshed.\n@throws PersistenceBrokerException if there ewas an error creating the new object"
] | [
"Returns true if this entity's primary key is not null, and for numeric\nfields, is non-zero.",
"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",
"Gets all the enterprise events that occurred within a specified date range.\n@param api the API connection to use.\n@param after the lower bound on the timestamp of the events returned.\n@param before the upper bound on the timestamp of the events returned.\n@param types an optional list of event types to filter by.\n@return a log of all the events that met the given criteria.",
"Returns the full record for the given webhook.\n\n@param webhook The webhook to get.\n@return Request object",
"Stops the currently running animation, if any.\n@see GVRAvatar#start(String)\n@see GVRAnimationEngine#stop(GVRAnimation)",
"Checks a returned Javascript value where we expect a boolean but could\nget null.\n\n@param val The value from Javascript to be checked.\n@param def The default return value, which can be null.\n@return The actual value, or if null, returns false.",
"Checks if the duration option is valid.\n\nNOTE: This does NOT check, if too many events are specified.\n\n@return a flag, indicating if the duration option is valid.",
"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.",
"Extract calendar data from the file.\n\n@throws SQLException"
] |
private static void parseDockers(JSONObject modelJSON,
Shape current) throws JSONException {
if (modelJSON.has("dockers")) {
ArrayList<Point> dockers = new ArrayList<Point>();
JSONArray dockersObject = modelJSON.getJSONArray("dockers");
for (int i = 0; i < dockersObject.length(); i++) {
Double x = dockersObject.getJSONObject(i).getDouble("x");
Double y = dockersObject.getJSONObject(i).getDouble("y");
dockers.add(new Point(x,
y));
}
if (dockers.size() > 0) {
current.setDockers(dockers);
}
}
} | [
"creates a point array of all dockers and add it to the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException"
] | [
"Gets information about a trashed file.\n@param fileID the ID of the trashed file.\n@return info about the trashed file.",
"This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Return true if this rule should be applied for the specified ClassNode, based on the\nconfiguration of this rule.\n@param classNode - the ClassNode\n@return true if this rule should be applied for the specified ClassNode",
"Sets the size of the matrix being decomposed, declares new memory if needed,\nand sets all helper functions to their initial value.",
"Create the label for a grid line.\n\n@param value the value of the line\n@param unit the unit that the value is in",
"Close the ClientRequestExecutor.",
"Performs all actions that have been configured.",
"Throws an IllegalArgumentException when the given value is not false.\n@param value the value to assert if false\n@param message the message to display if the value is false\n@return the value",
"Sets the max.\n\n@param n the new max"
] |
public void setAccordion(boolean accordion) {
getElement().setAttribute("data-collapsible", accordion ? CssName.ACCORDION : CssName.EXPANDABLE);
reload();
} | [
"Configure if you want this collapsible container to\naccordion its child elements or use expandable."
] | [
"Put a spatial object in the cache and index it.\n\n@param key key for object\n@param object object itself\n@param envelope envelope for object",
"Parse an extended attribute value.\n\n@param file parent file\n@param mpx parent entity\n@param value string value\n@param mpxFieldID field ID\n@param durationFormat duration format associated with the extended attribute",
"Compares two fields given by their names.\n\n@param objA The name of the first field\n@param objB The name of the second field\n@return\n@see java.util.Comparator#compare(java.lang.Object, java.lang.Object)",
"Concatenates the trajectory a and b\n@param a The end of this trajectory will be connected to the start of trajectory b\n@param b The start of this trajectory will be connected to the end of trajectory a\n@return Concatenated trajectory",
"Orders first by word, then by lemma, then by tag.\n\n@param wordLemmaTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)",
"Retrieves basic meta data from the result set.\n\n@throws SQLException",
"Return the BundleCapability of a bundle exporting the package packageName.\n\n@param context The BundleContext\n@param packageName The package name\n@return the BundleCapability of a bundle exporting the package packageName",
"Adds a row to the internal storage, indexed by primary key.\n\n@param uniqueID unique ID of the row\n@param map row data as a simpe map",
"Creates a rectangular matrix which is zero except along the diagonals.\n\n@param numRows Number of rows in the matrix.\n@param numCols NUmber of columns in the matrix.\n@return A matrix with diagonal elements equal to one."
] |
public static long getTxInfoCacheWeight(FluoConfiguration conf) {
long size = conf.getLong(TX_INFO_CACHE_WEIGHT, TX_INFO_CACHE_WEIGHT_DEFAULT);
if (size <= 0) {
throw new IllegalArgumentException("Cache size must be positive for " + TX_INFO_CACHE_WEIGHT);
}
return size;
} | [
"Gets the txinfo cache weight\n\n@param conf The FluoConfiguration\n@return The size of the cache value from the property value {@value #TX_INFO_CACHE_WEIGHT} if\nit is set, else the value of the default value {@value #TX_INFO_CACHE_WEIGHT_DEFAULT}"
] | [
"Does the headset the device is docked into have a dedicated home key\n@return",
"Add a new check box.\n@param date the date for the check box\n@param checkState the initial check state.",
"Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value",
"Call this method to initialize the Fluo connection props\n\n@param conf Job configuration\n@param props Use {@link org.apache.fluo.api.config.FluoConfiguration} to set props\nprogrammatically",
"Checks if the link target is a secure link.<p\n\n@param cms the current CMS context\n@param vfsName the path of the link target\n@param targetSite the target site containing the detail page\n@param secureRequest true if the currently running request is secure\n\n@return true if the link should be a secure link",
"Attempts to insert a colon so that a value without a colon can\nbe parsed.",
"Read the optional row header and UUID.\n\n@param stream input stream\n@param map row map",
"To be used with AutoText class constants ALIGMENT_LEFT, ALIGMENT_CENTER and ALIGMENT_RIGHT\n@param aligment\n@return",
"Maps a story if it is allowed by the meta filter\n\n@param story\nthe Story\n@param metaFilter\nthe meta filter"
] |
@SuppressWarnings("WeakerAccess")
public static @Nullable CleverTapAPI getDefaultInstance(Context context) {
// For Google Play Store/Android Studio tracking
sdkVersion = BuildConfig.SDK_VERSION_STRING;
if (defaultConfig == null) {
ManifestInfo manifest = ManifestInfo.getInstance(context);
String accountId = manifest.getAccountId();
String accountToken = manifest.getAcountToken();
String accountRegion = manifest.getAccountRegion();
if(accountId == null || accountToken == null) {
Logger.i("Account ID or Account token is missing from AndroidManifest.xml, unable to create default instance");
return null;
}
if (accountRegion == null) {
Logger.i("Account Region not specified in the AndroidManifest - using default region");
}
defaultConfig = CleverTapInstanceConfig.createDefaultInstance(context, accountId, accountToken, accountRegion);
defaultConfig.setDebugLevel(getDebugLevel());
}
return instanceWithConfig(context, defaultConfig);
} | [
"Returns the default shared instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object"
] | [
"Creates an object from the given JSON data.\n\n@param data the JSON data\n@param clazz the class object for the content of the JSON data\n@param <T> the type of the class object extending {@link InterconnectObject}\n@return the object contained in the given JSON data\n@throws JsonParseException if a the JSON data could not be parsed\n@throws JsonMappingException if the mapping of the JSON data to the IVO failed\n@throws IOException if an I/O related problem occurred",
"Close a transaction and do all the cleanup associated with it.",
"Utility method to convert an array of bytes into a long. Byte ordered is\nassumed to be big-endian.\n@param bytes The data to read from.\n@param offset The position to start reading the 8-byte long from.\n@return The 64-bit integer represented by the eight bytes.\n@since 1.1",
"Read all task relationships from a GanttProject.\n\n@param gpProject GanttProject project",
"Convert the Values using the FieldConversion.sqlToJava\n@param fcs\n@param values",
"Reads numBytes bytes, and returns the corresponding string",
"Use this API to fetch aaauser_binding resource of given name .",
"Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream",
"Are we running in Jetty with JMX enabled?"
] |
public void clearRequestSettings(int pathId, String clientUUID) throws Exception {
this.setRequestEnabled(pathId, false, clientUUID);
OverrideService.getInstance().disableAllOverrides(pathId, clientUUID, Constants.OVERRIDE_TYPE_REQUEST);
EditService.getInstance().updateRepeatNumber(Constants.OVERRIDE_TYPE_REQUEST, pathId, clientUUID);
} | [
"Clear all overrides, reset repeat counts for a request path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception"
] | [
"Reconstructs a number that is represented by more than one byte in a network packet in little-endian order, for\nthe very few protocol values that are sent in this quirky way.\n\n@param buffer the byte array containing the packet data\n@param start the index of the first byte containing a numeric value\n@param length the number of bytes making up the value\n@return the reconstructed number",
"Compute the key to use.\n\n@param ref The reference number.\n@param filename The filename.\n@param extension The file extension.",
"Command-line version of the classifier. See the class\ncomments for examples of use, and SeqClassifierFlags\nfor more information on supported flags.",
"Checks whether a property can be added to a Properties.\n\n@param typeManager\n@param properties the properties object\n@param typeId the type id\n@param filter the property filter\n@param id the property id\n\n@return true if the property should be added",
"Creates a status instance from the given serviceReferences.\nThe given list is copied to a new set made immutable.\n\n@param serviceReferencesBound the set of ServiceReference which are bound to the declaration.\n@param serviceReferencesHandled the set of ServiceReference which are handling the declaration.\n@return the new instance of status",
"Build and return a string version of the query. If you change the where or make other calls you will need to\nre-call this method to re-prepare the query for execution.",
"Convert an operation for deployment overlays to be executed on local servers.\nSince this might be called in the case of redeployment of affected deployments, we need to take into account\nthe composite op resulting from such a transformation\n@see AffectedDeploymentOverlay#redeployLinksAndTransformOperationForDomain\n@param operation\n@param host\n@return",
"Helper to get locale specific properties.\n\n@return the locale specific properties map.",
"Stops the service. If a timeout is given and the service has still not\ngracefully been stopped after timeout ms the service is stopped by force.\n\n@param millis value in ms"
] |
@Override
public Result getResult() throws Exception {
Result returnResult = result;
// If we've chained to other Actions, we need to find the last result
while (returnResult instanceof ActionChainResult) {
ActionProxy aProxy = ((ActionChainResult) returnResult).getProxy();
if (aProxy != null) {
Result proxyResult = aProxy.getInvocation().getResult();
if ((proxyResult != null) && (aProxy.getExecuteResult())) {
returnResult = proxyResult;
} else {
break;
}
} else {
break;
}
}
return returnResult;
} | [
"If the DefaultActionInvocation has been executed before and the Result is\nan instance of ActionChainResult, this method will walk down the chain of\nActionChainResults until it finds a non-chain result, which will be\nreturned. If the DefaultActionInvocation's result has not been executed\nbefore, the Result instance will be created and populated with the result\nparams.\n\n@return a Result instance\n@throws Exception"
] | [
"Start the rendering of the scalebar.",
"Access all of the elements of the collection that evaluate to true for the\nprovided query predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tAn iterator used to iterate over the elements that evaluated true for the predicate.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.",
"Methods returns InetAddress for localhost\n\n@return InetAddress of the localhost\n@throws UnknownHostException if localhost could not be resolved",
"Returns the time elapsed by the user on the app\n@return Time elapsed by user on the app in int",
"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",
"makes object obj persistent to the Objectcache under the key oid.",
"The click handler for the add button.",
"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",
"Flushes this output stream and forces any buffered output bytes to be written out to the stream. If propagate is\ntrue, the wrapped stream will also be flushed.\n\n@param propagate\nboolean flag to indicate whether the wrapped OutputStream should also be flushed.\n@throws IOException\nif an I/O error occurs."
] |
@Nullable
private static Converter<List<String>, Object> createPrimitiveTypeConverter(final Class<?> resultClass) {
Object defaultValue = defaultValue(resultClass);
if (defaultValue == null) {
// For primitive type, the default value shouldn't be null
return null;
}
return new BasicConverter(defaultValue) {
@Override
protected Object convert(String value) throws Exception {
return valueOf(value, resultClass);
}
};
} | [
"Creates a converter function that converts value into primitive type.\n\n@return A converter function or {@code null} if the given type is not primitive type or boxed type"
] | [
"Adds a shutdown hook for the process.\n\n@param process the process to add a shutdown hook for\n\n@return the thread set as the shutdown hook\n\n@throws java.lang.SecurityException If a security manager is present and it denies {@link\njava.lang.RuntimePermission <code>RuntimePermission(\"shutdownHooks\")</code>}",
"Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields.",
"call with lock on 'children' held",
"Method to create a new proxy that wraps the bean instance.\n\n@param beanInstance the bean instance\n@return a new proxy object",
"Returns the scene graph root.\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built-in behavior is to return a {@link AiVector}.\n\n@param wrapperProvider the wrapper provider (used for type inference)\n@return the scene graph root",
"Add an appender to Logback logging framework that will track the types of log messages made.",
"This method changes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent to change a belief\n@param belief_name\nThe name of the belief to change\n@param new_value\nThe new value of the belief to be changed\n@param connector\nThe connector to get the external access",
"Checks to see if another AbstractTransition's states is isCompatible for merging.\n\n@param another\n@return",
"Gets a method based on data in the override_db table\n\n@param overrideId ID of override\n@return Method found"
] |
private void addArrayMethods(List<MethodNode> methods, ClassNode receiver, String name, ClassNode[] args) {
if (args.length!=1) return;
if (!receiver.isArray()) return;
if (!isIntCategory(getUnwrapper(args[0]))) return;
if ("getAt".equals(name)) {
MethodNode node = new MethodNode(name, Opcodes.ACC_PUBLIC, receiver.getComponentType(), new Parameter[]{new Parameter(args[0],"arg")}, null, null);
node.setDeclaringClass(receiver.redirect());
methods.add(node);
} else if ("setAt".equals(name)) {
MethodNode node = new MethodNode(name, Opcodes.ACC_PUBLIC, VOID_TYPE, new Parameter[]{new Parameter(args[0],"arg")}, null, null);
node.setDeclaringClass(receiver.redirect());
methods.add(node);
}
} | [
"add various getAt and setAt methods for primitive arrays\n@param receiver the receiver class\n@param name the name of the method\n@param args the argument classes"
] | [
"Utility function to set the current value in a ListBox.\n\n@return returns true if the option corresponding to the value\nwas successfully selected in the ListBox",
"mark a node as blacklisted\n\n@param nodeId Integer node id of the node to be blacklisted",
"Use this API to delete ntpserver of given name.",
"Renders the given FreeMarker template to given directory, using given variables.",
"Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction",
"Get the Query Paramaters to be used for search request.\n@return this.QueryStringBuilder.",
"Gets the name of the shader variable to get the texture\ncoordinates for the named texture.\n\n@param texName name of texture\n@return name of shader variable",
"Convenience routine to return the specified error's\nunderlying SyntaxException, or null if it isn't one.",
"Validates the producer method"
] |
public Object putNodeMetaData(Object key, Object value) {
if (key == null) throw new GroovyBugError("Tried to set meta data with null key on " + this + ".");
if (metaDataMap == null) {
metaDataMap = new ListHashMap();
}
return metaDataMap.put(key, value);
} | [
"Sets the node meta data but allows overwriting values.\n\n@param key - the meta data key\n@param value - the meta data value\n@return the old node meta data value for this key\n@throws GroovyBugError if key is null"
] | [
"Sets the path name for this ID\n\n@param pathId ID of path\n@param pathName Name of path",
"Returns a licenses regarding its Id and a fake on if no license exist with such an Id\n\n@param licenseId String\n@return License",
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler.",
"Computes the null space using QRP decomposition. This is faster than using SVD but slower than QR.\nMuch more stable than QR though.\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"Add the collection of elements to this collection. This will also them to the associated database table.\n\n@return Returns true if any of the items did not already exist in the collection otherwise false.",
"Called when a payload thread has ended. This also notifies the poller to poll once again.",
"Write a string attribute.\n\n@param name attribute name\n@param value attribute value",
"Decode long from byte array at offset\n\n@param ba byte array\n@param offset Offset\n@return long value",
"Tests correctness. Try\nfrom=1000, to=10000\nfrom=200, to=1000\nfrom=16, to=1000\nfrom=1000, to=Integer.MAX_VALUE"
] |
@NotNull
private String getFQName(@NotNull final String localName, Object... params) {
final StringBuilder builder = new StringBuilder();
builder.append(storeName);
builder.append('.');
builder.append(localName);
for (final Object param : params) {
builder.append('#');
builder.append(param);
}
//noinspection ConstantConditions
return StringInterner.intern(builder.toString());
} | [
"Gets fully-qualified name of a table or sequence.\n\n@param localName local table name.\n@param params params.\n@return fully-qualified table name."
] | [
"In Gerrit < 2.12 the XSRF token was included in the start page HTML.",
"Recursively construct a LblTree from DOM tree\n\n@param walker tree walker for DOM tree traversal\n@return tree represented by DOM tree",
"Calling EventProducerInterceptor in case of logging faults.\n\n@param exchange\nthe message exchange\n@param reqFid\nthe FlowId\n\n@throws Fault\nthe fault",
"Adds error correction data to the specified binary string, which already contains the primary data",
"Show only the given channel.\n@param channels The channels to show",
"Gets an enhanced protection domain for a proxy based on the given protection domain.\n@param domain the given protection domain\n@return protection domain enhanced with \"accessDeclaredMembers\" runtime permission",
"Use this API to add dnstxtrec.",
"Return the next word of the string, in other words it stops when a space is encountered.",
"Dumps the contents of a structured block made up from a header\nand fixed sized records.\n\n@param headerSize header zie\n@param blockSize block size\n@param data data block"
] |
private void handleArchiveByFile(Predicate<String> filter, File archive, List<String> discoveredFiles)
{
try
{
try (ZipFile zip = new ZipFile(archive))
{
Enumeration<? extends ZipEntry> entries = zip.entries();
while (entries.hasMoreElements())
{
ZipEntry entry = entries.nextElement();
String name = entry.getName();
if (filter.accept(name))
discoveredFiles.add(name);
}
}
}
catch (IOException e)
{
throw new RuntimeException("Error handling file " + archive, e);
}
} | [
"Scans given archive for files passing given filter, adds the results into given list."
] | [
"Helper method to abstract out the common logic from the various users methods.\n\n@param api the API connection to be used when retrieving the users.\n@param filterTerm The filter term to lookup users by (login for external, login or name for managed)\n@param userType The type of users we want to search with this request.\nValid values are 'managed' (enterprise users), 'external' or 'all'\n@param externalAppUserId the external app user id that has been set for an app user\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return An iterator over the selected users.",
"Process TestCaseStartedEvent. New testCase will be created and added\nto suite as child.\n\n@param event to process",
"Login for a specific authentication, creating a specific token if given.\n\n@param token token to use\n@param authentication authentication to assign to token\n@return token",
"Recursively add files to a ZipOutputStream\n\n@param parent Parent file\n@param zout ZipOutputStream to append\n@param fileSource The file source\n@throws IOException I/O Error",
">>>>>> measureUntilFull helper methods",
"Register child resources associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition",
"User-initiated commands use this method.\n\n@param command The CLI command\n@return A Response object containing the command line, DMR request, and DMR response\n@throws CommandFormatException\n@throws IOException",
"Return the map bounds rotated with the set rotation. The bounds are adapted to rounding changes of the\nsize of the set paint area.\n\n@return Rotated bounds.",
"Use this API to fetch all the cmpparameter resources that are configured on netscaler."
] |
private float[] generateParticleTimeStamps(float totalTime)
{
float timeStamps[] = new float[mEmitRate * 2];
for ( int i = 0; i < mEmitRate * 2; i +=2 )
{
timeStamps[i] = totalTime + mRandom.nextFloat();
timeStamps[i + 1] = 0;
}
return timeStamps;
} | [
"Generate random time stamps from the current time upto the next one second.\nPassed as texture coordinates to the vertex shader, an unused field is present\nwith every pair passed.\n\n@param totalTime\n@return"
] | [
"in truth we probably only need the types as injected by the metadata binder",
"Use this API to delete route6 resources of given names.",
"returns an Array with an Objects CURRENT locking VALUES , BRJ\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Only sets and gets that are by row and column are used.",
"Add a polygon symbolizer definition to the rule.\n\n@param styleJson The old style.",
"Update the background color of the mBgCircle image view.",
"Allow for the use of text shading and auto formatting.",
"Get the size of the painting area required to draw the scalebar with labels.\n\n@param scalebarParams Parameters for the scalebar.\n@param settings Parameters for rendering the scalebar.\n@param maxLabelSize The max. size of the labels.",
"Takes a list of Strings and combines them into a single comma-separated\nString.\n@param strings The Strings to combine.\n@return The combined, comma-separated, String."
] |
public static PluginManager getInstance() {
if (_instance == null) {
_instance = new PluginManager();
_instance.classInformation = new HashMap<String, ClassInformation>();
_instance.methodInformation = new HashMap<String, com.groupon.odo.proxylib.models.Method>();
_instance.jarInformation = new ArrayList<String>();
if (_instance.proxyLibPath == null) {
//Get the System Classloader
ClassLoader sysClassLoader = Thread.currentThread().getContextClassLoader();
//Get the URLs
URL[] urls = ((URLClassLoader) sysClassLoader).getURLs();
for (int i = 0; i < urls.length; i++) {
if (urls[i].getFile().contains("proxylib")) {
// store the path to the proxylib
_instance.proxyLibPath = urls[i].getFile();
break;
}
}
}
_instance.initializePlugins();
}
return _instance;
} | [
"Gets the current instance of plugin manager\n\n@return PluginManager"
] | [
"Populate the expanded exceptions list based on the main exceptions list.\nWhere we find recurring exception definitions, we generate individual\nexceptions for each recurrence to ensure that we account for them correctly.",
"Set the specific device class of the node.\n@param specificDeviceClass the specificDeviceClass to set\n@exception IllegalArgumentException thrown when the specific device class does not match\nthe generic device class.",
"Operates on one dimension at a time.",
"Answer the TableAlias for aPath or aUserAlias\n@param aPath\n@param aUserAlias\n@param hintClasses\n@return TableAlias, null if none",
"Add \"ORDER BY\" clause to the SQL query statement. This can be called multiple times to add additional \"ORDER BY\"\nclauses. Ones earlier are applied first.",
"Use this API to unset the properties of filterhtmlinjectionparameter resource.\nProperties that need to be unset are specified in args array.",
"Create a set containing all the processor at the current node and the entire subgraph.",
"Invokes the exit logger if and only if no ExitLogger was previously invoked.\n@param logger the logger. Cannot be {@code null}",
"Convert a Java LinkedList to a Scala Iterable.\n@param linkedList Java LinkedList to convert\n@return Scala Iterable"
] |
public static String getStringFromJSONPath(JSONObject record, String path) {
final Object object = getObjectFromJSONPath(record, path);
return object == null ? null : object.toString();
} | [
"Gets a string attribute from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attribute as a {@link String}, or null if it was not found."
] | [
"Decrements the client's use count, and makes it eligible for closing if it is no longer in use.\n\n@param client the dbserver connection client which is no longer being used for a task",
"Non-blocking call\n\n@param key\n@param value\n@return",
"Use this API to add snmpmanager resources.",
"Serialize the object JSON. When an error occures return a string with the given error.",
"Obtains a local date in Symmetry454 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry454 local date, not null\n@throws DateTimeException if unable to create the date",
"Add server redirect to a profile, using current active ServerGroup\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@return ID of added ServerRedirect\n@throws Exception exception",
"Provides lookup of elements by non-namespaced name.\n\n@param name the name or shortcut key for nodes of interest\n@return the nodes of interest which match name",
"Get the items for the key.\n\n@param key\n@return the items for the given key",
"Sets the maximum time to wait before a call to getConnection is timed out.\n\nSetting this to zero is similar to setting it to Long.MAX_VALUE\n\n@param connectionTimeout\n@param timeUnit the unit of the connectionTimeout argument"
] |
@GwtIncompatible("Class.getDeclaredFields")
public ToStringBuilder addDeclaredFields() {
Field[] fields = instance.getClass().getDeclaredFields();
for(Field field : fields) {
addField(field);
}
return this;
} | [
"Adds all fields declared directly in the object's class to the output\n@return this"
] | [
"Sets the necessary height for all bands in the report, to hold their children",
"Retrieve a value from the map, ensuring that a key exists in the map\nwith the specified name.\n\n@param name column name\n@return column value",
"Loads the columns for this table into the alChildren list.",
"Use this API to add appfwjsoncontenttype.",
"used to signal to the server that the client is going to drop the connection, and waits up to\none second for the server to acknowledge the receipt of this message",
"Returns the compact project records for all projects in the team.\n\n@param team The team to find projects in.\n@return Request object",
"Serialize a map of objects to a JSON String.\n\n@param map The map of objects to serialize.\n@param jsonObjectClass The @JsonObject class of the list elements",
"Update the installed identity using the modified state from the modification.\n\n@param name the identity name\n@param modification the modification\n@param state the installation state\n@return the installed identity",
"Add the provided document to the cache."
] |
public static aaapreauthenticationpolicy_binding get(nitro_service service, String name) throws Exception{
aaapreauthenticationpolicy_binding obj = new aaapreauthenticationpolicy_binding();
obj.set_name(name);
aaapreauthenticationpolicy_binding response = (aaapreauthenticationpolicy_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch aaapreauthenticationpolicy_binding resource of given name ."
] | [
"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.",
"Appends the given string encoding special HTML characters.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nInput String starting position.\n@param end\nInput String end position.",
"Requests that the given namespace stopped being listened to for change events.\n\n@param namespace the namespace to stop listening for change events on.",
"Create a new Date. To the last day.",
"Returns the field definition with the specified name.\n\n@param name The name of the desired field\n@return The field definition or <code>null</code> if there is no such field",
"Submits the configured template to Transloadit.\n\n@return {@link Response}\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Returns the boolean value of the specified property.\n\n@param name The name of the property\n@param defaultValue The value to use if the property is not set or not a boolean\n@return The value",
"Use this API to fetch netbridge_vlan_binding resources of given name .",
"Obtains a local date in Accounting calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Accounting era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Accounting local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code AccountingEra}"
] |
public synchronized void addShutdownListener(ShutdownListener listener) {
if (state == CLOSED) {
listener.handleCompleted();
} else {
listeners.add(listener);
}
} | [
"Add a shutdown listener, which gets called when all requests completed on shutdown.\n\n@param listener the shutdown listener"
] | [
"Use this API to delete cacheselector of given name.",
"The amount of time to keep an idle client thread alive\n\n@param threadIdleTime",
"Iterates through this file line by line, splitting each line using\nthe given regex separator. For each line, the given closure is called with\na single parameter being the list of strings computed by splitting the line\naround matches of the given regular expression.\nFinally the resources used for processing the file are closed.\n\n@param self a File\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see IOGroovyMethods#splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5",
"Returns a set of beans specialized by this bean. An empty set is returned if this bean does not specialize another beans.",
"This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file",
"Notifies that multiple content items are inserted.\n\n@param positionStart the position.\n@param itemCount the item count.",
"generate random velocities in the given range\n@return",
"Resolves the path relative to the parent and normalizes it.\n\n@param parent the parent path\n@param path the path\n\n@return the normalized path",
"Makes a DocumentReaderAndWriter based on the flags the CRFClassifier\nwas constructed with. Will create the flags.readerAndWriter and\ninitialize it with the CRFClassifier's flags."
] |
public static String readStringFromUrlGeneric(String url)
throws IOException {
InputStream is = null;
URL urlObj = null;
String responseString = PcConstants.NA;
try {
urlObj = new URL(url);
URLConnection con = urlObj.openConnection();
con.setConnectTimeout(ParallecGlobalConfig.urlConnectionConnectTimeoutMillis);
con.setReadTimeout(ParallecGlobalConfig.urlConnectionReadTimeoutMillis);
is = con.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is,
Charset.forName("UTF-8")));
responseString = PcFileNetworkIoUtils.readAll(rd);
} finally {
if (is != null) {
is.close();
}
}
return responseString;
} | [
"Read string from url generic.\n\n@param url\nthe url\n@return the string\n@throws IOException\nSignals that an I/O exception has occurred."
] | [
"Filter for public tweets on these languages.\n\n@param languages\nValid BCP 47 (http://tools.ietf.org/html/bcp47) language identifiers,\nand may represent any of the languages listed on Twitter's advanced search page\n(https://twitter.com/search-advanced), or \"und\" if no language could be detected.\nThese strings should NOT be url-encoded.\n@return this",
"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",
"Returns a client model from a ResultSet\n\n@param result resultset containing client information\n@return Client or null\n@throws Exception exception",
"Use this API to fetch policydataset resource of given name .",
"Builds the path for an open arc based on a PolylineOptions.\n\n@param center\n@param start\n@param end\n@return PolylineOptions with the paths element populated.",
"Checks the given reference descriptor.\n\n@param refDef The reference descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Produces a string in which the lower 4 bytes are expressed as an IPv4 address and the remaining upper bytes are expressed in IPv6 format.\n\nThis the mixed IPv6/IPv4 format described in RFC 1884 https://tools.ietf.org/html/rfc1884\n\n@return",
"Creates the server bootstrap.",
"Converts a date to an instance date bean.\n@return the instance date bean."
] |
public synchronized void addNodesToWorkerList(List<Integer> nodeIds) {
// Bookkeeping for nodes that will be involved in the next task
nodeIdsWithWork.addAll(nodeIds);
logger.info("Node IDs with work: " + nodeIdsWithWork + " Newly added nodes " + nodeIds);
} | [
"Add nodes to the workers list\n\n@param nodeIds list of node ids."
] | [
"Get a bean value from the context.\n\n@param name bean name\n@return bean value or null",
"Compares two annotated parameters and returns true if they are equal",
"Use this API to fetch aaagroup_aaauser_binding resources of given name .",
"Use this API to rename a responderpolicy resource.",
"Use this method to enable device network-related information tracking, including IP address.\nThis reporting is disabled by default. To re-disable tracking call this method with enabled set to false.\n\n@param value boolean Whether device network info reporting should be enabled/disabled.",
"Returns the default shared instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object",
"Iterates through the given CharSequence line by line, splitting each line using\nthe given separator Pattern. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param pattern the regular expression Pattern for the delimiter\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@since 1.8.2",
"Add an appender to Logback logging framework that will track the types of log messages made.",
"Updates the properties of a tag. Only the fields provided in the `data`\nblock will be updated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated tag record.\n\n@param tag The tag to update.\n@return Request object"
] |
public static Value.Builder makeValue(Date date) {
return Value.newBuilder().setTimestampValue(toTimestamp(date.getTime() * 1000L));
} | [
"Make a timestamp value given a date."
] | [
"Resolve an operation transformer entry.\n\n@param address the address\n@param operationName the operation name\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the transformer entry",
"Notifies that a content item is removed.\n\n@param position the position.",
"Checks to see if matrix 'a' is the same as this matrix within the specified\ntolerance.\n\n@param a The matrix it is being compared against.\n@param tol How similar they must be to be equals.\n@return If they are equal within tolerance of each other.",
"returns a unique String for given field.\nthe returned uid is unique accross all tables.",
"compares two AST nodes",
"Decomposes the input matrix 'a' and makes sure it isn't modified.",
"Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved parameter type of the method return type, or {@code null}\nif not resolvable or if the single argument is of type {@link WildcardType}.",
"Try to kill a given process.\n\n@param processName the process name\n@param id the process integer id, or {@code -1} if this is not relevant\n@return {@code true} if the command succeeded, {@code false} otherwise",
"Return true if the values of the two vectors are equal when cast as ints.\n\n@param a first vector to compare\n@param b second vector to compare\n@return true if the values of the two vectors are equal when cast as ints"
] |
public static <T> boolean addAll(Collection<T> target, Iterator<? extends T> iterator) {
Preconditions.checkArgumentNotNull(target, "target");
boolean modified = false;
while (iterator.hasNext()) {
modified |= target.add(iterator.next());
}
return modified;
} | [
"Add all elements in the iterator to the collection.\n\n@param target\n@param iterator\n@return true if the target was modified, false otherwise"
] | [
"Get the content-type, including the optional \";base64\".",
"Separate from other findNonProgressingOp variant to allow unit testing without needing a mock OperationContext",
"Enables or disables auto closing when selecting a date.",
"Write resource assignment.\n\n@param record resource assignment instance\n@throws IOException",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"Kicks off an animation that will result in the pointer being centered in the\npie slice of the currently selected item.",
"Setter for property value. Doesn't affect entity version and doesn't\ninvalidate any of the cached entity iterables.\n\n@param localId entity local id.\n@param value property value.\n@param oldValue property old value\n@param propertyId property id",
"Invalidating just the GVRView associated with the GVRViewSceneObject\nincorrectly set the clip rectangle to just that view. To fix this,\nwe have to create a full screen android View and invalidate this\nto restore the clip rectangle.\n@return full screen View object",
"Boyer Moore scan that proceeds backwards from the end of the file looking for ENDSIG\n@throws NonScannableZipException"
] |
private Date getTimeFromInteger(Integer time)
{
Date result = null;
if (time != null)
{
int minutes = time.intValue();
int hours = minutes / 60;
minutes -= (hours * 60);
Calendar cal = DateHelper.popCalendar();
cal.set(Calendar.MILLISECOND, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MINUTE, minutes);
cal.set(Calendar.HOUR_OF_DAY, hours);
result = cal.getTime();
DateHelper.pushCalendar(cal);
}
return (result);
} | [
"Converts a time represented as an integer to a Date instance.\n\n@param time integer time\n@return Date instance"
] | [
"Sets currency symbol.\n\n@param symbol currency symbol",
"Returns script view\n\n@param model\n@return\n@throws Exception",
"Populates a resource availability table.\n\n@param table resource availability table\n@param data file data",
"Add an appliable dependency for this task item.\n\n@param appliable the appliable dependency.\n@return the key to be used as parameter to taskResult(string) method to retrieve updated dependency",
"Sets a single element of this vector. Elements 0, 1, and 2 correspond to\nx, y, and z.\n\n@param i\nelement index\n@param value\nelement value\n@return element value throws ArrayIndexOutOfBoundsException if i is not\nin the range 0 to 2.",
"Map from an activity code value UUID to the actual value itself, and its\nsequence number.\n\n@param storepoint storepoint containing current project data",
"Get the response headers for URL\n\n@param stringUrl URL to use\n@return headers HTTP Headers\n@throws IOException I/O error happened",
"Read an element which contains only a single boolean attribute.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@return the boolean value\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.",
"Use this API to create sslfipskey resources."
] |
public void addItem(T value, Direction dir, String text) {
addItem(value, dir, text, true);
} | [
"Adds an item to the list box, specifying its direction and an initial\nvalue for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param dir the item's direction\n@param text the text of the item to be added"
] | [
"Sets the maximum time to wait before a call to getConnection is timed out.\n\nSetting this to zero is similar to setting it to Long.MAX_VALUE\n\n@param connectionTimeout\n@param timeUnit the unit of the connectionTimeout argument",
"Convert a name into initials.\n\n@param name source name\n@return initials",
"Attempts exclusive acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success.",
"Rename with retry.\n\n@param from\n@param to\n@return <tt>true</tt> if the file was successfully renamed.",
"Gives an sequence of ByteBuffers of a specified range. Writing to these ByteBuffers modifies the contents of this LBuffer.\n@param offset\n@param size\n@return",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"returns the total count of objects in the GeneralizedCounter.",
"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.",
"Use this API to fetch appfwjsoncontenttype resources of given names ."
] |
void logAuditRecord() {
trackConfigurationChange();
if (!auditLogged) {
try {
AccessAuditContext accessContext = SecurityActions.currentAccessAuditContext();
Caller caller = getCaller();
auditLogger.log(
isReadOnly(),
resultAction,
caller == null ? null : caller.getName(),
accessContext == null ? null : accessContext.getDomainUuid(),
accessContext == null ? null : accessContext.getAccessMechanism(),
accessContext == null ? null : accessContext.getRemoteAddress(),
getModel(),
controllerOperations);
auditLogged = true;
} catch (Exception e) {
ControllerLogger.MGMT_OP_LOGGER.failedToUpdateAuditLog(e);
}
}
} | [
"Log an audit record of this operation."
] | [
"Join a group as a public member.\n\nNote: if a group has rules - the client must display the rules to the user and the user must accept them prior to joining the group. The acceptRules\nparameter indicates that the user has accepted those rules.\n\n@param groupId\n- the id of the group to join\n@param acceptRules\n- if a group has rules, true indicates the user has accepted the rules\n\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.join.html\">flickr.groups.join</a>",
"Use this API to disable nsfeature.",
"Calculate the value of a digital caplet assuming the Black'76 model.\n\n@param forward The forward (spot).\n@param volatility The Black'76 volatility.\n@param periodLength The period length of the underlying forward rate.\n@param discountFactor The discount factor corresponding to the payment date (option maturity + period length).\n@param optionMaturity The option maturity\n@param optionStrike The option strike.\n@return Returns the price of a digital caplet under the Black'76 model",
"Backup the current configuration as part of the patch history.\n\n@throws IOException for any error",
"Encrypt a string with AES-128 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output.",
"This method performs database modification at the very and of transaction.",
"Processes the template for all index columns for the current index descriptor.\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\"",
"Updates metadata versions on stores.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param oldStoreDefs List of old store definitions\n@param newStoreDefs List of new store definitions",
"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."
] |
private Set<String> findResourceNamesFromFileSystem(String classPathRootOnDisk, String scanRootLocation, File folder) {
LOGGER.debug("Scanning for resources in path: {} ({})", folder.getPath(), scanRootLocation);
File[] files = folder.listFiles();
if (files == null) {
return emptySet();
}
Set<String> resourceNames = new TreeSet<>();
for (File file : files) {
if (file.canRead()) {
if (file.isDirectory()) {
resourceNames.addAll(findResourceNamesFromFileSystem(classPathRootOnDisk, scanRootLocation, file));
} else {
resourceNames.add(toResourceNameOnClasspath(classPathRootOnDisk, file));
}
}
}
return resourceNames;
} | [
"Finds all the resource names contained in this file system folder.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param scanRootLocation The root location of the scan on the classpath, without leading or trailing slashes.\n@param folder The folder to look for resources under on disk.\n@return The resource names;"
] | [
"Throws an IllegalArgumentException when the given value is null.\n@param value the value to assert if not null\n@param name the name of the argument\n@param <T> The generic type of the value to assert if not null\n@return the value",
"Returns code number of Task field supplied.\n\n@param field - name\n@return - code no",
"Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events.",
"Use this API to unset the properties of nsrpcnode resource.\nProperties that need to be unset are specified in args array.",
"Adds all pairs from 'fromMap' to 'toMap' excluding once that matching the pattern",
"Sets up the coordinate transformations between the coordinate system of the parent element of the image element and the native coordinate system\nof the original image.",
"Get file size\n\n@return Long",
"Normalizes this vector in place.",
"Allocate a timestamp"
] |
public static java.sql.Time toTime(Object value) throws ParseException {
if (value == null) {
return null;
}
if (value instanceof java.sql.Time) {
return (java.sql.Time) value;
}
if (value instanceof String) {
if ("".equals((String) value)) {
return null;
}
return new java.sql.Time(IN_TIME_FORMAT.parse((String) value).getTime());
}
return new java.sql.Time(IN_TIME_FORMAT.parse(value.toString()).getTime());
} | [
"Convert an Object to a Time."
] | [
"add a FK column pointing to the item Class",
"Cancel all currently active operations.\n\n@return a list of cancelled operations",
"Mark the given TaskItem depends on this taskGroup.\n\n@param dependentTaskItem the task item that depends on this task group\n@return key to be used as parameter to taskResult(string) method to retrieve result of\ninvocation of given task item.",
"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",
"This produces the dotted hexadecimal format aaaa.bbbb.cccc",
"Extract Primavera project data and export in another format.\n\n@param driverClass JDBC driver class name\n@param connectionString JDBC connection string\n@param projectID project ID\n@param outputFile output file\n@throws Exception",
"Moves everything up so that the specified shift or latch character can be inserted.\n\n@param position the position beyond which everything needs to be shifted\n@param c the latch or shift character to insert at the specified position, after everything has been shifted",
"Returns the expected name of a workspace for a given suffix\n@param suffix\n@return",
"Reads input data from a JSON file in the output directory."
] |
public void updateDownLoadUrl(final String gavc, final String downLoadUrl) {
final DbArtifact artifact = getArtifact(gavc);
repositoryHandler.updateDownloadUrl(artifact, downLoadUrl);
} | [
"Update artifact download url of an artifact\n\n@param gavc String\n@param downLoadUrl String"
] | [
"Write a double attribute.\n\n@param name attribute name\n@param value attribute value",
"Builds the HTML code for a select widget given a bean containing the select options\n\n@param htmlAttributes html attributes for the select widget\n@param options the bean containing the select options\n\n@return the HTML for the select box",
"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",
"Sets the header of the collection component.",
"Write a time units field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Gets the i-th half-edge associated with the face.\n\n@param i\nthe half-edge index, in the range 0-2.\n@return the half-edge",
"Get the authentication for a specific token.\n\n@param token token\n@return authentication if any",
"This method retrieves the offset of a given entry in the Var2Data block.\nEach entry can be uniquely located by the identifier of the object to\nwhich the data belongs, and the type of the data.\n\n@param id unique identifier of an entity\n@param type data type identifier\n@return offset of requested item",
"Extracts the column of A and copies it into u while computing the magnitude of the\nlargest element and returning it.\n\n<pre>\nu[ (offsetU+row0+i)*2 ] = A.getReal(row0+i,col)\nu[ (offsetU+row0+i)*2 + 1] = A.getImag(row0+i,col)\n</pre>\n\n@param A Complex matrix\n@param row0 First row in A to be copied\n@param row1 Last row in A + 1 to be copied\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U\n@return magnitude of largest element"
] |
public Set<PlaybackState> getPlaybackState() {
Set<PlaybackState> result = new HashSet<PlaybackState>(playbackStateMap.values());
return Collections.unmodifiableSet(result);
} | [
"Look up all recorded playback state information.\n\n@return the playback state recorded for any player\n@since 0.5.0"
] | [
"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",
"Given a particular id, return the correct contextual. For contextuals\nwhich aren't passivation capable, the contextual can't be found in another\ncontainer, and null will be returned.\n\n@param id An identifier for the contextual\n@return the contextual",
"used for upload progress",
"Adds the given reference to the list of references that should still be\nserialized, and returns the RDF resource that will be used as a subject.\n\n@param reference\nthe reference to be serialized\n@return RDF resource that represents this reference",
"Returns the AirMapView implementation as requested by the mapType argument. Use this method if\nyou need to request a specific AirMapView implementation that is not necessarily the preferred\ntype. For example, you can use it to explicit request a web-based map implementation.\n\n@param mapType Map type for the requested AirMapView implementation.\n@return An {@link AirMapViewBuilder} for the requested {@link AirMapViewTypes} mapType.",
"Create a shell object and assign its id field.",
"Use this API to fetch filtered set of dbdbprofile resources.\nset the filter parameter values in filtervalue object.",
"Processes a row of the sites table and stores the site information found\ntherein.\n\n@param siteRow\nstring serialisation of a sites table row as found in the SQL\ndump",
"This method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions.\n\n@param date Date to be tested\n@return boolean value"
] |
static String from(Class<?> entryClass) {
List<String> tokens = tokenOf(entryClass);
return fromTokens(tokens);
} | [
"Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class"
] | [
"Use this API to update clusterinstance resources.",
"returns the abstract method from a SAM type, if it is a SAM type.\n@param c the SAM class\n@return null if nothing was found, the method otherwise",
"Extract resource assignments for a task.\n\n@param task parent task\n@param assignments list of Synchro resource assignment data",
"This method is called to alert project listeners to the fact that\na task has been read from a project file.\n\n@param task task instance",
"detect if WS Addressing feature already enabled.\n\n@param provider the interceptor provider\n@param bus the bus\n@return true, if successful",
"Use this API to fetch filtered set of sslglobal_sslpolicy_binding resources.\nset the filter parameter values in filtervalue object.",
"Get the next available ordinal for a method ID\n\n@param methodId ID of method\n@return value of next ordinal\n@throws Exception exception",
"Use this API to fetch statistics of appfwpolicy_stats resource of given name .",
"Convert an ObjectBank to corresponding collection of data features and\nlabels.\n\n@return A List of pairs, one for each document, where the first element is\nan int[][][] representing the data and the second element is an\nint[] representing the labels."
] |
public static double normP(DMatrixRMaj A , double p ) {
if( p == 1 ) {
return normP1(A);
} else if( p == 2 ) {
return normP2(A);
} else if( Double.isInfinite(p)) {
return normPInf(A);
}
if( MatrixFeatures_DDRM.isVector(A) ) {
return elementP(A,p);
} else {
throw new IllegalArgumentException("Doesn't support induced norms yet.");
}
} | [
"Computes either the vector p-norm or the induced matrix p-norm depending on A\nbeing a vector or a matrix respectively.\n\n@param A Vector or matrix whose norm is to be computed.\n@param p The p value of the p-norm.\n@return The computed norm."
] | [
"This essentially ensures that we only store a single Vertex for each unique \"Set\" of tags.",
"Detect if the given object has a PK field represents a 'null' value.",
"Gets a collection.\n\n@param collectionName the name of the collection to return\n@return the collection",
"Use this API to fetch appfwprofile_xmlvalidationurl_binding resources of given name .",
"Flush output streams.",
"This is a convenience method which allows all projects in an\nXER file to be read in a single pass.\n\n@param is input stream\n@param linkCrossProjectRelations add Relation links that cross ProjectFile boundaries\n@return list of ProjectFile instances\n@throws MPXJException",
"given the groupId, returns the groupName\n\n@param groupId ID of group\n@return name of group",
"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",
"Use this API to unset the properties of nsspparams resource.\nProperties that need to be unset are specified in args array."
] |
void addValue(V value, Resource resource) {
this.valueQueue.add(value);
this.valueSubjectQueue.add(resource);
} | [
"Adds the given value to the list of values that should still be\nserialized. The given RDF resource will be used as a subject.\n\n@param value\nthe value to be serialized\n@param resource\nthe RDF resource that is used as a subject for serialization"
] | [
"Helper method to find Strings of form \"all digits\" and \"digits-comma-digits\"",
"Use this API to fetch statistics of cmppolicylabel_stats resource of given name .",
"Send a request for a menu that we will retrieve items from in subsequent requests, when the request must reflect\nthe actual type of track being asked about.\n\n@param requestType identifies what kind of menu request to send\n@param targetMenu the destination for the response to this query\n@param slot the media library of interest for this query\n@param trackType the type of track for which metadata is being requested, since this affects the request format\n@param arguments the additional arguments needed, if any, to complete the request\n\n@return the {@link Message.KnownType#MENU_AVAILABLE} response reporting how many items are available in the menu\n\n@throws IOException if there is a problem communicating, or if the requested menu is not available\n@throws IllegalStateException if {@link #tryLockingForMenuOperations(long, TimeUnit)} was not called successfully\nbefore attempting this call",
"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",
"Use this API to fetch all the snmpoption resources that are configured on netscaler.",
"Triggers a new search with the given text.\n\n@param query the text to search for.",
"Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table.",
"Get an active operation.\n\n@param header the request header\n@return the active operation, {@code null} if if there is no registered operation",
"A simple helper method that creates a pool of connections to Redis using\nthe supplied configurations.\n\n@param jesqueConfig the config used to create the pooled Jedis connections\n@param poolConfig the config used to create the pool\n@return a configured Pool of Jedis connections"
] |
public static String getOffsetCodeFromCurveName(String curveName) {
if(curveName == null || curveName.length() == 0) {
return null;
}
String[] splits = curveName.split("(?<=\\D)(?=\\d)");
String offsetCode = splits[splits.length-1];
if(!Character.isDigit(offsetCode.charAt(0))) {
return null;
}
offsetCode = offsetCode.split("(?<=[A-Za-z])(?=.)", 2)[0];
offsetCode = offsetCode.replaceAll( "[\\W_]", "" );
return offsetCode;
} | [
"Determines the offset code of a forward contract from the name of a forward curve.\nThis method will extract a group of one or more digits together with the first letter behind them, if any.\nIf there are multiple groups of digits in the name, this method will extract the last.\nIf there is no number in the string, this method will return null.\n\n@param curveName The name of the curve.\n@return The offset code as String"
] | [
"Creates the server bootstrap.",
"Export modules and check them in. Assumes the log stream already open.\n@return exit code of the commit-script.",
"If directory doesn't exists try to create it.\n\n@param directory given directory to check\n@throws ReportGenerationException if can't create specified directory",
"Helper method to find Strings of form \"all digits\" and \"digits-comma-digits\"",
"Read a list of fixed sized blocks from the input stream.\n\n@return List of MapRow instances representing the fixed size blocks",
"Maps all views that don't start with \"android\" namespace.\n\n@param names All shared element names.\n@return The obsolete shared element names.",
"Add a raw SQL \"GROUP BY\" clause to the SQL query statement. This should not include the \"GROUP BY\".",
"Process calendar days of the week.\n\n@param calendar project calendar\n@param root calendar data",
"Generate a results file for each test in each suite.\n@param outputDirectory The target directory for the generated file(s)."
] |
public ParallelTaskBuilder setReplaceVarMapToSingleTargetSingleVar(
String variable, List<String> replaceList, String uniformTargetHost) {
if (Strings.isNullOrEmpty(uniformTargetHost)) {
logger.error("uniform target host is empty or null. skil setting.");
return this;
}
this.replacementVarMapNodeSpecific.clear();
this.targetHosts.clear();
int i = 0;
for (String replace : replaceList) {
if (replace == null){
logger.error("null replacement.. skip");
continue;
}
String hostName = PcConstants.API_PREFIX + i;
replacementVarMapNodeSpecific.put(
hostName,
new StrStrMap().addPair(variable, replace).addPair(
PcConstants.UNIFORM_TARGET_HOST_VAR,
uniformTargetHost));
targetHosts.add(hostName);
++i;
}
this.requestReplacementType = RequestReplacementType.TARGET_HOST_SPECIFIC_VAR_REPLACEMENT;
logger.info(
"Set requestReplacementType as {} for single target. Will disable the set target hosts."
+ "Also Simulated "
+ "Now Already set targetHost list with size {}. \nPLEASE NOT TO SET TARGET HOSTS AGAIN WITH THIS API.",
requestReplacementType.toString(), targetHosts.size());
return this;
} | [
"Sets the replace var map to single target single var.\n\n@param variable\nthe variable\n@param replaceList\n: the list of strings that will replace the variable\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder"
] | [
"init database with demo data",
"Use this API to reset appfwlearningdata resources.",
"Obtain override ID\n\n@param overrideIdentifier can be the override ID or class name\n@return\n@throws Exception",
"Builder method for specifying the name of an app.\n@param name The name to give an app.\n@return A copy of the {@link App}",
"Specifies the list of enrichers that will be used to enrich the container object.\n\n@param enrichers\nlist of enrichers that will be used to enrich the container object\n\n@return the current builder instance",
"Called by determineHead and may be overridden in subclasses\nif special treatment is necessary for particular categories.",
"Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator",
"Infer app name from scan package\n\n@param packageName\nthe package name\n@return\napp name inferred from the package name",
"Filter for public tweets on these languages.\n\n@param languages\nValid BCP 47 (http://tools.ietf.org/html/bcp47) language identifiers,\nand may represent any of the languages listed on Twitter's advanced search page\n(https://twitter.com/search-advanced), or \"und\" if no language could be detected.\nThese strings should NOT be url-encoded.\n@return this"
] |
public static void calculatePointDiff(Point2D _P1, Point2D _P2, Point2D _Result, float _Multiplier) {
float diffX = _P2.getX() - _P1.getX();
float diffY = _P2.getY() - _P1.getY();
_Result.setX(_P1.getX() + (diffX * _Multiplier));
_Result.setY(_P1.getY() + (diffY * _Multiplier));
} | [
"Calculates the middle point between two points and multiplies its coordinates with the given\nsmoothness _Mulitplier.\n@param _P1 First point\n@param _P2 Second point\n@param _Result Resulting point\n@param _Multiplier Smoothness multiplier"
] | [
"Creates a new RDF serializer based on the current configuration of this\nobject.\n\n@return the newly created RDF serializer\n@throws IOException\nif there were problems opening the output files",
"Use this API to fetch csvserver_cspolicy_binding resources of given name .",
"This method should be called after all column have been added to the report.\n@param numgroups\n@return",
"Count the total number of queued resource requests for all queues. The\nresult is \"approximate\" in the face of concurrency since individual\nqueues can change size during the aggregate count.\n\n@return The (approximate) aggregate count of queued resource requests.",
"Use this API to add nsacl6 resources.",
"Returns the list of store defs as a map\n\n@param storeDefs\n@return",
"Computes the best fit set of polynomial coefficients to the provided observations.\n\n@param samplePoints where the observations were sampled.\n@param observations A set of observations.",
"This method skips the end-of-line markers in the RTF document.\nIt also indicates if the end of the embedded object has been reached.\n\n@param text RTF document test\n@param offset offset into the RTF document\n@return new offset",
"set ViewPager scroller to change animation duration when sliding"
] |
protected <T, A> ActiveOperation<T, A> removeActiveOperation(Integer id) {
final ActiveOperation<T, A> removed = removeUnderLock(id);
if(removed != null) {
for(final Map.Entry<Integer, ActiveRequest<?, ?>> requestEntry : requests.entrySet()) {
final ActiveRequest<?, ?> request = requestEntry.getValue();
if(request.context == removed) {
requests.remove(requestEntry.getKey());
}
}
}
return removed;
} | [
"Remove an active operation.\n\n@param id the operation id\n@return the removed active operation, {@code null} if there was no registered operation"
] | [
"This is a convenience method to add a default derived\ncalendar to the project.\n\n@return new ProjectCalendar instance",
"Starts the enforcer.",
"Create a new Violation for the AST node.\n@param sourceCode - the SourceCode\n@param node - the Groovy AST Node\n@param message - the message for the violation; defaults to null",
"Updates the internal list of dates and fires a value change if necessary.\n\n@param dates the dates to set.",
"Get the number of views, comments and favorites on a photo 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 photoId\n(Required) The id of the photo to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoStats.htm\"",
"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",
"Create a new path address by appending more elements to the end of this address.\n\n@param additionalElements the elements to append\n@return the new path address",
"Converts the bytes that make up an internet address into the corresponding integer value to make\nit easier to perform bit-masking operations on them.\n\n@param address an address whose integer equivalent is desired\n\n@return the integer corresponding to that address",
"Notification that the process has become unstable.\n\n@return {@code true} if this is a change in status"
] |
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info)
{
Util.log("In OTMJCAManagedConnectionFactory.createManagedConnection");
try
{
Kit kit = getKit();
PBKey key = ((OTMConnectionRequestInfo) info).getPbKey();
OTMConnection connection = kit.acquireConnection(key);
return new OTMJCAManagedConnection(this, connection, key);
}
catch (ResourceException e)
{
throw new OTMConnectionRuntimeException(e.getMessage());
}
} | [
"return a new managed connection. This connection is wrapped around the real connection and delegates to it\nto get work done.\n@param subject\n@param info\n@return"
] | [
"Emit a event object with parameters and force all listeners to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)",
"Use this API to fetch all the nspbr6 resources that are configured on netscaler.",
"Obtain collection of headers to remove\n\n@return\n@throws Exception",
"Returns a name for the principal based upon one of the attributes\nof the main CommonProfile. The attribute name used to query the CommonProfile\nis specified in the constructor.\n\n@return a name for the Principal or null if the attribute is not populated.",
"do delete given object. Should be used by all intern classes to delete\nobjects.",
"Creates a decorator bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return a Bean",
"Creates a new DMatrixRMaj around the provided data. The data must encode\na row-major matrix. Any modification to the returned matrix will modify the\nprovided data.\n\n@param numRows Number of rows in the matrix.\n@param numCols Number of columns in the matrix.\n@param data Data that is being wrapped. Referenced Saved.\n@return A matrix which references the provided data internally.",
"Converts the positions to a 2D double array\n@return 2d double array [i][j], i=Time index, j=coordinate index",
"Disposes resources created to service this connection context"
] |
public int rebalanceNode(final RebalanceTaskInfo stealInfo) {
final RebalanceTaskInfo info = metadataStore.getRebalancerState()
.find(stealInfo.getDonorId());
// Do we have the plan in the state?
if(info == null) {
throw new VoldemortException("Could not find plan " + stealInfo
+ " in the server state on " + metadataStore.getNodeId());
} else if(!info.equals(stealInfo)) {
// If we do have the plan, is it the same
throw new VoldemortException("The plan in server state " + info
+ " is not the same as the process passed " + stealInfo);
} else if(!acquireRebalancingPermit(stealInfo.getDonorId())) {
// Both are same, now try to acquire a lock for the donor node
throw new AlreadyRebalancingException("Node " + metadataStore.getNodeId()
+ " is already rebalancing from donor "
+ info.getDonorId() + " with info " + info);
}
// Acquired lock successfully, start rebalancing...
int requestId = asyncService.getUniqueRequestId();
// Why do we pass 'info' instead of 'stealInfo'? So that we can change
// the state as the stores finish rebalance
asyncService.submitOperation(requestId,
new StealerBasedRebalanceAsyncOperation(this,
voldemortConfig,
metadataStore,
requestId,
info));
return requestId;
} | [
"This function is responsible for starting the actual async rebalance\noperation. This is run if this node is the stealer node\n\n<br>\n\nWe also assume that the check that this server is in rebalancing state\nhas been done at a higher level\n\n@param stealInfo Partition info to steal\n@return Returns a id identifying the async operation"
] | [
"Returns iban's country code and check digit.\n\n@param iban String\n@return countryCodeAndCheckDigit String",
"Converts to credentials for use in Grgit.\n@return {@code null} if both username and password are {@code null},\notherwise returns credentials in Grgit format.",
"Creates a style definition used for pages.\n@return The page style definition.",
"Obtain newline-delimited headers from request\n\n@param request HttpServletRequest to scan\n@return newline-delimited headers",
"Gracefully stop the engine",
"Show only the following channels.\n@param channels The names of the channels to show.\n@return this",
"This method changes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent to change a belief\n@param belief_name\nThe name of the belief to change\n@param new_value\nThe new value of the belief to be changed\n@param connector\nThe connector to get the external access",
"Returns the value that has to be set for the dynamic attribute.\n\n@param file the file where the current content is stored\n@param value the content value that is represented by the attribute\n@param attributeName the attribute's name\n@param editedLocalEntity the entities that where edited last\n@return the value that has to be set for the dynamic attribute.",
"Checks the component type of the given array against the expected component type.\n\n@param array\nthe array to be checked. May not be <code>null</code>.\n@param expectedComponentType\nthe expected component type of the array. May not be <code>null</code>.\n@return the unchanged array.\n@throws ArrayStoreException\nif the expected runtime {@code componentType} does not match the actual runtime component type."
] |
private Map<String, String> parseAttributes(I_CmsXmlContentLocation formatterLoc) {
Map<String, String> result = new LinkedHashMap<>();
for (I_CmsXmlContentValueLocation mappingLoc : formatterLoc.getSubValues(N_ATTRIBUTE)) {
String key = CmsConfigurationReader.getString(m_cms, mappingLoc.getSubValue(N_KEY));
String value = CmsConfigurationReader.getString(m_cms, mappingLoc.getSubValue(N_VALUE));
result.put(key, value);
}
return Collections.unmodifiableMap(result);
} | [
"Parses formatter attributes.\n\n@param formatterLoc the node location\n@return the map of formatter attributes (unmodifiable)"
] | [
"Returns a product regarding its name\n\n@param name String\n@return DbProduct",
"Checks to see within the flags if a reload, i.e. not a full restart, is required.\n\n@param flags the flags to check\n\n@return {@code true} if a reload is required, otherwise {@code false}",
"Use this API to unset the properties of lbsipparameters resource.\nProperties that need to be unset are specified in args array.",
"Go through all nodes and determine how many partition Ids each node\nhosts.\n\n@param cluster\n@return map of nodeId to number of primary partitions hosted on node.",
"Starts or stops capturing.\n\n@param capture If true, capturing is started. If false, it is stopped.\n@param fps Capturing FPS (frames per second).",
"Get a list of collaborators that are allowed access to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return list of collaborators",
"This method takes the textual version of a constraint name\nand returns an appropriate class instance. Note that unrecognised\nvalues are treated as \"As Soon As Possible\" constraints.\n\n@param locale target locale\n@param type text version of the constraint type\n@return ConstraintType instance",
"returns a Logger.\n\n@param loggerName the name of the Logger\n@return Logger the returned Logger",
"Utility method to clear cached calendar data."
] |
public static ipset_nsip_binding[] get(nitro_service service, String name) throws Exception{
ipset_nsip_binding obj = new ipset_nsip_binding();
obj.set_name(name);
ipset_nsip_binding response[] = (ipset_nsip_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch ipset_nsip_binding resources of given name ."
] | [
"Uncompresses the textual contents in the given map and and writes them to the files\ndenoted by the keys of the map.\n\n@param dir The base directory into which the files will be written\n@param contents The map containing the contents indexed by the filename\n@throws IOException If an error occurred",
"Convert an ObjectBank to arrays of data features and labels.\n\n@return A Pair, where the first element is an int[][][][] representing the\ndata and the second element is an int[][] representing the labels.",
"Clear all overrides, reset repeat counts for a response path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception",
"Return the text content of the document. It does not containing trailing spaces and asterisks\nat the start of the line.",
"Set the week days the events should occur.\n@param weekDays the week days to set.",
"Invoke the setters for the given variables on the given instance.\n@param <T> the instance type\n@param instance the instance to inject with the variables\n@param vars the variables to inject\n@return the instance\n@throws ReflectiveOperationException if there was a problem finding or invoking a setter method",
"Closes off all connections in all partitions.",
"Extract Primavera project data and export in another format.\n\n@param driverClass JDBC driver class name\n@param connectionString JDBC connection string\n@param projectID project ID\n@param outputFile output file\n@throws Exception",
"Copy all of the mappings from the specified map to this one, replacing\nany mappings with the same keys.\n\n@param in the map whose mappings are to be copied"
] |
public Date getStart()
{
Date result = null;
for (ResourceAssignment assignment : m_assignments)
{
if (result == null || DateHelper.compare(result, assignment.getStart()) > 0)
{
result = assignment.getStart();
}
}
return (result);
} | [
"Retrieves the earliest start date for all assigned tasks.\n\n@return start date"
] | [
"Returns the name of the current object on the specified level.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"",
"Retrieve the start slack.\n\n@return start slack",
"Writes assignment data to a PM XML file.",
"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",
"Creates a ServiceCall from an observable object.\n\n@param observable the observable to create from\n@param <T> the type of the response\n@return the created ServiceCall",
"Use this API to restore appfwprofile.",
"Parse the json string to the diagram model, assumes that the json is\nhierarchical ordered\n@param json\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException",
"Issue the database statements to create the table associated with a table configuration.\n\n@param connectionSource\nconnectionSource Associated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@return The number of statements executed to do so.",
"Merge two maps of configuration properties. If the original contains a mapping for the same key, the new mapping is ignored.\n\n@param original\n@param toMerge"
] |
public RandomVariable getValues(double evaluationTime, LIBORMarketModel model) {
if(evaluationTime > 0) {
throw new RuntimeException("Forward start evaluation currently not supported.");
}
// Fetch the covariance model of the model
LIBORCovarianceModel covarianceModel = model.getCovarianceModel();
// We sum over all forward rates
int numberOfComponents = covarianceModel.getLiborPeriodDiscretization().getNumberOfTimeSteps();
// Accumulator
RandomVariable integratedLIBORCurvature = new RandomVariableFromDoubleArray(0.0);
for(int componentIndex = 0; componentIndex < numberOfComponents; componentIndex++) {
// Integrate from 0 up to the fixing of the rate
double timeEnd = covarianceModel.getLiborPeriodDiscretization().getTime(componentIndex);
int timeEndIndex = covarianceModel.getTimeDiscretization().getTimeIndex(timeEnd);
// If timeEnd is not in the time discretization we get timeEndIndex = -insertionPoint-1. In that case, we use the index prior to the insertionPoint
if(timeEndIndex < 0) {
timeEndIndex = -timeEndIndex - 2;
}
// Sum squared second derivative of the variance for all components at this time step
RandomVariable integratedLIBORCurvatureCurrentRate = new RandomVariableFromDoubleArray(0.0);
for(int timeIndex = 0; timeIndex < timeEndIndex-2; timeIndex++) {
double timeStep1 = covarianceModel.getTimeDiscretization().getTimeStep(timeIndex);
double timeStep2 = covarianceModel.getTimeDiscretization().getTimeStep(timeIndex+1);
RandomVariable covarianceLeft = covarianceModel.getCovariance(timeIndex+0, componentIndex, componentIndex, null);
RandomVariable covarianceCenter = covarianceModel.getCovariance(timeIndex+1, componentIndex, componentIndex, null);
RandomVariable covarianceRight = covarianceModel.getCovariance(timeIndex+2, componentIndex, componentIndex, null);
// Calculate second derivative
RandomVariable curvatureSquared = covarianceRight.sub(covarianceCenter.mult(2.0)).add(covarianceLeft);
curvatureSquared = curvatureSquared.div(timeStep1 * timeStep2);
// Take square
curvatureSquared = curvatureSquared.squared();
// Integrate over time
integratedLIBORCurvatureCurrentRate = integratedLIBORCurvatureCurrentRate.add(curvatureSquared.mult(timeStep1));
}
// Empty intervall - skip
if(timeEnd == 0) {
continue;
}
// Average over time
integratedLIBORCurvatureCurrentRate = integratedLIBORCurvatureCurrentRate.div(timeEnd);
// Take square root
integratedLIBORCurvatureCurrentRate = integratedLIBORCurvatureCurrentRate.sqrt();
// Take max over all forward rates
integratedLIBORCurvature = integratedLIBORCurvature.add(integratedLIBORCurvatureCurrentRate);
}
integratedLIBORCurvature = integratedLIBORCurvature.div(numberOfComponents);
return integratedLIBORCurvature.sub(tolerance).floor(0.0);
} | [
"Calculates the squared curvature of the LIBOR instantaneous variance.\n\n@param evaluationTime Time at which the product is evaluated.\n@param model A model implementing the LIBORModelMonteCarloSimulationModel\n@return The squared curvature of the LIBOR instantaneous variance (reduced a possible tolerance). The return value is ≥ 0."
] | [
"Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception",
"Get the filters ExporterServiceFilter and ExportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid.",
"We have an OLE compound document... but is it an MPP file?\n\n@param stream file input stream\n@return ProjectFile instance",
"Processes and computes column counts of A\n\n@param A (Input) Upper triangular matrix\n@param parent (Input) Elimination tree.\n@param post (Input) Post order permutation of elimination tree. See {@link TriangularSolver_DSCC#postorder}\n@param counts (Output) Storage for column counts.",
"Sets the request body to the contents of a String.\n\n<p>If the contents of the body are large, then it may be more efficient to use an {@link InputStream} instead of\na String. Using a String requires that the entire body be in memory before sending the request.</p>\n\n@param body a String containing the contents of the body.",
"Returns the description of the running container.\n\n@param client the client used to query the server\n\n@return the description of the running container\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to query the container fails",
"This method lists all resource assignments defined in the file.\n\n@param file MPX file",
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added",
"Helper method to track storage operations & time via StreamingStats.\n\n@param startNs"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.