query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static Identifiers convertProfileAndPathIdentifier(String profileIdentifier, String pathIdentifier) throws Exception {
Identifiers id = new Identifiers();
Integer profileId = null;
try {
profileId = ControllerUtils.convertProfileIdentifier(profileIdentifier);
} catch (Exception e) {
// this is OK for this since it isn't always needed
}
Integer pathId = convertPathIdentifier(pathIdentifier, profileId);
id.setProfileId(profileId);
id.setPathId(pathId);
return id;
} | [
"Obtain the IDs of profile and path as Identifiers\n\n@param profileIdentifier actual ID or friendly name of profile\n@param pathIdentifier actual ID or friendly name of path\n@return\n@throws Exception"
] | [
"capture center eye",
"a small static helper to set a multi state drawable on a view\n\n@param icon\n@param iconColor\n@param selectedIcon\n@param selectedIconColor\n@param tinted\n@param imageView",
"Converts from a bitmap to individual day flags for a weekly recurrence,\nusing the array of masks.\n\n@param days bitmap\n@param masks array of mask values",
"Get the real Object\n\n@param objectOrProxy\n@return Object",
"Perform construction with custom thread pool size.",
"Replace HTML entities\n@param content Content\n@param map Map\n@return Replaced content",
"Returns the DBCP DataSource for the specified connection descriptor,\nafter creating a new DataSource if needed.\n@param jcd the descriptor for which to return a DataSource\n@return a DataSource, after creating a new pool if needed.\nGuaranteed to never be null.\n@throws LookupException if pool is not in cache and cannot be created",
"Update the currency format.\n\n@param properties project properties\n@param decimalSeparator decimal separator\n@param thousandsSeparator thousands separator",
"Set new list data set\n@param list new data set"
] |
private void readProjectHeader()
{
Table table = m_tables.get("DIR");
MapRow row = table.find("");
if (row != null)
{
setFields(PROJECT_FIELDS, row, m_projectFile.getProjectProperties());
m_wbsFormat = new P3WbsFormat(row);
}
} | [
"Read general project properties."
] | [
"Add a IN clause so the column must be equal-to one of the objects passed in.",
"Apply the remote read domain model result.\n\n@param result the domain model result\n@return whether it was applied successfully or not",
"Helper method to retrieve a canonical revision for git commits migrated from SVN. Migrated commits are\ndetected by the presence of 'git-svn-id' in the commit message.\n\n@param revision the commit/revision to inspect\n@param branch the name of the branch it came from\n@return the original SVN revision if it was a migrated commit from the branch specified, otherwise the git revision",
"Set the state of an individual day in a weekly recurrence.\n\n@param day Day instance\n@param value true if this day is included in the recurrence",
"Returns whether this address section represents a subnet block of addresses associated its prefix length.\n\nReturns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include\nthe entire subnet block for its prefix length.\n\nIf {@link AddressNetwork#getPrefixConfiguration} is set to consider all prefixes as subnets, this returns true for any grouping with prefix length.\n\n@return",
"capture screenshot of an eye",
"Filter everything until we found the first NL character.",
"Return a list of the top 100 unique places clustered by a given placetype for a user.\n\n@param placeType\nUse Type-constants at {@link Place}\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null.\n@param placeId\nA Flickr Places ID. Optional, can be null.\n@param threshold\nThe minimum number of photos that a place type must have to be included. If the number of photos is lowered then the parent place type for\nthat place will be used. Optional, can be null.\n@param minUploadDate\nOptional, can be null.\n@param maxUploadDate\nOptional, can be null.\n@param minTakenDate\nOptional, can be null.\n@param maxTakenDate\nOptional, can be null.\n@return A PlacesList\n@throws FlickrException",
"Use this API to fetch transformpolicy resource of given name ."
] |
public static tmglobal_tmsessionpolicy_binding[] get(nitro_service service) throws Exception{
tmglobal_tmsessionpolicy_binding obj = new tmglobal_tmsessionpolicy_binding();
tmglobal_tmsessionpolicy_binding response[] = (tmglobal_tmsessionpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch a tmglobal_tmsessionpolicy_binding resources."
] | [
"Synthesize and forward a KeyEvent to the library.\n\nThis call is made from the native layer.\n\n@param code id of the button\n@param action integer representing the action taken on the button",
"Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)",
"Use this API to delete nsacl6 resources of given names.",
"Finds or creates a ResourceStorageLoadable for the given resource.\nClients should first call shouldLoadFromStorage to check whether there exists a storage version\nof the given resource.\n\n@return an IResourceStorageLoadable",
"Acquires a read lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait.",
"Use this API to rename a nsacl6 resource.",
"Waits for the current outstanding request retrying it with exponential backoff if it fails.\n\n@throws ClosedByInterruptException if request was interrupted\n@throws IOException In the event of FileNotFoundException, MalformedURLException\n@throws RetriesExhaustedException if exceeding the number of retries",
"This handler will be triggered when there's no search result",
"Associate the specified value with the specified key in this map.\nIf the map previously contained a mapping for this key, the old\nvalue is replaced and returned.\n\n@param key the key with which the value is to be associated\n@param value the value to be associated with this key\n@return the value previously mapped to the key, or null"
] |
public void close() throws IOException {
System.out.println("Serialized "
+ this.jsonSerializer.getEntityDocumentCount()
+ " item documents to JSON file " + OUTPUT_FILE_NAME + ".");
this.jsonSerializer.close();
} | [
"Closes the output. Should be called after the JSON serialization was\nfinished.\n\n@throws IOException\nif there was a problem closing the output"
] | [
"Remove the set of partitions from the node provided\n\n@param node The node from which we're removing the partitions\n@param donatedPartitions The list of partitions to remove\n@return The new node without the partitions",
"Looks up a variable given its name. If none is found then return null.",
"The full path of a jrxml file, or the path in the classpath of a jrxml\nresource.\n\n@param path\n@return",
"Uploads a new large file.\n@param boxApi the API connection to be used by the upload session.\n@param folderId the id of the folder in which the file will be uploaded.\n@param stream the input stream that feeds the content of the file.\n@param url the upload session URL.\n@param fileName the name of the file to be created.\n@param fileSize the total size of the file.\n@return the created file instance.\n@throws InterruptedException when a thread gets interupted.\n@throws IOException when reading a stream throws exception.",
">>>>>> measureUntilFull helper methods",
"Adds, eventually merging, a direction for the specified relation type\n@param relationType\n@param direction",
"Generates a change event for a local insert of the given document in the given namespace.\n\n@param namespace the namespace where the document was inserted.\n@param document the document that was inserted.\n@return a change event for a local insert of the given document in the given namespace.",
"Takes a numeric string value and converts it to a integer between 0 and 100.\n\nreturns 0 if the string is not numeric.\n\n@param percentage - A numeric string value\n@return a integer between 0 and 100",
"Loads all localizations not already loaded.\n@throws CmsException thrown if locking a file fails.\n@throws UnsupportedEncodingException thrown if reading a file fails.\n@throws IOException thrown if reading a file fails."
] |
public static base_response flush(nitro_service client, cacheobject resource) throws Exception {
cacheobject flushresource = new cacheobject();
flushresource.locator = resource.locator;
flushresource.url = resource.url;
flushresource.host = resource.host;
flushresource.port = resource.port;
flushresource.groupname = resource.groupname;
flushresource.httpmethod = resource.httpmethod;
flushresource.force = resource.force;
return flushresource.perform_operation(client,"flush");
} | [
"Use this API to flush cacheobject."
] | [
"Process hours in a working day.\n\n@param calendar project calendar\n@param dayRecord working day data",
"Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either\njar files or references to directories containing class files.\n\nThe sourcePaths must be a reference to the top level directory for sources (eg, for a file\nsrc/main/java/org/example/Foo.java, the source path would be src/main/java).\n\nThe wildcard resolver provides a fallback for processing wildcard imports that the underlying parser was unable\nto resolve.",
"Iterate through a set of bit field flags and set the value for each one\nin the supplied container.\n\n@param flags bit field flags\n@param container field container\n@param data source data",
"Adds a column pair to this foreignkey.\n\n@param localColumn The column in the local table\n@param remoteColumn The column in the remote table",
"When set to true, all items in layout will be considered having the size of the largest child. If false, all items are\nmeasured normally. Disabled by default.\n@param enable true to measure children using the size of the largest child, false - otherwise.",
"Remove a variable in the top variables layer.",
"Finds an Object of the specified type.\n\n@param <T> Object type.\n@param classType The class of type T.\n@param id The document _id field.\n@param rev The document _rev field.\n@return An object of type T.\n@throws NoDocumentException If the document is not found in the database.",
"Use this API to update cacheselector.",
"There is a race condition that is not handled properly by the DialogFragment class.\nIf we don't check that this onDismiss callback isn't for the old progress dialog from before\nthe device orientation change, then this will cause the newly created dialog after the\norientation change to be dismissed immediately."
] |
public static String getImageIdFromTag(String imageTag, String host) throws IOException {
DockerClient dockerClient = null;
try {
dockerClient = getDockerClient(host);
return dockerClient.inspectImageCmd(imageTag).exec().getId();
} finally {
closeQuietly(dockerClient);
}
} | [
"Get image Id from imageTag using DockerBuildInfoHelper client.\n\n@param imageTag\n@param host\n@return"
] | [
"Creates the final artifact name.\n\n@return the artifact name",
"Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment",
"Get the first child element with the given name.\n\n@param element\nThe parent element\n@param name\nThe child element name\n@return The child element or null",
"Delete the partition steal information from the rebalancer state\n\n@param stealInfo The steal information to delete",
"Obtains a Ethiopic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Removes the expiration flag.",
"Abort and close the transaction.\nCalling abort abandons all persistent object modifications and releases the\nassociated locks.\nIf transaction is not in progress a TransactionNotInProgressException is thrown",
"Creates the stats type.\n\n@param statsItems\nthe stats items\n@param sortType\nthe sort type\n@param functionParser\nthe function parser\n@return the string",
"Returns the connection that has been saved or null if none."
] |
public static byte[] getBytes(String string, String encoding) {
try {
return string.getBytes(encoding);
} catch(UnsupportedEncodingException e) {
throw new IllegalArgumentException(encoding + " is not a known encoding name.", e);
}
} | [
"Translate the string to bytes using the given encoding\n\n@param string The string to translate\n@param encoding The encoding to use\n@return The bytes that make up the string"
] | [
"Returns the 'Up' - vector of the camera coordinate system.\n\nThe returned vector is relative to the coordinate space defined by the\ncorresponding node.<p>\n\nThe 'right' vector of the camera coordinate system is the cross product\nof the up and lookAt vectors. The default value is 0|1|0. The vector\nmay be normalized, but it needn't.<p>\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 'Up' vector",
"Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts.",
"Read custom fields for a GanttProject task.\n\n@param gpTask GanttProject task\n@param mpxjTask MPXJ Task instance",
"Gets a property from system, environment or an external map.\nThe lookup order is system > env > map > defaultValue.\n\n@param name\nThe name of the property.\n@param map\nThe external map.\n@param defaultValue\nThe value that should be used if property is not found.",
"Returns the finish date for this resource assignment.\n\n@return finish date",
"Populate a sorted list of custom fields to ensure that these fields\nare written to the file in a consistent order.",
"Counts each property for which there is a statement in the given item\ndocument, ignoring the property thisPropertyIdValue to avoid properties\ncounting themselves.\n\n@param statementDocument\n@param usageRecord\n@param thisPropertyIdValue",
"Returns the count of total number of unread inbox messages for the user\n@return int - count of all unread messages",
"Removes the value from the Collection mapped to by this key, leaving the\nrest of the collection intact.\n\n@param key\nthe key to the Collection to remove the value from\n@param value\nthe value to remove"
] |
public static base_response delete(nitro_service client, route6 resource) throws Exception {
route6 deleteresource = new route6();
deleteresource.network = resource.network;
deleteresource.gateway = resource.gateway;
deleteresource.vlan = resource.vlan;
deleteresource.td = resource.td;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete route6."
] | [
"Use this API to add cmppolicylabel resources.",
"Return a logger associated with a particular class name.",
"Use this API to fetch statistics of scpolicy_stats resource of given name .",
"Use this API to add autoscaleprofile resources.",
"Create a new Date. To the last day.",
"Call the onQueryExecuteTimeLimitExceeded hook if necessary\n@param sql sql statement that took too long\n@param queryStartTime time when query was started.",
"Sets the right padding for all cells in the row.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining",
"Explode 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",
"Performs a null edit on an item. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param itemId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection"
] |
public static <K,V> MultiValueMap<K,V> unmodifiableMultiValueMap(MultiValueMap<? extends K, ? extends V> map) {
Assert.notNull(map, "'map' must not be null");
Map<K, List<V>> result = new LinkedHashMap<K, List<V>>(map.size());
for (Map.Entry<? extends K, ? extends List<? extends V>> entry : map.entrySet()) {
List<V> values = Collections.unmodifiableList(entry.getValue());
result.put(entry.getKey(), values);
}
Map<K, List<V>> unmodifiableMap = Collections.unmodifiableMap(result);
return toMultiValueMap(unmodifiableMap);
} | [
"Returns an unmodifiable view of the specified multi-value map.\n\n@param map the map for which an unmodifiable view is to be returned.\n@return an unmodifiable view of the specified multi-value map."
] | [
"Retrieve a single value property.\n\n@param method method definition\n@param object target object\n@param map parameter values",
"Authenticates the API connection for Box Developer Edition.",
"Validates the producer method",
"Returns the metallic factor for PBR shading",
"Internal method which is called when the user has finished editing the title.\n\n@param box the text box which has been edited",
"Helper for reading a mandatory String value list - throwing an Exception if parsing fails.\n@param json The JSON object where the list should be read from.\n@param key The key of the value to read.\n@return The value from the JSON.\n@throws JSONException thrown when parsing fails.",
"Create an info object from an authscope object.\n\n@param authscope the authscope",
"Gets the logger.\n\n@return Returns a Category",
"Returns number of dependencies layers in the image.\n\n@param imageContent\n@return\n@throws IOException"
] |
public static synchronized void register(final String serviceName,
final Callable<Class< ? >> factory) {
if ( serviceName == null ) {
throw new IllegalArgumentException( "serviceName cannot be null" );
}
if ( factory != null ) {
if ( factories == null ) {
factories = new HashMap<String, List<Callable<Class< ? >>>>();
}
List<Callable<Class< ? >>> l = factories.get( serviceName );
if ( l == null ) {
l = new ArrayList<Callable<Class< ? >>>();
factories.put( serviceName,
l );
}
l.add( factory );
}
} | [
"Adds the given service provider factory to the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>"
] | [
"Handles the change of a value in the current translation.\n@param propertyId the property id of the column where the value has changed.",
"returns array with length 3 and optional entries version, encoding, standalone",
"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>",
"Apply content type to response with result provided.\n\nIf `result` is an error then it might not apply content type as requested:\n* If request is not ajax request, then use `text/html`\n* If request is ajax request then apply requested content type only when `json` or `xml` is requested\n* otherwise use `text/html`\n\n@param result\nthe result used to check if it is error result\n@return this `ActionContext`.",
"Build call for postUiAutopilotWaypoint\n\n@param addToBeginning\nWhether this solar system should be added to the beginning of\nall waypoints (required)\n@param clearOtherWaypoints\nWhether clean other waypoints beforing adding this one\n(required)\n@param destinationId\nThe destination to travel to, can be solar system, station or\nstructure's id (required)\n@param datasource\nThe server name you would like data from (optional, default to\ntranquility)\n@param token\nAccess token to use if unable to set a header (optional)\n@param callback\nCallback for upload/download progress\n@return Call to execute\n@throws ApiException\nIf fail to serialize the request body object",
"helper method to set the TranslucentNavigationFlag\n\n@param on",
"Use this API to update Interface.",
"Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content",
"Use this API to update spilloverpolicy."
] |
public static ActorSystem createAndGetActorSystem() {
if (actorSystem == null || actorSystem.isTerminated()) {
actorSystem = ActorSystem.create(PcConstants.ACTOR_SYSTEM, conf);
}
return actorSystem;
} | [
"Create and get actor system.\n\n@return the actor system"
] | [
"Add a column to be set to a value for UPDATE statements. This will generate something like columnName = 'value'\nwith the value escaped if necessary.",
"absolute for basicJDBCSupport\n@param row",
"Use this API to fetch vrid6 resource of given name .",
"The main method, which is essentially the same as in CRFClassifier. See the class documentation.",
"Serializes any char sequence and writes it into specified buffer.",
"Use this API to fetch statistics of nspbr6_stats resource of given name .",
"Clear any current allowed job types and use the given set.\n@param jobTypes the job types to allow",
"Returns all methods for a specific group\n\n@param groupId group ID to remove methods from\n@param filters array of method types to filter by, null means no filter\n@return Collection of methods found\n@throws Exception exception",
"This method attempts to locate a suitable directory by checking a number of different configuration sources.\n\n1 - serverConfigUserDirPropertyName - This value is used to check it a matching system property has been set. 2 -\nsuppliedConfigDir - If a path was specified on the command line it is expected to be passed in as this parameter. 3 -\nserverConfigDirPropertyName - This is a second system property to check.\n\nAnd finally if none of these match defaultBaseDir specifies the configuration being searched and is appended to the JBoss\nHome value discovered when the utility started."
] |
void recover() {
final List<NamespaceSynchronizationConfig> nsConfigs = new ArrayList<>();
for (final MongoNamespace ns : this.syncConfig.getSynchronizedNamespaces()) {
nsConfigs.add(this.syncConfig.getNamespaceConfig(ns));
}
for (final NamespaceSynchronizationConfig nsConfig : nsConfigs) {
nsConfig.getLock().writeLock().lock();
}
try {
for (final NamespaceSynchronizationConfig nsConfig : nsConfigs) {
nsConfig.getLock().writeLock().lock();
try {
recoverNamespace(nsConfig);
} finally {
nsConfig.getLock().writeLock().unlock();
}
}
} finally {
for (final NamespaceSynchronizationConfig nsConfig : nsConfigs) {
nsConfig.getLock().writeLock().unlock();
}
}
} | [
"Recovers the state of synchronization in case a system failure happened. The goal is to revert\nto a known, good state."
] | [
"Use this API to apply nspbr6.",
"Fetch flag resource by Country\n\n@param country Country\n@return int of resource | 0 value if not exists",
"Promote a module in the Grapes server\n\n@param name\n@param version\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Sets the class loader to be used on serialization operations, for data\nstored in the specified fqn and child nodes. Note that if another class\nloader is set for a specific child node tree, the cache will use instead\nthat class loader.\n\n@param regionFqn\n@param classLoader",
"Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler.",
"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",
"Retrieve multiple properties.\n\n@param method method definition\n@param object target object\n@param map parameter values",
"Adds an alias to the currently configured site.\n\n@param alias the URL of the alias server\n@param redirect <code>true</code> to always redirect to main URL\n@param offset the optional time offset for this alias",
"Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values"
] |
public static <T> int createTable(ConnectionSource connectionSource, DatabaseTableConfig<T> tableConfig)
throws SQLException {
Dao<T, ?> dao = DaoManager.createDao(connectionSource, tableConfig);
return doCreateTable(dao, false);
} | [
"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."
] | [
"Updates the styling and content of the internal text area based on the real value, the ghost value, and whether\nit has focus.",
"Return list of all files in the directory.\n\n@param directory target directory on file system\n@return list of files in the directory or empty list if directory is empty.",
"Determines if we need to calculate more dates.\nIf we do not have a finish date, this method falls back on using the\noccurrences attribute. If we have a finish date, we'll use that instead.\nWe're assuming that the recurring data has one or other of those values.\n\n@param calendar current date\n@param dates dates generated so far\n@return true if we should calculate another date",
"Convert gallery name to title key.\n@param gallery gallery name for example \"downloadgallery\"\n@return key as string \"ERR_REASON_NO_DOWNLOADGALLERY_0\"",
"add some validation to see if this miss anything.\n\n@return true, if successful\n@throws ParallelTaskInvalidException\nthe parallel task invalid exception",
"Methods returns InetAddress for localhost\n\n@return InetAddress of the localhost\n@throws UnknownHostException if localhost could not be resolved",
"Request metadata for a specific track ID, given a dbserver connection to a player that has already been set up.\nSeparated into its own method so it could be used multiple times with the same connection when gathering\nall track metadata.\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 client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved metadata, or {@code null} if there is no such track\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations",
"The way calendars are stored in an MSPDI file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects",
"Checks if there is an annotation of the given type on this method or on type level for all interfaces and superclasses\n\n@param method the method to scan\n@param annotation the annotation to search for\n@return <i>true</i> if the given annotation is present on method or type level annotations in the type hierarchy"
] |
public void setBody(String body) {
byte[] bytes = body.getBytes(StandardCharsets.UTF_8);
this.bodyLength = bytes.length;
this.body = new ByteArrayInputStream(bytes);
} | [
"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."
] | [
"Converts a Map to an array of objects, adding only those entries whose key is in the nameMapping array.\n\n@param values\nthe Map of values to convert\n@param nameMapping\nthe keys to extract from the Map (elements in the target array will be added in this order)\n@return the array of Objects\n@throws NullPointerException\nif values or nameMapping is null",
"Prepare a parallel PING Task.\n\n@return the parallel task builder",
"Set hint number for country",
"Merges the item from the resultLocaleValues into the corresponding item of the localeValues.\n@param item the item to merge\n@param localeValues the values where the item gets merged into\n@param resultLocaleValues the values where the item to merge is read from\n@return the modified localeValues with the merged item",
"Get a collection of all of the user's groups.\n\n@return A Collection of Group objects\n@throws FlickrException",
"Create a list of operations required to a boot a managed server.\n\n@param serverName the server name\n@param domainModel the complete domain model\n@param hostModel the local host model\n@param domainController the domain controller\n@return the list of boot operations",
"Run through all maps and remove any references that have been null'd out by the GC.",
"Load model from file\n\n@param gvrContext Valid {@link GVRContext} instance\n@param modelFile Path to the model's file, relative to the {@code assets} directory\n@return root object The root {@link GVRSceneObject} of the model\n@throws IOException If reading the model file fails",
"Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website."
] |
public static String getSerializedVectorClocks(List<VectorClock> vectorClocks) {
List<VectorClockWrapper> vectorClockWrappers = new ArrayList<VectorClockWrapper>();
for(VectorClock vc: vectorClocks) {
vectorClockWrappers.add(new VectorClockWrapper(vc));
}
String serializedVC = "";
try {
serializedVC = mapper.writeValueAsString(vectorClockWrappers);
} catch(Exception e) {
e.printStackTrace();
}
return serializedVC;
} | [
"Function to serialize the given list of Vector clocks into a string. If\nsomething goes wrong, it returns an empty string.\n\n@param vectorClocks The Vector clock list to serialize\n@return The string (JSON) version of the specified Vector clock"
] | [
"Seeks to the given day within the current month\n@param dayOfMonth the day of the month to seek to, represented as an integer\nfrom 1 to 31. Must be guaranteed to parse as an Integer. If this day is\nbeyond the last day of the current month, the actual last day of the month\nwill be used.",
"Generates a sub-trajectory",
"Use this API to fetch auditsyslogpolicy_systemglobal_binding resources of given name .",
"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.",
"Set trimmed value.\n\n@param t Trimmed value.",
"m is more generic than a",
"Use this API to fetch all the cachepolicylabel resources that are configured on netscaler.",
"Cause the container to be cleaned up, including all registered bean\nmanagers, and all deployment services",
"get bearer token returned by IAM in JSON format"
] |
public boolean process( int sideLength,
double diag[] ,
double off[] ,
double eigenvalues[] ) {
if( diag != null )
helper.init(diag,off,sideLength);
if( Q == null )
Q = CommonOps_DDRM.identity(helper.N);
helper.setQ(Q);
this.followingScript = true;
this.eigenvalues = eigenvalues;
this.fastEigenvalues = false;
return _process();
} | [
"Computes the eigenvalue of the provided tridiagonal matrix. Note that only the upper portion\nneeds to be tridiagonal. The bottom diagonal is assumed to be the same as the top.\n\n@param sideLength Number of rows and columns in the input matrix.\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@return true if it succeeds and false if it fails."
] | [
"Patch provided by Avril Kotzen ([email protected])\nDB2 handles TINYINT (for mapping a byte).",
"A convenience method for creating an immutable map.\n\n@param self a Map\n@return an immutable Map\n@see java.util.Collections#unmodifiableMap(java.util.Map)\n@since 1.0",
"Creates an operation to deploy existing deployment content to the runtime.\n\n@param deployment the deployment to deploy\n\n@return the deploy operation",
"Writes the JavaScript code describing the tags as Tag classes to given writer.",
"Generates a Map of query parameters for Artifact regarding the filters\n\n@return Map<String, Object>",
"Use this API to add sslcipher resources.",
"get bearer token returned by IAM in JSON format",
"This function returns the first external IP address encountered\n\n@return IP address or null\n@throws Exception",
"Use this API to fetch cachepolicylabel_binding resource of given name ."
] |
public float getSize(final Axis axis) {
float size = 0;
if (mViewPort != null && mViewPort.isClippingEnabled(axis)) {
size = mViewPort.get(axis);
} else if (mContainer != null) {
size = getSizeImpl(axis);
}
return size;
} | [
"Calculate the layout container size along the axis\n@param axis {@link Axis}\n@return size"
] | [
"Returns an array specifing the index of each hull vertex with respect to\nthe original input points.\n\n@return vertex indices with respect to the original points",
"Compiles and fills the reports design.\n\n@param dr the DynamicReport\n@param layoutManager the object in charge of doing the layout\n@param ds The datasource\n@param _parameters Map with parameters that the report may need\n@return\n@throws JRException",
"Removes bean from scope.\n\n@param name bean name\n@return previous value",
"Uses data from a bar to populate a task.\n\n@param row bar data\n@param task task to populate",
"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",
"Attempts to revert the working copy. In case of failure it just logs the error.",
"True if a CharSequence only contains whitespace characters.\n\n@param self The CharSequence to check the characters in\n@return true If all characters are whitespace characters\n@see #isAllWhitespace(String)\n@since 1.8.2",
"Gets the flags associated with this attribute.\n@return the flags. Will not return {@code null}",
"Helper function to return the minimum size of the workspace to be passed to the reduction given the input and output\ntensors"
] |
public void useOldRESTService() throws Exception {
List<Object> providers = createJAXRSProviders();
com.example.customerservice.CustomerService customerService = JAXRSClientFactory
.createFromModel("http://localhost:" + port + "/examples/direct/rest",
com.example.customerservice.CustomerService.class,
"classpath:/model/CustomerService-jaxrs.xml",
providers,
null);
System.out.println("Using old RESTful CustomerService with old client");
customer.v1.Customer customer = createOldCustomer("Smith Old REST");
customerService.updateCustomer(customer);
customer = customerService.getCustomerByName("Smith Old REST");
printOldCustomerDetails(customer);
} | [
"Old REST client uses old REST service"
] | [
"Normalizes the name so it can be used as Maven artifactId or groupId.",
"Sets the SyncFrequency on this collection.\n\n@param syncFrequency the SyncFrequency that contains all the desired options\n\n@return A Task that completes when the SyncFrequency has been updated",
"Returns true if the lattice contains an entry at the specified location.\n\n@param maturityInMonths The maturity in months to check.\n@param tenorInMonths The tenor in months to check.\n@param moneynessBP The moneyness in bp to check.\n@return True iff there is an entry at the specified location.",
"Read all top level tasks.",
"Traces the duration between origin time in the http Request and time just\nbefore being processed by the fat client\n\n@param operationType\n@param originTimeInMS - origin time in the Http Request\n@param requestReceivedTimeInMs - System Time in ms\n@param keyString",
"Formats a date or a time according to the local conventions.\n\nSince ReadablePartials don't support all fields, we fill in any blanks\nneeded for formatting by using the epoch (1970-01-01T00:00:00Z).\n\nSee {@link android.text.format.DateUtils#formatDateTime} for full docs.\n\n@param context the context is required only if the time is shown\n@param time a point in time\n@param flags a bit mask of formatting options\n@return a string containing the formatted date/time.",
"Computes an MD4 hash for the password.\n\n@param password the password for which to compute the hash\n@throws NoSuchAlgorithmException\n@throws InvalidKeyException\n\n@return the password hash",
"This method will be intercepted by the proxy if it is enabled to return the internal target.\n@return the target.",
"Returns the chunk id for the file name\n\n@param fileName The file name\n@return Chunk id"
] |
public boolean detectSonyMylo() {
if ((userAgent.indexOf(manuSony) != -1)
&& ((userAgent.indexOf(qtembedded) != -1) || (userAgent.indexOf(mylocom2) != -1))) {
return true;
}
return false;
} | [
"Detects if the current browser is a Sony Mylo device.\n@return detection of a Sony Mylo device"
] | [
"Adds a new 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.",
"Map custom info.\n\n@param ciType the custom info type\n@return the map",
"Retrieve a duration field.\n\n@param type field type\n@return Duration instance",
"Get the first non-white X point\n@param img Image n memory\n@return the x start",
"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.",
"Adds the newState and the edge between the currentState and the newState on the SFG.\n\n@param newState the new state.\n@param eventable the clickable causing the new state.\n@return the clone state iff newState is a clone, else returns null",
"Serializes any char sequence and writes it into specified buffer.",
"Provides a RunAs client login context",
"Wrapper functions with no bounds checking are used to access matrix internals"
] |
public static <K, V> QueuedKeyedResourcePool<K, V> create(ResourceFactory<K, V> factory) {
return create(factory, new ResourcePoolConfig());
} | [
"Create a new queued pool using the defaults for key of type K, request of\ntype R, and value of Type V.\n\n@param factory The factory that creates objects\n@return The created pool"
] | [
"Gets the registration point that been associated with the registration for the longest period.\n\n@return the initial registration point, or {@code null} if there are no longer any registration points",
"adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported",
"This method only overrides properties that are specific from Cube like await strategy or before stop events.\n\n@param overrideDockerCompositions\nthat contains information to override.",
"Get an Iterator based on the ReportQuery\n\n@param query\n@return Iterator",
"Changes to cluster OR store definition metadata results in routing\nstrategies changing. These changes need to be propagated to all the\nlisteners.\n\n@param cluster The updated cluster metadata\n@param storeDefs The updated list of store definition",
"Get a compatible constructor\n\n@param type\nClass to look for constructor in\n@param argumentType\nArgument type for constructor\n@return the compatible constructor or null if none found",
"Use this API to fetch all the autoscaleaction resources that are configured on netscaler.",
"Populate the properties indicating the source of this schedule.\n\n@param properties project properties",
"Convenience method for setting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field to set.\n@param value\nValue to which to set the field."
] |
@Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<InternationalFixedDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<InternationalFixedDate>) super.localDateTime(temporal);
} | [
"Obtains a International Fixed local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed local date-time, not null\n@throws DateTimeException if unable to create the date-time"
] | [
"Scan a network interface to find if it has an address space which matches the device we are trying to reach.\nIf so, return the address specification.\n\n@param aDevice the DJ Link device we are trying to communicate with\n@param networkInterface the network interface we are testing\n@return the address which can be used to communicate with the device on the interface, or null",
"Create a container in the platform\n\n@param container\nThe name of the container",
"Adds listeners and reads from a file.\n\n@param reader reader for file type\n@param file schedule data\n@return ProjectFile instance",
"The full path of a jrxml file, or the path in the classpath of a jrxml\nresource.\n\n@param path\n@return",
"Delete the first n items from the list\n\n@param newStart the logsegment who's index smaller than newStart will be deleted.\n@return the deleted segment",
"We have reason to believe we might have enough information to calculate a signature for the track loaded on a\nplayer. Verify that, and if so, perform the computation and record and report the new signature.",
"Cancel request and workers.",
"We have received notification that a device is no longer on the network, so clear out its artwork.\n\n@param announcement the packet which reported the device’s disappearance",
"Transforms user name and icon size into the image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path"
] |
public static Info eye( final Variable A , ManagerTempVariables manager) {
Info ret = new Info();
final VariableMatrix output = manager.createMatrix();
ret.output = output;
if( A instanceof VariableMatrix ) {
ret.op = new Operation("eye-m") {
@Override
public void process() {
DMatrixRMaj mA = ((VariableMatrix)A).matrix;
output.matrix.reshape(mA.numRows,mA.numCols);
CommonOps_DDRM.setIdentity(output.matrix);
}
};
} else if( A instanceof VariableInteger ) {
ret.op = new Operation("eye-i") {
@Override
public void process() {
int N = ((VariableInteger)A).value;
output.matrix.reshape(N,N);
CommonOps_DDRM.setIdentity(output.matrix);
}
};
} else {
throw new RuntimeException("Unsupported variable type "+A);
}
return ret;
} | [
"Returns an identity matrix"
] | [
"Use this API to fetch all the snmpalarm resources that are configured on netscaler.",
"Sets the baseline finish text value.\n\n@param baselineNumber baseline number\n@param value baseline finish text value",
"If a policy already exists on a folder, this will apply that policy to all existing files and sub folders within\nthe target folder.\n\n@param conflictResolution the desired behavior for conflict-resolution. Set to either none or overwrite.",
"Get a View that displays the data at the specified\nposition in the data set. In this case, if we are at\nthe end of the list and we are still in append mode, we\nask for a pending view and return it, plus kick off the\nbackground task to append more data to the wrapped\nadapter.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View",
"Main file parser. Reads GIF content blocks. Stops after reading maxFrames",
"Puts the cached security context in the thread local.\n\n@param context the cache context",
"Use this API to fetch the statistics of all protocoludp_stats resources that are configured on netscaler.",
"generate random velocities in the given range\n@return",
"Parses an item IRI\n\n@param iri\nthe item IRI like http://www.wikidata.org/entity/Q42\n@throws IllegalArgumentException\nif the IRI is invalid or does not ends with an item id"
] |
public static Map<String, Object> with(Object... params) {
Map<String, Object> map = new HashMap<>();
for (int i = 0; i < params.length; i++) {
map.put(String.valueOf(i), params[i]);
}
return map;
} | [
"Convenience wrapper for message parameters\n@param params\n@return"
] | [
"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",
"Add a new script\n\n@param model\n@param name\n@param script\n@return\n@throws Exception",
"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",
"Specify the class represented by this `ClassNode` is annotated\nby an annotation class specified by the name\n@param name the name of the annotation class\n@return this `ClassNode` instance",
"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",
"Loads a classifier from the file specified. If the file's name ends in .gz,\nuses a GZIPInputStream, else uses a regular FileInputStream. This method\ncloses the File when done.\n\n@param file\nLoads a classifier from this file.\n@param props\nProperties in this object will be used to overwrite those\nspecified in the serialized classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"Sets a string-valued additional info entry on the user.\n\n@param username the name of the user\n@param infoName the additional info key\n@param value the additional info value\n\n@throws CmsException if something goes wrong",
"Adds the given property and value to the constructed reference.\n\n@param propertyIdValue\nthe property to add\n@param value\nthe value to add\n@return builder object to continue construction",
"m is more generic than a"
] |
public Collection<SerialMessage> initialize() {
ArrayList<SerialMessage> result = new ArrayList<SerialMessage>();
if (this.getNode().getManufacturer() == 0x010F && this.getNode().getDeviceType() == 0x0501) {
logger.warn("Detected Fibaro FGBS001 Universal Sensor - this device fails to respond to SENSOR_ALARM_GET and SENSOR_ALARM_SUPPORTED_GET.");
return result;
}
result.add(this.getSupportedMessage());
return result;
} | [
"Initializes the alarm sensor command class. Requests the supported alarm types."
] | [
"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 scale vector of the keyframe.",
"Populate a sorted list of custom fields to ensure that these fields\nare written to the file in a consistent order.",
"Use this API to fetch all the cacheobject resources that are configured on netscaler.",
"Shifts are performed based upon singular values computed previously. If it does not converge\nusing one of those singular values it uses a Wilkinson shift instead.",
"Adds OPT_U | OPT_URL option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Returns all the persistent id generators which potentially require the creation of an object in the schema.",
"return a HashMap with all properties, name as key, value as value\n@return the properties",
"Add a number of days to the supplied date.\n\n@param date start date\n@param days number of days to add\n@return new date"
] |
public static <T> T[] sort(T[] self, Comparator<T> comparator) {
return sort(self, true, comparator);
} | [
"Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5"
] | [
"Returns the last available version of an artifact\n\n@param gavc String\n@return String",
"Classify the tokens in a String. Each sentence becomes a separate document.\nDoesn't override default readerAndWriter.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap}).",
"Given a symmetric matrix which is represented by a lower triangular matrix convert it back into\na full symmetric matrix.\n\n@param A (Input) Lower triangular matrix (Output) symmetric matrix",
"Creates a map of metadata from json.\n@param jsonObject metadata json object for metadata field in get /files?fileds=,etadata.scope.template response\n@return Map of String as key a value another Map with a String key and Metadata value",
"append multi clickable SpecialUnit or String\n\n@param specialClickableUnit SpecialClickableUnit\n@param specialUnitOrStrings Unit Or String\n@return",
"Only call async",
"Convert an Object of type Class to an Object.",
"Performs a null edit on an item. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param itemId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"Populate the authenticated user profiles in the Shiro subject.\n\n@param profiles the linked hashmap of profiles"
] |
public void shutdown() {
for (Entry<HttpClientType, AsyncHttpClient> entry : map.entrySet()) {
AsyncHttpClient client = entry.getValue();
if (client != null)
client.close();
}
} | [
"Shutdown each AHC client in the map."
] | [
"This method log given exception in specified listener",
"Set the property on the given object to the new value.\n\n@param object on which to set the property\n@param newValue the new value of the property\n@throws RuntimeException if the property could not be set",
"Gets the top of thread-local shell stack, or null if it is empty.\n\n@return the top of the shell stack",
"Figures out the correct class loader to use for a proxy for a given bean",
"Readable yyyyMMdd int representation of a day, which is also sortable.",
"Use this API to update filterhtmlinjectionparameter.",
"Notifies that multiple header items are removed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Adds, eventually merging, a direction for the specified relation type\n@param relationType\n@param direction",
"Abort and close the transaction. Calling abort abandons all persistent\nobject modifications and releases the associated locks. Aborting a\ntransaction does not restore the state of modified transient objects"
] |
public static final Integer parseInteger(String value)
{
return (value == null || value.length() == 0 ? null : Integer.valueOf(Integer.parseInt(value)));
} | [
"Utility method to convert a String to an Integer, and\nhandles null values.\n\n@param value string representation of an integer\n@return int value"
] | [
"Analyses the command-line arguments which are relevant for the\nserialization process in general. It fills out the class arguments with\nthis data.\n\n@param cmd\n{@link CommandLine} objects; contains the command line\narguments parsed by a {@link CommandLineParser}",
"Add component processing time to given map\n@param mapComponentTimes\n@param component",
"Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value",
"delegate to each contained OJBIterator and release\nits resources.",
"Sets padding between the pages\n@param padding\n@param axis",
"This method retrieves an int value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of an integer\n@return int value",
"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",
"Returns the configured extra parameters that should be given to Solr, or the empty string if no parameters are configured.\n@return The configured extra parameters that should be given to Solr, or the empty string if no parameters are configured.",
"Shuts down the server. Active connections are not affected."
] |
public static Chart getMSDLineWithActiveTransportModelChart(Trajectory t, int lagMin,
int lagMax, double timelag, double diffusionCoefficient, double velocity) {
double[] xData = new double[lagMax - lagMin + 1];
double[] yData = new double[lagMax - lagMin + 1];
double[] modelData = new double[lagMax - lagMin + 1];
MeanSquaredDisplacmentFeature msdeval = new MeanSquaredDisplacmentFeature(
t, lagMin);
msdeval.setTrajectory(t);
msdeval.setTimelag(lagMin);
for (int i = lagMin; i < lagMax + 1; i++) {
msdeval.setTimelag(i);
double msdhelp = msdeval.evaluate()[0];
xData[i - lagMin] = i;
yData[i - lagMin] = msdhelp;
modelData[i - lagMin] = Math.pow(velocity*(i*timelag), 2) + 4*diffusionCoefficient*(i*timelag);//4 * D * Math.pow(i * timelag, a);
}
// Create Chart
Chart chart = QuickChart.getChart("MSD Line", "LAG", "MSD", "MSD",
xData, yData);
chart.addSeries("y=4*D*t + (v*t)^2", xData, modelData);
// Show it
//new SwingWrapper(chart).displayChart();
return chart;
} | [
"Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param diffusionCoefficient Diffusion coefficient\n@param velocity velocity of the active transport"
] | [
"Mbeans for SLOP_UPDATE",
"Set a custom response for this path\n\n@param pathName name of path\n@param customResponse value of custom response\n@return true if success, false otherwise\n@throws Exception exception",
"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.",
"Load the layers based on the default setup.\n\n@param jbossHome the jboss home directory\n@param productConfig the product config\n@param repoRoots the repository roots\n@return the available layers\n@throws IOException",
"GetJob helper - String predicates are all created the same way, so this factors some code.",
"this method is basically checking whether we can return \"this\" for getNetworkSection",
"Extract data for a single predecessor.\n\n@param task parent task\n@param row Synchro predecessor data",
"Finish initializing service.\n\n@throws IOException oop",
"Create a Renderer getting a copy from the prototypes collection.\n\n@param content to render.\n@param parent used to inflate the view.\n@return a new renderer."
] |
private ArrayList<String> getRemoveHeaders() throws Exception {
ArrayList<String> headersToRemove = new ArrayList<String>();
for (EndpointOverride selectedPath : requestInformation.get().selectedResponsePaths) {
// check to see if there is custom override data or if we have headers to remove
List<EnabledEndpoint> points = selectedPath.getEnabledEndpoints();
for (EnabledEndpoint endpoint : points) {
// skip if repeat count is 0
if (endpoint.getRepeatNumber() == 0) {
continue;
}
if (endpoint.getOverrideId() == Constants.PLUGIN_RESPONSE_HEADER_OVERRIDE_REMOVE) {
// add to remove headers array
headersToRemove.add(endpoint.getArguments()[0].toString());
endpoint.decrementRepeatNumber();
}
}
}
return headersToRemove;
} | [
"Obtain collection of headers to remove\n\n@return\n@throws Exception"
] | [
"Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager",
"this class requires that the supplied enum is not fitting a\nCollection case for casting",
"Moves the given row down.\n\n@param row the row to move",
"Write a new line and indent.",
"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.",
"Add an executable \"post-run\" dependent for this model.\n\n@param executable the executable \"post-run\" dependent\n@return the key to be used as parameter to taskResult(string) method to retrieve result of executing\nthe executable \"post-run\" dependent",
"If this address was resolved from a host, returns that host. Otherwise, does a reverse name lookup.",
"Calculate the name of the output value.\n\n@param outputPrefix a nullable prefix to prepend to the name if non-null and non-empty\n@param outputMapper the name mapper\n@param field the field containing the value",
"Mark new or deleted reference elements\n@param broker"
] |
public void recordResourceRequestQueueLength(SocketDestination dest, int queueLength) {
if(dest != null) {
getOrCreateNodeStats(dest).recordResourceRequestQueueLength(null, queueLength);
recordResourceRequestQueueLength(null, queueLength);
} else {
this.resourceRequestQueueLengthHistogram.insert(queueLength);
checkMonitoringInterval();
}
} | [
"Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nrequest queue."
] | [
"Log a byte array.\n\n@param label label text\n@param data byte array",
"Log long string using verbose tag\n\n@param TAG The tag.\n@param longString The long string.",
"Use this API to add gslbservice resources.",
"I pulled this out of internal store so that when doing multiple table\ninheritance, i can recurse this function.\n\n@param obj\n@param cld\n@param oid BRJ: what is it good for ???\n@param insert\n@param ignoreReferences",
"Resolve the disposal method for the given producer method. Any resolved\nbeans will be marked as such for the purpose of validating that all\ndisposal methods are used. For internal use.\n\n@param types the types\n@param qualifiers The binding types to match\n@param declaringBean declaring bean\n@return The set of matching disposal methods",
"Sets the target implementation type required. This can be used to explicitly acquire a specific\nimplementation\ntype and use a query to configure the instance or factory to be returned.\n\n@param type the target implementation type, not null.\n@return this query builder for chaining.",
"Sends a multipart response. Each body part represents a versioned value\nof the given key.\n\n@throws IOException\n@throws MessagingException",
"Registers an event handler in the repository shared between Javascript\nand Java.\n\n@param h Event handler to be registered.\n@return Callback key that Javascript will use to find this handler.",
"Retrieves an integer value from the extended data.\n\n@param type Type identifier\n@return integer value"
] |
private void init() {
if (initialized.compareAndSet(false, true)) {
final RowSorter<? extends TableModel> rowSorter = table.getRowSorter();
rowSorter.toggleSortOrder(1); // sort by date
rowSorter.toggleSortOrder(1); // descending
final TableColumnModel columnModel = table.getColumnModel();
columnModel.getColumn(1).setCellRenderer(dateRenderer);
columnModel.getColumn(2).setCellRenderer(sizeRenderer);
}
} | [
"Initializes the model"
] | [
"Gets the value of the project property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the project property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetProject().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ProjectListType.Project }",
"Configure file logging and stop console logging.\n\n@param filename\nLog to this file.",
"When the JRField needs properties, use this method.\n@param propertyName\n@param value\n@return",
"This method extracts data for a single predecessor from an MSPDI file.\n\n@param currTask Current task object\n@param link Predecessor data",
"Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects",
"Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)",
"Add a polygon symbolizer definition to the rule.\n\n@param styleJson The old style.",
"Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string.",
"Encode a path in a manner suitable for a GET request\n@param in The path to encode, eg \"a/document\"\n@return The encoded path eg \"a%2Fdocument\""
] |
private Class[] getInterfaces(Class clazz) {
Class superClazz = clazz;
Class[] interfaces = clazz.getInterfaces();
// clazz can be an interface itself and when getInterfaces()
// is called on an interface it returns only the extending
// interfaces, not the interface itself.
if (clazz.isInterface()) {
Class[] tempInterfaces = new Class[interfaces.length + 1];
tempInterfaces[0] = clazz;
System.arraycopy(interfaces, 0, tempInterfaces, 1, interfaces.length);
interfaces = tempInterfaces;
}
// add all interfaces implemented by superclasses to the interfaces array
while ((superClazz = superClazz.getSuperclass()) != null) {
Class[] superInterfaces = superClazz.getInterfaces();
Class[] combInterfaces = new Class[interfaces.length + superInterfaces.length];
System.arraycopy(interfaces, 0, combInterfaces, 0, interfaces.length);
System.arraycopy(superInterfaces, 0, combInterfaces, interfaces.length, superInterfaces.length);
interfaces = combInterfaces;
}
/**
* Must remove duplicate interfaces before calling Proxy.getProxyClass().
* Duplicates can occur if a subclass re-declares that it implements
* the same interface as one of its ancestor classes.
**/
HashMap unique = new HashMap();
for (int i = 0; i < interfaces.length; i++) {
unique.put(interfaces[i].getName(), interfaces[i]);
}
/* Add the OJBProxy interface as well */
unique.put(OJBProxy.class.getName(), OJBProxy.class);
interfaces = (Class[])unique.values().toArray(new Class[unique.size()]);
return interfaces;
} | [
"Get interfaces implemented by clazz\n\n@param clazz\n@return"
] | [
"Get the error message with the dependencies appended\n\n@param dependencies - the list with dependencies to be attached to the message\n@param message - the custom error message to be displayed to the user\n@return String",
"Converts an image in RGB mode to BINARY mode\n\n@param img image\n@param threshold grays cale threshold\n@return new MarvinImage instance in BINARY mode",
"Check that each group is satisfied by one and only one field.\n\n@param currentPath the json path to the element being checked",
"Retrieve the correct index for the supplied Table instance.\n\n@param table Table instance\n@return index",
"Helper method that creates a Velocity context and initialises it\nwith a reference to the ReportNG utils, report metadata and localised messages.\n@return An initialised Velocity context.",
"Checks if the provided artifactQuery is valid\n\n@param artifactQuery ArtifactQuery\n@throws WebApplicationException if the data is corrupted",
"Returns PatternParser used to parse the conversion string. Subclasses may\noverride this to return a subclass of PatternParser which recognize\ncustom conversion characters.\n\n@since 0.9.0",
"LRN cross-channel backward computation. Double parameters cast to tensor data type",
"Returns true if the addon depends on reporting."
] |
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"
] | [
"judge if an point in the area or not\n\n@param point\n@param area\n@param offsetRatio\n@return",
"Create the metadata which gets send to the DC when registering.\n\n\n@param hostInfo the local host info\n@param productConfig the product config\n@param ignoredResourceRegistry registry of ignored resources\n@return the host info",
"Adds all rows from the TSV file specified, using the provided delimiter and null value.\n\n@param file The file to read the data from.\n@param delimiter A column delimiter.\n@param nullValue Value to be treated as null in the source data.\n@return {@code this}",
"Change the color of the center which indicates the new color.\n\n@param color int of the color.",
"Sanity-check a new non-beat update, make sure we are still interpolating a sensible position, and correct\nas needed.\n\n@param lastTrackUpdate the most recent digested update received from a player\n@param newDeviceUpdate a new status update from the player\n@param beatGrid the beat grid for the track that is playing, in case we have jumped\n\n@return the playback position we believe that player has reached at that point in time",
"Sets the underlying connect timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#connectTimeout(long, TimeUnit)",
"Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Use this API to unset the properties of responderpolicy resource.\nProperties that need to be unset are specified in args array.",
"Process the layers.conf file.\n\n@param repoRoot the root\n@return the layers conf\n@throws java.io.IOException"
] |
private void removeAllBroadcasts(Set<String> sessionIds) {
if (sessionIds == null) {
for (CmsSessionInfo info : OpenCms.getSessionManager().getSessionInfos()) {
OpenCms.getSessionManager().getBroadcastQueue(info.getSessionId().getStringValue()).clear();
}
return;
}
for (String sessionId : sessionIds) {
OpenCms.getSessionManager().getBroadcastQueue(sessionId).clear();
}
} | [
"Removes all pending broadcasts\n\n@param sessionIds to remove broadcast for (or null for all sessions)"
] | [
"Rotate the specified photo. The only allowed values for degrees are 90, 180 and 270.\n\n@param photoId\nThe photo ID\n@param degrees\nThe degrees to rotate (90, 170 or 270)",
"By default all bean archives see each other.",
"Reads input data from a JSON file in the output directory.",
"Computes the blend weights for the given time and\nupdates them in the target.",
"Fetch all relevant attributes from the backing store and copy instances which are not present in the local bean store.",
"Use this API to unset the properties of gslbsite resources.\nProperties that need to be unset are specified in args array.",
"Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction\nagain.\n\n@since 2.4\n@noreference",
"Creates a copy with verbose mode enabled.\n\n@param serverSetups the server setups.\n@return copies of server setups with verbose mode enabled.",
"Use this API to fetch appflowpolicylabel resource of given name ."
] |
@SafeVarargs
private final <T> Set<T> join(Set<T>... sets)
{
Set<T> result = new HashSet<>();
if (sets == null)
return result;
for (Set<T> set : sets)
{
if (set != null)
result.addAll(set);
}
return result;
} | [
"Join N sets."
] | [
"Set the minimum date limit.",
"Query a player to determine the port on which its database server is running.\n\n@param announcement the device announcement with which we detected a new player on the network.",
"Each element of the second array is added to each element of the first.",
"Gets the invalid message.\n\n@param key the key\n@return the invalid message",
"Ensures that the start and end dates for ranges fit within the\nworking times for a given day.\n\n@param calendar current calendar\n@param list assignment data",
"Set the role info for this user. If set, this will be used to set the user's authorizations.\n\n@param roles the roles\n@since 1.10.0",
"Set the value of the underlying component. Note that this will\nnot work for ListEditor components. Also, note that for a JComboBox,\nThe value object must have the same identity as an object in the drop-down.\n\n@param propName The DMR property name to set.\n@param value The value.",
"Copies the jdb log files, with additional verification of the checksums.\n\n@param sourceFile\n@param destFile\n@throws IOException",
"creates a shape list containing all child shapes and set it to the\ncurrent shape new shape get added to the shape array\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException"
] |
public Automaton getAutomatonById(String id) throws IOException {
if (idToVersion.containsKey(id)) {
List<BytesRef> bytesArray = new ArrayList<>();
Set<String> data = get(id);
if (data != null) {
Term term;
for (String item : data) {
term = new Term("dummy", item);
bytesArray.add(term.bytes());
}
Collections.sort(bytesArray);
return Automata.makeStringUnion(bytesArray);
}
}
return null;
} | [
"Gets the automaton by id.\n\n@param id the id\n@return the automaton by id\n@throws IOException Signals that an I/O exception has occurred."
] | [
"Generate a Jongo query with provided the parameter.\n\n@param key\n@param value\n@return String",
"Internal utility to help JNI add hit objects to the pick list. Specifically for MeshColliders with picking\nfor UV, Barycentric, and normal coordinates enabled",
"Finishes the process of attaching a metadata cache file once it has been opened and validated.\n\n@param slot the slot to which the cache should be attached\n@param cache the opened, validated metadata cache file",
"Copies from buffer to our internal strBufferIndex, expanding the internal buffer if necessary\n@param offset offset in the buffer to start copying from\n@param length length to copy",
"Returns a string that should be used as a label for the given property.\n\n@param propertyIdValue\nthe property to label\n@return the label",
"Converts a list of dates to a Json array with the long representation of the dates as strings.\n@param individualDates the list to convert.\n@return Json array with long values of dates as string",
"Obtain the destination hostname for a source host\n\n@param hostName\n@return",
"Set the role info for this user. If set, this will be used to set the user's authorizations.\n\n@param roles the roles\n@since 1.10.0",
"helper method to activate or deactivate a specific flag\n\n@param bits\n@param on"
] |
public static BoxRetentionPolicy.Info createFinitePolicy(BoxAPIConnection api, String name, int length,
String action, RetentionPolicyParams optionalParams) {
return createRetentionPolicy(api, name, TYPE_FINITE, length, action, optionalParams);
} | [
"Used to create a new finite retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info."
] | [
"Backup all xml files in a given directory.\n\n@param source the source directory\n@param target the target directory\n@throws IOException for any error",
"Extracts warnings that are returned in an API response.\n\n@param root\nroot node of the JSON result",
"Execute a partitioned query using an index and a query selector.\n\nOnly available in partitioned databases. To verify a database is partitioned call\n{@link Database#info()} and check that {@link DbInfo.Props#getPartitioned()} returns\n{@code true}.\n\n<p>Example usage:</p>\n<pre>\n{@code\n// Query database partition 'Coppola'.\nQueryResult<Movie> movies = db.query(\"Coppola\", new QueryBuilder(and(\ngt(\"Movie_year\", 1960),\neq(\"Person_name\", \"Al Pacino\"))).\nfields(\"Movie_name\", \"Movie_year\").\nbuild(), Movie.class);\n}\n</pre>\n\n@param partitionKey Database partition to query.\n@param query String representation of a JSON object describing criteria used to\nselect documents.\n@param classOfT The class of Java objects to be returned in the {@code docs} field of\nresult.\n@param <T> The type of the Java object to be returned in the {@code docs} field of\nresult.\n@return A {@link QueryResult} object, containing the documents matching the query\nin the {@code docs} field.\n@see com.cloudant.client.api.Database#query(String, Class)",
"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}.",
"Information about a specific release.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param releaseName Release name. See {@link #listReleases} for a list of the app's releases.\n@return the release object",
"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.",
"This method allows a predecessor relationship to be removed from this\ntask instance. It will only delete relationships that exactly match the\ngiven targetTask, type and lag time.\n\n@param targetTask the predecessor task\n@param type relation type\n@param lag relation lag\n@return returns true if the relation is found and removed",
"Get the URI for the given statement.\n\n@param statement\nthe statement for which to create a URI\n@return the URI",
"Sets the bean store\n\n@param beanStore The bean store"
] |
public boolean removeHandlerFor(final GVRSceneObject sceneObject) {
sceneObject.detachComponent(GVRCollider.getComponentType());
return null != touchHandlers.remove(sceneObject);
} | [
"Makes the object unpickable and removes the touch handler for it\n@param sceneObject\n@return true if the handler has been successfully removed"
] | [
"Non-zero counts of Householder vectors and computes a permutation\nmatrix that ensures diagonal entires are all structurally nonzero.\n\n@param parent elimination tree\n@param ll linked list for each row that specifies elements that are not zero",
"Returns the constructor of the indirection handler class.\n\n@return The constructor for indirection handlers",
"Get the node that has been selected by the user, or null if\nnothing is selected.\n@return The node or <code>null</code>",
"Use this API to fetch all the appfwprofile resources that are configured on netscaler.",
"Sets the top padding for all cells in the row.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining",
"Part of the endOfRun process that needs the database. May be deferred if the database is not available.",
"refresh credentials if CredentialProvider set",
"Executes the supplied cell processors on the last row of CSV that was read and populates the supplied List of\nprocessed columns.\n\n@param processedColumns\nthe List to populate with processed columns\n@param processors\nthe cell processors\n@return the updated List\n@throws NullPointerException\nif processedColumns or processors is null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif the wrong number of processors are supplied, or CellProcessor execution failed",
"If the user has not specified a project ID, this method\nretrieves the ID of the first project in the file."
] |
@Programmatic
public <T> List<T> fromExcel(
final Blob excelBlob,
final Class<T> cls,
final String sheetName) throws ExcelService.Exception {
return fromExcel(excelBlob, new WorksheetSpec(cls, sheetName));
} | [
"Returns a list of objects for each line in the spreadsheet, of the specified type.\n\n<p>\nIf the class is a view model then the objects will be properly instantiated (that is, using\n{@link DomainObjectContainer#newViewModelInstance(Class, String)}, with the correct\nview model memento); otherwise the objects will be simple transient objects (that is, using\n{@link DomainObjectContainer#newTransientInstance(Class)}).\n</p>"
] | [
"Get the value for a single attribute on an MBean by name.\n@param attributeName the attribute name (can be URL-encoded).\n@return the value as a String.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Append a Handler to every parent of the given class\n@param parent The class of the parents to add the child to\n@param child The Handler to add.",
"Constructs a string representing this address according to the given parameters\n\n@param keepMixed if this address was constructed from a string with mixed representation (a:b:c:d:e:f:1.2.3.4), whether to keep it that way (ignored if makeMixed is true in the params argument)\n@param params the parameters for the address string",
"Start transaction on the underlying connection.",
"Removes metadata related to rebalancing.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeIds Node ids to clear metadata after rebalancing",
"Parses the comma delimited address into model nodes.\n\n@param profileName the profile name for the domain or {@code null} if not a domain\n@param inputAddress the address.\n\n@return a collection of the address nodes.",
"Print the String features generated from a IN",
"Converts any string into a string that is safe to use as a file name.\nThe result will only include ascii characters and numbers, and the \"-\",\"_\", and \".\" characters.",
"Whether the specified JavaBeans property exists on the given type or not.\n\n@param clazz the type of interest\n@param property the JavaBeans property name\n@param elementType the element type to check, must be either {@link ElementType#FIELD} or\n{@link ElementType#METHOD}.\n@return {@code true} if the specified property exists, {@code false} otherwise"
] |
@Pure
public static <P1, P2, P3> Procedure2<P2, P3> curry(final Procedure3<? super P1, ? super P2, ? super P3> procedure, final P1 argument) {
if (procedure == null)
throw new NullPointerException("procedure");
return new Procedure2<P2, P3>() {
@Override
public void apply(P2 p2, P3 p3) {
procedure.apply(argument, p2, p3);
}
};
} | [
"Curries a procedure that takes three arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes two arguments. Never <code>null</code>."
] | [
"Classify the tokens in a String. Each sentence becomes a separate document.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap}).",
"Send a master handoff yield command to all registered listeners.\n\n@param toPlayer the device number to which we are being instructed to yield the tempo master role",
"Runs a query that returns a single int.",
"Determines the feature state\n\n@param context the template context\n@param tag the tag\n@param attributeName the attribute name\n@param attributeValue the attribute value\n@param defaultState the default state if the expression evaluates to null\n@return the feature state",
"Gets information about all of the group memberships for this group.\nDoes not support paging.\n@return a collection of information about the group memberships for this group.",
"Removes a design document using the id and rev from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}",
"Invert by solving for against an identity matrix.\n\n@param A_inv Where the inverted matrix saved. Modified.",
"Validates operations against their description providers\n\n@param operations The operations to validate\n@throws IllegalArgumentException if any operation is not valid",
"Adds a column to this table definition.\n\n@param columnDef The new column"
] |
public void append(Object object, String indentation) {
append(object, indentation, segments.size());
} | [
"Add the string representation of the given object to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param object\nthe appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>."
] | [
"Get the possible beans for the given element\n\n@param resolvable The resolving criteria\n@return An unmodifiable set of matching beans",
"Create a collection object of the given collection type. If none has been given,\nOJB uses RemovalAwareList, RemovalAwareSet, or RemovalAwareCollection depending\non the field type.\n\n@param desc The collection descriptor\n@param collectionClass The collection class specified in the collection-descriptor\n@return The collection object",
"Seeks to the given day within the current year\n@param dayOfYear the day of the year to seek to, represented as an integer\nfrom 1 to 366. Must be guaranteed to parse as an Integer. If this day is\nbeyond the last day of the current year, the actual last day of the year\nwill be used.",
"Enable or disable the default blank validator.",
"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",
"We have an OLE compound document... but is it an MPP file?\n\n@param stream file input stream\n@return ProjectFile instance",
"Set a colspan in a group of columns. First add the cols to the report\n\n@param colNumber the index of the col\n@param colQuantity the number of cols how i will take\n@param colspanTitle colspan title\n@return a Dynamic Report Builder\n@throws ColumnBuilderException When the index of the cols is out of\nbounds.",
"Sets the name of the optional two tabs.\nThe contents of the tabs are filtered based on the name of the tab.\n@param tabs ArrayList of Strings",
"Generate a call to the delegate object."
] |
private void validateJUnit4() throws BuildException {
try {
Class<?> clazz = Class.forName("org.junit.runner.Description");
if (!Serializable.class.isAssignableFrom(clazz)) {
throw new BuildException("At least JUnit version 4.10 is required on junit4's taskdef classpath.");
}
} catch (ClassNotFoundException e) {
throw new BuildException("JUnit JAR must be added to junit4 taskdef's classpath.");
}
} | [
"Validate JUnit4 presence in a concrete version."
] | [
"Creates necessary objects to make a chart an hyperlink\n\n@param design\n@param djlink\n@param chart\n@param name",
"Use this API to update cmpparameter.",
"Convert the holiday format from EquivalenceClassTransformer into a date format\n\n@param holiday the date\n@return a date String in the format yyyy-MM-dd",
"Gathers all parameters' annotations for the given method, starting from the third parameter.",
"Invokes the setter on the bean with the supplied value.\n\n@param bean\nthe bean\n@param setMethod\nthe setter method for the field\n@param fieldValue\nthe field value to set\n@throws SuperCsvException\nif there was an exception invoking the setter",
"Fetch the latest versions for cluster metadata",
"Given the current cluster and a zone id that needs to be dropped, this\nmethod will remove all partitions from the zone that is being dropped and\nmove it to the existing zones. The partitions are moved intelligently so\nas not to avoid any data movement in the existing zones.\n\nThis is achieved by moving the partitions to nodes in the surviving zones\nthat is zone-nry to that partition in the surviving zone.\n\n@param currentCluster Current cluster metadata\n@return Returns an interim cluster with empty partition lists on the\nnodes from the zone being dropped",
"Select a List of values from a Matcher using a Collection\nto identify the indices to be selected.\n\n@param self a Matcher\n@param indices a Collection of indices\n@return a String of the values at the given indices\n@since 1.6.0",
"Use this API to add gslbsite."
] |
public Photoset getInfo(String photosetId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_INFO);
parameters.put("photoset_id", photosetId);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element photosetElement = response.getPayload();
Photoset photoset = new Photoset();
photoset.setId(photosetElement.getAttribute("id"));
User owner = new User();
owner.setId(photosetElement.getAttribute("owner"));
photoset.setOwner(owner);
Photo primaryPhoto = new Photo();
primaryPhoto.setId(photosetElement.getAttribute("primary"));
primaryPhoto.setSecret(photosetElement.getAttribute("secret")); // TODO verify that this is the secret for the photo
primaryPhoto.setServer(photosetElement.getAttribute("server")); // TODO verify that this is the server for the photo
primaryPhoto.setFarm(photosetElement.getAttribute("farm"));
photoset.setPrimaryPhoto(primaryPhoto);
// TODO remove secret/server/farm from photoset?
// It's rather related to the primaryPhoto, then to the photoset itself.
photoset.setSecret(photosetElement.getAttribute("secret"));
photoset.setServer(photosetElement.getAttribute("server"));
photoset.setFarm(photosetElement.getAttribute("farm"));
photoset.setPhotoCount(photosetElement.getAttribute("count_photos"));
photoset.setVideoCount(Integer.parseInt(photosetElement.getAttribute("count_videos")));
photoset.setViewCount(Integer.parseInt(photosetElement.getAttribute("count_views")));
photoset.setCommentCount(Integer.parseInt(photosetElement.getAttribute("count_comments")));
photoset.setDateCreate(photosetElement.getAttribute("date_create"));
photoset.setDateUpdate(photosetElement.getAttribute("date_update"));
photoset.setIsCanComment("1".equals(photosetElement.getAttribute("can_comment")));
photoset.setTitle(XMLUtilities.getChildValue(photosetElement, "title"));
photoset.setDescription(XMLUtilities.getChildValue(photosetElement, "description"));
photoset.setPrimaryPhoto(primaryPhoto);
return photoset;
} | [
"Get the information for a specified photoset.\n\nThis method does not require authentication.\n\n@param photosetId\nThe photoset ID\n@return The Photoset\n@throws FlickrException"
] | [
"Add or remove the active cursors from the provided scene.\n\n@param scene The GVRScene.\n@param add <code>true</code> for add, <code>false</code> to remove",
"Each element of the second array is added to each element of the first.",
"Get interfaces implemented by clazz\n\n@param clazz\n@return",
"Creates a \"delta clone\" of this Map, where only the differences are\nrepresented.",
"Get the names of the paths that would apply to the request\n\n@param requestUrl URL of the request\n@param requestType Type of the request: GET, POST, PUT, or DELETE as integer\n@return JSONArray of path names\n@throws Exception",
"Utility method to convert a String to an Integer, and\nhandles null values.\n\n@param value string representation of an integer\n@return int value",
"Performs a HTTP DELETE request.\n\n@return {@link Response}",
"Combines adjacent blocks of the same type.",
"Recovers the state of synchronization in case a system failure happened. The goal is to revert\nto a known, good state."
] |
public static ObjectName createObjectName(String domain, String type) {
try {
return new ObjectName(domain + ":type=" + type);
} catch(MalformedObjectNameException e) {
throw new VoldemortException(e);
}
} | [
"Create a JMX ObjectName\n\n@param domain The domain of the object\n@param type The type of the object\n@return An ObjectName representing the name"
] | [
"Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor",
"Access an attribute.\n\n@param type the attribute's type, not {@code null}\n@param key the attribute's key, not {@code null}\n@return the attribute value, or {@code null}.",
"Reads the table data from an input stream and breaks\nit down into rows.\n\n@param is input stream",
"Constructs a string representing this address according to the given parameters\n\n@param keepMixed if this address was constructed from a string with mixed representation (a:b:c:d:e:f:1.2.3.4), whether to keep it that way (ignored if makeMixed is true in the params argument)\n@param params the parameters for the address string",
"This method retrieves a String of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return string containing required data",
"Send a beat announcement to all registered master listeners.\n\n@param beat the beat sent by the tempo master",
"Get interfaces implemented by clazz\n\n@param clazz\n@return",
"Executes the API action \"wbsetclaim\" for the given parameters.\n\n@param statement\nthe JSON serialization of claim to add or delete.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Converts the given hash code into an index into the\nhash table."
] |
public void setUserInfo(String username, String infoName, String value) throws CmsException {
CmsUser user = m_cms.readUser(username);
user.setAdditionalInfo(infoName, value);
m_cms.writeUser(user);
} | [
"Sets a string-valued additional info entry on the user.\n\n@param username the name of the user\n@param infoName the additional info key\n@param value the additional info value\n\n@throws CmsException if something goes wrong"
] | [
"Configures the configuration selector.",
"Builds a new instance for the class represented by the given class descriptor.\n\n@param cld The class descriptor\n@return The instance",
"Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect",
"Adds the specified list of users as members of the project. Returns the updated project record.\n\n@param project The project to add members to.\n@return Request object",
"Use this API to update route6 resources.",
"Does the slice contain only 7-bit ASCII characters.",
"Updates the styling and content of the internal text area based on the real value, the ghost value, and whether\nit has focus.",
"Utility function that pauses and asks for confirmation on dangerous\noperations.\n\n@param confirm User has already confirmed in command-line input\n@param opDesc Description of the dangerous operation\n@throws IOException\n@return True if user confirms the operation in either command-line input\nor here.",
"Return all tenors for which data exists.\n\n@return The tenors in months."
] |
protected void onFaultedResolution(String dependencyKey, Throwable throwable) {
if (toBeResolved == 0) {
throw new RuntimeException("invalid state - " + this.key() + ": The dependency '" + dependencyKey + "' is already reported or there is no such dependencyKey");
}
toBeResolved--;
} | [
"Reports a dependency of this node has been faulted.\n\n@param dependencyKey the id of the dependency node\n@param throwable the reason for unsuccessful resolution"
] | [
"Extracts project properties from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"Retrieves the monthly or yearly relative day of the week.\n\n@return day of the week",
"Read ClassDescriptors from the given repository file.\n@see #mergeDescriptorRepository",
"Return the filesystem path needed to mount the NFS filesystem associated with a particular media slot.\n\n@param slot the slot whose filesystem is desired\n\n@return the path to use in the NFS mount request to access the files mounted in that slot\n\n@throws IllegalArgumentException if it is a slot that we don't know how to handle",
"Resolves the configuration.\n\n@param config The specified configuration.\n@return The resolved configuration.",
"Generate a map file from a jar file.\n\n@param jarFile jar file\n@param mapFileName map file name\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws XMLStreamException\n@throws IOException\n@throws ClassNotFoundException\n@throws IntrospectionException",
"Converts an absolute rectangle to a relative one wrt to the current coordinate system.\n\n@param rect absolute rectangle\n@return relative rectangle",
"Returns an array of all declared fields in the given class and all\nsuper-classes.",
"Check whether the URL contains one of the patterns.\n\n@param uri URI\n@param patterns possible patterns\n@return true when URL contains one of the patterns"
] |
protected static BufferedReader createFileReader(String file_name)
throws BeastException {
try {
return new BufferedReader(new FileReader(file_name));
} catch (FileNotFoundException e) {
Logger logger = Logger.getLogger(MASReader.class.getName());
logger.severe("ERROR: " + e.toString());
throw new BeastException("ERROR: " + e.toString(), e);
}
} | [
"Method to read our client's plain text\n\n@param file_name\n@return the filereader to translate client's plain text into our files\n@throws BeastException\nif any problem is found whit the file"
] | [
"Creates a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.",
"Saves the current translations from the container to the respective localization.",
"Scans all Forge addons for files accepted by given filter.",
"Create a forward curve from given times and discount factors.\n\nThe forward curve will have times.length-1 fixing times from times[0] to times[times.length-2]\n<code>\nforward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]);\n</code>\nNote: If time[0] > 0, then the discount factor 1.0 will inserted at time 0.0\n\n@param name The name of this curve.\n@param times A vector of given time points.\n@param givenDiscountFactors A vector of given discount factors (corresponding to the given time points).\n@param paymentOffset The maturity of the underlying index modeled by this curve.\n@return A new ForwardCurve object.",
"This method lists all resources defined in the file.\n\n@param file MPX file",
"Processes one item document. This is often the main workhorse that\ngathers the data you are interested in. You can modify this code as you\nwish.",
"Get the sub registry for the hosts.\n\n@param range the version range\n@return the sub registry",
"Returns the name of the current member which is the name in the case of a field, or the property name for an\naccessor method.\n\n@return The member name\n@exception XDocletException if an error occurs",
"For a given set of calendar data, this method sets the working\nday status for each day, and if present, sets the hours for that\nday.\n\nNOTE: MPP14 defines the concept of working weeks. MPXJ does not\ncurrently support this, and thus we only read the working hours\nfor the default working week.\n\n@param data calendar data block\n@param defaultCalendar calendar to use for default values\n@param cal calendar instance\n@param isBaseCalendar true if this is a base calendar"
] |
public <X> X invokeOnInstance(Object instance, Object... parameters) throws IllegalArgumentException, SecurityException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
final Map<Class<?>, Method> methods = this.methods;
Method method = methods.get(instance.getClass());
if (method == null) {
// the same method may be written to the map twice, but that is ok
// lookupMethod is very slow
Method delegate = annotatedMethod.getJavaMember();
method = SecurityActions.lookupMethod(instance.getClass(), delegate.getName(), delegate.getParameterTypes());
SecurityActions.ensureAccessible(method);
synchronized (this) {
final Map<Class<?>, Method> newMethods = new HashMap<Class<?>, Method>(methods);
newMethods.put(instance.getClass(), method);
this.methods = WeldCollections.immutableMapView(newMethods);
}
}
return cast(method.invoke(instance, parameters));
} | [
"Invokes the method on the class of the passed instance, not the declaring\nclass. Useful with proxies\n\n@param instance The instance to invoke\n@param manager The Bean manager\n@return A reference to the instance"
] | [
"Create a handful of default currencies to keep Primavera happy.",
"Readable yyyyMMdd representation of a day, which is also sortable.",
"Allows to access the identifiers of the current defined roundings.\n\n@param providers the providers and ordering to be used. By default providers and ordering as defined in\n#getDefaultProviders is used, not null.\n@return the set of custom rounding ids, never {@code null}.",
"Parse init parameter for integer value, returning default if not found or invalid",
"Builds the DynamicReport object. Cannot be used twice since this produced\nundesired results on the generated DynamicReport object\n\n@return",
"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",
"Gets the date time str.\n\n@param d\nthe d\n@return the date time str",
"Calculate entropy value.\n@param values Values.\n@return Returns entropy value of the specified histogram array.",
"Gets a method based on data in the override_db table\n\n@param overrideId ID of override\n@return Method found"
] |
public static Artifact createArtifact(final String groupId, final String artifactId, final String version, final String classifier, final String type, final String extension, final String origin){
final Artifact artifact = new Artifact();
artifact.setGroupId(groupId);
artifact.setArtifactId(artifactId);
artifact.setVersion(version);
if(classifier != null){
artifact.setClassifier(classifier);
}
if(type != null){
artifact.setType(type);
}
if(extension != null){
artifact.setExtension(extension);
}
artifact.setOrigin(origin == null ? "maven" : origin);
return artifact;
} | [
"Generates an artifact regarding the parameters.\n\n<P> <b>WARNING:</b> The parameters grId/arId/version should be filled!!! Only classifier and type are not mandatory.\n\n@param groupId String\n@param artifactId String\n@param version String\n@param classifier String\n@param type String\n@param extension String\n@return Artifact"
] | [
"Sets the scale vector of the keyframe.",
"Returns the formula for the percentage\n@param group\n@param type\n@return",
"returns a sorted array of constructors",
"Main method, handles all the setup tasks for DataGenerator a user would normally do themselves\n\n@param args command line arguments",
"Use this API to fetch all the ipset resources that are configured on netscaler.",
"Wraps a linear solver of any type with a safe solver the ensures inputs are not modified",
"Add a single exception to a calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param date calendar exception",
"Checks the hour, minute and second are equal.",
"Get the available sizes of a Photo.\n\nThe boolean toggle allows to (api-)sign the call.\n\nThis way the calling user can retrieve sizes for <b>his own</b> private photos.\n\n@param photoId\nThe photo ID\n@param sign\ntoggle to allow optionally signing the call (Authenticate)\n@return A collection of {@link Size}\n@throws FlickrException"
] |
private int getColor(int value) {
if (value == 0) {
return 0;
}
double scale = Math.log10(value) / Math.log10(this.topValue);
double lengthScale = Math.min(1.0, scale) * (colors.length - 1);
int index = 1 + (int) lengthScale;
if (index == colors.length) {
index--;
}
double partScale = lengthScale - (index - 1);
int r = (int) (colors[index - 1][0] + partScale
* (colors[index][0] - colors[index - 1][0]));
int g = (int) (colors[index - 1][1] + partScale
* (colors[index][1] - colors[index - 1][1]));
int b = (int) (colors[index - 1][2] + partScale
* (colors[index][2] - colors[index - 1][2]));
r = Math.min(255, r);
b = Math.min(255, b);
g = Math.min(255, g);
return (r << 16) | (g << 8) | b;
} | [
"Returns a color for a given absolute number that is to be shown on the\nmap.\n\n@param value\n@return"
] | [
"Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception",
"Return input mapper from processor.",
"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.",
"Adds an audio source to the audio manager.\nAn audio source cannot be played unless it is\nadded to the audio manager. A source cannot be\nadded twice.\n@param audioSource audio source to add",
"Use this API to fetch cachecontentgroup resource of given name .",
"Detects if the current browser is a Sony Mylo device.\n@return detection of a Sony Mylo device",
"get current total used capacity.\n\n@return the total used capacity",
"Compiles and fills the reports design.\n\n@param dr the DynamicReport\n@param layoutManager the object in charge of doing the layout\n@param ds The datasource\n@param _parameters Map with parameters that the report may need\n@return\n@throws JRException",
"Determine the enum value corresponding to the track source slot found in the packet.\n\n@return the proper value"
] |
public static <T> void injectBoundFields(T instance, CreationalContext<T> creationalContext, BeanManagerImpl manager,
Iterable<? extends FieldInjectionPoint<?, ?>> injectableFields) {
for (FieldInjectionPoint<?, ?> injectableField : injectableFields) {
injectableField.inject(instance, manager, creationalContext);
}
} | [
"Injects bound fields\n\n@param instance The instance to inject into"
] | [
"Enter information into the hidden input field.\n\n@param input The input to enter into the hidden field.",
"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.",
"Run a task periodically, for a set number of times.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@param repetitions\nRepeat count\n@return {@code null} if {@code repetitions < 1}; otherwise, an interface\nthat lets you query the status; cancel; or reschedule the event.",
"This procedure is invoked to process the \"subst\" Tcl command.\nSee the user documentation for details on what it does.\n\n@param interp the current interpreter.\n@param argv command arguments.\n@exception TclException if wrong # of args or invalid argument(s).",
"orientation state factory method",
"Use this API to fetch cachepolicylabel_binding resource of given name .",
"Given a layer ID, search for the WMS layer.\n\n@param layerId layer id\n@return WMS layer or null if layer is not a WMS layer",
"Given the lambda value perform an implicit QR step on the matrix.\n\nB^T*B-lambda*I\n\n@param lambda Stepping factor.",
"Filter out interceptors and decorators which are also enabled globally.\n\n@param enabledClasses\n@param globallyEnabledClasses\n@param logMessageCallback\n@param deployment\n@return the filtered list"
] |
private void writeNewLineIndent() throws IOException
{
if (m_pretty)
{
if (!m_indent.isEmpty())
{
m_writer.write('\n');
m_writer.write(m_indent);
}
}
} | [
"Write a new line and indent."
] | [
"FastJSON does not provide the API so we have to create our own",
"Methods returns InetAddress for localhost\n\n@return InetAddress of the localhost\n@throws UnknownHostException if localhost could not be resolved",
"Build filter for the request.\n\n@param layerFilter layer filter\n@param featureIds features to include in report (null for all)\n@return filter\n@throws GeomajasException filter could not be parsed/created",
"Check if the current version match the last release or the last snapshot one\n\n@param artifact\n@return boolean",
"A GString variant of the equivalent GString method.\n\n@param self the original GString\n@param condition the closure that must evaluate to true to continue taking elements\n@return a prefix of elements in the GString where each\nelement passed to the given closure evaluates to true\n@since 2.3.7",
"Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0",
"Create an MD5 hash of a string.\n\n@param input Input string.\n@return Hash of input.\n@throws IllegalArgumentException if {@code input} is blank.",
"Use this API to update gslbservice resources.",
"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"
] |
public static ManagementProtocolHeader parse(DataInput input) throws IOException {
validateSignature(input);
expectHeader(input, ManagementProtocol.VERSION_FIELD);
int version = input.readInt();
expectHeader(input, ManagementProtocol.TYPE);
byte type = input.readByte();
switch (type) {
case ManagementProtocol.TYPE_REQUEST:
return new ManagementRequestHeader(version, input);
case ManagementProtocol.TYPE_RESPONSE:
return new ManagementResponseHeader(version, input);
case ManagementProtocol.TYPE_BYE_BYE:
return new ManagementByeByeHeader(version);
case ManagementProtocol.TYPE_PING:
return new ManagementPingHeader(version);
case ManagementProtocol.TYPE_PONG:
return new ManagementPongHeader(version);
default:
throw ProtocolLogger.ROOT_LOGGER.invalidType("0x" + Integer.toHexString(type));
}
} | [
"Parses the input stream to read the header\n\n@param input data input to read from\n@return the parsed protocol header\n@throws IOException"
] | [
"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.",
"Get a property as a boolean or throw exception.\n\n@param key the property name",
"Returns the u component of a coordinate from a texture coordinate set.\n\n@param vertex the vertex index\n@param coords the texture coordinate set\n@return the u component",
"Add a list of enums to the options map\n@param key The key for the options map (ex: \"include[]\")\n@param list A list of enums",
"Cut the message content to the configured length.\n\n@param event the event",
"Sets the offset for the animation.\n\n@param startOffset animation will start at the specified offset value\n\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code startOffset} is either negative or greater than\nthe animation duration",
"Remove any overrides for an endpoint on the default profile, client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise",
"Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder",
"Used to get the current repository key\n@return keyFromText or keyFromSelect reflected by the dynamicMode flag"
] |
public static void checkXerbla() {
double[] x = new double[9];
System.out.println("Check whether we're catching XERBLA errors. If you see something like \"** On entry to DGEMM parameter number 4 had an illegal value\", it didn't work!");
try {
NativeBlas.dgemm('N', 'N', 3, -1, 3, 1.0, x, 0, 3, x, 0, 3, 0.0, x, 0, 3);
} catch (IllegalArgumentException e) {
check("checking XERBLA", e.getMessage().contains("XERBLA"));
return;
}
assert (false); // shouldn't happen
} | [
"Check whether error handling works. If it works, you should see an\nok, otherwise, you might see the actual error message and then\nthe program exits."
] | [
"Set the locking values\n@param cld\n@param obj\n@param oldLockingValues",
"Reads a markdown link ID.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link ID.",
"Deselects all child items of the provided item.\n@param item the item for which all childs should be deselected.d",
"Marks the start of a query identified by the provided correlationId\n\n@param query - Query data\n@param correlationId - Identifier\n@return Start event to pass to the Events systems EventBus",
"Deletes the first element from the receiver that matches the specified element.\nDoes nothing, if no such matching element is contained.\n\nTests elements for equality or identity as specified by <tt>testForEquality</tt>.\nWhen testing for equality, two elements <tt>e1</tt> and\n<tt>e2</tt> are <i>equal</i> if <tt>(e1==null ? e2==null :\ne1.equals(e2))</tt>.)\n\n@param testForEquality if true -> tests for equality, otherwise for identity.\n@param element the element to be deleted.",
"Reads an argument of type \"nstring\" from the request.",
"Map the EventType.\n\n@param eventType the event type\n@return the event",
"Adds a new gender item and an initial name.\n\n@param entityIdValue\nthe item representing the gender\n@param name\nthe label to use for representing the gender",
"Uploads a new large file.\n@param boxApi the API connection to be used by the upload session.\n@param folderId the id of the folder in which the file will be uploaded.\n@param stream the input stream that feeds the content of the file.\n@param url the upload session URL.\n@param fileName the name of the file to be created.\n@param fileSize the total size of the file.\n@return the created file instance.\n@throws InterruptedException when a thread gets interupted.\n@throws IOException when reading a stream throws exception."
] |
public void weeksChange(String week, Boolean value) {
final WeekOfMonth changedWeek = WeekOfMonth.valueOf(week);
boolean newValue = (null != value) && value.booleanValue();
boolean currentValue = m_model.getWeeksOfMonth().contains(changedWeek);
if (newValue != currentValue) {
if (newValue) {
setPatternScheme(true, false);
m_model.addWeekOfMonth(changedWeek);
onValueChange();
} else {
removeExceptionsOnChange(new Command() {
public void execute() {
m_model.removeWeekOfMonth(changedWeek);
onValueChange();
}
});
}
}
} | [
"Handle a change in the weeks of month.\n@param week the changed weeks checkbox's internal value.\n@param value the new value of the changed checkbox."
] | [
"Assigns retention policy with givenID to the folder.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param folderID id of the folder to assign policy to.\n@return info about created assignment.",
"Entry point for processing filter definitions.\n\n@param properties project properties\n@param filters project filters\n@param fixedData filter fixed data\n@param varData filter var data",
"get TypeSignature given the signature\n\n@param typeSignature\n@param useInternalFormFullyQualifiedName\nif true, fqn in parameterizedTypeSignature must be in the form\n'java/lang/Thread'. If false fqn must be of the form\n'java.lang.Thread'\n@return",
"MPP14 files seem to exhibit some occasional weirdness\nwith duplicate ID values which leads to the task structure\nbeing reported incorrectly. The following method attempts to correct this.\nThe method uses ordering data embedded in the file to reconstruct\nthe correct ID order of the tasks.",
"Get the ver\n\n@param id\n@return",
"Calculate start dates for a monthly absolute recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Lists the buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.",
"Use this API to fetch all the nsdiameter resources that are configured on netscaler.",
"Get the output mapper from processor."
] |
public AT_Row setTargetTranslator(TargetTranslator targetTranslator) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setTargetTranslator(targetTranslator);
}
}
return this;
} | [
"Sets the target translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining"
] | [
"Create the navigation frame.\n@param outputDirectory The target directory for the generated file(s).",
"Returns the Class object of the class specified in the OJB.properties\nfile for the \"PersistentFieldClass\" property.\n\n@return Class The Class object of the \"PersistentFieldClass\" class\nspecified in the OJB.properties file.",
"Parse a currency symbol position from a string representation.\n\n@param value String representation\n@return CurrencySymbolPosition instance",
"for bpm connector",
"Validate that the Unique IDs for the entities in this container are valid for MS Project.\nIf they are not valid, i.e one or more of them are too large, renumber them.",
"Return true if the connection being released is the one that has been saved.",
"Generates a full list of all parents and their children, in order.\n\n@param parentList A list of the parents from\nthe {@link ExpandableRecyclerAdapter}\n@return A list of all parents and their children, expanded",
"Fetches the current online data for the given item, and adds numerical\nlabels if necessary.\n\n@param itemIdValue\nthe id of the document to inspect",
"Finds all lazily-declared classes and methods and adds their definitions to the source."
] |
public HiveShellContainer evaluateStatement(List<? extends Script> scripts, Object target, TemporaryFolder temporaryFolder, Statement base) throws Throwable {
container = null;
FileUtil.setPermission(temporaryFolder.getRoot(), FsPermission.getDirDefault());
try {
LOGGER.info("Setting up {} in {}", getName(), temporaryFolder.getRoot().getAbsolutePath());
container = createHiveServerContainer(scripts, target, temporaryFolder);
base.evaluate();
return container;
} finally {
tearDown();
}
} | [
"Drives the unit test."
] | [
"Processes the template if the property value of the current object on the specified level equals the given value.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"\[email protected] name=\"value\" optional=\"false\" description=\"The value to check for\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"",
"Send JSON representation of given data object to all connections\nconnected to given URL\n\n@param data the data object\n@param url the url",
"Populate a milestone from a Row instance.\n\n@param row Row instance\n@param task Task instance",
"Reads input data from a JSON file in the output directory.",
"Determine if a CharSequence can be parsed as a Double.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isDouble(String)\n@since 1.8.2",
"Re-Tag the websocket connection hold by this context with label specified.\nThis method will remove all previous tags on the websocket connection and then\ntag it with the new label.\n@param label the label.\n@return this websocket conext.",
"Use this API to fetch all the snmpoption resources that are configured on netscaler.",
"Add profile to database, return collection of profile data. Called when 'enter' is hit in the UI\ninstead of 'submit' button\n\n@param model\n@param name\n@return\n@throws Exception",
"Visits a parameter of this method.\n\n@param name\nparameter name or null if none is provided.\n@param access\nthe parameter's access flags, only <tt>ACC_FINAL</tt>,\n<tt>ACC_SYNTHETIC</tt> or/and <tt>ACC_MANDATED</tt> are\nallowed (see {@link Opcodes})."
] |
public ValueContainer[] getCurrentLockingValues(Object o) throws PersistenceBrokerException
{
FieldDescriptor[] fields = getLockingFields();
ValueContainer[] result = new ValueContainer[fields.length];
for (int i = 0; i < result.length; i++)
{
result[i] = new ValueContainer(fields[i].getPersistentField().get(o), fields[i].getJdbcType());
}
return result;
} | [
"returns an Array with an Objects CURRENT locking VALUES , BRJ\n@throws PersistenceBrokerException if there is an erros accessing o field values"
] | [
"Check type.\n\n@param type the type\n@return the boolean",
"Get EditMode based on os and mode\n\n@return edit mode",
"Use this API to fetch all the configstatus resources that are configured on netscaler.",
"Registers a handler and returns the callback key to be passed to\nJavascript.\n\n@param handler Handler to be registered.\n@return A String random UUID that can be used as the callback key.",
"Returns first resolver that accepts the given resolverId.\nIn case none is found null is returned.\n@param resolverId identifier of the resolver\n@return found resolver or null otherwise",
"Say whether this character is an annotation introducing\ncharacter.\n\n@param ch The character to check\n@return Whether it is an annotation introducing character",
"Create a Count-Query for QueryByCriteria",
"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",
"A map of the header key value pairs. Keys are strings and values are either list of strings or a\nstring.\n\n@param headers the header map"
] |
public static void mark(DeploymentUnit unit) {
unit = DeploymentUtils.getTopDeploymentUnit(unit);
unit.putAttachment(MARKER, Boolean.TRUE);
} | [
"Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead"
] | [
"Prints a few aspects of the TreebankLanguagePack, just for debugging.",
"Use this API to Import sslfipskey resources.",
"Create an index of base font numbers and their associated base\nfont instances.\n@param data property data",
"Returns a Span that covers all rows beginning with a prefix String parameters will be encoded\nas UTF-8",
"Read a single resource assignment.\n\n@param resource MPXJ resource\n@param assignment Phoenix assignment",
"helper method to set the TranslucentNavigationFlag\n\n@param on",
"This method extracts project extended attribute data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Sets the given value on an the receivers's accessible field with the given name.\n\n@param receiver the receiver, never <code>null</code>\n@param fieldName the field's name, never <code>null</code>\n@param value the value to set\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#set(Object, Object)}\n@throws IllegalArgumentException see {@link Field#set(Object, Object)}",
"Adds a metadata classification to the specified file.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type added to the file."
] |
protected List<String> getPluginsPath() throws IOException {
List<String> result = new ArrayList<>();
Path pluginsDirectory = PROPERTIES.getAllureHome().resolve("plugins").toAbsolutePath();
if (Files.notExists(pluginsDirectory)) {
return Collections.emptyList();
}
try (DirectoryStream<Path> plugins = Files.newDirectoryStream(pluginsDirectory, JAR_FILES)) {
for (Path plugin : plugins) {
result.add(plugin.toUri().toURL().toString());
}
}
return result;
} | [
"Returns the plugins classpath elements."
] | [
"Orders first by word, then by tag.\n\n@param wordTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)",
"Creates an option to deploy existing content to the runtime for each deployment\n\n@param deployments a set of deployments to deploy\n\n@return the deploy operation",
"Write a short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at",
"Must be called before any other functions. Declares and sets up internal data structures.\n\n@param numSamples Number of samples that will be processed.\n@param sampleSize Number of elements in each sample.",
"Checks if the given project exists or not.\n\n@param name project name\n@return true/false\n@throws IllegalArgumentException",
"Create a string from bytes using the given encoding\n\n@param bytes The bytes to create a string from\n@param encoding The encoding of the string\n@return The created string",
"Use this API to fetch statistics of servicegroup_stats resource of given name .",
"Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise",
"Copy bytes from an input stream to a file and log progress\n@param is the input stream to read\n@param destFile the file to write to\n@throws IOException if an I/O error occurs"
] |
VersionExcludeData getVersionIgnoreData(int major, int minor, int micro) {
VersionExcludeData result = registry.get(new VersionKey(major, minor, micro));
if (result == null) {
result = registry.get(new VersionKey(major, minor, null));
}
return result;
} | [
"Gets the host-ignore data for a slave host running the given version.\n\n@param major the kernel management API major version\n@param minor the kernel management API minor version\n@param micro the kernel management API micro version\n\n@return the host-ignore data, or {@code null} if there is no matching registration"
] | [
"Gets or creates id of the entity type.\n\n@param entityType entity type name.\n@param allowCreate if set to true and if there is no entity type like entityType,\ncreate the new id for the entityType.\n@return entity type id.",
"Creates a Bytes object by copying the data of the CharSequence and encoding it using UTF-8.",
"Configure a new user defined field.\n\n@param fieldType field type\n@param dataType field data type\n@param name field name",
"Sets the max.\n\n@param n the new max",
"Serializes Number value and writes it into specified buffer.",
"Use this API to clear bridgetable resources.",
"Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions.",
"Given a HTTPResponce, process it, throwing an error if needed and return a Token for the next\nrequest.",
"simple echo implementation"
] |
public static void composeThroughMask(Raster src, WritableRaster dst, Raster sel) {
int x = src.getMinX();
int y = src.getMinY();
int w = src.getWidth();
int h = src.getHeight();
int srcRGB[] = null;
int selRGB[] = null;
int dstRGB[] = null;
for ( int i = 0; i < h; i++ ) {
srcRGB = src.getPixels(x, y, w, 1, srcRGB);
selRGB = sel.getPixels(x, y, w, 1, selRGB);
dstRGB = dst.getPixels(x, y, w, 1, dstRGB);
int k = x;
for ( int j = 0; j < w; j++ ) {
int sr = srcRGB[k];
int dir = dstRGB[k];
int sg = srcRGB[k+1];
int dig = dstRGB[k+1];
int sb = srcRGB[k+2];
int dib = dstRGB[k+2];
int sa = srcRGB[k+3];
int dia = dstRGB[k+3];
float a = selRGB[k+3]/255f;
float ac = 1-a;
dstRGB[k] = (int)(a*sr + ac*dir);
dstRGB[k+1] = (int)(a*sg + ac*dig);
dstRGB[k+2] = (int)(a*sb + ac*dib);
dstRGB[k+3] = (int)(a*sa + ac*dia);
k += 4;
}
dst.setPixels(x, y, w, 1, dstRGB);
y++;
}
} | [
"Compose src onto dst using the alpha of sel to interpolate between the two.\nI can't think of a way to do this using AlphaComposite.\n@param src the source raster\n@param dst the destination raster\n@param sel the mask raster"
] | [
"Use this API to fetch all the responderparam resources that are configured on netscaler.",
"Find and validate manifest.json file in Artifactory for the current image.\nSince provided imageTag differs between reverse-proxy and proxy-less configuration, try to build the correct manifest path.\n@param server\n@param dependenciesClient\n@param listener\n@return\n@throws IOException",
"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",
"Determine which math transform to use when creating the coordinate of the label.\n\n@param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined.",
"Get information about this database.\n\n@return DbInfo encapsulating the database info\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/database.html#getting-database-details\"\ntarget=\"_blank\">Databases - read</a>",
"Use this API to update csparameter.",
"Inspects the object and all superclasses for public, non-final, accessible methods and returns a\ncollection containing all the attributes found.\n\n@param classToInspect the class under inspection.",
"Returns the expected name of a workspace for a given suffix\n@param suffix\n@return",
"Gets Widget layout dimension\n@param axis The {@linkplain Layout.Axis axis} to obtain layout size for\n@return dimension"
] |
public static base_response unset(nitro_service client, systemuser resource, String[] args) throws Exception{
systemuser unsetresource = new systemuser();
unsetresource.username = resource.username;
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of systemuser resource.\nProperties that need to be unset are specified in args array."
] | [
"Test a given date for being easter sunday.\n\nThe method uses the algorithms sometimes cited as Meeus,Jones, Butcher Gregorian algorithm.\nTaken from http://en.wikipedia.org/wiki/Computus\n\n@param date The date to check.\n@return True, if date is easter sunday.",
"Record the checkout queue length\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param queueLength The number of entries in the \"synchronous\" checkout\nqueue.",
"Sets a new image\n\n@param BufferedImage imagem",
"NOT IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery",
"Compute the CRC32 of the segment of the byte array given by the\nspecificed size and offset\n\n@param bytes The bytes to checksum\n@param offset the offset at which to begin checksumming\n@param size the number of bytes to checksum\n@return The CRC32",
"Get PhoneNumber object\n\n@return PhonenUmber | null on error",
"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\"",
"Build the Criteria using multiple ORs\n@param ids collection of identities\n@param fields\n@return Criteria",
"Returns an integer array that contains the default values for all the\ntexture parameters.\n\n@return an integer array that contains the default values for all the\ntexture parameters."
] |
private void lockOnChange(Object propertyId) throws CmsException {
if (isDescriptorProperty(propertyId)) {
lockDescriptor();
} else {
Locale l = m_bundleType.equals(BundleType.PROPERTY) ? m_locale : null;
lockLocalization(l);
}
} | [
"Lock a file lazily, if a value that should be written to the file has changed.\n@param propertyId the table column in which the value has changed (e.g., KEY, TRANSLATION, ...)\n@throws CmsException thrown if locking fails."
] | [
"This function helps handle the following case\n\n<OL>\n<LI>TX1 locls r1 col1\n<LI>TX1 fails before unlocking\n<LI>TX2 attempts to write r1:col1 w/o reading it\n</OL>\n\n<p>\nIn this case TX2 would not roll back TX1, because it never read the column. This function\nattempts to handle this case if TX2 fails. Only doing this in case of failures is cheaper than\ntrying to always read unread columns.\n\n@param cd Commit data",
"Loops over cluster and repeatedly tries to break up contiguous runs of\npartitions. After each phase of breaking up contiguous partitions, random\npartitions are selected to move between zones to balance the number of\npartitions in each zone. The second phase may re-introduce contiguous\npartition runs in another zone. Therefore, this overall process is\nrepeated multiple times.\n\n@param nextCandidateCluster\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return updated cluster",
"a useless object at the top level of the response JSON for no reason at all.",
"List the photos with the most views, comments or favorites.\n\n@param date\n(Optional) 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. If no date is provided, all time view counts will be returned.\n@param sort\n(Optional) The order in which to sort returned photos. Defaults to views. The possible values are views, comments and favorites. Other sort\noptions are available through flickr.photos.search.\n@param perPage\n(Optional) Number of referrers 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@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html\"",
"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",
"Asynchronous call that begins execution of the task\nand returns immediately.",
"Populate the authenticated user profiles in the Shiro subject.\n\n@param profiles the linked hashmap of profiles",
"Get an extent aware Iterator based on the ReportQuery\n\n@param query\n@param cld\n@return OJBIterator",
"Reads a duration value. This method relies on the fact that\nthe units of the duration have been specified elsewhere.\n\n@param value Duration value\n@param type type of units of the duration\n@return Duration instance"
] |
private int findYOffsetForGroupLabel(JRDesignBand band) {
int offset = 0;
for (JRChild jrChild : band.getChildren()) {
JRDesignElement elem = (JRDesignElement) jrChild;
if (elem.getKey() != null && elem.getKey().startsWith("variable_for_column_")) {
offset = elem.getY();
break;
}
}
return offset;
} | [
"Used to ensure that the general footer label will be at the same Y position as the variables in the band.\n@param band\n@return"
] | [
"Returns script view\n\n@param model\n@return\n@throws Exception",
"Helper method for formatting connection establishment messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] <connectionReason>\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG.",
"Get the connectivity state as reported by the Android system\n\n@param context Android context\n@return the connectivity state as reported by the Android system",
"Initial setup of the service worker registration.",
"A static method that provides an easy way to create a list of a\ncertain parametric type.\nThis static constructor works better with generics.\n\n@param list The list to pad\n@param padding The padding element (may be null)\n@return The padded list",
"Main method of RendererAdapter. This method has the responsibility of update the\nRendererBuilder values and create or recycle a new Renderer. Once the renderer has been\nobtained the RendereBuilder will call the render method in the renderer and will return the\nRenderer root view to the ListView.\n\nIf rRendererBuilder returns a null Renderer this method will throw a\nNullRendererBuiltException.\n\n@param position to render.\n@param convertView to use to recycle.\n@param parent used to inflate views.\n@return view rendered.",
"Determine which unit to use when creating grid labels.\n\n@param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined.",
"Create and serialize a WorkerStatus for a pause event.\n\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus",
"Returns the counters with keys as the first key and count as the\ntotal count of the inner counter for that key\n\n@return counter of type K1"
] |
private void writeToFile(List<DomainControllerData> data, String domainName) throws IOException {
if(domainName == null || data == null) {
return;
}
if (conn == null) {
init();
}
try {
String key = S3Util.sanitize(domainName) + "/" + S3Util.sanitize(DC_FILE_NAME);
byte[] buf = S3Util.domainControllerDataToByteBuffer(data);
S3Object val = new S3Object(buf, null);
if (usingPreSignedUrls()) {
Map headers = new TreeMap();
headers.put("x-amz-acl", Arrays.asList("public-read"));
conn.put(pre_signed_put_url, val, headers).connection.getResponseMessage();
} else {
Map headers = new TreeMap();
headers.put("Content-Type", Arrays.asList("text/plain"));
conn.put(location, key, val, headers).connection.getResponseMessage();
}
}
catch(Exception e) {
throw HostControllerLogger.ROOT_LOGGER.cannotWriteToS3File(e.getLocalizedMessage());
}
} | [
"Write the domain controller data to an S3 file.\n\n@param data the domain controller data\n@param domainName the name of the directory in the bucket to write the S3 file to\n@throws IOException"
] | [
"Gets the current page\n@return",
"Arbitrarily resolve the inconsistency by choosing the first object if\nthere is one.\n\n@param values The list of objects\n@return A single value, if one exists, taken from the input list.",
"Returns the locale specified by the named scoped attribute or context\nconfiguration parameter.\n\n<p> The named scoped attribute is searched in the page, request,\nsession (if valid), and application scope(s) (in this order). If no such\nattribute exists in any of the scopes, the locale is taken from the\nnamed context configuration parameter.\n\n@param pageContext the page in which to search for the named scoped\nattribute or context configuration parameter\n@param name the name of the scoped attribute or context configuration\nparameter\n\n@return the locale specified by the named scoped attribute or context\nconfiguration parameter, or <tt>null</tt> if no scoped attribute or\nconfiguration parameter with the given name exists",
"Assigns a retention policy to all items with a given metadata template, optionally matching on fields.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param templateID the ID of the metadata template to assign the policy to.\n@param filter optional fields to match against in the metadata template.\n@return info about the created assignment.",
"Check the model for expression values.\n\n@param model the model\n@return the attribute containing an expression",
"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",
"Creates a non-binary text media type with the given subtype and a specified encoding",
"Check if the current version match the last release or the last snapshot one\n\n@param artifact\n@return boolean",
"Method will be executed asynchronously."
] |
public String[][] getRequiredRuleNames(Param param) {
if (isFiltered(param)) {
return EMPTY_ARRAY;
}
AbstractElement elementToParse = param.elementToParse;
String ruleName = param.ruleName;
if (ruleName == null) {
return getRequiredRuleNames(param, elementToParse);
}
return getAdjustedRequiredRuleNames(param, elementToParse, ruleName);
} | [
"Returns the names of parser rules that should be called in order to obtain the follow elements for the parser\ncall stack described by the given param."
] | [
"Loads the given class, respecting the given classloader.\n@param clazz class to load\n@return Loaded class\n@throws ClassNotFoundException",
"Print a percent complete value.\n\n@param value Double instance\n@return percent complete value",
"Read project calendars.",
"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.",
"Flag that the processor has completed execution.\n\n@param processorGraphNode the node that has finished.",
"Register a new DropPasteWorkerInterface.\n@param worker The new worker",
"Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@param fHeight What to multiply the height by. value < 1 scales down, and value > one scales up\n@return A scaled image",
"Verify that cluster is congruent to store def wrt zones.",
"Resolve the given string using any plugin and the DMR resolve method"
] |
private String readOptionalString(JSONValue val) {
JSONString str = null == val ? null : val.isString();
if (str != null) {
return str.stringValue();
}
return null;
} | [
"Read an optional string value form a JSON value.\n@param val the JSON value that should represent the string.\n@return the string from the JSON or null if reading the string fails."
] | [
"Classify the tokens in a String. Each sentence becomes a separate document.\nDoesn't override default readerAndWriter.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap}).",
"Verify that all OGM custom externalizers are present.\nN.B. even if some Externalizer is only needed in specific configuration,\nit is not safe to start a CacheManager without one as the same CacheManager\nmight be used, or have been used in the past, to store data using a different\nconfiguration.\n\n@see ExternalizerIds\n@see AdvancedExternalizer\n@param externalCacheManager the provided CacheManager to validate",
"Upgrade the lock on the given object to the given lock mode. The call has\nno effect if the object's current lock is already at or above that level of\nlock mode.\n\n@param obj object to acquire a lock on.\n@param lockMode lock mode to acquire. The lock modes\nare <code>READ</code> , <code>UPGRADE</code> , and <code>WRITE</code> .\n\n@exception LockNotGrantedException Description of Exception",
"Over simplistic helper to compare two strings to check radio buttons.\n\n@param value1 the first value\n@param value2 the second value\n@return \"checked\" if both values are equal, the empty String \"\" otherwise",
"Add classes to the map file.\n\n@param writer XML stream writer\n@param jarFile jar file\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws IOException\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException",
"On throwable.\n\n@param cause\nthe cause",
"Tokenizes lookup fields and returns all matching buckets in the\nindex.",
"Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null.",
"Adds a procedure argument definition to this class descriptor.\n\n@param argDef The procedure argument definition"
] |
public static String getFailureDescriptionAsString(final ModelNode result) {
if (isSuccessfulOutcome(result)) {
return "";
}
final String msg;
if (result.hasDefined(ClientConstants.FAILURE_DESCRIPTION)) {
if (result.hasDefined(ClientConstants.OP)) {
msg = String.format("Operation '%s' at address '%s' failed: %s", result.get(ClientConstants.OP), result.get(ClientConstants.OP_ADDR), result
.get(ClientConstants.FAILURE_DESCRIPTION));
} else {
msg = String.format("Operation failed: %s", result.get(ClientConstants.FAILURE_DESCRIPTION));
}
} else {
msg = String.format("An unexpected response was found checking the deployment. Result: %s", result);
}
return msg;
} | [
"Parses the result and returns the failure description. If the result was successful, an empty string is\nreturned.\n\n@param result the result of executing an operation\n\n@return the failure message or an empty string"
] | [
"Checks the preconditions for creating a new LMinMax processor.\n\n@param min\nthe minimum value (inclusive)\n@param max\nthe maximum value (inclusive)\n@throws IllegalArgumentException\nif {@code max < min}",
"checking availability of ClassInfo.setFlags method is just workaround for JANDEX-37",
"Returns the name of the current member which is the name in the case of a field, or the property name for an\naccessor method.\n\n@return The member name\n@exception XDocletException if an error occurs",
"Enforces the correct srid on incoming features.\n\n@param feature\nobject to enforce srid on\n@throws LayerException\nproblem getting or setting srid",
"Removes the supplied marker from the map.\n\n@param marker",
"Deletes the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name.",
"Parses btch api response to create a list of BoxAPIResponse objects.\n@param batchResponse response of a batch api request\n@return list of BoxAPIResponses",
"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",
"Initialize the ui elements for the management part."
] |
protected void setBandsFinalHeight() {
log.debug("Setting bands final height...");
List<JRBand> bands = new ArrayList<JRBand>();
Utils.addNotNull(bands, design.getPageHeader());
Utils.addNotNull(bands, design.getPageFooter());
Utils.addNotNull(bands, design.getColumnHeader());
Utils.addNotNull(bands, design.getColumnFooter());
Utils.addNotNull(bands, design.getSummary());
Utils.addNotNull(bands, design.getBackground());
bands.addAll(((JRDesignSection) design.getDetailSection()).getBandsList());
Utils.addNotNull(bands, design.getLastPageFooter());
Utils.addNotNull(bands, design.getTitle());
Utils.addNotNull(bands, design.getPageFooter());
Utils.addNotNull(bands, design.getNoData());
for (JRGroup jrgroup : design.getGroupsList()) {
DJGroup djGroup = (DJGroup) getReferencesMap().get(jrgroup.getName());
JRDesignSection headerSection = (JRDesignSection) jrgroup.getGroupHeaderSection();
JRDesignSection footerSection = (JRDesignSection) jrgroup.getGroupFooterSection();
if (djGroup != null) {
for (JRBand headerBand : headerSection.getBandsList()) {
setBandFinalHeight((JRDesignBand) headerBand, djGroup.getHeaderHeight(), djGroup.isFitHeaderHeightToContent());
}
for (JRBand footerBand : footerSection.getBandsList()) {
setBandFinalHeight((JRDesignBand) footerBand, djGroup.getFooterHeight(), djGroup.isFitFooterHeightToContent());
}
} else {
bands.addAll(headerSection.getBandsList());
bands.addAll(footerSection.getBandsList());
}
}
for (JRBand jrDesignBand : bands) {
setBandFinalHeight((JRDesignBand) jrDesignBand);
}
} | [
"Sets the necessary height for all bands in the report, to hold their children"
] | [
"Calculates the text height for the indicator value and sets its x-coordinate.",
"Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails.",
"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()",
"Get the configured hive.execution.engine. If not set it will default to the default value of HiveConf",
"A callback that handles requestComplete event from NIO selector manager\nWill try any possible nodes and pass itself as callback util all nodes\nare exhausted\n\n@param slopKey\n@param slopVersioned\n@param nodesToTry List of nodes to try to contact. Will become shorter\nafter each callback",
"Set the value as provided.\n@param value the serial date value as JSON string.",
"Map the Primavera UDF to a custom field.\n\n@param fieldType parent object type\n@param dataType UDF data type\n@param name UDF name\n@return FieldType instance",
"Send message to all connections labeled with tag specified\nwith self connection excluded\n\n@param message the message to be sent\n@param tag the string that tag the connections to be sent\n@return this context",
"Gets constructors with given annotation type\n\n@param annotationType The annotation type to match\n@return A set of abstracted constructors with given annotation type. If\nthe constructors set is empty, initialize it first. Returns an\nempty set if there are no matches.\n@see org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType#getEnhancedConstructors(Class)"
] |
public static clusternodegroup_binding get(nitro_service service, String name) throws Exception{
clusternodegroup_binding obj = new clusternodegroup_binding();
obj.set_name(name);
clusternodegroup_binding response = (clusternodegroup_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch clusternodegroup_binding resource of given name ."
] | [
"Use this API to unset the properties of snmpalarm resources.\nProperties that need to be unset are specified in args array.",
"Convert an Object to a Date, without an Exception",
"Returns a list of Elements form the DOM tree, matching the tag element.",
"Use this API to fetch all the auditmessages resources that are configured on netscaler.\nThis uses auditmessages_args which is a way to provide additional arguments while fetching the resources.",
"Creates the default editor state for editing a bundle with descriptor.\n@return the default editor state for editing a bundle with descriptor.",
"Apply all attributes on the given context, hereby existing entries are preserved.\n\n@param context the context to be applied, not null.\n@return this Builder, for chaining\n@see #importContext(AbstractContext, boolean)",
"called when we are completed finished with using the TcpChannelHub",
"Sanity checks the input or declares a new matrix. Return matrix is an identity matrix.",
"Returns the name of the bone.\n\n@return the name"
] |
public Iterable<BoxMetadataCascadePolicy.Info> getMetadataCascadePolicies(String... fields) {
Iterable<BoxMetadataCascadePolicy.Info> cascadePoliciesInfo =
BoxMetadataCascadePolicy.getAll(this.getAPI(), this.getID(), fields);
return cascadePoliciesInfo;
} | [
"Retrieves all Metadata Cascade Policies on a folder.\n\n@param fields optional fields to retrieve for cascade policies.\n@return the Iterable of Box Metadata Cascade Policies in your enterprise."
] | [
"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",
"Entry point for this example\nUses HDFS ToolRunner to wrap processing of\n\n@param args Command-line arguments for HDFS example",
"Post a module to the server\n\n@param module\n@param user\n@param password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Return a new instance of the BufferedImage\n\n@return BufferedImage",
"Performs a remote service method invocation. This method is called by\ngenerated proxy classes.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a {@link Request} object that can be used to track the request",
"This is needed when running on slaves.",
"Performs a delete operation with the specified composite request object\n\n@param deleteRequestObject Composite request object containing the key to\ndelete\n@return true if delete was successful. False otherwise",
"Configure the access permissions required to access this print job.\n\n@param template the containing print template which should have sufficient information to\nconfigure the access.\n@param context the application context",
"we only use the registrationList map if the object is not a proxy. During the\nreference locking, we will materialize objects and they will enter the registered for\nlock map."
] |
public static <K, V, T> List<Versioned<V>> get(Store<K, V, T> storageEngine, K key, T transform) {
Map<K, List<Versioned<V>>> result = storageEngine.getAll(Collections.singleton(key),
Collections.singletonMap(key,
transform));
if(result.size() > 0)
return result.get(key);
else
return Collections.emptyList();
} | [
"Implements get by delegating to getAll."
] | [
"Requests that the given namespace be started listening to for change events.\n\n@param namespace the namespace to listen for change events on.",
"Register a new PerformanceMonitor with Spring if it does not already exist.\n\n@param beanName The name of the bean that this performance monitor is wrapped around\n@param registry The registry where all the spring beans are registered",
"Specify additional query parameters to be passed to the filter function.\n\n@param queryParams map of key-value parameters\n@return this Replication instance to set more options or trigger the replication",
"Generates a schedule based on some meta data. The schedule generation\nconsiders short periods.\n\n@param referenceDate The date which is used in the schedule to internally convert dates to doubles, i.e., the date where t=0.\n@param startDate The start date of the first period.\n@param frequency The frequency.\n@param maturity The end date of the last period.\n@param daycountConvention The daycount convention.\n@param shortPeriodConvention If short period exists, have it first or last.\n@param dateRollConvention Adjustment to be applied to the all dates.\n@param businessdayCalendar Businessday calendar (holiday calendar) to be used for date roll adjustment.\n@param fixingOffsetDays Number of business days to be added to period start to get the fixing date.\n@param paymentOffsetDays Number of business days to be added to period end to get the payment date.\n@return The corresponding schedule\n@deprecated Will be removed in version 2.3",
"Insert entity object. The caller must first initialize the primary key\nfield.",
"Create a ModelNode representing the JVM the instance is running on.\n\n@return a ModelNode representing the JVM the instance is running on.\n@throws OperationFailedException",
"Parses an RgbaColor from a hexadecimal, rgb, rgba, hsl, or hsla\nvalue.\n\n@return returns the parsed color",
"Read hints from a file.",
"Scans given archive for files passing given filter, adds the results into given list."
] |
public final static int readMdLink(final StringBuilder out, final String in, final int start)
{
int pos = start;
int counter = 1;
while (pos < in.length())
{
final char ch = in.charAt(pos);
if (ch == '\\' && pos + 1 < in.length())
{
pos = escape(out, in.charAt(pos + 1), pos);
}
else
{
boolean endReached = false;
switch (ch)
{
case '(':
counter++;
break;
case ' ':
if (counter == 1)
{
endReached = true;
}
break;
case ')':
counter--;
if (counter == 0)
{
endReached = true;
}
break;
}
if (endReached)
{
break;
}
out.append(ch);
}
pos++;
}
return (pos == in.length()) ? -1 : pos;
} | [
"Reads a markdown link.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link."
] | [
"Checks if this service implementation accepts the given resource path.\n@param resourcePath Resource path\n@return true if the implementation matches and the configuration is not invalid.",
"Use this API to fetch server_service_binding resources of given name .",
"The Baseline Finish field shows the planned completion date for a task\nat the time you saved a baseline. Information in this field becomes\navailable when you set a baseline for a task.\n\n@return Date",
"Initializes the metadataCache for MetadataStore",
"Read phases and activities from the Phoenix file to create the task hierarchy.\n\n@param phoenixProject all project data\n@param storepoint storepoint containing current project data",
"Convolve with a 2D kernel.\n@param kernel the kernel\n@param inPixels the input pixels\n@param outPixels the output pixels\n@param width the width\n@param height the height\n@param alpha include alpha channel\n@param edgeAction what to do at the edges",
"Initialize the metadata cache with system store list",
"Use this API to update vridparam.",
"Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path"
] |
public static cmpparameter get(nitro_service service) throws Exception{
cmpparameter obj = new cmpparameter();
cmpparameter[] response = (cmpparameter[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the cmpparameter resources that are configured on netscaler."
] | [
"Verify that cluster is congruent to store def wrt zones.",
"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.",
"Performs an implicit double step given the set of two imaginary eigenvalues provided.\nSince one eigenvalue is the complex conjugate of the other only one set of real and imaginary\nnumbers is needed.\n\n@param x1 upper index of submatrix.\n@param x2 lower index of submatrix.\n@param real Real component of each of the eigenvalues.\n@param img Imaginary component of one of the eigenvalues.",
"Get the bone index for the given scene object.\n\n@param bone GVRSceneObject bone to search for\n@return bone index or -1 for root bone.\n@see #getParentBoneIndex",
"Use this API to update systemuser resources.",
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added",
"Get the bounding box for a certain tile.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns the bounding box for the tile, expressed in the layer's coordinate system.",
"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",
"Adds the given service provider factory to the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>"
] |
public Object getRealValue()
{
if(valueRealSubject != null)
{
return valueRealSubject;
}
else
{
TransactionExt tx = getTransaction();
if((tx != null) && tx.isOpen())
{
prepareValueRealSubject(tx.getBroker());
}
else
{
if(getPBKey() != null)
{
PBCapsule capsule = new PBCapsule(getPBKey(), null);
try
{
prepareValueRealSubject(capsule.getBroker());
}
finally
{
capsule.destroy();
}
}
else
{
getLog().warn("No tx, no PBKey - can't materialise value with Identity " + getKeyOid());
}
}
}
return valueRealSubject;
} | [
"Returns the real value object."
] | [
"This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset to position 0 before\ncalling this method and the caller must reset it after the call\nreturns\n@return True if the buffer holds a complete request, false otherwise",
"OJB can handle only classes that declare at least one primary key attribute,\nthis method checks this condition.\n\n@param realObject The real object to check\n@throws ClassNotPersistenceCapableException thrown if no primary key is specified for the objects class",
"Validates the input parameters.",
"Main method of the class, which handles the process of creating the tests\n\n@param requirementsFolder\n, it is the folder where the plain text given by the client is\nstored\n@param platformName\n, to choose the MAS platform (JADE, JADEX, etc.)\n@param src_test_dir\n, the folder where our classes are created\n@param tests_package\n, the name of the package where the stories are created\n@param casemanager_package\n, the path where casemanager must be created\n@param loggingPropFile\n, properties file\n@throws Exception\n, if any error is found in the configuration",
"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.",
"Convenience method to convert a CSV string list to a set. Note that this\nwill suppress duplicates.\n\n@param str the input String\n@return a Set of String entries in the list",
"Return a logger associated with a particular class name.",
"Determine whether the user has followed bean-like naming convention or not.",
"Given a block of data representing completed work, this method will\nretrieve a set of TimephasedWork instances which represent\nthe day by day work carried out for a specific resource assignment.\n\n@param calendar calendar on which date calculations are based\n@param resourceAssignment resource assignment\n@param data completed work data block\n@return list of TimephasedWork instances"
] |
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"
] | [
"Returns the real value object.",
"helper method to set the TranslucentStatusFlag\n\n@param on",
"Creates an operations that targets this handler.\n@param operationToValidate the operation that this handler will validate\n@return the validation operation",
"Backup all xml files in a given directory.\n\n@param source the source directory\n@param target the target directory\n@throws IOException for any error",
"Generates a unique signature for an annotated type. Members without\nannotations are omitted to reduce the length of the signature\n\n@param <X>\n@param annotatedType\n@return hash of a signature for a concrete annotated type",
"parse the target resource and add it to the current shape\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Updates the story and returns the full record for the updated story.\nOnly comment stories can have their text updated, and only comment stories and\nattachment stories can be pinned. Only one of `text` and `html_text` can be specified.\n\n@param story Globally unique identifier for the story.\n@return Request object",
"Send a request to another handler internal to the server, getting back the response body and response code.\n\n@param request request to send to another handler.\n@return {@link InternalHttpResponse} containing the response code and body.",
"Encodes the given URI query parameter with the given encoding.\n@param queryParam the query parameter to be encoded\n@param encoding the character encoding to encode to\n@return the encoded query parameter\n@throws UnsupportedEncodingException when the given encoding parameter is not supported"
] |
public synchronized Widget measureChild(final int dataIndex, boolean calculateOffset) {
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "measureChild dataIndex = %d", dataIndex);
Widget widget = mContainer.get(dataIndex);
if (widget != null) {
synchronized (mMeasuredChildren) {
mMeasuredChildren.add(dataIndex);
}
}
return widget;
} | [
"Calculate the child size along the axis and measure the offset inside the\nlayout container\n@param dataIndex of child in Container\n@return true item fits the container, false - otherwise"
] | [
"Curries a function that takes three arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes two arguments. Never <code>null</code>.",
"Remove an addon from an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param addonName Addon name. See {@link #listAppAddons} for a list of addons that can be used.\n@return the request object",
"Returns an Array with an Objects PK VALUES if convertToSql is true, any\nassociated java-to-sql conversions are applied. If the Object is a Proxy\nor a VirtualProxy NO conversion is necessary.\n\n@param objectOrProxy\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException",
"Term prefix.\n\n@param term\nthe term\n@return the string",
"Returns the compact records for all sections in the specified project.\n\n@param project The project to get sections from.\n@return Request object",
"This method returns the length of overlapping time between two time\nranges.\n\n@param start1 start of first range\n@param end1 end of first range\n@param start2 start start of second range\n@param end2 end of second range\n@return overlapping time in milliseconds",
"Un-serialize a Json into BuildInfo\n@param buildInfo String\n@return Map<String,String>\n@throws IOException",
"Use this API to fetch all the appfwjsoncontenttype resources that are configured on netscaler.",
"A GString variant of the equivalent GString method.\n\n@param self the original GString\n@param condition the closure that must evaluate to true to continue taking elements\n@return a prefix of elements in the GString where each\nelement passed to the given closure evaluates to true\n@since 2.3.7"
] |
public void addHiDpiImage(String factor, CmsJspImageBean image) {
if (m_hiDpiImages == null) {
m_hiDpiImages = CmsCollectionsGenericWrapper.createLazyMap(new CmsScaleHiDpiTransformer());
}
m_hiDpiImages.put(factor, image);
} | [
"adds a CmsJspImageBean as hi-DPI variant to this image\n@param factor the variant multiplier, e.g. \"2x\" (the common retina multiplier)\n@param image the image to be used for this variant"
] | [
"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",
"Computes FPS average",
"This method is used to retrieve the calendar associated\nwith a task. If no calendar is associated with a task, this method\nreturns null.\n\n@param task MSPDI task\n@return calendar instance",
"Initialize elements from the duration panel.",
"Calculates all dates of the series.\n@return all dates of the series in milliseconds.",
"Obtains a local date in Pax calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Pax local date, not null\n@throws DateTimeException if unable to create the date",
"Use this API to update responderpolicy resources.",
"Calculate the highlight color. Saturate at 0xff to make sure that high values\ndon't result in aliasing.\n\n@param _Slice The Slice which will be highlighted.",
"Rollback an app to a specific release.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param releaseUuid Release UUID. See {@link #listReleases} for a list of the app's releases.\n@return the release object"
] |
public void mergeSubtree(final OperationTransformerRegistry targetRegistry, final Map<PathAddress, ModelVersion> subTree) {
for(Map.Entry<PathAddress, ModelVersion> entry: subTree.entrySet()) {
mergeSubtree(targetRegistry, entry.getKey(), entry.getValue());
}
} | [
"Merge a subtree.\n\n@param targetRegistry the target registry\n@param subTree the subtree"
] | [
"Use this API to fetch sslfipskey resource of given name .",
"Use this API to delete sslcipher of given name.",
"Launch Sample Activity residing in the same module",
"Adds the specified class to the internal class graph along with its\nrelations and dependencies, eventually inferring them, according to the\nOptions specified for this matcher\n@param cd",
"Stops the processing and prints the final time.",
"Compose src onto dst using the alpha of sel to interpolate between the two.\nI can't think of a way to do this using AlphaComposite.\n@param src the source raster\n@param dst the destination raster\n@param sel the mask raster",
"Delivers the correct JSON Object for the Stencilset Extensions\n\n@param extensions",
"returns a dynamic Proxy that implements all interfaces of the\nclass described by this ClassDescriptor.\n\n@return Class the dynamically created proxy class",
"Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero"
] |
public static Map<String, ByteRunAutomaton> byteRunAutomatonMap(
Map<String, Automaton> automatonMap) {
HashMap<String, ByteRunAutomaton> byteRunAutomatonMap = new HashMap<>();
if (automatonMap != null) {
for (Entry<String, Automaton> entry : automatonMap.entrySet()) {
byteRunAutomatonMap.put(entry.getKey(),
new ByteRunAutomaton(entry.getValue()));
}
}
return byteRunAutomatonMap;
} | [
"Byte run automaton map.\n\n@param automatonMap the automaton map\n@return the map"
] | [
"Adds a function to the end of the token list\n@param function Function which is to be added\n@return The new Token created around function",
"URLEncode a string\n@param s\n@return",
"Must be called before any other functions. Declares and sets up internal data structures.\n\n@param numSamples Number of samples that will be processed.\n@param sampleSize Number of elements in each sample.",
"Gets a first data set value.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation",
"Retrieves the timephased breakdown of actual cost.\n\n@return timephased actual cost",
"Return the most appropriate log type. This should _never_ return null.",
"Checks that the modified features exist.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Implement this to do your drawing.\n\n@param canvas the canvas on which the background will be drawn",
"Returns all accessible projects of the given organizational unit.\n\nThat is all projects which are owned by the current user or which are\naccessible for the group of the user.<p>\n\n@param cms the opencms context\n@param ouFqn the fully qualified name of the organizational unit to get projects for\n@param includeSubOus if all projects of sub-organizational units should be retrieved too\n\n@return all <code>{@link org.opencms.file.CmsProject}</code> objects in the organizational unit\n\n@throws CmsException if operation was not successful"
] |
private String getClassLabel(EntityIdValue entityIdValue) {
ClassRecord classRecord = this.classRecords.get(entityIdValue);
String label;
if (classRecord == null || classRecord.itemDocument == null) {
label = entityIdValue.getId();
} else {
label = getLabel(entityIdValue, classRecord.itemDocument);
}
EntityIdValue labelOwner = this.labels.get(label);
if (labelOwner == null) {
this.labels.put(label, entityIdValue);
return label;
} else if (labelOwner.equals(entityIdValue)) {
return label;
} else {
return label + " (" + entityIdValue.getId() + ")";
}
} | [
"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"
] | [
"Use this API to fetch vpntrafficpolicy_vpnglobal_binding resources of given name .",
"If this Aztec Code symbol is part of a series of Aztec Code symbols appended in a structured format,\nthis method sets the unique message ID for the series. Values may not contain spaces and must contain\nonly printable ASCII characters. Message IDs are optional.\n\n@param messageId the unique message ID for the series that this symbol is part of",
"Sets the initial pivot ordering and compute the F-norm squared for each column",
"Reads all sub-categories below the provided category.\n@return The map from the provided category to it's sub-categories in a {@link CmsJspCategoryAccessBean}.",
"Checks attributes for rejection\n\n@param rejectedAttributes gathers information about failed attributes\n@param attributeValue the attribute value",
"Print rate.\n\n@param rate Rate instance\n@return rate value",
"Restores a saved connection state into this BoxAPIConnection.\n\n@see #save\n@param state the saved state that was created with {@link #save}.",
"Moves the drawer to the position passed.\n\n@param position The position the content is moved to.\n@param velocity Optional velocity if called by releasing a drag event.\n@param animate Whether the move is animated.",
"Boot with the given operations, performing full model and capability registry validation.\n\n@param bootOperations the operations. Cannot be {@code null}\n@param rollbackOnRuntimeFailure {@code true} if the boot should fail if operations fail in the runtime stage\n@return {@code true} if boot was successful\n@throws ConfigurationPersistenceException"
] |
private static long createLongSeed(byte[] seed)
{
if (seed == null || seed.length != SEED_SIZE_BYTES)
{
throw new IllegalArgumentException("Java RNG requires a 64-bit (8-byte) seed.");
}
return BinaryUtils.convertBytesToLong(seed, 0);
} | [
"Helper method to convert seed bytes into the long value required by the\nsuper class."
] | [
"Determine if a key version is invalid by comparing the version's\nexistence and required writes configuration\n\n@param keyVersionNodeSetMap A map that contains keys mapping to a map\nthat maps versions to set of PrefixNodes\n@param requiredWrite Required Write configuration",
"This filter changes the amount of color in each of the three channels.\n\n@param r The amount of redness in the picture. Can range from -100 to 100 in percentage.\n@param g The amount of greenness in the picture. Can range from -100 to 100 in percentage.\n@param b The amount of blueness in the picture. Can range from -100 to 100 in percentage.\n@throws IllegalArgumentException if {@code r}, {@code g}, or {@code b} are outside of bounds.",
"Method will be executed asynchronously.",
"Does this procedure return any values to the 'caller'?\n\n@return <code>true</code> if the procedure returns at least 1\nvalue that is returned to the caller.",
"Call rollback on the underlying connection.",
"Use this API to update appfwlearningsettings resources.",
"Returns the parsed story from the given path\n\n@param configuration the Configuration used to run story\n@param storyPath the story path\n@return The parsed Story",
"Prints to a file. If the file does not exist, rewrites the file;\ndoes not append.",
"Verifies application name. Avoids characters that Zookeeper does not like in nodes & Hadoop\ndoes not like in HDFS paths.\n\n@param name Application name\n@throws IllegalArgumentException If name contains illegal characters"
] |
@Override
public boolean retainAll(Collection<?> collection) {
if (dao == null) {
return false;
}
boolean changed = false;
CloseableIterator<T> iterator = closeableIterator();
try {
while (iterator.hasNext()) {
T data = iterator.next();
if (!collection.contains(data)) {
iterator.remove();
changed = true;
}
}
return changed;
} finally {
IOUtils.closeQuietly(iterator);
}
} | [
"Uses the iterator to run through the dao and retain only the items that are in the passed in collection. This\nwill remove the items from the associated database table as well.\n\n@return Returns true of the collection was changed at all otherwise false."
] | [
"Add an exception to a calendar.\n\n@param parentNode parent node\n@param exception calendar exceptions",
"Sets the bottom padding for all cells in the table.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining",
"Returns the log message id used by this checker. This is used to group it so that all attributes failing a type of rejction\nend up in the same error message. This default implementation uses the formatted log message with an empty attribute map as the id.\n\n@return the log message id",
"Parses the buffer into body content\n@param in ByteBuffer to parse\n@return a ByteBuffer with the parsed body content. Buffer in may not be depleted. If more data is\nneeded, null is returned. In the case of content complete, an empty ByteBuffer is returned.\n@throws BaseExceptions.ParserException",
"Creates SLD rules for each old style.",
"Parses command-line and removes metadata related to rebalancing.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"Helper method that encapsulates the minimum logic for adding a job to a\nqueue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJson\nthe job serialized as JSON",
"Use this API to add clusternodegroup.",
"a specialized version of solve that avoid additional checks that are not needed."
] |
public CollectionRequest<Team> findByOrganization(String organization) {
String path = String.format("/organizations/%s/teams", organization);
return new CollectionRequest<Team>(this, Team.class, path, "GET");
} | [
"Returns the compact records for all teams in the organization visible to\nthe authorized user.\n\n@param organization Globally unique identifier for the workspace or organization.\n@return Request object"
] | [
"Launch Navigation Service residing in the navigation module",
"Get the list of all nodes and the list of active nodes in the cluster.\n\n@return Membership object encapsulating lists of all nodes and the cluster nodes\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-_membership-\">\n_membership</a>",
"Generate and return the list of statements to drop a database table.",
"Returns the precedence of the specified operator. Non-operator's will\nreceive -1 or a GroovyBugError, depending on your preference.",
"test, how many times the group was present in the list of groups.",
"Create a new Date. To the last day.",
"try to find the first none null table name for the given class-descriptor.\nIf cld has extent classes, all of these cld's searched for the first none null\ntable name.",
"Retrieves state and metrics information for individual client connection.\n\n@param name connection name\n@return connection information",
"Determine if a CharSequence can be parsed as an Integer.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isInteger(String)\n@since 1.8.2"
] |
protected boolean checkActionPackages(String classPackageName) {
if (actionPackages != null) {
for (String packageName : actionPackages) {
String strictPackageName = packageName + ".";
if (classPackageName.equals(packageName) || classPackageName.startsWith(strictPackageName))
return true;
}
}
return false;
} | [
"Checks if class package match provided list of action packages\n\n@param classPackageName\nname of class package\n@return true if class package is on the {@link #actionPackages} list"
] | [
"Removes elements from begin to end from the list, inclusive. Returns a new list which\nis composed of the removed elements",
"Use this API to fetch vlan_nsip_binding resources of given name .",
"The derivative of the objective function. You may override this method\nif you like to implement your own derivative.\n\n@param parameters Input value. The parameter vector.\n@param derivatives Output value, where derivatives[i][j] is d(value(j)) / d(parameters(i)\n@throws SolverException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Converts a Map to an array of objects, adding only those entries whose key is in the nameMapping array.\n\n@param values\nthe Map of values to convert\n@param nameMapping\nthe keys to extract from the Map (elements in the target array will be added in this order)\n@return the array of Objects\n@throws NullPointerException\nif values or nameMapping is null",
"Convert the continuous values into discrete values by chopping up\nthe distribution into several equally-sized intervals.",
"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.",
"Create a temporary directory under a given workspace",
"Indicates if a bean is proxyable\n\n@param bean The bean to test\n@return True if proxyable, false otherwise",
"Invoke an operation on an MBean by name.\nNote that only basic data types are supported for parameter values.\n@param operationName the operation name (can be URL-encoded).\n@param parameterMap the {@link Map} of parameter names and value arrays.\n@return the returned value from the operation.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported."
] |
public void performImplicitDoubleStep(int x1, int x2 , double real , double img ) {
double a11 = A.get(x1,x1);
double a21 = A.get(x1+1,x1);
double a12 = A.get(x1,x1+1);
double a22 = A.get(x1+1,x1+1);
double a32 = A.get(x1+2,x1+1);
double p_plus_t = 2.0*real;
double p_times_t = real*real + img*img;
double b11,b21,b31;
if( useStandardEq ) {
b11 = (a11*a11 - p_plus_t*a11+p_times_t)/a21 + a12;
b21 = a11+a22-p_plus_t;
b31 = a32;
} else {
// this is different from the version in the book and seems in my testing to be more resilient to
// over flow issues
b11 = (a11*a11 - p_plus_t*a11+p_times_t) + a12*a21;
b21 = (a11+a22-p_plus_t)*a21;
b31 = a32*a21;
}
performImplicitDoubleStep(x1, x2, b11, b21, b31);
} | [
"Performs an implicit double step given the set of two imaginary eigenvalues provided.\nSince one eigenvalue is the complex conjugate of the other only one set of real and imaginary\nnumbers is needed.\n\n@param x1 upper index of submatrix.\n@param x2 lower index of submatrix.\n@param real Real component of each of the eigenvalues.\n@param img Imaginary component of one of the eigenvalues."
] | [
"Plots the MSD curve for trajectory t.\n@param t List of trajectories\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds",
"Set the amount of padding between child objects.\n@param axis {@link Axis}\n@param padding",
"Returns the latest change events for a given namespace.\n\n@param namespace the namespace to get events for.\n@return the latest change events for a given namespace.",
"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",
"Gets the info for a running build\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param buildId the unique identifier of the build",
"Set the refresh frequency of this scene object.\nUse NONE for improved performance when the text is set initially and never\nchanged.\n\n@param frequency\nThe refresh frequency of this TextViewSceneObject.",
"Read configuration from zookeeper",
"Gets information about all of the group memberships for this group.\nDoes not support paging.\n@return a collection of information about the group memberships for this group.",
"Returns the ARGB components for all pixels in this image\n\n@return an array containing an array for each ARGB components in that order."
] |
private void setPlaying(boolean playing) {
PlaybackState oldState = currentSimpleState();
if (oldState != null && oldState.playing != playing) {
setPlaybackState(oldState.player, oldState.position, playing);
}
} | [
"Set whether the player holding the waveform is playing, which changes the indicator color to white from red.\nThis method can only be used in situations where the component is tied to a single player, and therefore has\na single playback position.\n\n@param playing if {@code true}, draw the position marker in white, otherwise red\n\n@see #setPlaybackState"
] | [
"used by Error template",
"Modify the meta-data for a photoset.\n\n@param photosetId\nThe photoset ID\n@param title\nA new title\n@param description\nA new description (can be null)\n@throws FlickrException",
"Wrapper delayed emission, based on delayProvider.\n\n@param event the event to emit\n@param milliseconds the delay in milliseconds\n@param <T> the type of event\n@return delayed observable",
"Unmarshals the descriptor content.\n\n@throws CmsXmlException thrown if the XML structure of the descriptor is wrong.\n@throws CmsException thrown if reading the descriptor file fails.",
"Set the channel. This will return whether the channel could be set successfully or not.\n\n@param newChannel the channel\n@return whether the operation succeeded or not",
"defines the KEY in the parent report parameters map where to get the subreport parameters map.\n@param path where to get the parameter map for the subrerpot.\n@return",
"Main method of VPRendererAdapter. This method has the responsibility of update the\nRendererBuilder values and create or recycle a new Renderer. Once the renderer has been\nobtained the RendereBuilder will call the render method in the renderer and will return the\nRenderer root view to the ViewPager.\n\nIf RendererBuilder returns a null Renderer this method will throw a\nNullRendererBuiltException.\n\n@param parent The containing View in which the page will be shown.\n@param position to render.\n@return view rendered.",
"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",
"This method merges together assignment data for the same cost.\n\n@param list assignment data"
] |
public PropertiesEnvelope createUserProperties(String userId, AppProperties properties, String aid) throws ApiException {
ApiResponse<PropertiesEnvelope> resp = createUserPropertiesWithHttpInfo(userId, properties, aid);
return resp.getData();
} | [
"Create User Application Properties\nCreate application properties for a user\n@param userId User Id (required)\n@param properties Properties to be updated (required)\n@param aid Application ID (optional)\n@return PropertiesEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body"
] | [
"Handles subscription verification callback from Facebook.\n@param subscription The subscription name.\n@param challenge A challenge that Facebook expects to be returned.\n@param verifyToken A verification token that must match with the subscription's token given when the controller was created.\n@return The challenge if the verification token matches; blank string otherwise.",
"Read the top level tasks from GanttProject.\n\n@param gpProject GanttProject project",
"Returns the current revision.",
"Creates an Odata filter string that can be used for filtering list results by tags.\n\n@param tagName the name of the tag. If not provided, all resources will be returned.\n@param tagValue the value of the tag. If not provided, only tag name will be filtered.\n@return the Odata filter to pass into list methods",
"Sets the specified long attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Adds a new step to the list of steps.\n\n@param name Name of the step to add.\n@param robot The name of the robot ot use with the step.\n@param options extra options required for the step.",
"Creates a real agent in the platform\n\n@param agent_name\nThe name that the agent is gonna have in the platform\n@param path\nThe path of the description (xml) of the agent",
"Displays a localized warning.\n@param caption the caption of the warning.\n@param description the description of the warning.",
"Check whether the URL contains one of the patterns.\n\n@param uri URI\n@param patterns possible patterns\n@return true when URL contains one of the patterns"
] |
private static Iterable<BoxUser.Info> getUsersInfoForType(final BoxAPIConnection api,
final String filterTerm, final String userType, final String externalAppUserId, final String... fields) {
return new Iterable<BoxUser.Info>() {
public Iterator<BoxUser.Info> iterator() {
QueryStringBuilder builder = new QueryStringBuilder();
if (filterTerm != null) {
builder.appendParam("filter_term", filterTerm);
}
if (userType != null) {
builder.appendParam("user_type", userType);
}
if (externalAppUserId != null) {
builder.appendParam("external_app_user_id", externalAppUserId);
}
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
URL url = USERS_URL_TEMPLATE.buildWithQuery(api.getBaseURL(), builder.toString());
return new BoxUserIterator(api, url);
}
};
} | [
"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."
] | [
"Parse one resource to a shape object and add it to the shapes array\n@param shapes\n@param flatJSON\n@param resourceId\n@throws org.json.JSONException",
"Returns all accessible projects of the given organizational unit.\n\nThat is all projects which are owned by the current user or which are\naccessible for the group of the user.<p>\n\n@param cms the opencms context\n@param ouFqn the fully qualified name of the organizational unit to get projects for\n@param includeSubOus if all projects of sub-organizational units should be retrieved too\n\n@return all <code>{@link org.opencms.file.CmsProject}</code> objects in the organizational unit\n\n@throws CmsException if operation was not successful",
"Call with pathEntries lock taken",
"Determine the enum value corresponding to the third play state found in the packet.\n\n@return the proper value",
"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",
"Execute the physical query and initialize the various entities and collections\n\n@param session the session\n@param qp the query parameters\n@param ogmLoadingContext the loading context\n@param returnProxies when {@code true}, get an existing proxy for each collection element (if there is one)\n@return the result of the query",
"Returns the primary message codewords for mode 3.\n\n@param postcode the postal code\n@param country the country code\n@param service the service code\n@return the primary message, as codewords",
"Sets the HTML entity translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining",
"If an error is thrown while loading zone data, the exception is logged\nto system error and null is returned for this and all future requests.\n\n@param id the id to load\n@return the loaded zone"
] |
public ConnectionRepository readConnectionRepository(String fileName)
{
try
{
RepositoryPersistor persistor = new RepositoryPersistor();
return persistor.readConnectionRepository(fileName);
}
catch (Exception e)
{
throw new MetadataException("Can not read repository " + fileName, e);
}
} | [
"Read JdbcConnectionDescriptors from the given repository file.\n\n@see #mergeConnectionRepository"
] | [
"Computes the MD5 value of the input stream\n\n@param input\n@return\n@throws IOException\n@throws IllegalStateException",
"Converts a Map to an array of objects, adding only those entries whose key is in the nameMapping array.\n\n@param values\nthe Map of values to convert\n@param nameMapping\nthe keys to extract from the Map (elements in the target array will be added in this order)\n@return the array of Objects\n@throws NullPointerException\nif values or nameMapping is null",
"Loads the file content in the properties collection\n@param filePath The path of the file to be loaded",
"get TypeSignature given the signature\n\n@param typeSignature\n@param useInternalFormFullyQualifiedName\nif true, fqn in parameterizedTypeSignature must be in the form\n'java/lang/Thread'. If false fqn must be of the form\n'java.lang.Thread'\n@return",
"Constructs a list of items with given separators.\n\n@param sql\nStringBuilder to which the constructed string will be\nappended.\n@param list\nList of objects (usually strings) to join.\n@param init\nString to be added to the start of the list, before any of the\nitems.\n@param sep\nSeparator string to be added between items in the list.",
"This method reads a byte array from the input stream.\n\n@param is the input stream\n@param size number of bytes to read\n@return byte array\n@throws IOException on file read error or EOF",
"Gets all Checkable widgets in the group\n@return list of Checkable widgets",
"Sets ID field value.\n\n@param val value",
"Returns a new ObjectPool for the specified connection descriptor.\nOverride this method to setup your own pool.\n@param jcd the connection descriptor for which to set up the pool\n@return a newly created object pool"
] |
protected void watchConnection(ConnectionHandle connectionHandle) {
String message = captureStackTrace(UNCLOSED_EXCEPTION_MESSAGE);
this.closeConnectionExecutor.submit(new CloseThreadMonitor(Thread.currentThread(), connectionHandle, message, this.closeConnectionWatchTimeoutInMs));
} | [
"Starts off a new thread to monitor this connection attempt.\n@param connectionHandle to monitor"
] | [
"Create parameter converters from methods annotated with @AsParameterConverter\n@see {@link AbstractStepsFactory}",
"Attach the given link to the classification, while checking for duplicates.",
"Get a property as a double or defaultValue.\n\n@param key the property name\n@param defaultValue the default value",
"Returns a module\n\n@param moduleId String\n@return DbModule",
"end AnchorImplementation class",
"Retrieve the effective calendar for this task. If the task does not have\na specific calendar associated with it, fall back to using the default calendar\nfor the project.\n\n@return ProjectCalendar instance",
"Set the attributes for the associated object.\n\n@param attributes attributes for associated objects\n@deprecated replaced by {@link #setAllAttributes(Map)} after introduction of nested associations",
"caching is not supported for this method",
"Convert a color to an angle.\n\n@param color The RGB value of the color to \"find\" on the color wheel.\n\n@return The angle (in rad) the \"normalized\" color is displayed on the\ncolor wheel."
] |
public FullTypeSignature getTypeErasureSignature() {
if (typeErasureSignature == null) {
typeErasureSignature = new ClassTypeSignature(binaryName,
new TypeArgSignature[0], ownerTypeSignature == null ? null
: (ClassTypeSignature) ownerTypeSignature
.getTypeErasureSignature());
}
return typeErasureSignature;
} | [
"get the type erasure signature"
] | [
"The way calendars are stored in an MPP14 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects",
"Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity",
"Initializes the Stitch SDK so that app clients can be created.\n\n@param context An Android context value.",
"Returns the local collection representing the given namespace for raw document operations.\n\n@param namespace the namespace referring to the local collection.\n@return the local collection representing the given namespace for raw document operations.",
"Checks if a point is in the given rectangle.\n\n@param _Rect rectangle which is checked\n@param _X x-coordinate of the point\n@param _Y y-coordinate of the point\n@return True if the points intersects with the rectangle.",
"Use this API to restore appfwprofile resources.",
"Returns the next power of 2 after the input value x.\n\n@param x Input value x.\n@return Returns the next power of 2 after the input value x.",
"Add a property.",
"GetJob helper - String predicates are all created the same way, so this factors some code."
] |
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"
] | [
"Get the int resource id with specified type definition\n@param context\n@param id String resource id\n@return int resource id",
"checks if there is a writelock for transaction tx on object obj.\nReturns true if so, else false.",
"Searches all descendant folders using a given query and query parameters.\n@param offset is the starting position.\n@param limit the maximum number of items to return. The default is 30 and the maximum is 200.\n@param bsp containing query and advanced search capabilities.\n@return a PartialCollection containing the search results.",
"Upgrade the lock on the given object to the given lock mode. The call has\nno effect if the object's current lock is already at or above that level of\nlock mode.\n\n@param obj object to acquire a lock on.\n@param lockMode lock mode to acquire. The lock modes\nare <code>READ</code> , <code>UPGRADE</code> , and <code>WRITE</code> .\n\n@exception LockNotGrantedException Description of Exception",
"Create a REST call to artifactory with a generic request\n\n@param artifactoryRequest that should be sent to artifactory\n@return {@link ArtifactoryResponse} artifactory response as per to the request sent",
"Stops all transitions.",
"Get a property as a json array or default.\n\n@param key the property name\n@param defaultValue default",
"Converts the string of given content to an input stream.\n\n@param content the string content.\n@param charset the charset for conversion.\n@return the stream (should be closed by invoker).",
"Obtains a Ethiopic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time"
] |
private void stopAllServersAndRemoveCamelContext(CamelContext camelContext) {
log.debug("Stopping all servers associated with {}", camelContext);
List<SingleBusLocatorRegistrar> registrars = locatorRegistrar.getAllRegistars(camelContext);
registrars.forEach(registrar -> registrar.stopAllServersAndRemoveCamelContext());
} | [
"Stops all servers linked with the current camel context\n\n@param camelContext"
] | [
"Loads the configuration from file \"OBJ.properties\". If the system\nproperty \"OJB.properties\" is set, then the configuration in that file is\nloaded. Otherwise, the file \"OJB.properties\" is tried. If that is also\nunsuccessful, then the configuration is filled with default values.",
"Use this API to add sslaction resources.",
"Returns the first number available, starting at portNumberStartingPoint that's not already in the reservedPorts\nlist.\n\n@param portNumberStartingPoint first port number to start from.\n@param reservedPorts the ports already reserved.\n@return first number available not in the given list, starting at the given parameter.",
"Specify the class represented by this `ClassNode` is annotated\nby an annotation class specified by the name\n@param name the name of the annotation class\n@return this `ClassNode` instance",
"Implements getAll by delegating to get.",
"Repeat a CharSequence a certain number of times.\n\n@param self a CharSequence to be repeated\n@param factor the number of times the CharSequence should be repeated\n@return a String composed of a repetition\n@throws IllegalArgumentException if the number of repetitions is < 0\n@since 1.8.2",
"Writes a DTD that can be used for data XML files matching the current model to the given writer.\n\n@param output The writer to write the DTD to",
"The parameter must never be null\n\n@param queryParameters",
"Caches the given object using the given Identity as key\n\n@param oid The Identity key\n@param obj The object o cache"
] |
ValidationResult isRestrictedEventName(String name) {
ValidationResult error = new ValidationResult();
if (name == null) {
error.setErrorCode(510);
error.setErrorDesc("Event Name is null");
return error;
}
for (String x : restrictedNames)
if (name.equalsIgnoreCase(x)) {
// The event name is restricted
error.setErrorCode(513);
error.setErrorDesc(name + " is a restricted event name. Last event aborted.");
Logger.v(name + " is a restricted system event name. Last event aborted.");
return error;
}
return error;
} | [
"Checks whether the specified event name is restricted. If it is,\nthen create a pending error, and abort.\n\n@param name The event name\n@return Boolean indication whether the event name is restricted"
] | [
"handle case where Instant is outside the bounds of OffsetDateTime",
"Set the directory and test that the directory exists and is contained within the Configuration\ndirectory.\n\n@param directory the new directory",
"Emit an enum event with parameters supplied.\n\nThis will invoke all {@link SimpleEventListener} bound to the specific\nenum value and all {@link SimpleEventListener} bound to the enum class\ngiven the listeners has the matching argument list.\n\nFor example, given the following enum definition:\n\n```java\npublic enum UserActivity {LOGIN, LOGOUT}\n```\n\nWe have the following simple event listener methods:\n\n```java\n{@literal @}OnEvent\npublic void handleUserActivity(UserActivity, User user) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGIN)\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGOUT)\npublic void logUserLogout(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` method:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGIN, user, System.currentTimeMills());\n```\n\nThe `handleUserActivity` is not invoked because\n\n* The method parameter `(UserActivity, User, long)` does not match the declared argument list `(UserActivity, User)`\n\nWhile the following code will invoke both `handleUserActivity` and `logUserLogout` methods:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGOUT, user);\n```\n\nThe `logUserLogin` method will not be invoked because\n\n1. the method is bound to `UserActivity.LOGIN` enum value specifically, while `LOGOUT` is triggered\n2. the method has a `long timestamp` in the argument list and it is not passed to `eventBus.emit`\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener",
"Check the given resource back into the pool\n\n@param key The key for the resource\n@param resource The resource",
"Ask the specified player for the specified artwork from the specified media slot, first checking if we have a\ncached copy.\n\n@param artReference uniquely identifies the desired artwork\n@param trackType the kind of track that owns the artwork\n\n@return the artwork, if it was found, or {@code null}\n\n@throws IllegalStateException if the ArtFinder is not running",
"This implementation checks whether a File can be opened,\nfalling back to whether an InputStream can be opened.\nThis will cover both directories and content resources.",
"Set the Log4j appender.\n\n@param appender the log4j appender",
"returns true if the primary key fields are valid for delete, else false.\nPK fields are valid if each of them contains a valid non-null value\n@param cld the ClassDescriptor\n@param obj the object\n@return boolean",
"Use this API to fetch all the dnspolicylabel resources that are configured on netscaler."
] |
public static base_responses add(nitro_service client, cacheselector resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
cacheselector addresources[] = new cacheselector[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new cacheselector();
addresources[i].selectorname = resources[i].selectorname;
addresources[i].rule = resources[i].rule;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add cacheselector resources."
] | [
"Close and remove expired streams. Package protected to allow unit tests to invoke it.",
"Validate JUnit4 presence in a concrete version.",
"Registers your facet filters, adding them to this InstantSearch's widgets.\n\n@param filters a List of facet filters.",
"Put object to session cache.\n\n@param oid The {@link org.apache.ojb.broker.Identity} of the object to cache\n@param entry The {@link org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.CacheEntry} of the object\n@param onlyIfNew Flag, if set <em>true</em> only new objects (not already in session cache) be cached.",
"Executes a method on the server asynchronously",
"Ask the specified player for the album art 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 artReference uniquely identifies the desired album art\n@param trackType the kind of track that owns the art\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nartwork updates will use available caches only\n\n@return the album art found, if any",
"Add assertions to tests execution.",
"Sets divider padding for axis. If axis does not match the orientation, it has no effect.\n@param padding\n@param axis {@link Axis}",
"Obtains a Pax zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax zoned date-time, not null\n@throws DateTimeException if unable to create the date-time"
] |
private static synchronized FileOutputWriter createFileWriter(final TypeDefinition type, final DecompilerSettings settings)
throws IOException
{
final String outputDirectory = settings.getOutputDirectory();
final String fileName = type.getName() + settings.getLanguage().getFileExtension();
final String packageName = type.getPackageName();
// foo.Bar -> foo/Bar.java
final String subDir = StringUtils.defaultIfEmpty(packageName, "").replace('.', File.separatorChar);
final String outputPath = PathHelper.combine(outputDirectory, subDir, fileName);
final File outputFile = new File(outputPath);
final File parentDir = outputFile.getParentFile();
if (parentDir != null && !parentDir.exists() && !parentDir.mkdirs())
{
throw new IllegalStateException("Could not create directory:" + parentDir);
}
if (!outputFile.exists() && !outputFile.createNewFile())
{
throw new IllegalStateException("Could not create output file: " + outputPath);
}
return new FileOutputWriter(outputFile, settings);
} | [
"Constructs the path from FQCN, validates writability, and creates a writer."
] | [
"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",
"Sets the maxConnectionAge. Any connections older than this setting will be closed\noff whether it is idle or not. Connections currently in use will not be affected until they\nare returned to the pool.\n\n@param maxConnectionAge the maxConnectionAge to set.\n@param timeUnit the unit of the maxConnectionAge argument.",
"Adds a new gender item and an initial name.\n\n@param entityIdValue\nthe item representing the gender\n@param name\nthe label to use for representing the gender",
"simple echo implementation",
"Reads a line from the input stream, where a line is terminated by \\r, \\n, or \\r\\n\n@param trim whether to trim trailing \\r and \\ns",
"iteration not synchronized",
"Gets a list of registered docker images from the images cache, if it has been\nregistered to the cache for a specific build-info ID and if a docker manifest has been captured for it\nby the build-info proxy.\nAdditionally, the methods also removes the returned images from the cache.\n@param buildInfoId\n@return",
"Overloads the left shift operator to provide syntactic sugar for appending to a StringBuilder.\n\n@param self a StringBuilder\n@param value an Object\n@return the original StringBuilder\n@since 1.8.2",
"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"
] |
public GVRAnimation setOnFinish(GVROnFinish callback) {
mOnFinish = callback;
// Do the instance-of test at set-time, not at use-time
mOnRepeat = callback instanceof GVROnRepeat ? (GVROnRepeat) callback
: null;
if (mOnRepeat != null) {
mRepeatCount = -1; // loop until iterate() returns false
}
return this;
} | [
"Set the on-finish callback.\n\nThe basic {@link GVROnFinish} callback will notify you when the animation\nruns to completion. This is a good time to do things like removing\nnow-invisible objects from the scene graph.\n\n<p>\nThe extended {@link GVROnRepeat} callback will be called after every\niteration of an indefinite (repeat count less than 0) animation, giving\nyou a way to stop the animation when it's not longer appropriate.\n\n@param callback\nA {@link GVROnFinish} or {@link GVROnRepeat} implementation.\n<p>\n<em>Note</em>: Supplying a {@link GVROnRepeat} callback will\n{@linkplain #setRepeatCount(int) set the repeat count} to a\nnegative number. Calling {@link #setRepeatCount(int)} with a\nnon-negative value after setting a {@link GVROnRepeat}\ncallback will effectively convert the callback to a\n{@link GVROnFinish}.\n@return {@code this}, so you can chain setProperty() calls."
] | [
"Return all objects for the given class.",
"Set the position of the pick ray.\nThis function is used internally to update the\npick ray with the new controller position.\n@param x the x value of the position.\n@param y the y value of the position.\n@param z the z value of the position.",
"Use this API to fetch sslcipher resource of given name .",
"Remove all scene objects.",
"Finds and returns the date for the given event summary and year within the given ics file,\nor null if not present.",
"Sign in a group of connections to the registry by key\n\n@param key\nthe key\n@param connections\na collection of websocket connections",
"FOR internal use. This method was called after the external transaction was completed.\n\n@see javax.transaction.Synchronization",
"Retrieve the routing type value from the REST request.\n\"X_VOLD_ROUTING_TYPE_CODE\" is the routing type header.\n\nBy default, the routing code is set to NORMAL\n\nTODO REST-Server 1. Change the header name to a better name. 2. Assumes\nthat integer is passed in the header",
"Returns the Java executable command.\n\n@param javaHome the java home directory or {@code null} to use the default\n\n@return the java command to use"
] |
public static String getOffsetCodeFromSchedule(Schedule schedule) {
double doubleLength = 0;
for(int i = 0; i < schedule.getNumberOfPeriods(); i ++) {
doubleLength += schedule.getPeriodLength(i);
}
doubleLength /= schedule.getNumberOfPeriods();
doubleLength *= 12;
int periodLength = (int) Math.round(doubleLength);
String offsetCode = periodLength + "M";
return offsetCode;
} | [
"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"
] | [
"Get the pickers date.",
"Get http response",
"This method removes trailing delimiter characters.\n\n@param buffer input sring buffer",
"Add the operation at the end of Stage MODEL if this operation has not already been registered.\n\nThis operation should be added if any of the following occur: -\n- The authorization configuration is removed from a security realm.\n- The rbac provider is changed to rbac.\n- A role is removed.\n- An include is removed from a role.\n- A management interface is removed.\n\nNote: This list only includes actions that could invalidate the configuration, actions that would not invalidate the\nconfiguration do not need this operation registering. e.g. Adding a role, if the configuration was already valid this\ncould not invalidate it.\n\n@param context - The OperationContext to use to register the step.",
"Use this API to fetch sslcertkey_crldistribution_binding resources of given name .",
"Whether the rows of the given association should be stored in a hash using the single row key column as key or\nnot.",
"Helper method to create a string template source for a given formatter and content.\n\n@param formatter the formatter\n@param contentSupplier the content supplier\n\n@return the string template provider",
"Process a graphical indicator definition for a known type.\n\n@param type field type",
"Returns a configured transformer to write XML.\n\n@return the XML configured transformer\n@throws SpinXmlElementException if no new transformer can be created"
] |
Subsets and Splits