query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
void writeInterPropertyLinks(PropertyDocument document)
throws RDFHandlerException {
Resource subject = this.rdfWriter.getUri(document.getEntityId()
.getIri());
this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter
.getUri(Vocabulary.WB_DIRECT_CLAIM_PROP), Vocabulary
.getPropertyUri(document.getEntityId(),
PropertyContext.DIRECT));
this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter
.getUri(Vocabulary.WB_CLAIM_PROP), Vocabulary.getPropertyUri(
document.getEntityId(), PropertyContext.STATEMENT));
this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter
.getUri(Vocabulary.WB_STATEMENT_PROP), Vocabulary
.getPropertyUri(document.getEntityId(),
PropertyContext.VALUE_SIMPLE));
this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter
.getUri(Vocabulary.WB_STATEMENT_VALUE_PROP),
Vocabulary.getPropertyUri(document.getEntityId(),
PropertyContext.VALUE));
this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter
.getUri(Vocabulary.WB_QUALIFIER_PROP), Vocabulary
.getPropertyUri(document.getEntityId(),
PropertyContext.QUALIFIER_SIMPLE));
this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter
.getUri(Vocabulary.WB_QUALIFIER_VALUE_PROP), Vocabulary
.getPropertyUri(document.getEntityId(),
PropertyContext.QUALIFIER));
this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter
.getUri(Vocabulary.WB_REFERENCE_PROP), Vocabulary
.getPropertyUri(document.getEntityId(),
PropertyContext.REFERENCE_SIMPLE));
this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter
.getUri(Vocabulary.WB_REFERENCE_VALUE_PROP), Vocabulary
.getPropertyUri(document.getEntityId(),
PropertyContext.REFERENCE));
this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter
.getUri(Vocabulary.WB_NO_VALUE_PROP), Vocabulary
.getPropertyUri(document.getEntityId(),
PropertyContext.NO_VALUE));
this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter
.getUri(Vocabulary.WB_NO_QUALIFIER_VALUE_PROP), Vocabulary
.getPropertyUri(document.getEntityId(),
PropertyContext.NO_QUALIFIER_VALUE));
// TODO something more with NO_VALUE
} | [
"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"
] | [
"Sets the target hosts from line by line text.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Use this API to update lbsipparameters.",
"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.",
"Prints some basic documentation about this program.",
"Disply available use cases.",
"Use this API to clear gslbldnsentries.",
"Get the content-type, including the optional \";base64\".",
"Ensure the current throughput levels for the tracked operation does not\nexceed set quota limits. Throws an exception if exceeded quota.\n\n@param quotaKey\n@param trackedOp",
"Process an operand value used in the definition of the graphical\nindicator criteria.\n\n@param index position in operand list\n@param type field type\n@param criteria indicator criteria"
] |
@Inject
public void setQueue(EventQueue queue) {
if (epi == null) {
MessageToEventMapper mapper = new MessageToEventMapper();
mapper.setMaxContentLength(maxContentLength);
epi = new EventProducerInterceptor(mapper, queue);
}
} | [
"Sets the queue.\n\n@param queue the new queue"
] | [
"Use this API to add dbdbprofile resources.",
"Sets the category display options that affect how the category selection dialog is shown.\n\n@param displayCategoriesByRepository if true, the categories are shown separated by repository.\n@param displayCategorySelectionCollapsed if true, the selection dialog opens showing only the top-level categories\n(or the various repositories) in collapsed state.",
"Returns true if\n- includeTags is not empty and tag is in includeTags\n- includeTags is empty and tag is not in excludeTags\n@param tags Hint tags\n@param includeTags Include tags\n@param excludeTags Exclude tags\n@return has tag match",
"Registers the resource to the parent deployment resource. The model returned is that of the resource parameter.\n\n@param subsystemName the subsystem name\n@param resource the resource to be used for the subsystem on the deployment\n\n@return the model\n\n@throws java.lang.IllegalStateException if the subsystem resource already exists",
"Carry out any post-processing required to tidy up\nthe data read from the database.",
"Handle a whole day change event.\n@param event the change event.",
"Returns a Span that covers all rows beginning with a prefix String parameters will be encoded\nas UTF-8",
"Add authentication information for the given host\n@param host the host\n@param credentials the credentials\n@param authScheme the scheme for preemptive authentication (should be\n<code>null</code> if adding authentication for a proxy server)\n@param context the context in which the authentication information\nshould be saved",
"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"
] |
private void scheduleBatchLoadIfNeeded(Serializable id, SharedSessionContractImplementor session) throws MappingException {
//cannot batch fetch by unique key (property-ref associations)
if ( StringHelper.isEmpty( delegate.getRHSUniqueKeyPropertyName() ) && id != null ) {
EntityPersister persister = session.getFactory().getMetamodel().entityPersister( delegate.getAssociatedEntityName() );
EntityKey entityKey = session.generateEntityKey( id, persister );
if ( !session.getPersistenceContext().containsEntity( entityKey ) ) {
session.getPersistenceContext().getBatchFetchQueue().addBatchLoadableEntityKey( entityKey );
}
}
} | [
"Register the entity as batch loadable, if enabled\n\nCopied from {@link org.hibernate.type.ManyToOneType#scheduleBatchLoadIfNeeded}"
] | [
"That is, of size 6, which become 8, since HashMaps are powers of 2. Still, it's half the size",
"Prepares Artifactory server either from serverID or from ArtifactoryServer.\n\n@param artifactoryServerID\n@param pipelineServer\n@return",
"Selects a specific vertex and fragment shader to use for rendering.\n\nIf a shader template has been specified, it is used to generate\na vertex and fragment shader based on mesh attributes, bound textures\nand light sources. If the textures bound to the material are changed\nor a new light source is added, this function must be called again\nto select the appropriate shaders. This function may cause recompilation\nof shaders which is quite slow.\n\n@param scene scene being rendered\n@see GVRShaderTemplate GVRMaterialShader.getShaderType",
"Calculates the beginLine of a violation report.\n\n@param pmdViolation The violation for which the beginLine should be calculated.\n@return The beginLine is assumed to be the line with the smallest number. However, if the smallest number is\nout-of-range (non-positive), it takes the other number.",
"Update the Target Filter of the ImporterService.\nApply the induce modifications on the links of the ImporterService\n\n@param serviceReference",
"Move this rectangle to the specified bottom-left point.\n\n@param rect rectangle to move\n@param x new x origin\n@param y new y origin",
"Checks that sequence-name is only used with autoincrement='ojb'\n\n@param fieldDef The field 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",
"Compares current cluster with final cluster. Uses pertinent store defs\nfor each cluster to determine if a node that hosts a zone-primary in the\ncurrent cluster will no longer host any zone-nary in the final cluster.\nThis check is the precondition for a server returning an invalid metadata\nexception to a client on a normal-case put or get. Normal-case being that\nthe zone-primary receives the pseudo-master put or the get operation.\n\n@param currentCluster\n@param currentStoreDefs\n@param finalCluster\n@param finalStoreDefs\n@return pretty-printed string documenting invalid metadata rates for each\nzone.",
"Apply modifications to a content task definition.\n\n@param patchId the patch id\n@param modifications the modifications\n@param definitions the task definitions\n@param filter the content item filter"
] |
public static boolean isFloat(CharSequence self) {
try {
Float.valueOf(self.toString().trim());
return true;
} catch (NumberFormatException nfe) {
return false;
}
} | [
"Determine if a CharSequence can be parsed as a Float.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isFloat(String)\n@since 1.8.2"
] | [
"Make a composite filter from the given sub-filters using AND to combine filters.",
"Convenience wrapper for message parameters\n@param params\n@return",
"Convert an integer value into a TimeUnit instance.\n\n@param value time unit value\n@return TimeUnit instance",
"Create a random video.\n\n@return random video.",
"Sets up internal data structures and creates a copy of the input matrix.\n\n@param A The input matrix. Not modified.",
"If the Artifact does not exist, it will add it to the database. Nothing if it already exit.\n\n@param fromClient DbArtifact",
"Add the set with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The set of all packages to add.",
"Finds and returns the date for the given event summary and year within the given ics file,\nor null if not present.",
"Convert a field value to something suitable to be stored in the database."
] |
boolean isUserPasswordReset(CmsUser user) {
if (USER_PASSWORD_STATUS.containsKey(user.getId())) { //Check if user was checked before
if (!USER_PASSWORD_STATUS.get(user.getId()).booleanValue()) { // was false before, false->true is never done without changing map
return false;
}
if (m_checkedUserPasswordReset.contains(user.getId())) { //was true before, true->false happens when user resets password. Only check one time per table load.
return true; //Set gets flushed on reloading table
}
}
CmsUser currentUser = user;
if (user.getAdditionalInfo().size() < 3) {
try {
currentUser = m_cms.readUser(user.getId());
} catch (CmsException e) {
LOG.error("Can not read user", e);
}
}
if (currentUser.getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_PASSWORD_RESET) != null) {
USER_PASSWORD_STATUS.put(currentUser.getId(), new Boolean(true));
m_checkedUserPasswordReset.add(currentUser.getId());
return true;
}
USER_PASSWORD_STATUS.put(currentUser.getId(), new Boolean(false));
return false;
} | [
"Is the user password reset?\n\n@param user User to check\n@return boolean"
] | [
"Build a Pk-Query base on the ClassDescriptor.\n\n@param cld\n@return a select by PK query",
"This method is used to change the credentials of CleverTap account Id and token programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token",
"Use this API to change responderhtmlpage.",
"Get image Id from imageTag using DockerBuildInfoHelper client.\n\n@param imageTag\n@param host\n@return",
"Returns a map from a category path to the wrapper of all the sub-categories of the category with the path given as key.\n\n@return a map from a category path to all sub-categories of the path's category.",
"Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields.",
"Add roles for given role parent item.\n\n@param ouItem group parent item",
"Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n@throws Exception",
"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"
] |
private double goldenMean(double a, double b) {
if (geometric) {
return a * Math.pow(b / a, GOLDEN_SECTION);
} else {
return a + (b - a) * GOLDEN_SECTION;
}
} | [
"The point that is the GOLDEN_SECTION along the way from a to b.\na may be less or greater than b, you find the point 60-odd percent\nof the way from a to b.\n\n@param a Interval minimum\n@param b Interval maximum\n@return The GOLDEN_SECTION along the way from a to b."
] | [
"This method returns the duplicated certificate mapped to the passed in cert, or\ncreates and returns one if no mapping has yet been performed. If a naked public\nkey has already been mapped that matches the key in the cert, the already mapped\nkeypair will be reused for the mapped cert.\n@param cert\n@return\n@throws CertificateEncodingException\n@throws InvalidKeyException\n@throws CertificateException\n@throws CertificateNotYetValidException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws SignatureException\n@throws KeyStoreException\n@throws UnrecoverableKeyException",
"Set source url for a server\n\n@param newUrl new URL\n@param id Server ID",
"Store a comment based on comment text, gavc and user information\n\n@param gavc - entity id\n@param commentText - comment text\n@param credential - user credentials\n@param entityType - type of the entity",
"Checks the id value.\n\n@param fieldDef The field 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",
"Use this API to fetch vpnsessionpolicy_aaauser_binding resources of given name .",
"Confirms a user with the given token and token id.\n\n@param token the confirmation token.\n@param tokenId the id of the confirmation token.\n@return A {@link Task} that completes when confirmation completes/fails.",
"Validate the Combination filter field in Multi configuration jobs",
"Get the Roman Numeral of the current value\n@return",
"Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream"
] |
ValidationResult cleanObjectKey(String name) {
ValidationResult vr = new ValidationResult();
name = name.trim();
for (String x : objectKeyCharsNotAllowed)
name = name.replace(x, "");
if (name.length() > Constants.MAX_KEY_LENGTH) {
name = name.substring(0, Constants.MAX_KEY_LENGTH-1);
vr.setErrorDesc(name.trim() + "... exceeds the limit of "+ Constants.MAX_KEY_LENGTH + " characters. Trimmed");
vr.setErrorCode(520);
}
vr.setObject(name.trim());
return vr;
} | [
"Cleans the object key.\n\n@param name Name of the object key\n@return The {@link ValidationResult} object containing the object,\nand the error code(if any)"
] | [
"Consumer is required to do any privilege checks before getting here\n\n@param request a {@link HttpServletRequest} which may contain forced groups parameters from URL, Header or Cookie.\n@return a map of test names to bucket values specified by the request. Returns an empty {@link Map} if nothing was specified",
"Generate a schedule descriptor for the given start and end date.\n\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule descriptor",
"Gets a JsonObject containing any pending changes to this object that can be sent back to the Box API.\n@return a JsonObject containing the pending changes.",
"Escapes control characters with a preceding backslash.\nOptionally encodes special chars as unicode escape sequence.\nThe resulting string is safe to be put into a Java string literal between\nthe quotes.",
"Watches specified IDs in a collection.\n@param ids the ids to watch.\n@return the stream of change events.",
"Adds the index input to list.\n\n@param name the name\n@param in the in\n@param postingsFormatName the postings format name\n@return the string\n@throws IOException Signals that an I/O exception has occurred.",
"Log a byte array.\n\n@param label label text\n@param data byte array",
"Add a creatable \"post-run\" dependent for this task item.\n\n@param creatable the creatable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve created \"post-run\" dependent",
"Stops all servers.\n\n{@inheritDoc}"
] |
public <V> V getAttachment(final AttachmentKey<V> key) {
assert key != null;
return key.cast(contextAttachments.get(key));
} | [
"Retrieves an object that has been attached to 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}."
] | [
"Convert an ObjectName to a PathAddress.\n\nPatterns are supported: there may not be a resource at the returned PathAddress but a resource model <strong>MUST</strong>\nmust be registered.",
"This method extracts byte arrays from the embedded object data\nand converts them into RTFEmbeddedObject instances, which\nit then adds to the supplied list.\n\n@param offset offset into the RTF document\n@param text RTF document\n@param objects destination for RTFEmbeddedObject instances\n@return new offset into the RTF document",
"Simple, high-level API to enable or disable eye picking for this scene\nobject.\n\nThe {@linkplain #attachCollider low-level\nAPI} gives you a lot of control over eye picking, but it does involve an\nawful lot of details. This method\n(and {@link #getPickingEnabled()}) provides a simple boolean property.\nIt attaches a GVRSphereCollider to the scene object. If you want more\naccurate picking, you can use {@link #attachComponent(GVRComponent)} to attach a\nmesh collider instead. The mesh collider is more accurate but also\ncosts more to compute.\n\n@param enabled\nShould eye picking 'see' this scene object?\n\n@since 2.0.2\n@see GVRSphereCollider\n@see GVRMeshCollider",
"Start with specifying the artifact version",
"Calculate the summed conditional likelihood of this data by summing\nconditional estimates.",
"Sets the baseline duration text value.\n\n@param baselineNumber baseline number\n@param value baseline duration text value",
"Set the ambient light intensity.\n\nThis designates the color of the ambient reflection.\nIt is multiplied by the material ambient color to derive\nthe hue of the ambient reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code ambient_intensity} to control the intensity of ambient light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)",
"Tests the string edit distance function.",
"Sets the alias. By default the entire attribute path participates in the alias\n@param alias The name of the alias to set"
] |
public static void shutDownActorSystemForce() {
if (!actorSystem.isTerminated()) {
logger.info("shutting down actor system...");
actorSystem.shutdown();
actorSystem.awaitTermination(timeOutDuration);
logger.info("Actor system has been shut down.");
} else {
logger.info("Actor system has been terminated already. NO OP.");
}
} | [
"Shut down actor system force."
] | [
"The user can be referenced by their globally unique user ID or their email address.\nReturns the full user record for the invited user.\n\n@param workspace The workspace or organization to invite the user to.\n@return Request object",
"Creates or returns the instance of the helper class.\n\n@param inputSpecification the input specification.\n@param formFillMode if random data should be used on the input fields.\n@return The singleton instance.",
"Returns a portion of the Bytes object\n\n@param start index of subsequence start (inclusive)\n@param end index of subsequence end (exclusive)",
"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",
"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.",
"Creates a resource ID from information of a generic resource.\n\n@param subscriptionId the subscription UUID\n@param resourceGroupName the resource group name\n@param resourceProviderNamespace the resource provider namespace\n@param resourceType the type of the resource or nested resource\n@param resourceName name of the resource or nested resource\n@param parentResourcePath parent resource's relative path to the provider,\nif the resource is a generic resource\n@return the resource ID string",
"Returns the command to run by the shell to normally run the checkin script.\n@return the command to run by the shell to normally run the checkin script.",
"Saves the messages for all languages that were opened in the editor.\n\n@throws CmsException thrown if saving fails.",
"Returns the later of two dates, handling null values. A non-null Date\nis always considered to be later than a null Date.\n\n@param d1 Date instance\n@param d2 Date instance\n@return Date latest date"
] |
public static List getAt(Matcher self, Collection indices) {
List result = new ArrayList();
for (Object value : indices) {
if (value instanceof Range) {
result.addAll(getAt(self, (Range) value));
} else {
int idx = DefaultTypeTransformation.intUnbox(value);
result.add(getAt(self, idx));
}
}
return result;
} | [
"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"
] | [
"Ends the transition",
"returns array with all allowed values\n@return allowed values",
"Add a new download. The download will start automatically once the download manager is\nready to execute it and connectivity is available.\n\n@param request the parameters specifying this download\n@return an ID for the download, unique across the application. This ID is used to make future\ncalls related to this download.\n@throws IllegalArgumentException",
"Read a single resource assignment.\n\n@param resource MPXJ resource\n@param assignment Phoenix assignment",
"this method mimics EMC behavior",
"Stops the emulator. Multiple calls are allowed.\n\n@throws DatastoreEmulatorException if the emulator cannot be stopped",
"create a consumer\n\n@param zookeeperConfig connect config of zookeeper; ex: 127.0.0.1:2181/jafka\n@param topic the topic to be watched\n@param groupId grouping the consumer clients\n@param listener message listener\n@return the real consumer",
"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}.",
"The full path of a jrxml file, or the path in the classpath of a jrxml\nresource.\n\n@param path\n@return"
] |
public VALUE put(KEY key, VALUE object) {
CacheEntry<VALUE> entry;
if (referenceType == ReferenceType.WEAK) {
entry = new CacheEntry<>(new WeakReference<>(object), null);
} else if (referenceType == ReferenceType.SOFT) {
entry = new CacheEntry<>(new SoftReference<>(object), null);
} else {
entry = new CacheEntry<>(null, object);
}
countPutCountSinceEviction++;
countPut++;
if (isExpiring && nextCleanUpTimestamp == 0) {
nextCleanUpTimestamp = System.currentTimeMillis() + expirationMillis + 1;
}
CacheEntry<VALUE> oldEntry;
synchronized (this) {
if (values.size() >= maxSize) {
evictToTargetSize(maxSize - 1);
}
oldEntry = values.put(key, entry);
}
return getValueForRemoved(oldEntry);
} | [
"Stores an new entry in the cache."
] | [
"Delete an artifact in the Grapes server\n\n@param gavc\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Processes an anonymous reference definition.\n\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"false\" description=\"The fully qualified name of the class\nowning the referenced field\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\"",
"Create an embedded host controller.\n\n@param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty.\n@param modulePath the location of the root of the module repository. May be {@code null} if the standard\nlocation under {@code jbossHomePath} should be used\n@param systemPackages names of any packages that must be treated as system packages, with the same classes\nvisible to the caller's classloader visible to host-controller-side classes loaded from\nthe server's modular classloader\n@param cmdargs any additional arguments to pass to the embedded host controller (e.g. -b=192.168.100.10)\n@return the server. Will not be {@code null}",
"Wraps the specified object pool for connections as a DataSource.\n\n@param jcd the OJB connection descriptor for the pool to be wrapped\n@param connectionPool the connection pool to be wrapped\n@return a DataSource attached to the connection pool.\nConnections will be wrapped using DBCP PoolGuard, that will not allow\nunwrapping unless the \"accessToUnderlyingConnectionAllowed=true\" configuration\nis specified.",
"Print the given values after displaying the provided message.",
"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.",
"Requests the waveform detail for a specific track ID, given a connection to a player that has already been\nset up.\n\n@param rekordboxId the track whose waveform detail is desired\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved waveform detail, or {@code null} if none was available\n@throws IOException if there is a communication problem",
"Delivers the correct JSON Object for properties\n\n@param properties\n@throws org.json.JSONException",
"Generate the next available field for a user defined field.\n\n@param <E> field type class\n@param clazz class of the desired field enum\n@param type user defined field type.\n@return field of specified type"
] |
private List<Row> join(List<Row> leftRows, String leftColumn, String rightTable, List<Row> rightRows, String rightColumn)
{
List<Row> result = new LinkedList<Row>();
RowComparator leftComparator = new RowComparator(new String[]
{
leftColumn
});
RowComparator rightComparator = new RowComparator(new String[]
{
rightColumn
});
Collections.sort(leftRows, leftComparator);
Collections.sort(rightRows, rightComparator);
ListIterator<Row> rightIterator = rightRows.listIterator();
Row rightRow = rightIterator.hasNext() ? rightIterator.next() : null;
for (Row leftRow : leftRows)
{
Integer leftValue = leftRow.getInteger(leftColumn);
boolean match = false;
while (rightRow != null)
{
Integer rightValue = rightRow.getInteger(rightColumn);
int comparison = leftValue.compareTo(rightValue);
if (comparison == 0)
{
match = true;
break;
}
if (comparison < 0)
{
if (rightIterator.hasPrevious())
{
rightRow = rightIterator.previous();
}
break;
}
rightRow = rightIterator.next();
}
if (match && rightRow != null)
{
Map<String, Object> newMap = new HashMap<String, Object>(((MapRow) leftRow).getMap());
for (Entry<String, Object> entry : ((MapRow) rightRow).getMap().entrySet())
{
String key = entry.getKey();
if (newMap.containsKey(key))
{
key = rightTable + "." + key;
}
newMap.put(key, entry.getValue());
}
result.add(new MapRow(newMap));
}
}
return result;
} | [
"Very basic implementation of an inner join between two result sets.\n\n@param leftRows left result set\n@param leftColumn left foreign key column\n@param rightTable right table name\n@param rightRows right result set\n@param rightColumn right primary key column\n@return joined result set"
] | [
"Replace a single value at the appropriate location in the existing value array.\n@param index - location in the array list\n@param newValue - the new String",
"Returns new instance of OptionalValue with given key and value\n@param key resource key of the created value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue with given key",
"Either gets an existing lock on the specified resource or creates one if none exists.\nThis methods guarantees to do this atomically.\n\n@param resourceId the resource to get or create the lock on\n@param isolationId the isolation level identity key. See {@link CommonsOJBLockManager}.\n@return the lock for the specified resource",
"Moves the elements contained in \"band\" in the Y axis \"yOffset\"\n@param yOffset\n@param band",
"Creates a new ServerDetails object for resolver, this will take URL and name from the deployer ServerDetails as a default behaviour",
"Retrieves a string value from the property data.\n\n@param type Type identifier\n@return string value",
"Add the dependencies if the deployment contains a service activator loader entry.\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"used for upload progress",
"Adds new holes to the polygon.\n\n@param holes holes, must be contained in the exterior ring and must not overlap or\nintersect another hole\n@return this for chaining"
] |
public static nsspparams get(nitro_service service) throws Exception{
nsspparams obj = new nsspparams();
nsspparams[] response = (nsspparams[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the nsspparams resources that are configured on netscaler."
] | [
"Get layer style by name.\n\n@param name layer style name\n@return layer style",
"Checks if the link target is a secure link.<p\n\n@param cms the current CMS context\n@param vfsName the path of the link target\n@param targetSite the target site containing the detail page\n@param secureRequest true if the currently running request is secure\n\n@return true if the link should be a secure link",
"Resolve all files from a given path and simplify its definition.",
"Set dates with the provided check states.\n@param datesWithCheckInfo the dates to set, accompanied with the check state to set.",
"Returns the query string currently in the text field.\n\n@return the query string",
"Minimize the function starting at the given initial point.",
"Read a task relationship.\n\n@param link ConceptDraw PROJECT task link",
"Obtain newline-delimited headers from request\n\n@param request HttpServletRequest to scan\n@return newline-delimited headers",
"add a new producer, either synchronous or asynchronous, connecting\nto the specified broker\n\n@param broker broker to producer"
] |
static ChangeEvent<BsonDocument> changeEventForLocalInsert(
final MongoNamespace namespace,
final BsonDocument document,
final boolean writePending
) {
final BsonValue docId = BsonUtils.getDocumentId(document);
return new ChangeEvent<>(
new BsonDocument(),
OperationType.INSERT,
document,
namespace,
new BsonDocument("_id", docId),
null,
writePending);
} | [
"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."
] | [
"Adds a criterion to given pipeline which filters out vertices representing given WindupVertexFrame.",
"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",
"Splits the given string.",
"Add properties to 'properties' map on transaction start\n@param type - of transaction",
"check if MessageID exists in the message, if not, only generate new MessageID for outbound message.\n@param message",
"Retrieve the default mapping between MPXJ assignment fields and Primavera assignment field names.\n\n@return mapping",
"Checks the second, hour, month, day, month and year are equal.",
"Return a html view that contains the targeted license\n\n@param name String\n@return DbLicense",
"Performs a Bulk Documents insert request.\n\n@param objects The {@link List} of objects.\n@param allOrNothing Indicates whether the request has <tt>all-or-nothing</tt> semantics.\n@return {@code List<Response>} Containing the resulted entries."
] |
public static base_responses add(nitro_service client, cmppolicylabel resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
cmppolicylabel addresources[] = new cmppolicylabel[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new cmppolicylabel();
addresources[i].labelname = resources[i].labelname;
addresources[i].type = resources[i].type;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add cmppolicylabel resources."
] | [
"Returns whether the given host matches this one. For hosts to match, they must represent the same addresses or have the same host names.\nHosts are not resolved when matching. Also, hosts must have the same port and service. They must have the same masks if they are host names.\nEven if two hosts are invalid, they match if they have the same invalid string.\n\n@param host\n@return",
"Returns an ArrayList of String URLs of the Carousel Images\n@return ArrayList of Strings",
"Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content",
"Interim and final clusters ought to have same partition counts, same\nzones, and same node state. Partitions per node may of course differ.\n\n@param interimCluster\n@param finalCluster",
"Retrieve the default mapping between MPXJ task fields and Primavera wbs field names.\n\n@return mapping",
"given the groupId, returns the groupName\n\n@param groupId ID of group\n@return name of group",
"Returns the specified element, or null.",
"This method writes calendar data to a Planner file.\n\n@throws JAXBException on xml creation errors",
"Returns sql statement used in this prepared statement together with the parameters.\n@param sql base sql statement\n@param logParams parameters to print out\n@return returns printable statement"
] |
private static Originator mapOriginatorType(OriginatorType originatorType) {
Originator originator = new Originator();
if (originatorType != null) {
originator.setCustomId(originatorType.getCustomId());
originator.setHostname(originatorType.getHostname());
originator.setIp(originatorType.getIp());
originator.setProcessId(originatorType.getProcessId());
originator.setPrincipal(originatorType.getPrincipal());
}
return originator;
} | [
"Map originator type.\n\n@param originatorType the originator type\n@return the originator"
] | [
"Write the config to the writer.",
"Use this API to add inat resources.",
"Template-and-Hook method for generating the url required by the jdbc driver\nto allow for modifying an existing database.",
"Gets information about this user.\n@param fields the optional fields to retrieve.\n@return info about this user.",
"Changes the vertex buffer associated with this mesh.\n@param vbuf new vertex buffer to use\n@see #setVertices(float[])\n@see #getVertexBuffer()\n@see #getVertices()",
"Get the default provider used.\n\n@return the default provider, never {@code null}.",
"Return the array of field objects pulled from the data object.",
"generate a select-Statement according to query\n\n@param query the Query\n@param cld the ClassDescriptor",
"Get a list of modules regarding filters\n\n@param filters Map<String,String>\n@return List<Module>\n@throws GrapesCommunicationException"
] |
public DbConn getConn()
{
Connection cnx = null;
try
{
Thread.interrupted(); // this is VERY sad. Needed for Oracle driver which otherwise fails spectacularly.
cnx = _ds.getConnection();
if (cnx.getAutoCommit())
{
cnx.setAutoCommit(false);
cnx.rollback(); // To ensure no open transaction created by the pool before changing TX mode
}
if (cnx.getTransactionIsolation() != Connection.TRANSACTION_READ_COMMITTED)
{
cnx.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
}
return new DbConn(this, cnx);
}
catch (SQLException e)
{
DbHelper.closeQuietly(cnx); // May have been left open when the pool has given us a failed connection.
throw new DatabaseException(e);
}
} | [
"A connection to the database. Should be short-lived. No transaction active by default.\n\n@return a new open connection."
] | [
"Start with specifying the artifactId",
"Stop Redwood, closing all tracks and prohibiting future log messages.",
"Set the background color of the progress spinner disc.\n\n@param colorRes Resource id of the color.",
"Get the collection of configured blogs for the calling user.\n\n@return The Collection of configured blogs",
"Use this API to clear nssimpleacl.",
"Returns the value of the identified field as a Boolean.\n@param fieldName the name of the field\n@return the value of the field as a Boolean",
"Configures a RequestBuilder to send an RPC request.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a RequestBuilder object that is ready to have its\n{@link RequestBuilder#send()} method invoked.",
"Sets the character translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator",
"Call the Coverage Task."
] |
public static String detokenize(List<String> tokens) {
return TwitterKoreanProcessor.detokenize(JavaConversions.iterableAsScalaIterable(tokens));
} | [
"Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string."
] | [
"Modifier method to set the unique ID of this calendar.\n\n@param uniqueID unique identifier",
"Returns the adapter position of the Parent associated with this ChildViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.",
"Throws one RendererException if the viewType, layoutInflater or parent are null.",
"As already described, but if separator is not null, then objects\nsuch as TaggedWord\n\n@param separator The string used to separate Word and Tag\nin TaggedWord, etc",
"Compute a singular-value decomposition of A.\n\n@return A DoubleMatrix[3] array of U, S, V such that A = U * diag(S) * V'",
"Computes the ratio of the smallest value to the largest. Does not assume\nthe array is sorted first\n@param sv array\n@return smallest / largest",
"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",
"Checks to see if the specified off diagonal element is zero using a relative metric.",
"Returns the right string representation of the effort level based on given number of points."
] |
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"
] | [
"Tells you if the date part of a datetime is in a certain time range.",
"Sets Idle max age.\n\nThe time, for a connection to remain unused before it is closed off. Do not use aggressive values here!\n@param idleMaxAge time after which a connection is closed off\n@param timeUnit idleMaxAge time granularity.",
"What is the maximum bounds in screen space? Needed for correct clipping calculation.\n\n@param tile\ntile\n@param panOrigin\npan origin\n@return max screen bbox",
"Create the log if it does not exist or return back exist log\n\n@param topic the topic name\n@param partition the partition id\n@return read or create a log\n@throws IOException any IOException",
"Gets the Chi Square distance between two normalized histograms.\n\n@param histogram1 Histogram.\n@param histogram2 Histogram.\n@return The Chi Square distance between x and y.",
"Detects if the current device is a mobile device.\nThis method catches most of the popular modern devices.\nExcludes Apple iPads and other modern tablets.\n@return detection of any mobile device using the quicker method",
"Clones a BufferedImage.\n@param image the image to clone\n@return the cloned image",
"Fetch the next event from a given stream\n@return the next event\n@throws IOException any io exception that could occur",
"Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null"
] |
private void processHyperlinkData(Resource resource, byte[] data)
{
if (data != null)
{
int offset = 12;
String hyperlink;
String address;
String subaddress;
offset += 12;
hyperlink = MPPUtility.getUnicodeString(data, offset);
offset += ((hyperlink.length() + 1) * 2);
offset += 12;
address = MPPUtility.getUnicodeString(data, offset);
offset += ((address.length() + 1) * 2);
offset += 12;
subaddress = MPPUtility.getUnicodeString(data, offset);
resource.setHyperlink(hyperlink);
resource.setHyperlinkAddress(address);
resource.setHyperlinkSubAddress(subaddress);
}
} | [
"This method is used to extract the resource hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param resource resource instance\n@param data hyperlink data block"
] | [
"Load assertion from the provided json or throw exception if not possible.\n\n@param encodedAssertion the assertion as it was encoded in JSON.",
"Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print",
"Recursively write tasks.\n\n@param tasks list of tasks\n@throws IOException",
"Read the optional row header and UUID.\n\n@param stream input stream\n@param map row map",
"Apply the layout to the each page in the list\n@param itemLayout item layout in the page\n@return true if the new layout is applied successfully, otherwise - false",
"Applies the matrices computed from the scene object's\nlinked to the skeleton bones to the current pose.\n@see #applyPose(GVRPose, int)\n@see #setPose(GVRPose)",
"Add a metadata profile.\n@see #loadProfile",
"If requested, adjust the bounds to the nearest scale and the map size.\n\n@param mapValues Map parameters.\n@param paintArea The size of the painting area.\n@param bounds The map bounds.\n@param dpi the DPI.",
"add an Extent class to the current descriptor\n@param newExtentClassName name of the class to add"
] |
@SuppressWarnings("serial")
private Button createSaveExitButton() {
Button saveExitBtn = CmsToolBar.createButton(
FontOpenCms.SAVE_EXIT,
m_messages.key(Messages.GUI_BUTTON_SAVE_AND_EXIT_0));
saveExitBtn.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
saveAction();
closeAction();
}
});
saveExitBtn.setEnabled(false);
return saveExitBtn;
} | [
"Creates the save and exit button UI Component.\n@return the save and exit button."
] | [
"Use this API to add clusternodegroup resources.",
"Method used to update fields with values received from API.\n@param jsonObject JSON-encoded info about File Version object.",
"Set the model used by the left table.\n\n@param model table model",
"Request to join a group.\n\nNote: if a group has rules, the client must display the rules to the user and the user must accept them (which is indicated by passing a true value to\nacceptRules) prior to making the join request.\n\n@param groupId\n- groupId parameter\n@param message\n- (required) message to group administrator\n@param acceptRules\n- (required) parameter indicating user has accepted groups rules",
"Get a property as an long or throw an exception.\n\n@param key the property name",
"Saves the loaded XML bundle as property bundle.\n@throws UnsupportedEncodingException thrown if localizations from the XML bundle could not be loaded correctly.\n@throws CmsException thrown if any of the interactions with the VFS fails.\n@throws IOException thrown if localizations from the XML bundle could not be loaded correctly.",
"Returns the complete project record for a single project.\n\n@param project The project to get.\n@return Request object",
"Use this API to delete nsacl6 resources of given names.",
"Creates a MetaMatcher based on the filter content.\n\n@param filterAsString the String representation of the filter\n@param metaMatchers the Map of custom MetaMatchers\n@return A MetaMatcher used to match the filter content"
] |
private void readRoleDefinitions(Project gpProject)
{
m_roleDefinitions.put("Default:1", "project manager");
for (Roles roles : gpProject.getRoles())
{
if ("Default".equals(roles.getRolesetName()))
{
continue;
}
for (Role role : roles.getRole())
{
m_roleDefinitions.put(role.getId(), role.getName());
}
}
} | [
"Read the role definitions from a GanttProject project.\n\n@param gpProject GanttProject project"
] | [
"Resolve the server registry.\n\n@param mgmtVersion the mgmt version\n@param subsystems the subsystems\n@return the transformer registry",
"Producers returned from this method are not validated. Internal use only.",
"Process calendar days of the week.\n\n@param calendar project calendar\n@param root calendar data",
"Add a BETWEEN clause so the column must be between the low and high parameters.",
"Add a variable to the scripting context.\n\n@param varName The variable name.\n@param value The variable value.",
"Write correlation id.\n\n@param message the message\n@param correlationId the correlation id",
"Searches the variables layers, top to bottom, for given name, and returns if found; null otherwise.\n\nIf maxDepth is set to {@link Variables#SEARCH_ALL_LAYERS}, then search all layers.",
"Specify the time out of the session established at the server. The\nsession is kept alive by requests sent by this client object. If the\nsession is idle for a period of time that would timeout the session, the\nclient will send a PING request to keep the session alive.\n\n@param timeout timeout in milliseconds, must be greater than zero and less\nthan 60000.",
"Encode a long into a byte array at an offset\n\n@param ba Byte array\n@param offset Offset\n@param v Long value\n@return byte array given in input"
] |
public base_response login(String username, String password, Long timeout) throws Exception
{
this.set_credential(username, password);
this.set_timeout(timeout);
return this.login();
} | [
"Use this API to login into Netscaler.\n@param username Username\n@param password Password for the Netscaler.\n@param timeout timeout for netscaler session.Default is 1800secs\n@return status of the operation performed.\n@throws Exception nitro exception is thrown."
] | [
"Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows",
"multi-field string",
"Retrieve a work week which applies to this date.\n\n@param date target date\n@return work week, or null if none match this date",
"Returns status message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String",
"Returns a JSONObject keyed with the lastId retrieved and a value of a JSONArray of the retrieved JSONObject events\n\n@param table the table to read from\n@return JSONObject containing the max row ID and a JSONArray of the JSONObject events or null",
"Checks if the specified longitude is correct.\n\n@param name the name of the longitude field\n@param longitude the value of the longitude field\n@return the longitude",
"Get the Avro Schema of the input path, assuming the path contains just one\nschema version in all files under that path.",
"handle white spaces.",
"Process the deployment root for the manifest.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException"
] |
GVRSceneObject makeParticleMesh(float[] vertices, float[] velocities,
float[] particleTimeStamps )
{
mParticleMesh = new GVRMesh(mGVRContext);
//pass the particle positions as vertices, velocities as normals, and
//spawning times as texture coordinates.
mParticleMesh.setVertices(vertices);
mParticleMesh.setNormals(velocities);
mParticleMesh.setTexCoords(particleTimeStamps);
particleID = new GVRShaderId(ParticleShader.class);
material = new GVRMaterial(mGVRContext, particleID);
material.setVec4("u_color", mColorMultiplier.x, mColorMultiplier.y,
mColorMultiplier.z, mColorMultiplier.w);
material.setFloat("u_particle_age", mAge);
material.setVec3("u_acceleration", mAcceleration.x, mAcceleration.y, mAcceleration.z);
material.setFloat("u_particle_size", mSize);
material.setFloat("u_size_change_rate", mParticleSizeRate);
material.setFloat("u_fade", mFadeWithAge);
material.setFloat("u_noise_factor", mNoiseFactor);
GVRRenderData renderData = new GVRRenderData(mGVRContext);
renderData.setMaterial(material);
renderData.setMesh(mParticleMesh);
material.setMainTexture(mTexture);
GVRSceneObject meshObject = new GVRSceneObject(mGVRContext);
meshObject.attachRenderData(renderData);
meshObject.getRenderData().setMaterial(material);
// Set the draw mode to GL_POINTS, disable writing to depth buffer, enable depth testing
// and set the rendering order to transparent.
// Disabling writing to depth buffer ensure that the particles blend correctly
// and keeping the depth test on along with rendering them
// after the geometry queue makes sure they occlude, and are occluded, correctly.
meshObject.getRenderData().setDrawMode(GL_POINTS);
meshObject.getRenderData().setDepthTest(true);
meshObject.getRenderData().setDepthMask(false);
meshObject.getRenderData().setRenderingOrder(GVRRenderData.GVRRenderingOrder.TRANSPARENT);
return meshObject;
} | [
"Creates and returns a GVRSceneObject with the specified mesh attributes.\n\n@param vertices the vertex positions of that make up the mesh. (x1, y1, z1, x2, y2, z2, ...)\n@param velocities the velocity attributes for each vertex. (vx1, vy1, vz1, vx2, vy2, vz2...)\n@param particleTimeStamps the spawning times of each vertex. (t1, 0, t2, 0, t3, 0 ..)\n\n@return The GVRSceneObject with this mesh."
] | [
"Do not call this method outside of activity!!!",
"returns true if there are still more rows in the underlying ResultSet.\nReturns false if ResultSet is exhausted.",
"Print all relations for a given's class's tag\n@param tagname the tag containing the given relation\n@param from the source class\n@param edgetype the dot edge specification",
"Calculate entropy value.\n@param values Values.\n@return Returns entropy value of the specified histogram array.",
"Process encoded payload.\n\n@throws IOException Signals that an I/O exception has occurred.",
"Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source",
"Helper function that drops all local databases for every client.",
"Returns the URL to the property file that contains CRS definitions.\n\n@return The URL to the epsg file containing custom EPSG codes",
"Use this API to fetch authenticationvserver_authenticationcertpolicy_binding resources of given name ."
] |
protected void putConnectionBackInPartition(ConnectionHandle connectionHandle) throws SQLException {
if (this.cachedPoolStrategy && ((CachedConnectionStrategy)this.connectionStrategy).tlConnections.dumbGet().getValue()){
connectionHandle.logicallyClosed.set(true);
((CachedConnectionStrategy)this.connectionStrategy).tlConnections.set(new AbstractMap.SimpleEntry<ConnectionHandle, Boolean>(connectionHandle, false));
} else {
BlockingQueue<ConnectionHandle> queue = connectionHandle.getOriginatingPartition().getFreeConnections();
if (!queue.offer(connectionHandle)){ // this shouldn't fail
connectionHandle.internalClose();
}
}
} | [
"Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error"
] | [
"Set an attribute.\n\n@param name attribute name.\n@param value attribute value.",
"Adds a single value to the data set and updates any\nstatistics that are calculated cumulatively.\n@param value The value to add.",
"Prints command-line help menu.",
"Load the given class using a specific class loader.\n\n@param className The name of the class\n@param cl The Class Loader to be used for finding the class.\n@return The class object",
"Gets information about the device pin.\n@param fields the fields to retrieve.\n@return info about the device pin.",
"Use this API to fetch dnspolicylabel resource of given name .",
"Helper to read an optional Integer value.\n@param path The XML path of the element to read.\n@return The Integer value stored in the XML, or <code>null</code> if the value could not be read.",
"Runs through the log removing segments until the size of the log is at least\nlogRetentionSize bytes in size\n\n@throws IOException",
"Validate JUnit4 presence in a concrete version."
] |
public ThreadUsage getThreadUsage() {
ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();
ThreadUsage threadUsage = new ThreadUsage();
long[] threadIds = threadMxBean.getAllThreadIds();
threadUsage.liveThreadCount = threadIds.length;
for (long tId : threadIds) {
ThreadInfo threadInfo = threadMxBean.getThreadInfo(tId);
threadUsage.threadData.put(Long.toString(tId), new ThreadData(
threadInfo.getThreadName(), threadInfo.getThreadState()
.name(), threadMxBean.getThreadCpuTime(tId)));
}
return threadUsage;
} | [
"Gets the thread usage.\n\n@return the thread usage"
] | [
"Whether the address is IPv4-compatible\n\n@see java.net.Inet6Address#isIPv4CompatibleAddress()",
"Add \"ORDER BY\" clause to the SQL query statement. This can be called multiple times to add additional \"ORDER BY\"\nclauses. Ones earlier are applied first.",
"Set an enterprise number value.\n\n@param index number index (1-40)\n@param value number value",
"Gets a SerialMessage with the MULTI CHANNEL CAPABILITY GET command.\nGets the capabilities for a specific endpoint.\n@param the number of the endpoint to get the\n@return the serial message.",
"Print a duration represented by an arbitrary fraction of minutes.\n\n@param duration Duration instance\n@param factor required factor\n@return duration represented as an arbitrary fraction of minutes",
"It is possible for the QR algorithm to get stuck in a loop because of symmetries. This happens\nmore often with larger matrices. By taking a random step it can break the symmetry and finish.",
"Set some initial values.",
"Executes a query using the given parameters. The query results will be added to the\nExecutionResults using the given identifier.\n\n@param identifier\nThe identifier to be used for the results when added to the ExecutionResults\n@param name\nThe name of the query to execute\n@param arguments\nThe arguments to be used for the query parameters\n@return",
"Compares two avro strings which contains single store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content"
] |
public void writeTo(WritableByteChannel channel) throws IOException {
for (ByteBuffer buffer : toDirectByteBuffers()) {
channel.write(buffer);
}
} | [
"Writes the buffer contents to the given byte channel.\n\n@param channel\n@throws IOException"
] | [
"Read flow id.\n\n@param message the message\n@return flow id from the message",
"Use this API to fetch statistics of rnatip_stats resource of given name .",
"Creates a collection from the given stream, casting each object to the\nprovided listener class. The returned collection must not necessarily be\nmutable.\n\n@param <T> Type of the listeners in the given list.\n@param listenerClass The class of the objects in the provided list.\n@param listeners The stream to obtain the listeners for the resulting\ncollection from.\n@param sizeHint Expected size of the input stream.\n@return A typed copy of the list.",
"Call commit on the underlying connection.",
"Returns the texture magnification filter\n\nIf missing, defaults to {@link GL_LINEAR }\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture magnification filter",
"Prints the help on the command line\n\n@param options Options object from commons-cli",
"Execute a Runnable on a thread pool thread\n\n@param priority\nThe thread priority. Be careful with this! <blockquote>\n<b>Note:</b> Use Thread.MIN_PRIORITY..Thread.MAX_PRIORITY\n(1..10), <b>not</b> the Process/Linux -20..19 range!\n</blockquote>\n@param threadProc\nThe code to run. It doesn't matter if this code never returns\n- by using spawn (and, hence the thread pool) there is at\nleast a chance that you will be reusing a thread, thus saving\nteardown/startup costs.\n\n@return A Future<?> that lets you wait for thread completion, if\nnecessary",
"Sets a configuration option to the specified value.",
"Gets the Java subclass of GVRShader which implements\nthis shader type.\n@param ctx GVRContext shader is associated with\n@return GVRShader class implementing the shader type"
] |
protected static void invalidateSwitchPoints() {
if (LOG_ENABLED) {
LOG.info("invalidating switch point");
}
SwitchPoint old = switchPoint;
switchPoint = new SwitchPoint();
synchronized(IndyInterface.class) { SwitchPoint.invalidateAll(new SwitchPoint[]{old}); }
} | [
"Callback for constant meta class update change"
] | [
"Stops the server. This method does nothing if the server is stopped already.",
"Check if a column is part of the row key columns.\n\n@param column the name of the column to check\n@return true if the column is one of the row key columns, false otherwise",
"In case we cannot delete a directory create a marker to recheck whether we can garbage collect some not\nreferenced directories and files.\n\n@param file the directory",
"Converts a JSON patch path to a JSON property name.\nCurrently the metadata API only supports flat maps.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the JSON property name.",
"Use this API to fetch netbridge_vlan_binding resources of given name .",
"Returns the list of nodes which match the expression xpathExpr in the String domStr.\n\n@return the list of nodes which match the query\n@throws XPathExpressionException\n@throws IOException",
"Read data for a single column.\n\n@param startIndex block start\n@param length block length",
"Returns the parsed story from the given text\n\n@param configuration the Configuration used to run story\n@param storyAsText the story text\n@param storyId the story Id, which will be returned as story path\n@return The parsed Story",
"Determine the enum value corresponding to the track type found in the packet.\n\n@return the proper value"
] |
public void createProposals(final Collection<ContentAssistContext> contexts, final IIdeContentProposalAcceptor acceptor) {
Iterable<ContentAssistContext> _filteredContexts = this.getFilteredContexts(contexts);
for (final ContentAssistContext context : _filteredContexts) {
ImmutableList<AbstractElement> _firstSetGrammarElements = context.getFirstSetGrammarElements();
for (final AbstractElement element : _firstSetGrammarElements) {
{
boolean _canAcceptMoreProposals = acceptor.canAcceptMoreProposals();
boolean _not = (!_canAcceptMoreProposals);
if (_not) {
return;
}
this.createProposals(element, context, acceptor);
}
}
}
} | [
"Create content assist proposals and pass them to the given acceptor."
] | [
"Set the order in which sets are returned for the user.\n\nThis method requires authentication with 'write' permission.\n\n@param photosetIds\nAn array of Ids\n@throws FlickrException",
"Returns the device push token or null\n\n@param type com.clevertap.android.sdk.PushType (FCM or GCM)\n@return String device token or null\nNOTE: on initial install calling getDevicePushToken may return null, as the device token is\nnot yet available\nImplement CleverTapAPI.DevicePushTokenRefreshListener to get a callback once the token is\navailable",
"Makes this pose the inverse of the input pose.\n@param src pose to invert.",
"Add columns to the tree.\n\n@param parentNode parent tree node\n@param table columns container",
"Convert a floating point date to a LocalDateTime.\n\nNote: This method currently performs a rounding to the next second.\n\nIf referenceDate is null, the method returns null.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param floatingPointDate The value to the time offset \\( t \\).\n@return The date resulting from adding Math.round(fixingTime*SECONDS_PER_DAY) seconds to referenceDate, where one day has SECONDS_PER_DAY seconds and SECONDS_PER_DAY is a constant 365*24*60*60",
"Return true if the class name is associated to an hidden class or matches a hide expression",
"Fill queue.\n\n@param item the item\n@param minStartPosition the min start position\n@param maxStartPosition the max start position\n@param minEndPosition the min end position\n@throws IOException Signals that an I/O exception has occurred.",
"Returns the compact records for all teams to which user is assigned.\n\n@param user An identifier for the user. Can be one of an email address,\nthe globally unique identifier for the user, or the keyword `me`\nto indicate the current user making the request.\n@return Request object",
"Sets the bounds of a UIObject, moving and sizing to match the\nbounds specified. Currently used for the itemhover and useful\nfor other absolutely positioned elements."
] |
public void setMonth(String monthStr) {
final Month month = Month.valueOf(monthStr);
if ((m_model.getMonth() == null) || !m_model.getMonth().equals(monthStr)) {
removeExceptionsOnChange(new Command() {
public void execute() {
m_model.setMonth(month);
onValueChange();
}
});
}
} | [
"Set the month.\n@param monthStr the month to set."
] | [
"Generates a Map of query parameters for Artifact regarding the filters\n\n@return Map<String, Object>",
"crops the srcBmp with the canvasView bounds and returns the cropped bitmap",
"Retrieves all of the headers from the servlet request and sets them on\nthe proxy request\n\n@param httpServletRequest The request object representing the client's request to the\nservlet engine\n@param httpMethodProxyRequest The request that we are about to send to the proxy host",
"Look-up the results data for a particular test class.",
"A find query only given as criterion. Leave it to MongoDB's own parser to handle it.\n\n@return the {@link Rule} to identify a find query only",
"Old SOAP client uses new SOAP service",
"Push an event which describes a purchase made.\n\n@param eventName Has to be specified as \"Charged\". Anything other than this\nwill result in an {@link InvalidEventNameException} being thrown.\n@param chargeDetails A {@link HashMap}, with keys as strings, and values as {@link String},\n{@link Integer}, {@link Long}, {@link Boolean}, {@link Float}, {@link Double},\n{@link java.util.Date}, or {@link Character}\n@param items An {@link ArrayList} which contains up to 15 {@link HashMap} objects,\nwhere each HashMap object describes a particular item purchased\n@throws InvalidEventNameException Thrown if the event name is not \"Charged\"\n@deprecated use {@link CleverTapAPI#pushChargedEvent(HashMap chargeDetails, ArrayList items)}",
"Calculate the signature by which we can reliably recognize a loaded track.\n\n@param title the track title\n@param artist the track artist, or {@code null} if there is no artist\n@param duration the duration of the track in seconds\n@param waveformDetail the monochrome waveform detail of the track\n@param beatGrid the beat grid of the track\n\n@return the SHA-1 hash of all the arguments supplied, or {@code null} if any either {@code waveFormDetail} or {@code beatGrid} were {@code null}",
"Read one collection element from the current row of the JDBC result set\n\n@param optionalOwner the collection owner\n@param optionalKey the collection key\n@param persister the collection persister\n@param descriptor the collection aliases\n@param rs the result set\n@param session the session\n@throws HibernateException if an error occurs\n@throws SQLException if an error occurs during the query execution"
] |
public static QRDecomposition<DoubleMatrix> qr(DoubleMatrix A) {
int minmn = min(A.rows, A.columns);
DoubleMatrix result = A.dup();
DoubleMatrix tau = new DoubleMatrix(minmn);
SimpleBlas.geqrf(result, tau);
DoubleMatrix R = new DoubleMatrix(A.rows, A.columns);
for (int i = 0; i < A.rows; i++) {
for (int j = i; j < A.columns; j++) {
R.put(i, j, result.get(i, j));
}
}
DoubleMatrix Q = DoubleMatrix.eye(A.rows);
SimpleBlas.ormqr('L', 'N', result, tau, Q);
return new QRDecomposition<DoubleMatrix>(Q, R);
} | [
"QR decomposition.\n\nDecomposes (m,n) matrix A into a (m,m) matrix Q and an (m,n) matrix R such that\nQ is orthogonal, R is upper triangular and Q * R = A\n\nNote that if A has more rows than columns, then the lower rows of R will contain\nonly zeros, such that the corresponding later columns of Q do not enter the computation\nat all. For some reason, LAPACK does not properly normalize those columns.\n\n@param A matrix\n@return QR decomposition"
] | [
"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.",
"Promote a module in the Grapes server\n\n@param name\n@param version\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Returns a geoquery.",
"Decide which donor node to steal from. This is a policy implementation.\nI.e., in the future, additional policies could be considered. At that\ntime, this method should be overridden in a sub-class, or a policy object\nought to implement this algorithm.\n\nCurrent policy:\n\n1) If possible, a stealer node that is the zone n-ary in the finalCluster\nsteals from the zone n-ary in the currentCluster in the same zone.\n\n2) If there are no partition-stores to steal in the same zone (i.e., this\nis the \"zone expansion\" use case), then a differnt policy must be used.\nThe stealer node that is the zone n-ary in the finalCluster determines\nwhich pre-existing zone in the currentCluster hosts the primary partition\nid for the partition-store. The stealer then steals the zone n-ary from\nthat pre-existing zone.\n\nThis policy avoids unnecessary cross-zone moves and distributes the load\nof cross-zone moves approximately-uniformly across pre-existing zones.\n\nOther policies to consider:\n\n- For zone expansion, steal all partition-stores from one specific\npre-existing zone.\n\n- Replace heuristic to approximately uniformly distribute load among\nexisting zones to something more concrete (i.e. track steals from each\npre-existing zone and forcibly balance them).\n\n- Select a single donor for all replicas in a new zone. This will require\ndonor-based rebalancing to be run (at least for this specific part of the\nplan). This would reduce the number of donor-side scans of data. (But\nstill send replication factor copies over the WAN.) This would require\napparatus in the RebalanceController to work.\n\n- Set up some sort of chain-replication in which a single stealer in the\nnew zone steals some replica from a pre-exising zone, and then other\nn-aries in the new zone steal from the single cross-zone stealer in the\nzone. This would require apparatus in the RebalanceController to work.\n\n@param currentSRP\n@param finalSRP\n@param stealerZoneId\n@param stealerNodeId\n@param stealerPartitionId\n@return the node id of the donor for this partition Id.",
"Concatenates the trajectory a and b\n@param a The end of this trajectory will be connected to the start of trajectory b\n@param b The start of this trajectory will be connected to the end of trajectory a\n@return Concatenated trajectory",
"Gets read-only metadata.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeIds Node ids to fetch read-only metadata from\n@param storeNames Stores names to fetch read-only metadata from\n@param metaKeys List of read-only metadata to fetch\n@throws IOException",
"Given a BSON document, remove any forbidden fields and return the document. If no changes are\nmade, the original document reference is returned. If changes are made, a cloned copy of the\ndocument with the changes will be returned.\n\n@param document the document from which to remove forbidden fields\n\n@return a BsonDocument without any forbidden fields.",
"Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges",
"Throws if the given file is null, is not a file or directory, or is an empty directory."
] |
public static base_responses update(nitro_service client, responderpolicy resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
responderpolicy updateresources[] = new responderpolicy[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new responderpolicy();
updateresources[i].name = resources[i].name;
updateresources[i].rule = resources[i].rule;
updateresources[i].action = resources[i].action;
updateresources[i].undefaction = resources[i].undefaction;
updateresources[i].comment = resources[i].comment;
updateresources[i].logaction = resources[i].logaction;
updateresources[i].appflowaction = resources[i].appflowaction;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | [
"Use this API to update responderpolicy resources."
] | [
"Start with specifying the artifact version",
"Creates an operation to read a resource.\n\n@param address the address to create the read for\n@param recursive whether to search recursively or not\n\n@return the operation",
"Use this API to unset the properties of gslbsite resource.\nProperties that need to be unset are specified in args array.",
"Use this API to fetch auditnslogpolicy_authenticationvserver_binding resources of given name .",
"Create an Product delivery\n\n@throws AuthenticationException, GrapesCommunicationException, IOException",
"Returns the item at the specified position.\n\n@param position index of the item to return\n@return the item at the specified position or {@code null} when not found",
"Set trimmed value.\n\n@param t Trimmed value.",
"compute Sinh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"Get the parameters of determining this parametric\ncovariance model. The parameters are usually free parameters\nwhich may be used in calibration.\n\n@return Parameter vector."
] |
public LuaPreparedScript endPreparedScriptReturn(LuaValue value, LuaScriptConfig config) {
add(new LuaAstReturnStatement(argument(value)));
return endPreparedScript(config);
} | [
"End building the prepared script, adding a return value statement\n@param value the value to return\n@param config the configuration for the script to build\n@return the new {@link LuaPreparedScript} instance"
] | [
"Configure file logging and stop console logging.\n\n@param filename\nLog to this file.",
"Update max min.\n\n@param n the n\n@param c the c",
"Retrieve the frequency of an exception.\n\n@param exception XML calendar exception\n@return frequency",
"Mark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to mark as current",
"Set new front facing rotation\n@param rotation",
"Updates the path_order column in the table, loops though the pathOrder array, and changes the value to the loop\nindex+1 for the specified pathId\n\n@param profileId ID of profile\n@param pathOrder array containing new order of paths",
"Add several jvm metrics.",
"Submit a command to the server.\n\n@param command The CLI command\n@return The DMR response as a ModelNode\n@throws CommandFormatException\n@throws IOException",
"Rollback the last applied patch.\n\n@param contentPolicy the content policy\n@param resetConfiguration whether to reset the configuration\n@param modification the installation modification\n@return the patching result\n@throws PatchingException"
] |
private void setCalendarToOrdinalRelativeDay(Calendar calendar, int dayNumber)
{
int currentDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
int requiredDayOfWeek = getDayOfWeek().getValue();
int dayOfWeekOffset = 0;
if (requiredDayOfWeek > currentDayOfWeek)
{
dayOfWeekOffset = requiredDayOfWeek - currentDayOfWeek;
}
else
{
if (requiredDayOfWeek < currentDayOfWeek)
{
dayOfWeekOffset = 7 - (currentDayOfWeek - requiredDayOfWeek);
}
}
if (dayOfWeekOffset != 0)
{
calendar.add(Calendar.DAY_OF_YEAR, dayOfWeekOffset);
}
if (dayNumber > 1)
{
calendar.add(Calendar.DAY_OF_YEAR, (7 * (dayNumber - 1)));
}
} | [
"Moves a calendar to the nth named day of the month.\n\n@param calendar current date\n@param dayNumber nth day"
] | [
"Connect and register at the remote domain controller.\n\n@return connection the established connection\n@throws IOException",
"trim \"act.\" from conf keys",
"Report on the filtered data in DMR .",
"Generate a sql where-clause for the array of fields\n\n@param fields array containing all columns used in WHERE clause",
"Takes a model and an SCXMLFrontier and decomposes the Frontier into a Map of Strings to Strings\nThese strings can be sent over a network to get a Frontier past a 'gap'\n\n@param frontier the Frontier\n@param modelText the model\n@return the map of strings representing a decomposition",
"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",
"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",
"Returns the default hidden preference for the user.\n\n@return boolean hidden or not\n@throws FlickrException",
"Use this API to fetch all the responderparam resources that are configured on netscaler."
] |
static ParsedHost validateHostImpl(HostName fromHost) throws HostNameException {
final String str = fromHost.toString();
HostNameParameters validationOptions = fromHost.getValidationOptions();
return validateHost(fromHost, str, validationOptions);
} | [
"So we will follow rfc 1035 and in addition allow the underscore."
] | [
"Access all of the elements of the collection that evaluate to true for the\nprovided query predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tAn iterator used to iterate over the elements that evaluated true for the predicate.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.",
"Bulk delete clients from a profile.\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return returns the table of the remaining clients or an exception if deletion failed for some reason\n@throws Exception",
"Determines whether the current object on the specified level has a specific property, and if so, processes the\ntemplate\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\"",
"Retrieve the default mapping between MPXJ assignment fields and Primavera assignment field names.\n\n@return mapping",
"Use this API to fetch all the appfwwsdl resources that are configured on netscaler.",
"Sets a header per-request\n\n@param key Header key\n@param value Header value\n@return The request itself",
"Returns if a request should be retried based on the retry count, current response,\nand the current strategy.\n\n@param retryCount The current retry attempt count.\n@param response The exception that caused the retry conditions to occur.\n@return true if the request should be retried; false otherwise.",
"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.",
"Calculates the delta of a digital option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The delta of the digital option"
] |
private void writeWBS(Task mpxj)
{
if (mpxj.getUniqueID().intValue() != 0)
{
WBSType xml = m_factory.createWBSType();
m_project.getWBS().add(xml);
String code = mpxj.getWBS();
code = code == null || code.length() == 0 ? DEFAULT_WBS_CODE : code;
Task parentTask = mpxj.getParentTask();
Integer parentObjectID = parentTask == null ? null : parentTask.getUniqueID();
xml.setCode(code);
xml.setGUID(DatatypeConverter.printUUID(mpxj.getGUID()));
xml.setName(mpxj.getName());
xml.setObjectId(mpxj.getUniqueID());
xml.setParentObjectId(parentObjectID);
xml.setProjectObjectId(PROJECT_OBJECT_ID);
xml.setSequenceNumber(Integer.valueOf(m_wbsSequence++));
xml.setStatus("Active");
}
writeChildTasks(mpxj);
} | [
"Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity"
] | [
"Read calendar hours and exception data.\n\n@param calendar parent calendar\n@param row calendar hours and exception data",
"Patch provided by Avril Kotzen ([email protected])\nDB2 handles TINYINT (for mapping a byte).",
"This method is called on every reference that is in the .class file.\n@param typeReference\n@return",
"This filter uses a 9-patch to overlay the image.\n\n@param imageUrl Watermark image URL. It is very important to understand that the same image\nloader that Thumbor uses will be used here.",
"This intro hides the system bars.",
"Scans a single class for Swagger annotations - does not invoke ReaderListeners",
"Returns an integer array that contains the current values for all the\ntexture parameters.\n\n@return an integer array that contains the current values for all the\ntexture parameters.",
"Create an error image.\n\n@param area The size of the image",
"Update an existing feature. Made package private for testing purposes.\n\n@param feature feature to update\n@throws LayerException oops"
] |
final void waitForSizeQueue(final int queueSize) {
synchronized (this.queue) {
while (this.queue.size() > queueSize) {
try {
this.queue.wait(250L);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
try {
Thread.sleep(500L);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
this.queue.notifyAll();
}
} | [
"For test purposes only."
] | [
"Support the range subscript operator for GString\n\n@param text a GString\n@param range a Range\n@return the String of characters corresponding to the provided range\n@since 2.3.7",
"Adds NOT BETWEEN criteria,\ncustomer_id not between 1 and 10\n\n@param attribute The field name to be used\n@param value1 The lower boundary\n@param value2 The upper boundary",
"Removes empty space when \"fitToContent\" is true and real height of object is\ntaller than current bands height, otherwise, it is not modified\n\n@param band\n@param currHeigth\n@param fitToContent",
"Given a class configures the binding between a class and a Renderer class.\n\n@param clazz to bind.\n@param prototype used as Renderer.\n@return the current RendererBuilder instance.",
"Assign FK value of main object with PK values of the reference object.\n\n@param obj real object with reference (proxy) object (or real object with set FK values on insert)\n@param cld {@link ClassDescriptor} of the real object\n@param rds An {@link ObjectReferenceDescriptor} of real object.\n@param insert Show if \"linking\" is done while insert or update.",
"Sets a JSON String as a request entity.\n\n@param connnection The request of {@link HttpConnection}\n@param body The JSON String to set.",
"Determine how many forked JVMs to use.",
"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",
"Stores an new entry in the cache."
] |
@SuppressWarnings("unchecked")
public static <T> Serializer<T> unsafeGetSerializer(SerializerFactory serializerFactory,
SerializerDefinition serializerDefinition) {
return (Serializer<T>) serializerFactory.getSerializer(serializerDefinition);
} | [
"This is a temporary measure until we have a type-safe solution for\nretrieving serializers from a SerializerFactory. It avoids warnings all\nover the codebase while making it easy to verify who calls it."
] | [
"Read exactly buffer.length bytes from the stream into the buffer\n\n@param stream The stream to read from\n@param buffer The buffer to read into",
"Sign off a group of connections from the registry by key\n\n@param key\nthe key\n@param connections\na collection of websocket connections",
"Demonstrates obtaining the request history data from a test run",
"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.",
"Parses and adds dictionaries to the Solr index.\n\n@param cms the OpenCms object.\n\n@throws CmsRoleViolationException in case the user does not have the required role ROOT_ADMIN",
"Option check, forwards options to the standard doclet, if that one refuses them,\nthey are sent to UmlGraph",
"Run the configured crawl. This method blocks until the crawl is done.\n\n@return the CrawlSession once the crawl is done.",
"Returns a list of Elements form the DOM tree, matching the tag element.",
"Return the class's name, possibly by stripping the leading path"
] |
static String replaceCheckDigit(final String iban, final String checkDigit) {
return getCountryCode(iban) + checkDigit + getBban(iban);
} | [
"Returns an iban with replaced check digit.\n\n@param iban The iban\n@return The iban without the check digit"
] | [
"Goes through the buckets from ix and out, checking for each\ncandidate if it's in one of the buckets, and if so, increasing\nits score accordingly. No new candidates are added.",
"Gets the proper modulus operation.\n\n@param x Integer.\n@param m Modulo.\n@return Modulus.",
"Calls the httpHandler method.",
"Old REST client uses old REST service",
"Update a note.\n\n@param note\nThe Note to update\n@throws FlickrException",
"add a FK column pointing to This Class",
"A convenience method for creating an immutable sorted set.\n\n@param self a SortedSet\n@return an immutable SortedSet\n@see java.util.Collections#unmodifiableSortedSet(java.util.SortedSet)\n@since 1.0",
"Write the table configuration to a buffered writer.",
"Remove any device announcements that are so old that the device seems to have gone away."
] |
public static int checkVlen(int i) {
int count = 0;
if (i >= -112 && i <= 127) {
return 1;
} else {
int len = -112;
if (i < 0) {
i ^= -1L; // take one's complement'
len = -120;
}
long tmp = i;
while (tmp != 0) {
tmp = tmp >> 8;
len--;
}
count++;
len = (len < -120) ? -(len + 120) : -(len + 112);
while (len != 0) {
count++;
len--;
}
return count;
}
} | [
"Determines the number bytes required to store a variable length\n\n@param i length of Bytes\n@return number of bytes needed"
] | [
"Manual check because introducing a capability can't be done without a full refactoring.\nThis has to go as soon as the management interfaces are redesigned.\n@param context the OperationContext\n@param otherManagementEndpoint : the address to check that may provide an exposed jboss-remoting endpoint.\n@throws OperationFailedException in case we can't remove the management resource.",
"Get the element at the index as a float.\n\n@param i the index of the element to access",
"Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance",
"Load a model to attach to the avatar\n@param avatarResource resource with avatar model\n@param attachBone name of bone to attach model to",
"Returns the ordered Map value of the field.\n\n@return the ordered Map value of the field. It returns a reference of the value.\n@throws IllegalArgumentException if the value cannot be converted to ordered Map.",
"Creates a future that will send a request to the reporting host and call\nthe handler with the response\n\n@param path the path at the reporting host which the request will be made\n@param reportingHandler the handler to receive the response once executed\nand recieved\n@return a {@link java.util.concurrent.Future} for handing the request",
"Test for convergence by seeing if the element with the largest change\nis smaller than the tolerance. In some test cases it alternated between\nthe + and - values of the eigen vector. When this happens it seems to have \"converged\"\nto a non-dominant eigen vector. At least in the case I looked at. I haven't devoted\na lot of time into this issue...",
"Get a property as a string or throw an exception.\n\n@param key the property name",
"Validates the wrapped value and returns a localized error message in case of invalid values.\n@return <code>null</code> if the value is valid, a suitable localized error message otherwise."
] |
private TransactionManager getTransactionManager()
{
TransactionManager retval = null;
try
{
if (log.isDebugEnabled()) log.debug("getTransactionManager called");
retval = TransactionManagerFactoryFactory.instance().getTransactionManager();
}
catch (TransactionManagerFactoryException e)
{
log.warn("Exception trying to obtain TransactionManager from Factory", e);
e.printStackTrace();
}
return retval;
} | [
"Return the TransactionManager of the external app"
] | [
"Adds the List of Lists of CRFDatums to the data and labels arrays, treating\neach datum as if it were its own document. Adds context labels in addition\nto the target label for each datum, meaning that for a particular document,\nthe number of labels will be windowSize-1 greater than the number of\ndatums.\n\n@param processedData\na List of Lists of CRFDatums",
"Create the navigation frame.\n@param outputDirectory The target directory for the generated file(s).",
"Removes the token from the list\n@param token Token which is to be removed",
"Determines if this value is the default value for the given field type.\n\n@param type field type\n@param value value\n@return true if the value is not default",
"Use this API to fetch tmtrafficpolicy_lbvserver_binding resources of given name .",
"Set a bean in the context.\n\n@param name bean name\n@param object bean value",
"Remove an write lock.",
"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",
"Use this API to fetch all the spilloverpolicy resources that are configured on netscaler."
] |
public static base_responses enable(nitro_service client, Long clid[]) throws Exception {
base_responses result = null;
if (clid != null && clid.length > 0) {
clusterinstance enableresources[] = new clusterinstance[clid.length];
for (int i=0;i<clid.length;i++){
enableresources[i] = new clusterinstance();
enableresources[i].clid = clid[i];
}
result = perform_operation_bulk_request(client, enableresources,"enable");
}
return result;
} | [
"Use this API to enable clusterinstance resources of given names."
] | [
"Retrieve table data, return an empty result set if no table data is present.\n\n@param name table name\n@return table data",
"Method to build Integration flow for IMAP Idle configuration.\n@param urlName Mail source URL.\n@return Integration Flow object IMAP IDLE.",
"Execute a HTTP request\n\n@param stringUrl URL\n@param method Method to use\n@param parameters Params\n@param input Input / Payload\n@param charset Input Charset\n@return response\n@throws IOException",
"Add a custom query parameter to the _changes request. Useful for specifying extra parameters\nto a filter function for example.\n\n@param name the name of the query parameter\n@param value the value of the query parameter\n@return this Changes instance\n@since 2.5.0",
"Compare two integers, accounting for null values.\n\n@param n1 integer value\n@param n2 integer value\n@return comparison result",
"Add a plugin path\n\n@param model\n@param add\n@return\n@throws Exception",
"Get a state handler for a given patching artifact.\n\n@param artifact the patching artifact\n@param <P>\n@param <S>\n@return the state handler, {@code null} if there is no handler registered for the given artifact",
"Execute blocking for a prepared result.\n\n@param operation the operation to execute\n@param client the protocol client\n@return the prepared operation\n@throws IOException\n@throws InterruptedException",
"Replace a single value at the appropriate location in the existing value array.\n@param index - location in the array list\n@param newValue - the new String"
] |
public long addAll(final Map<String, Double> scoredMember) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zadd(getKey(), scoredMember);
}
});
} | [
"Adds to this set all of the elements in the specified map of members and their score.\n@param scoredMember the members to add together with their scores\n@return the number of members actually added"
] | [
"Returns the name of the bone.\n\n@return the name",
"Parses the configuration node and provides a pipeline configuration without any extensions marked for loading.\nThe configuration node is supposed to conform to the pipeline configuration JSON schema.\n\n<p>The caller is supposed to use the methods from the builder to add/find extension classes that will be used in\nthe analysis.\n\n<p>Note that the returned pipeline configuration might not contain all the extensions available in\nthe classloader depending on the include/exclude filters in the configuration.\n\n@param json the configuration node\n@return a pipeline configuration parsed from the configuration\n@see Builder#build()",
"Use this API to fetch all the snmpmanager resources that are configured on netscaler.",
"Decode long from byte array at offset\n\n@param ba byte array\n@param offset Offset\n@return long value",
"Performs DBSCAN cluster analysis.\n\n@param points the points to cluster\n@return the list of clusters\n@throws NullArgumentException if the data points are null",
"Add a dependency task group for this model.\n\n@param dependency the dependency.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependency task group",
"Resolve all files from a given path and simplify its definition.",
"Parses an item id\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@param siteIri\nthe siteIRI that this value refers to\n@throws IllegalArgumentException\nif the id is invalid",
"Get the spin scripting environment\n\n@param language the language name\n@return the environment script as string or null if the language is\nnot in the set of languages supported by spin."
] |
public static service_stats[] get(nitro_service service) throws Exception{
service_stats obj = new service_stats();
service_stats[] response = (service_stats[])obj.stat_resources(service);
return response;
} | [
"Use this API to fetch the statistics of all service_stats resources that are configured on netscaler."
] | [
"Write resource assignment.\n\n@param record resource assignment instance\n@throws IOException",
"Sets the value to a default.",
"Returns the time elapsed by the user on the app\n@return Time elapsed by user on the app in int",
"Use this API to fetch all the nsdiameter resources that are configured on netscaler.",
"Concatenates the trajectory a and b\n@param a The end of this trajectory will be connected to the start of trajectory b\n@param b The start of this trajectory will be connected to the end of trajectory a\n@return Concatenated trajectory",
"Processes the template for the object cache of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Appends a formatted line of code to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>",
"Joins the given list into a single string.",
"Reads a single schema file.\n\n@param reader The schema reader\n@param schemaFile The schema file\n@return The model"
] |
protected void initializeJdbcConnection(Connection con, JdbcConnectionDescriptor jcd)
throws LookupException
{
try
{
PlatformFactory.getPlatformFor(jcd).initializeJdbcConnection(jcd, con);
}
catch (PlatformException e)
{
throw new LookupException("Platform dependent initialization of connection failed", e);
}
} | [
"Initialize the connection with the specified properties in OJB\nconfiguration files and platform depended properties.\nInvoke this method after a NEW connection is created, not if re-using from pool.\n\n@see org.apache.ojb.broker.platforms.PlatformFactory\n@see org.apache.ojb.broker.platforms.Platform"
] | [
"Method must be invoked upon completion of a rebalancing task. It is the\ntask's responsibility to do so.\n\n@param stealerId\n@param donorId",
"updates the groupname in the table given the id\n\n@param newGroupName new group name\n@param id ID of group",
"Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer",
"Returns the overtime cost of this resource assignment.\n\n@return cost",
"Removes all of the markers from the map.",
"Compute the key to use.\n\n@param ref The reference number.\n@param filename The filename.\n@param extension The file extension.",
"Adds an orthographic camera constructed from the designated\nperspective camera to describe the shadow projection.\nThe field of view and aspect ration of the perspective\ncamera are used to obtain the view volume of the\northographic camera. This type of camera is used\nfor shadows generated by direct lights at infinite distance.\n@param centerCam GVRPerspectiveCamera to derive shadow projection from\n@return Orthographic camera to use for shadow casting\n@see GVRDirectLight",
"Write a double attribute.\n\n@param name attribute name\n@param value attribute value",
"Writes this address as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix."
] |
private Task findChildTaskByUUID(ChildTaskContainer parent, UUID uuid)
{
Task result = null;
for (Task task : parent.getChildTasks())
{
if (uuid.equals(task.getGUID()))
{
result = task;
break;
}
}
return result;
} | [
"Locates a task within a child task container which matches the supplied UUID.\n\n@param parent child task container\n@param uuid required UUID\n@return Task instance or null if the task is not found"
] | [
"Creates a rectangular matrix which is zero except along the diagonals.\n\n@param numRows Number of rows in the matrix.\n@param numCols NUmber of columns in the matrix.\n@return A matrix with diagonal elements equal to one.",
"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command removes all elements in the sorted set between the lexicographical range specified.\n@param lexRange\n@return the number of elements removed.",
"Searches for commas in the set of tokens. Used for inputs to functions.\n\nIgnore comma's which are inside a [ ] block\n\n@return List of output tokens between the commas",
"Adds a user defined field value to a task.\n\n@param fieldType field type\n@param container FieldContainer instance\n@param row UDF data",
"Creates a new section in a project.\n\nReturns the full record of the newly created section.\n\n@param project The project to create the section in\n@return Request object",
"Removes all the given tags from the document.\n\n@param dom the document object.\n@param tagName the tag name, examples: script, style, meta\n@return the changed dom.",
"Sets an element in at the specified index.",
"Obtains a International Fixed zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Provides a consistent ordering over lists. First compares by the first\nelement. If that element is equal, the next element is considered, and so\non."
] |
private void addAllProjectModels(ApplicationReportIndexModel navIdx, ProjectModel projectModel)
{
navIdx.addProjectModel(projectModel);
for (ProjectModel childProject : projectModel.getChildProjects())
{
if (!Iterators.asSet(navIdx.getProjectModels()).contains(childProject))
addAllProjectModels(navIdx, childProject);
}
} | [
"Attach all project models within the application to the index. This will make it easy to navigate from the\nprojectModel to the application index."
] | [
"Set the month.\n@param monthStr the month to set.",
"Deletes the VFS XML bundle file.\n@throws CmsException thrown if the delete operation fails.",
"Retrieve the date range at the specified index.\nThe index is zero based, and this method will return\nnull if the requested date range does not exist.\n\n@param index range index\n@return date range instance",
"This continuously tries to reconnect in a separate thread and will only stop if the connection was established\nsuccessfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters\nand callback will get updated.\n\n@param reconnectUri the updated connection uri\n@param authKey the updated authentication key\n@param callback the current callback",
"if you want to parse an argument, you need a converter from String to Object\n\n@param commandLineOption specification of the command line options\n@param converter how to convert your String value to a castable Object",
"Use this API to unset the properties of clusterinstance resource.\nProperties that need to be unset are specified in args array.",
"Use this API to fetch filtered set of gslbservice resources.\nset the filter parameter values in filtervalue object.",
"Set an unknown field.\n@param name the unknown property name\n@param value the unknown property value",
"Return a logger associated with a particular class name."
] |
protected void appendSQLClause(SelectionCriteria c, StringBuffer buf)
{
// BRJ : handle SqlCriteria
if (c instanceof SqlCriteria)
{
buf.append(c.getAttribute());
return;
}
// BRJ : criteria attribute is a query
if (c.getAttribute() instanceof Query)
{
Query q = (Query) c.getAttribute();
buf.append("(");
buf.append(getSubQuerySQL(q));
buf.append(")");
buf.append(c.getClause());
appendParameter(c.getValue(), buf);
return;
}
AttributeInfo attrInfo = getAttributeInfo((String) c.getAttribute(), false, c.getUserAlias(), c.getPathClasses());
TableAlias alias = attrInfo.tableAlias;
if (alias != null)
{
boolean hasExtents = alias.hasExtents();
if (hasExtents)
{
// BRJ : surround with braces if alias has extents
buf.append("(");
appendCriteria(alias, attrInfo.pathInfo, c, buf);
c.setNumberOfExtentsToBind(alias.extents.size());
Iterator iter = alias.iterateExtents();
while (iter.hasNext())
{
TableAlias tableAlias = (TableAlias) iter.next();
buf.append(" OR ");
appendCriteria(tableAlias, attrInfo.pathInfo, c, buf);
}
buf.append(")");
}
else
{
// no extents
appendCriteria(alias, attrInfo.pathInfo, c, buf);
}
}
else
{
// alias null
appendCriteria(alias, attrInfo.pathInfo, c, buf);
}
} | [
"Answer the SQL-Clause for a SelectionCriteria\nIf the Criteria references a class with extents an OR-Clause is\nadded for each extent\n@param c SelectionCriteria"
] | [
"Little helper function that recursivly deletes a directory.\n\n@param dir The directory",
"Creates the given connection pool with the given configuration. Extracted here to make unit mocking easier.\n@param config configuration object.\n@return BoneCP connection pool handle.",
"Load a list of entities using the information in the context\n\n@param session The session\n@param lockOptions The locking details\n@param ogmContext The context with the information to load the entities\n@return the list of entities corresponding to the given context",
"Use this API to Import appfwsignatures.",
"Process a single criteria block.\n\n@param list parent criteria list\n@param block current block",
"Wrap an existing setter.",
"Reads and sets the next feed in the stream.",
"Creates a bridge accessory, capable of holding multiple child accessories. This has the\nadvantage over multiple standalone accessories of only requiring a single pairing from iOS for\nthe bridge.\n\n@param authInfo authentication information for this accessory. These values should be persisted\nand re-supplied on re-start of your application.\n@param label label for the bridge. This will show in iOS during pairing.\n@param manufacturer manufacturer of the bridge. This information is exposed to iOS for unknown\npurposes.\n@param model model of the bridge. This is also exposed to iOS for unknown purposes.\n@param serialNumber serial number of the bridge. Also exposed. Purposes also unknown.\n@return the bridge, from which you can {@link HomekitRoot#addAccessory add accessories} and\nthen {@link HomekitRoot#start start} handling requests.\n@throws IOException when mDNS cannot connect to the network",
"Write the domain controller's data to an output stream.\n\n@param outstream the output stream\n@throws Exception"
] |
public static int cudnnCTCLoss(
cudnnHandle handle,
cudnnTensorDescriptor probsDesc, /** Tensor descriptor for probabilities, the dimensions are T,N,A (T is the timing steps, N is the
mini batch size, A is the alphabet size) */
Pointer probs, /** probabilities after softmax, in GPU memory */
int[] labels, /** labels, in CPU memory */
int[] labelLengths, /** the length of each label, in CPU memory */
int[] inputLengths, /** the lengths of timing steps in each batch, in CPU memory */
Pointer costs, /** the returned costs of CTC, in GPU memory */
cudnnTensorDescriptor gradientsDesc, /** Tensor descriptor for gradients, the dimensions are T,N,A */
Pointer gradients, /** the returned CTC gradients, in GPU memory, to compute costs only, set it to NULL */
int algo, /** algorithm selected, supported now 0 and 1 */
cudnnCTCLossDescriptor ctcLossDesc,
Pointer workspace, /** pointer to the workspace, in GPU memory */
long workSpaceSizeInBytes)/** the workspace size needed */
{
return checkResult(cudnnCTCLossNative(handle, probsDesc, probs, labels, labelLengths, inputLengths, costs, gradientsDesc, gradients, algo, ctcLossDesc, workspace, workSpaceSizeInBytes));
} | [
"return the ctc costs and gradients, given the probabilities and labels"
] | [
"Returns a RowColumn following the current one\n\n@return RowColumn following this one",
"The period of time to ban a node that gives an error on an operation.\n\n@param nodeBannagePeriod The period of time to ban the node\n@param unit The time unit of the given value\n\n@deprecated Use {@link #setFailureDetectorBannagePeriod(long)} instead",
"This method is used to finalize the configuration\nafter the configuration items have been set.",
"Use this API to fetch service_dospolicy_binding resources of given name .",
"Use this API to delete sslfipskey of given name.",
"Shutdown the server\n\n@throws Exception exception",
"This is needed when running on slaves.",
"Add a \"post-run\" dependent for this model.\n\n@param dependent the \"post-run\" dependent.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group",
"Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException"
] |
public static double HighAccuracyFunction(double x) {
if (x < -8 || x > 8)
return 0;
double sum = x;
double term = 0;
double nextTerm = x;
double pwr = x * x;
double i = 1;
// Iterate until adding next terms doesn't produce
// any change within the current numerical accuracy.
while (sum != term) {
term = sum;
// Next term
nextTerm *= pwr / (i += 2);
sum += nextTerm;
}
return 0.5 + sum * Math.exp(-0.5 * pwr - 0.5 * Constants.Log2PI);
} | [
"High-accuracy Normal cumulative distribution function.\n\n@param x Value.\n@return Result."
] | [
"Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected",
"Exports a single queue to an XML file.",
"Update an object in the database to change its id to the newId parameter.",
"Returns the complete tag record for a single tag.\n\n@param tag The tag to get.\n@return Request object",
"Create a classname from a given path\n\n@param path\n@return",
"Use this API to add vpnclientlessaccesspolicy.",
"Get the currently selected opacity.\n\n@return The int value of the currently selected opacity.",
"Checks if the path leads to an embedded property or association.\n\n@param targetTypeName the entity with the property\n@param namesWithoutAlias the path to the property with all the aliases resolved\n@return {@code true} if the property is an embedded, {@code false} otherwise.",
"Checks, if the end type is valid for the set pattern type.\n@return a flag, indicating if the end type is valid for the pattern type."
] |
public static Set<String> listDeployments(Resource deploymentRootResource, Set<String> runtimeNames) {
Set<Pattern> set = new HashSet<>();
for (String wildcardExpr : runtimeNames) {
Pattern pattern = DeploymentOverlayIndex.getPattern(wildcardExpr);
set.add(pattern);
}
return listDeploymentNames(deploymentRootResource, set);
} | [
"Returns the deployment names with the specified runtime names at the specified deploymentRootAddress.\n\n@param deploymentRootResource\n@param runtimeNames\n@return the deployment names with the specified runtime names at the specified deploymentRootAddress."
] | [
"Attempts to checkout a resource so that one queued request can be\nserviced.\n\n@param key The key for which to process the requestQueue\n@return true iff an item was processed from the Queue.",
"Convert an Object to a Date.",
"Gets the instance associated with the current thread.",
"Initial random seed used for shuffling test suites and other sources\nof pseudo-randomness. If not set, any random value is set.\n\n<p>The seed's format is compatible with {@link RandomizedRunner} so that\nseed can be fixed for suites and methods alike.",
"Checks if the provided duration information is valid.\n@return <code>null</code> if the information is valid, the key of the suitable error message otherwise.",
"Specify the Artifact for which the condition should search for.\n\n@param artifact\n@return",
"Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFileName The file to write the stream contents to.\n@throws IOException If the stream cannot be copied.",
"Read the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar object\n@param mpxjCalendar MPXJ calendar object",
"Update the project properties from the project summary task.\n\n@param task project summary task"
] |
public static List<Representation> parseRepresentations(JsonObject jsonObject) {
List<Representation> representations = new ArrayList<Representation>();
for (JsonValue representationJson : jsonObject.get("entries").asArray()) {
Representation representation = new Representation(representationJson.asObject());
representations.add(representation);
}
return representations;
} | [
"Parse representations from a file object response.\n@param jsonObject representations json object in get response for /files/file-id?fields=representations\n@return list of representations"
] | [
"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",
"Writes a presentable version of the given PTB-tokenized text.\nPTB tokenization splits up punctuation and does various other things\nthat makes simply joining the tokens with spaces look bad. So join\nthe tokens with space and run it through this method to produce nice\nlooking text. It's not perfect, but it works pretty well.",
"returns an Array with an Objects PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Use this API to fetch vpnclientlessaccesspolicy resource of given name .",
"Sets the time to wait when close connection watch threads are enabled. 0 = wait forever.\n@param closeConnectionWatchTimeout the watchTimeout to set\n@param timeUnit Time granularity",
"Called by spring on initialization.",
"Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement",
"Returns the compact project records for all projects in the workspace.\n\n@param workspace The workspace or organization to find projects in.\n@return Request object",
"Determine the color to use to draw a cue list entry. Hot cues are green, ordinary memory points are red,\nand loops are orange.\n\n@param entry the entry being drawn\n\n@return the color with which it should be represented."
] |
private static String getEncodedInstance(String encodedResponse) {
if (isReturnValue(encodedResponse) || isThrownException(encodedResponse)) {
return encodedResponse.substring(4);
}
return encodedResponse;
} | [
"Returns a string that encodes the result of a method invocation.\nEffectively, this just removes any headers from the encoded response.\n\n@param encodedResponse\n@return string that encodes the result of a method invocation"
] | [
"PUT and POST are identical calls except for the header specifying the method",
"Checks to see if the submatrix has its boundaries along inner blocks.\n\n@param blockLength Size of an inner block.\n@param A Submatrix.\n@return If it is block aligned or not.",
"Update artifact provider\n\n@param gavc String\n@param provider String",
"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.",
"build a complete set of local files, files from referenced projects, and dependencies.",
"Maps this iterable from the source document type to the target document type.\n\n@param mapper a function that maps from the source to the target document type\n@param <U> the target document type\n@return an iterable which maps T to U",
"Use this API to fetch all the route6 resources that are configured on netscaler.",
"Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException",
"get bearer token returned by IAM in JSON format"
] |
private void handleUpdate(final CdjStatus update) {
// First see if any metadata caches need evicting or mount sets need updating.
if (update.isLocalUsbEmpty()) {
final SlotReference slot = SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.USB_SLOT);
detachMetadataCache(slot);
flushHotCacheSlot(slot);
removeMount(slot);
} else if (update.isLocalUsbLoaded()) {
recordMount(SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.USB_SLOT));
}
if (update.isLocalSdEmpty()) {
final SlotReference slot = SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.SD_SLOT);
detachMetadataCache(slot);
flushHotCacheSlot(slot);
removeMount(slot);
} else if (update.isLocalSdLoaded()){
recordMount(SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.SD_SLOT));
}
if (update.isDiscSlotEmpty()) {
removeMount(SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.CD_SLOT));
} else {
recordMount(SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.CD_SLOT));
}
// Now see if a track has changed that needs new metadata.
if (update.getTrackType() == CdjStatus.TrackType.UNKNOWN ||
update.getTrackType() == CdjStatus.TrackType.NO_TRACK ||
update.getTrackSourceSlot() == CdjStatus.TrackSourceSlot.NO_TRACK ||
update.getTrackSourceSlot() == CdjStatus.TrackSourceSlot.UNKNOWN ||
update.getRekordboxId() == 0) { // We no longer have metadata for this device.
clearDeck(update);
} else { // We can offer metadata for this device; check if we already looked up this track.
final TrackMetadata lastMetadata = hotCache.get(DeckReference.getDeckReference(update.getDeviceNumber(), 0));
final DataReference trackReference = new DataReference(update.getTrackSourcePlayer(),
update.getTrackSourceSlot(), update.getRekordboxId());
if (lastMetadata == null || !lastMetadata.trackReference.equals(trackReference)) { // We have something new!
// First see if we can find the new track in the hot cache as a hot cue
for (TrackMetadata cached : hotCache.values()) {
if (cached.trackReference.equals(trackReference)) { // Found a hot cue hit, use it.
updateMetadata(update, cached);
return;
}
}
// Not in the hot cache so try actually retrieving it.
if (activeRequests.add(update.getTrackSourcePlayer())) {
// We had to make sure we were not already asking for this track.
clearDeck(update); // We won't know what it is until our request completes.
new Thread(new Runnable() {
@Override
public void run() {
try {
TrackMetadata data = requestMetadataInternal(trackReference, update.getTrackType(), true);
if (data != null) {
updateMetadata(update, data);
}
} catch (Exception e) {
logger.warn("Problem requesting track metadata from update" + update, e);
} finally {
activeRequests.remove(update.getTrackSourcePlayer());
}
}
}, "MetadataFinder metadata request").start();
}
}
}
} | [
"Process an update packet from one of the CDJs. See if it has a valid track loaded; if not, clear any\nmetadata we had stored for that player. If so, see if it is the same track we already know about; if not,\nrequest the metadata associated with that track.\n\nAlso clears out any metadata caches that were attached for slots that no longer have media mounted in them,\nand updates the sets of which players have media mounted in which slots.\n\nIf any of these reflect a change in state, any registered listeners will be informed.\n\n@param update an update packet we received from a CDJ"
] | [
"Parse the string representation of a double.\n\n@param value string representation\n@return Java representation\n@throws ParseException",
"Use this API to fetch statistics of cmppolicy_stats resource of given name .",
"Returns the compact task records for all tasks with the given tag.\nTasks can have more than one tag at a time.\n\n@param tag The tag to fetch tasks from.\n@return Request object",
"Sets the indirection handler class.\n\n@param indirectionHandlerClass The class for indirection handlers",
"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.",
"Process a SQLite database PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance",
"This method dumps the entire contents of a file to an output\nprint writer as hex and ASCII data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors",
"Processes and computes column counts of A\n\n@param A (Input) Upper triangular matrix\n@param parent (Input) Elimination tree.\n@param post (Input) Post order permutation of elimination tree. See {@link TriangularSolver_DSCC#postorder}\n@param counts (Output) Storage for column counts.",
"Builds the table for the database results.\n\n@param results the database results\n@return the table"
] |
public static <T extends Comparable<? super T>> List<T> sortInplace(List<T> list) {
Collections.sort(list);
return list;
} | [
"Sorts the specified list itself into ascending order, according to the natural ordering of its elements.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)"
] | [
"Static main.\n\n@param args\nProgram arguments.\n@throws IOException\nIf an IO error occurred.",
"Evict cached object\n\n@param key\nthe key indexed the cached object to be evicted",
"Attaches an arbitrary object to this context only if the object was not already attached. If a value has already\nbeen attached with the key provided, the current value associated with the key is returned.\n\n@param key they attachment key used to ensure uniqueness and used for retrieval of the value.\n@param value the value to store.\n@param <V> the value type of the attachment.\n\n@return the previous value associated with the key or {@code null} if there was no previous value.",
"Try to reconnect to a started server.",
"Check whether the patch can be applied to a given target.\n\n@param condition the conditions\n@param target the target\n@throws PatchingException",
"Write a map field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Remove multiple fields from the map\n@param fields the fields to remove\n@return the number of fields removed",
"Builds the mapping table.",
"Adds a clause that checks whether ANY set bits in a bitmask are present\nin a numeric expression.\n\n@param expr\nSQL numeric expression to check.\n@param bits\nInteger containing the bits for which to check."
] |
public Iterable<BoxGroupMembership.Info> getAllMemberships(String ... fields) {
final QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
return new Iterable<BoxGroupMembership.Info>() {
public Iterator<BoxGroupMembership.Info> iterator() {
URL url = USER_MEMBERSHIPS_URL_TEMPLATE.buildWithQuery(
BoxUser.this.getAPI().getBaseURL(), builder.toString(), BoxUser.this.getID());
return new BoxGroupMembershipIterator(BoxUser.this.getAPI(), url);
}
};
} | [
"Gets information about all of the group memberships for this user as iterable with paging support.\n@param fields the fields to retrieve.\n@return an iterable with information about the group memberships for this user."
] | [
"Calculates the Black-Scholes option value of an atm call option.\n\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param forward The forward, i.e., the expectation of the index under the measure associated with payoff unit.\n@param payoffUnit The payoff unit, i.e., the discount factor or the anuity associated with the payoff.\n@return Returns the value of a European at-the-money call option under the Black-Scholes model",
"for testing purpose",
"Checks whether a user account can be locked because of inactivity.\n\n@param cms the CMS context\n@param user the user to check\n@return true if the user may be locked after being inactive for too long",
"Adds folders to perform the search in.\n@param folders Folders to search in.",
"Save the current file as the given type.\n\n@param file target file\n@param type file type",
"Set cached value for the attribute. Used for dynamically loaded values in the Acacia content editor.\n\n@param attribute the attribute for which the value should be cached\n@param value the value to cache",
"Goes through the token lists and adds all the variables which can be used to define a sub-matrix. If anything\nelse is found an excpetion is thrown",
"Add new control at the end of control bar with specified touch listener and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener",
"Returns all factory instances that match the query.\n\n@param query the factory query, not null.\n@return the instances found, never null."
] |
private PatternPathRouterWithGroups.RoutableDestination<HttpResourceModel>
getMatchedDestination(List<PatternPathRouterWithGroups.RoutableDestination<HttpResourceModel>> routableDestinations,
HttpMethod targetHttpMethod, String requestUri) {
LOG.trace("Routable destinations for request {}: {}", requestUri, routableDestinations);
Iterable<String> requestUriParts = splitAndOmitEmpty(requestUri, '/');
List<PatternPathRouterWithGroups.RoutableDestination<HttpResourceModel>> matchedDestinations = new ArrayList<>();
long maxScore = 0;
for (PatternPathRouterWithGroups.RoutableDestination<HttpResourceModel> destination : routableDestinations) {
HttpResourceModel resourceModel = destination.getDestination();
for (HttpMethod httpMethod : resourceModel.getHttpMethod()) {
if (targetHttpMethod.equals(httpMethod)) {
long score = getWeightedMatchScore(requestUriParts, splitAndOmitEmpty(resourceModel.getPath(), '/'));
LOG.trace("Max score = {}. Weighted score for {} is {}. ", maxScore, destination, score);
if (score > maxScore) {
maxScore = score;
matchedDestinations.clear();
matchedDestinations.add(destination);
} else if (score == maxScore) {
matchedDestinations.add(destination);
}
}
}
}
if (matchedDestinations.size() > 1) {
throw new IllegalStateException(String.format("Multiple matched handlers found for request uri %s: %s",
requestUri, matchedDestinations));
} else if (matchedDestinations.size() == 1) {
return matchedDestinations.get(0);
}
return null;
} | [
"Get HttpResourceModel which matches the HttpMethod of the request.\n\n@param routableDestinations List of ResourceModels.\n@param targetHttpMethod HttpMethod.\n@param requestUri request URI.\n@return RoutableDestination that matches httpMethod that needs to be handled. null if there are no matches."
] | [
"convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"Imports a file via assimp without post processing.\n\n@param filename the file to import\n@return the loaded scene\n@throws IOException if an error occurs",
"Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Returns an attribute's list value from a non-main section of this JAR's manifest.\nThe attributes string value will be split on whitespace into the returned list.\nThe returned list may be safely modified.\n\n@param section the manifest's section\n@param name the attribute's name",
"Returns the default hidden preference for the user.\n\n@return boolean hidden or not\n@throws FlickrException",
"Auto re-initialize external resourced\nif resources have been already released.",
"Returns the default output for functions without configured JSPs.\n\n@param request the current request\n@return the default HTML output",
"Verifies if the new value is different from the field's old value. It's\nuseful, for example, in NoSQL databases that replicates data between\nservers. This verification prevents to mark a field as modified and to be\nreplicated needlessly.\n\n@param field\nthe field that we are checking before to be modified\n@param value\nthe new value\n@return true if the new and the old values are different and the value\nwas changed.",
"Returns the compact representations of all of the dependencies of a task.\n\n@param task The task to get dependencies on.\n@return Request object"
] |
private Point parsePoint(String point) {
int comma = point.indexOf(',');
if (comma == -1)
return null;
float lat = Float.valueOf(point.substring(0, comma));
float lng = Float.valueOf(point.substring(comma + 1));
return spatialctx.makePoint(lng, lat);
} | [
"Parses coordinates into a Spatial4j point shape."
] | [
"convert selector used in an upsert statement into a document",
"Use this API to fetch vlan resource of given name .",
"Get the TagsInterface for working with Flickr Tags.\n\n@return The TagsInterface",
"Returns a OkHttpClient that ignores SSL cert errors\n@return",
"Walk through the object graph of the specified insert object. Was used for\nrecursive object graph walk.",
"Inserts the provided document. If the document is missing an identifier, the client should\ngenerate one.\n\n@param document the document to insert\n@return a task containing the result of the insert one operation",
"Creates a field map for relations.\n\n@param props props data",
"This method will add a DemoInterceptor into every in and every out phase\nof the interceptor chains.\n\n@param provider",
"Function to perform backward pooling"
] |
public static Deployment of(final URL url) {
final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("url", url));
return new Deployment(deploymentContent, null);
} | [
"Creates a new deployment for the URL. The target server will require access to the URL.\n\n@param url the URL representing the content\n\n@return the deployment"
] | [
"Used to set the complex value of a matrix element.\n@param row The row of the element.\n@param col The column of the element.\n@param real Real component of assigned value\n@param imaginary Imaginary component of assigned value",
"Use this API to count bridgegroup_vlan_binding resources configued on NetScaler.",
"Sets the name of the designated bone.\n\n@param boneindex zero based index of bone to rotate.\n@param bonename string with name of bone.\n. * @see #getBoneName",
"Decides what are the preferred credentials to use for resolving the repo keys of the server\n\n@return Preferred credentials for repo resolving. Never null.",
"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",
"Adds all fields declared in the object's class and its superclasses to the output.\n@return this",
"Initialize the version properties map from the gradle.properties file, and the additional properties from the\ngradle.properties file.",
"Start component timer for current instance\n@param type - of component",
"Microsoft Project bases the order of tasks displayed on their ID\nvalue. This method takes the hierarchical structure of tasks\nrepresented in MPXJ and renumbers the ID values to ensure that\nthis structure is displayed as expected in Microsoft Project. This\nis typically used to deal with the case where a hierarchical task\nstructure has been created programmatically in MPXJ."
] |
private final void processMainRequest() {
sender = getSender();
startTimeMillis = System.currentTimeMillis();
timeoutDuration = Duration.create(
request.getActorMaxOperationTimeoutSec(), TimeUnit.SECONDS);
actorMaxOperationTimeoutSec = request.getActorMaxOperationTimeoutSec();
if (request.getProtocol() == RequestProtocol.HTTP
|| request.getProtocol() == RequestProtocol.HTTPS) {
String urlComplete = String.format("%s://%s:%d%s", request
.getProtocol().toString(), trueTargetNode, request
.getPort(), request.getResourcePath());
// http://stackoverflow.com/questions/1600291/validating-url-in-java
if (!PcHttpUtils.isUrlValid(urlComplete.trim())) {
String errMsg = "INVALID_URL";
logger.error("INVALID_URL: " + urlComplete + " return..");
replyErrors(errMsg, errMsg, PcConstants.NA, PcConstants.NA_INT);
return;
} else {
logger.debug("url pass validation: " + urlComplete);
}
asyncWorker = getContext().actorOf(
Props.create(HttpWorker.class, actorMaxOperationTimeoutSec,
client, urlComplete, request.getHttpMethod(),
request.getPostData(), request.getHttpHeaderMap(), request.getResponseHeaderMeta()));
} else if (request.getProtocol() == RequestProtocol.SSH ){
asyncWorker = getContext().actorOf(
Props.create(SshWorker.class, actorMaxOperationTimeoutSec,
request.getSshMeta(), trueTargetNode));
} else if (request.getProtocol() == RequestProtocol.TCP ){
asyncWorker = getContext().actorOf(
Props.create(TcpWorker.class, actorMaxOperationTimeoutSec,
request.getTcpMeta(), trueTargetNode));
} else if (request.getProtocol() == RequestProtocol.UDP ){
asyncWorker = getContext().actorOf(
Props.create(UdpWorker.class, actorMaxOperationTimeoutSec,
request.getUdpMeta(), trueTargetNode));
} else if (request.getProtocol() == RequestProtocol.PING ){
asyncWorker = getContext().actorOf(
Props.create(PingWorker.class, actorMaxOperationTimeoutSec, request.getPingMeta(),
trueTargetNode));
}
asyncWorker.tell(RequestWorkerMsgType.PROCESS_REQUEST, getSelf());
cancelExistingIfAnyAndScheduleTimeoutCall();
} | [
"the 1st request from the manager."
] | [
"Send a packet to the target device telling it to load the specified track from the specified source player.\n\n@param target an update from the player that you want to have load a track\n@param rekordboxId the identifier of a track within the source player's rekordbox database\n@param sourcePlayer the device number of the player from which the track should be loaded\n@param sourceSlot the media slot from which the track should be loaded\n@param sourceType the type of track to be loaded\n\n@throws IOException if there is a problem sending the command\n@throws IllegalStateException if the {@code VirtualCdj} is not active",
"Map the EventType.\n\n@param eventType the event type\n@return the event",
"Returns the Organization that produce this artifact or null if there is none\n\n@param dbArtifact DbArtifact\n@return DbOrganization",
"Use this API to add onlinkipv6prefix.",
"Rethrows platform specific OperationCanceledExceptions and unwraps OperationCanceledErrors. Does nothing for any other type of Throwable.",
"Use this API to fetch authenticationvserver_authenticationlocalpolicy_binding resources of given name .",
"Analyzes the source code of an interface. The specified interface must not contain methods, that changes the\nstate of the corresponding object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@return analysis result",
"simple echo implementation",
"Token Info\nReturns the Token Information\n@return ApiResponse<TokenInfoSuccessResponse>\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body"
] |
private static boolean isValidPropertyClass(final PropertyDescriptor _property) {
final Class type = _property.getPropertyType();
return Number.class.isAssignableFrom(type) || type == String.class || Date.class.isAssignableFrom(type) || type == Boolean.class;
} | [
"Checks if a property's type is valid to be included in the report.\n@param _property the property.\n@return true if the property is is of a valid type."
] | [
"returns the zero argument constructor for the class represented by this class descriptor\nor null if a zero argument constructor does not exist. If the zero argument constructor\nfor this class is not public it is made accessible before being returned.",
"Create and return a new Violation for this rule and the specified import\n@param sourceCode - the SourceCode\n@param importNode - the ImportNode for the import triggering the violation\n@return a new Violation object",
"Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class",
"If this address was resolved from a host, returns that host. Otherwise, does a reverse name lookup.",
"Get the account knowing his position\n@param position the position of the account (it can change at runtime!)\n@return the account",
"Update the underlying buffer using the integer\n\n@param number number to be stored in checksum buffer",
"Helper to return the first item in the iterator or null.\n\n@return T the first item or null.",
"Deletes all outgoing links of specified entity.\n\n@param entity the entity.",
"Assigns a list of nodes in the cluster represented by this failure\ndetector configuration.\n\n@param nodes Collection of Node instances, usually determined from the\nCluster; must be non-null"
] |
public static base_responses change(nitro_service client, sslcertkey resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslcertkey updateresources[] = new sslcertkey[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new sslcertkey();
updateresources[i].certkey = resources[i].certkey;
updateresources[i].cert = resources[i].cert;
updateresources[i].key = resources[i].key;
updateresources[i].password = resources[i].password;
updateresources[i].fipskey = resources[i].fipskey;
updateresources[i].inform = resources[i].inform;
updateresources[i].passplain = resources[i].passplain;
updateresources[i].nodomaincheck = resources[i].nodomaincheck;
}
result = perform_operation_bulk_request(client, updateresources,"update");
}
return result;
} | [
"Use this API to change sslcertkey resources."
] | [
"Returns a projection object for specifying the fields to retrieve during a specific find operation.",
"Update the current position with specified length.\nThe input will append to the current position of the iterator.\n\n@param length update length",
"Add a user by ID to the list of people to notify when the retention period is ending.\n@param userID The ID of the user to add to the list.",
"Get an extent aware Iterator based on the ReportQuery\n\n@param query\n@param cld\n@return OJBIterator",
"Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable",
"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",
"Return a list of websocket connection by key\n\n@param key\nthe key to find the websocket connection list\n@return a list of websocket connection or an empty list if no websocket connection found by key",
"Use this API to add systemuser resources.",
"Method used as dynamical parameter converter"
] |
private String getPathSelectString() {
String queryString = "SELECT " + Constants.DB_TABLE_REQUEST_RESPONSE + "." + Constants.GENERIC_CLIENT_UUID +
"," + Constants.DB_TABLE_PATH + "." + Constants.GENERIC_ID +
"," + Constants.PATH_PROFILE_PATHNAME +
"," + Constants.PATH_PROFILE_ACTUAL_PATH +
"," + Constants.PATH_PROFILE_BODY_FILTER +
"," + Constants.PATH_PROFILE_GROUP_IDS +
"," + Constants.DB_TABLE_PATH + "." + Constants.PATH_PROFILE_PROFILE_ID +
"," + Constants.PATH_PROFILE_PATH_ORDER +
"," + Constants.REQUEST_RESPONSE_REPEAT_NUMBER +
"," + Constants.REQUEST_RESPONSE_REQUEST_ENABLED +
"," + Constants.REQUEST_RESPONSE_RESPONSE_ENABLED +
"," + Constants.PATH_PROFILE_CONTENT_TYPE +
"," + Constants.PATH_PROFILE_REQUEST_TYPE +
"," + Constants.PATH_PROFILE_GLOBAL +
" FROM " + Constants.DB_TABLE_PATH +
" JOIN " + Constants.DB_TABLE_REQUEST_RESPONSE +
" ON " + Constants.DB_TABLE_PATH + "." + Constants.GENERIC_ID +
"=" + Constants.DB_TABLE_REQUEST_RESPONSE + "." + Constants.REQUEST_RESPONSE_PATH_ID +
" AND " + Constants.DB_TABLE_REQUEST_RESPONSE + "." + Constants.GENERIC_CLIENT_UUID + " = ?";
return queryString;
} | [
"Generate a path select string\n\n@return Select query string"
] | [
"Use this API to fetch a cmpglobal_cmppolicy_binding resources.",
"Clears out the statement handles.\n@param internalClose if true, close the inner statement handle too.",
"Gets any assignments for this task.\n@return a list of assignments for this task.",
"Delivers the correct JSON Object for outgoings\n\n@param outgoings\n@throws org.json.JSONException",
"Populate the expanded exceptions list based on the main exceptions list.\nWhere we find recurring exception definitions, we generate individual\nexceptions for each recurrence to ensure that we account for them correctly.",
"Process data for an individual calendar.\n\n@param row calendar data",
"Set default values for the TimeAndSizeRollingAppender appender\n\n@param appender",
"Returns a raw handle to the SQLite database connection. Do not close!\n@param context A context, which is used to (when needed) set up a connection to the database\n@return The single, unique connection to the database, as is (also) used by our Cupboard instance",
"Get the element at the index as a float.\n\n@param i the index of the element to access"
] |
protected void checkVariableName(GraphRewrite event, EvaluationContext context)
{
if (variableName == null)
{
setVariableName(Iteration.getPayloadVariableName(event, context));
}
} | [
"Check the variable name and if not set, set it with the singleton variable name being on the top of the stack."
] | [
"If a text contains double quotes, escape them.\n\n@param text the text to escape\n@return Escaped text or {@code null} if the text is null",
"generate a message for loglevel ERROR\n\n@param pObject the message Object",
"Executes a HTTP request and parses the JSON response into a Response instance.\n\n@param connection The HTTP request to execute.\n@return Response object of the deserialized JSON response",
"Returns the command line options to be used for scalaxb, excluding the\ninput file names.",
"Updates the information about the user status for this terms of service with any info fields that have\nbeen modified locally.\n@param info the updated info.",
"Closes the server socket.",
"We have obtained waveform detail for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this waveform detail\n@param detail the waveform detail which we retrieved",
"Convert an array of bytes into an array of ints. 4 bytes from the\ninput data map to a single int in the output data.\n@param bytes The data to read from.\n@return An array of 32-bit integers constructed from the data.\n@since 1.1",
"Obtains the Constructor specified from the given Class and argument types\n\n@throws NoSuchMethodException"
] |
private void writeAssignments() throws IOException
{
writeAttributeTypes("assignment_types", AssignmentField.values());
m_writer.writeStartList("assignments");
for (ResourceAssignment assignment : m_projectFile.getResourceAssignments())
{
writeFields(null, assignment, AssignmentField.values());
}
m_writer.writeEndList();
} | [
"This method writes assignment data to a JSON file."
] | [
"Checks if the given AnnotatedType is sensible, otherwise provides warnings.",
"Get the value for a particular configuration property\n\n@param name - name of the property\n@return The first value encountered or null",
"Checks if the specified longitude is correct.\n\n@param name the name of the longitude field\n@param longitude the value of the longitude field\n@return the longitude",
"Return all Clients for a profile\n\n@param profileId ID of profile clients belong to\n@return collection of the Clients found\n@throws Exception exception",
"Performs spellchecking using Solr and returns the spellchecking results using JSON.\n\n@param res The HttpServletResponse object.\n@param servletRequest The ServletRequest object.\n@param cms The CmsObject object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user\n@throws IOException if writing the response fails",
"Sets the replace var map to single target single var.\n\n@param variable\nthe variable\n@param replaceList\n: the list of strings that will replace the variable\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"The Cost Variance field shows the difference between the baseline cost\nand total cost for a task. The total cost is the current estimate of costs\nbased on actual costs and remaining costs.\n\n@return amount",
"Returns the given collection persister for the inverse side in case the given persister represents the main side\nof a bi-directional many-to-many association.\n\n@param mainSidePersister the collection persister on the main side of a bi-directional many-to-many association\n@return the collection persister for the inverse side of the given persister or {@code null} in case it\nrepresents the inverse side itself or the association is uni-directional",
"Get a list of tags for the specified photo.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param photoId\nThe photo ID\n@return The collection of Tag objects"
] |
public static List<DesignDocument> fromDirectory(File directory) throws FileNotFoundException {
List<DesignDocument> designDocuments = new ArrayList<DesignDocument>();
if (directory.isDirectory()) {
Collection<File> files = FileUtils.listFiles(directory, null, true);
for (File designDocFile : files) {
designDocuments.add(fromFile(designDocFile));
}
} else {
designDocuments.add(fromFile(directory));
}
return designDocuments;
} | [
"Deserialize a directory of javascript design documents to a List of DesignDocument objects.\n\n@param directory the directory containing javascript files\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read"
] | [
"Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string",
"Obtain override ID\n\n@param overrideIdentifier can be the override ID or class name\n@return\n@throws Exception",
"Factory for 'and' and 'or' predicates.",
"return request is success by JsonRtn object\n\n@param jsonRtn\n@return",
"For recovery from the latest consistent snapshot, we should clean up the\nold files from the previous backup set, else we will fill the disk with\nuseless log files\n\n@param backupDir",
"Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@return The value of the element.",
"Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"Retrieve list of assignment extended attributes.\n\n@return list of extended attributes",
"Tests the string edit distance function."
] |
public void setContentType(int pathId, String contentType) {
PreparedStatement statement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
statement = sqlConnection.prepareStatement(
"UPDATE " + Constants.DB_TABLE_PATH +
" SET " + Constants.PATH_PROFILE_CONTENT_TYPE + " = ? " +
" WHERE " + Constants.GENERIC_ID + " = ?"
);
statement.setString(1, contentType);
statement.setInt(2, pathId);
statement.executeUpdate();
statement.close();
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
}
} | [
"Sets the content type for this ID\n\n@param pathId ID of path\n@param contentType content type value"
] | [
"Read the header data for a single file.\n\n@param header header data\n@return SynchroTable instance",
"Write the domain controller's data to an output stream.\n\n@param outstream the output stream\n@throws Exception",
"Map message info.\n\n@param messageInfoType the message info type\n@return the message info",
"Only call async",
"Converts the real matrix into a complex matrix.\n\n@param input Real matrix. Not modified.\n@param output Complex matrix. Modified.",
"Pool configuration.\n@param props\n@throws HibernateException",
"Closing will only skip to the end of this fixed length input stream and\nnot call the parent's close method.\n@throws IOException if an I/O error occurs while closing stream",
"Whether or not points are within some threshold.\n@param point1 Point 1\n@param point2 Point 2\n@return True or false",
"Gets a string attribute from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attribute as a {@link String}, or null if it was not found."
] |
public final void notifyContentItemInserted(int position) {
int newHeaderItemCount = getHeaderItemCount();
int newContentItemCount = getContentItemCount();
if (position < 0 || position >= newContentItemCount) {
throw new IndexOutOfBoundsException("The given position " + position + " is not within the position bounds for content items [0 - " + (newContentItemCount - 1) + "].");
}
notifyItemInserted(position + newHeaderItemCount);
} | [
"Notifies that a content item is inserted.\n\n@param position the position of the content item."
] | [
"Validate that the overlay exists. If it doesn't exist, throws an\nexception if not in batch mode or if failInBatch is true. In batch mode,\nwe could be in the case that the overlay doesn't exist yet.",
"Read flow id from message.\n\n@param message the message\n@return the FlowId as string",
"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",
"Adds a file with the provided description.",
"Runs intermediate check on the Assembly status until it is finished executing,\nthen returns it as a response.\n\n@return {@link AssemblyResponse}\n@throws LocalOperationException if something goes wrong while running non-http operations.\n@throws RequestException if request to Transloadit server fails.",
"Return an instance of this class.\n\n@param container Solr CoreContainer container object in order to create a server object.\n\n@return instance of CmsSolrSpellchecker",
"Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return",
"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.",
"Post an artifact to the Grapes server\n\n@param artifact The artifact to post\n@param user The user posting the information\n@param password The user password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException"
] |
public Map<String, EntityDocument> wbGetEntities(
WbGetEntitiesActionData properties)
throws MediaWikiApiErrorException, IOException {
return wbGetEntities(properties.ids, properties.sites,
properties.titles, properties.props, properties.languages,
properties.sitefilter);
} | [
"Creates a map of identifiers or page titles to documents retrieved via\nthe API URL\n\n@param properties\nparameter setting for wbgetentities\n@return map of document identifiers or titles to documents retrieved via\nthe API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\nif we encounter network issues or HTTP 500 errors from Wikibase"
] | [
"Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException",
"Publish the bundle resources directly.",
"Return true only if the specified object responds to the named method\n@param object - the object to check\n@param methodName - the name of the method\n@return true if the object responds to the named method",
"helper to calculate the actionBar height\n\n@param context\n@return",
"generate a select-Statement according to query\n\n@param query the Query\n@param cld the ClassDescriptor",
"Registers an image to the images cache, so that it can be captured by the build-info proxy.\n\n@param imageId\n@param imageTag\n@param targetRepo\n@param buildInfoId\n@throws IOException",
"Deletes a product from the database\n\n@param name String",
"Handle a simple ping request.\n\n@param channel the channel\n@param header the protocol header\n@throws IOException for any error",
"Use this API to enable snmpalarm of given name."
] |
public static void d(ISubsystem subsystem, String tag, String pattern, Object... parameters) {
if (!isEnabled(subsystem)) return;
d(subsystem, tag, format(pattern, parameters));
} | [
"Send a DEBUG log message with specified subsystem. If subsystem is not enabled the message\nwill not be logged\n@param subsystem logging subsystem\n@param tag Used to identify the source of a log message. It usually identifies the class or\nactivity where the log call occurs.\n@param pattern The message pattern\n@return"
] | [
"Apply aliases to task and resource fields.\n\n@param aliases map of aliases",
"Use this API to delete dnstxtrec resources.",
"Adds this vector to v1 and places the result in this vector.\n\n@param v1\nright-hand vector",
"Use this API to add autoscaleaction resources.",
"Always returns the original proxy object that was serialized.\n\n@return the proxy object\n@throws java.io.ObjectStreamException",
"Initializes data structures",
"Processes the template for all collection definitions of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Removes the specified entry point\n\n@param controlPoint The entry point",
"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"
] |
public long queryForLong(DatabaseConnection databaseConnection, PreparedStmt<T> preparedStmt) throws SQLException {
CompiledStatement compiledStatement = preparedStmt.compile(databaseConnection, StatementType.SELECT_LONG);
DatabaseResults results = null;
try {
results = compiledStatement.runQuery(null);
if (results.first()) {
return results.getLong(0);
} else {
throw new SQLException("No result found in queryForLong: " + preparedStmt.getStatement());
}
} finally {
IOUtils.closeThrowSqlException(results, "results");
IOUtils.closeThrowSqlException(compiledStatement, "compiled statement");
}
} | [
"Return a long value from a prepared query."
] | [
"Set the active view.\nIf the mdActiveIndicator attribute is set, this View will have the indicator drawn next to it.\n\n@param v The active view.\n@param position Optional position, usually used with ListView. v.setTag(R.id.mdActiveViewPosition, position)\nmust be called first.",
"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",
"Reads numBytes bytes, and returns the corresponding string",
"Returns the configured body or the default value.",
"Hide multiple channels. All other channels will be shown.\n@param channels The channels to hide",
"Convert this buffer to a java array.\n@return",
"Sets the name of the designated bone.\n\n@param boneindex zero based index of bone to rotate.\n@param bonename string with name of bone.\n. * @see #getBoneName",
"Obtain the ID associated with a profile name\n\n@param profileName profile name\n@return ID of profile",
"Add additional source types"
] |
public Request header(String key, String value) {
this.headers.put(key, value);
return this;
} | [
"Sets a header per-request\n\n@param key Header key\n@param value Header value\n@return The request itself"
] | [
"Restarts a single dyno\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param dynoId the unique identifier of the dyno to restart",
"Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance",
"Shutdown task scheduler.",
"Add the declarationBinderRef to the ImportersManager, create the corresponding.\nBinderDescriptor.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder\n@throws InvalidFilterException",
"Retuns the Windows UNC style path with backslashs intead of forward slashes.\n\n@return The UNC path.",
"Set the individual dates.\n@param dates the dates to set.",
"Verifies a provided signature.\n\n@param key\nfor which signature key\n@param actualAlgorithm\ncurrent signature algorithm\n@param actualSignature\ncurrent signature\n@param webHookPayload\nfor signing\n@param deliveryTimestamp\nfor signing\n@return true if verification passed",
"Rename with retry.\n\n@param from\n@param to\n@return <tt>true</tt> if the file was successfully renamed.",
"Gets a list of any comments on this file.\n\n@return a list of comments on this file."
] |
public void sub(Vector3d v1) {
x -= v1.x;
y -= v1.y;
z -= v1.z;
} | [
"Subtracts v1 from this vector and places the result in this vector.\n\n@param v1\nright-hand vector"
] | [
"Use this API to fetch all the sslservice resources that are configured on netscaler.\nThis uses sslservice_args which is a way to provide additional arguments while fetching the resources.",
"Use this API to fetch autoscaleaction resource of given name .",
"Add the given pair into the map.\n\n<p>\nIf the pair key already exists in the map, its value is replaced\nby the value in the pair, and the old value in the map is returned.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param entry the entry (key, value) to add into the map.\n@return the value previously associated to the key, or <code>null</code>\nif the key was not present in the map before the addition.\n@since 2.15",
"Adds, eventually merging, a direction for the specified relation type\n@param relationType\n@param direction",
"Removes a value from the list.\n\n@param list the list\n@param value value to remove",
"Returns the primary port of the server.\n\n@return the primary {@link ServerPort} if the server is started. {@link Optional#empty()} otherwise.",
"Checks to see if a handler is disabled\n\n@param handlerName the name of the handler to enable.",
"Shows the given step.\n\n@param step the step",
"Get an Iterator based on the ReportQuery\n\n@param query\n@return Iterator"
] |
private void clearDeck(CdjStatus update) {
if (hotCache.remove(DeckReference.getDeckReference(update.getDeviceNumber(), 0)) != null) {
deliverTrackMetadataUpdate(update.getDeviceNumber(), null);
}
} | [
"We have received an update that invalidates any previous metadata for that player, so clear it out, and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we can have no metadata for the associated player"
] | [
"Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discarded, since these fields are used system internally.\n@return the manipulated document",
"Interfaces, enums, annotations, and abstract classes cannot be\ninstantiated.\n\n@param actionClass\nclass to check\n@return returns true if the class cannot be instantiated or should be\nignored",
"Decodes a signed request, returning the payload of the signed request as a specified type.\n@param signedRequest the value of the signed_request parameter sent by Facebook.\n@param type the type to bind the signed_request to.\n@param <T> the Java type to bind the signed_request to.\n@return the payload of the signed request as an object\n@throws SignedRequestException if there is an error decoding the signed request",
"This method maps the currency symbol position from the\nrepresentation used in the MPP file to the representation\nused by MPX.\n\n@param value MPP symbol position\n@return MPX symbol position",
"Two stage promotion, dry run and actual promotion to verify correctness.\n\n@param promotion\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException",
"Set a knot blend type.\n@param n the knot index\n@param type the knot blend type\n@see #getKnotBlend",
"Start the chain of execution running.\n\n@throws IllegalStateException\nif the chain of execution has already been started.",
"Add an additional compilation unit into the loop\n-> build compilation unit declarations, their bindings and record their results.",
"Determine whether the user has followed bean-like naming convention or not."
] |
private static void listHierarchy(ProjectFile file)
{
for (Task task : file.getChildTasks())
{
System.out.println("Task: " + task.getName() + "\t" + task.getStart() + "\t" + task.getFinish());
listHierarchy(task, " ");
}
System.out.println();
} | [
"This method lists all tasks defined in the file in a hierarchical\nformat, reflecting the parent-child relationships between them.\n\n@param file MPX file"
] | [
"Use this API to link sslcertkey resources.",
"Calculate matrix exponential of a square matrix.\n\nA scaled Pade approximation algorithm is used.\nThe algorithm has been directly translated from Golub & Van Loan \"Matrix Computations\",\nalgorithm 11.3.1. Special Horner techniques from 11.2 are also used to minimize the number\nof matrix multiplications.\n\n@param A square matrix\n@return matrix exponential of A",
"Get all the names of inputs that are required to be in the Values object when this graph is executed.",
"With this impl, it only returns the same credentials once. Otherwise it's possible that a loop will occur.\nWhen server returns status code 401, the HTTP client provides the same credentials forever.\nSince we create a new HTTP client for every request, we can handle it this way.",
"Constructs the path from FQCN, validates writability, and creates a writer.",
"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",
"This method reads a single byte from the input stream.\n\n@param is the input stream\n@return byte value\n@throws IOException on file read error or EOF",
"Remove all unnecessary comments from a lexer or parser file",
"In-place scaling of a column in A\n\n@param alpha scale factor\n@param A matrix\n@param col which row in A"
] |
public void eol() throws ProtocolException {
char next = nextChar();
// Ignore trailing spaces.
while (next == ' ') {
consume();
next = nextChar();
}
// handle DOS and unix end-of-lines
if (next == '\r') {
consume();
next = nextChar();
}
// Check if we found extra characters.
if (next != '\n') {
throw new ProtocolException("Expected end-of-line, found more character(s): "+next);
}
dumpLine();
} | [
"Moves the request line reader to end of the line, checking that no non-space\ncharacter are found.\n\n@throws ProtocolException If more non-space tokens are found in this line,\nor the end-of-file is reached."
] | [
"Determines if this value is the default value for the given field type.\n\n@param type field type\n@param value value\n@return true if the value is not default",
"Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException",
"Runs a Story with the given configuration and steps.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.",
"Determine the enum value corresponding to the third play state found in the packet.\n\n@return the proper value",
"Writes the torque schemata to files in the given directory and returns\na comma-separated list of the filenames.\n\n@param dir The directory to write the files to\n@return The list of filenames\n@throws IOException If an error occurred",
"Sets the top padding for all cells in the table.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining",
"Gets display duration for specified frame.\n\n@param n int index of frame.\n@return delay in milliseconds.",
"Convert an Object to a DateTime.",
"Creates the final artifact name.\n\n@return the artifact name"
] |
@SuppressWarnings("unchecked")
public final FluentModelImplT withTag(String key, String value) {
if (this.inner().getTags() == null) {
this.inner().withTags(new HashMap<String, String>());
}
this.inner().getTags().put(key, value);
return (FluentModelImplT) this;
} | [
"Adds a tag to the resource.\n@param key the key for the tag\n@param value the value for the tag\n@return the next stage of the definition/update"
] | [
"Stop announcing ourselves and listening for status updates.",
"Adds a chain of vertices to the end of this list.",
"If supported by the WMS server, a parameter \"angle\" can be set on \"customParams\" or \"mergeableParams\".\nIn this case the rotation will be done natively by the WMS.",
"Walk project references recursively, adding thrift files to the provided list.",
"Called on mouse up in the caption area, ends dragging by ending event\ncapture.\n\n@param event the mouse up event that ended dragging\n\n@see DOM#releaseCapture\n@see #beginDragging\n@see #endDragging",
"Use this API to update vpnclientlessaccesspolicy.",
"Log a message line to the output.",
"Use this API to fetch all the callhome resources that are configured on netscaler.",
"Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable"
] |
public static final Double parseCurrency(Number value)
{
return (value == null ? null : NumberHelper.getDouble(value.doubleValue() / 100));
} | [
"Parse currency.\n\n@param value currency value\n@return currency value"
] | [
"Scans given directory for files passing given filter, adds the results into given list.",
"Use this API to update gslbsite.",
"Add the dependencies if the deployment contains a service activator loader entry.\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"Use this API to fetch appfwprofile_safeobject_binding resources of given name .",
"The keywords to include in the PDF metadata.\n\n@param keywords the keywords of the PDF.",
"Returns a matrix of StatisticsMatrix type so that SimpleMatrix functions create matrices\nof the correct type.",
"Give next index i where i and i+timelag is valid",
"Create a Css Selector Transform",
"Encodes the given URI scheme with the given encoding.\n@param scheme the scheme to be encoded\n@param encoding the character encoding to encode to\n@return the encoded scheme\n@throws UnsupportedEncodingException when the given encoding parameter is not supported"
] |
public void setYearlyAbsoluteFromDate(Date date)
{
if (date != null)
{
Calendar cal = DateHelper.popCalendar(date);
m_dayNumber = Integer.valueOf(cal.get(Calendar.DAY_OF_MONTH));
m_monthNumber = Integer.valueOf(cal.get(Calendar.MONTH) + 1);
DateHelper.pushCalendar(cal);
}
} | [
"Sets the yearly absolute date.\n\n@param date yearly absolute date"
] | [
"Throws an exception if the request can for security reasons not be performed.\nSecurity restrictions can be set via parameters of the index.\n\n@param cms the current context.\n@param query the query.\n@param isSpell flag, indicating if the spellcheck handler is requested.\n@throws CmsSearchException thrown if the query cannot be executed due to security reasons.",
"Removes bean from scope.\n\n@param name bean name\n@return previous value",
"Reload a managed server.\n\n@param permit the controller permit\n@return whether the state was changed successfully or not",
"Overrides the superclass implementation to allow the value type's AttributeDefinition to in turn\nresolve each element.\n\n{@inheritDoc}",
"Puts a single byte if the buffer is not yet full.\n\n@return true if the byte was put, or false if the buffer is full",
"Read a nested table. Instantiates the supplied reader class to\nextract the data.\n\n@param reader table reader class\n@return table rows",
"Uncheck all items in the list including all sub-items.\n@param list list of CmsTreeItem entries.",
"Computes the cross product of v1 and v2 and places the result in this\nvector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector",
"Process hours in a working day.\n\n@param calendar project calendar\n@param dayRecord working day data"
] |
public boolean hasForeignkey(String name)
{
String realName = (name == null ? "" : name);
ForeignkeyDef def = null;
for (Iterator it = getForeignkeys(); it.hasNext();)
{
def = (ForeignkeyDef)it.next();
if (realName.equals(def.getName()))
{
return true;
}
}
return false;
} | [
"Determines whether this table has a foreignkey of the given name.\n\n@param name The name of the foreignkey\n@return <code>true</code> if there is a foreignkey of that name"
] | [
"Parse a list of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.",
"Request a database sends a list of UUIDs.\n\n@param count The count of UUIDs.",
"Gets all checked widget indexes in the group. The indexes are counted from 0 to size -1,\nwhere size is the number of Checkable widgets in the group. It does not take into account\nany non-Checkable widgets added to the group widget.\n\n@return list of checked widget indexes",
"Return all methods for a list of groupIds\n\n@param groupIds array of group IDs\n@param filters array of filters to apply to method selection\n@return collection of Methods found\n@throws Exception exception",
"Bhattacharyya distance between two normalized histograms.\n\n@param histogram1 Normalized histogram.\n@param histogram2 Normalized histogram.\n@return The Bhattacharyya distance between the two histograms.",
"Load entries from the storage.\nOverriding methods should first delegate to super before adding their own entries.",
"Creates a new row representing a rule.\n@param type the type for the rule row, must not be null nor {@link TableRowType#CONTENT} nor {@link TableRowType#UNKNOWN}\n@param style the style for the rule row, must not be null nor {@link TableRowStyle#UNKNOWN}\n@return a new row representing a rule\n@throws {@link NullPointerException} if type or style where null\n@throws {@link IllegalStateException} if type or style where unknown or if type was {@link TableRowType#CONTENT}",
"Update the current position with specified length.\nThe input will append to the current position of the iterator.\n\n@param length update length",
"This method is used to configure the format pattern.\n\n@param patterns new format patterns"
] |
private void putEvent(EventType eventType) throws Exception {
List<EventType> eventTypes = Collections.singletonList(eventType);
int i;
for (i = 0; i < retryNum; ++i) {
try {
monitoringService.putEvents(eventTypes);
break;
} catch (Exception e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
}
Thread.sleep(retryDelay);
}
if (i == retryNum) {
LOG.warning("Could not send events to monitoring service after " + retryNum + " retries.");
throw new Exception("Send SERVER_START/SERVER_STOP event to SAM Server failed");
}
} | [
"Put event.\n\n@param eventType the event type\n@throws Exception the exception"
] | [
"Convert a GanttProject task relationship type into an MPXJ RelationType instance.\n\n@param gpType GanttProject task relation type\n@return RelationType instance",
"A package of the specified class will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClass\n@return self",
"Use this API to fetch sslcipher resources of given names .",
"Loads configuration from InputStream. Later loads have lower priority.\n\n@param in InputStream to load from\n@since 1.2.0",
"Handle bind service event.\n@param service Service instance\n@param props Service reference properties",
"Treats the object as iterable, iterating through the values it represents and returns the first non-null result obtained from calling the closure, otherwise returns the defaultResult.\n\n@param self an Object with an iterator returning its values\n@param defaultResult an Object that should be returned if all closure results are null\n@param closure a closure that returns a non-null value when processing should stop\n@return the first non-null result of the closure, otherwise the default value\n@since 1.7.5",
"Set dates with the provided check states.\n@param datesWithCheckInfo the dates to set, accompanied with the check state to set.",
"Generated the report.",
"Use this API to add vpath resources."
] |
public static <T extends WindupVertexFrame> WindupVertexFrame removeTypeFromModel(GraphContext graphContext, WindupVertexFrame frame, Class<T> type)
{
Vertex vertex = frame.getElement();
graphContext.getGraphTypeManager().removeTypeFromElement(type, vertex);
return graphContext.getFramed().frameElement(vertex, WindupVertexFrame.class);
} | [
"Removes the specified type from the frame."
] | [
"Straight conversion from an ObjectName to a PathAddress.\n\nThere may not necessarily be a Resource at this path address (if that correspond to a pattern) but it must\nmatch a model in the registry.\n\n@param domain the name of the caller's JMX domain\n@param registry the root resource for the management model\n@param name the ObjectName to convert\n\n@return the PathAddress, or {@code null} if no address matches the object name",
"Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable",
"This will create a line in the SDEF file for each calendar\nif there are more than 9 calendars, you'll have a big error,\nas USACE numbers them 0-9.\n\n@param records list of ProjectCalendar instances",
"Read a single duration field extended attribute.\n\n@param row field data",
"Return the current working directory\n\n@return the current working directory",
"Set the group name\n\n@param name new name of server group\n@param id ID of group",
"Sets the day of the month.\n@param day the day to set.",
"Access all currencies known.\n\n@param providers the (optional) specification of providers to consider.\n@return the list of known currencies, never null.",
"Helper function to bind script bundler to various targets"
] |
public static base_response clear(nitro_service client, route6 resource) throws Exception {
route6 clearresource = new route6();
clearresource.routetype = resource.routetype;
return clearresource.perform_operation(client,"clear");
} | [
"Use this API to clear route6."
] | [
"a small static helper to set the image from the imageHolder nullSave to the imageView\n\n@param imageHolder\n@param imageView\n@param tag used to identify imageViews and define different placeholders\n@return true if an image was set",
"Called when the pattern has changed.",
"Get the DMR path for this node. For leaves, the DMR path is the path of its parent.\n@return The DMR path for this node.",
"Given the key, figures out which partition on the local node hosts the key.\n\n@param key\n@return",
"Process a single outline code.\n\n@param parentRow outline code to task mapping table\n@throws SQLException",
"Read a single calendar exception.\n\n@param bc parent calendar\n@param exception exception data",
"Use this API to fetch nd6ravariables resources of given names .",
"Converts a class into a signature token.\n\n@param c class\n@return signature token text",
"Returns true if the specified name is NOT allowed. It isn't allowed if it matches a built in operator\nor if it contains a restricted character."
] |
private void addEdgesForVertex(Vertex vertex)
{
ClassDescriptor cld = vertex.getEnvelope().getClassDescriptor();
Iterator rdsIter = cld.getObjectReferenceDescriptors(true).iterator();
while (rdsIter.hasNext())
{
ObjectReferenceDescriptor rds = (ObjectReferenceDescriptor) rdsIter.next();
addObjectReferenceEdges(vertex, rds);
}
Iterator cdsIter = cld.getCollectionDescriptors(true).iterator();
while (cdsIter.hasNext())
{
CollectionDescriptor cds = (CollectionDescriptor) cdsIter.next();
addCollectionEdges(vertex, cds);
}
} | [
"Adds all edges for a given object envelope vertex. All edges are\nadded to the edgeList map.\n@param vertex the Vertex object to find edges for"
] | [
"Update the repeat number for a client path\n\n@param newNum new repeat number of the path\n@param path_id ID of the path\n@param client_uuid UUID of the client\n@throws Exception exception",
"Write the given number of bytes out to the array\n\n@param bytes The array to write to\n@param value The value to write from\n@param offset the offset into the array\n@param numBytes The number of bytes to write",
"A convenience method for creating an immutable sorted set.\n\n@param self a SortedSet\n@return an immutable SortedSet\n@see java.util.Collections#unmodifiableSortedSet(java.util.SortedSet)\n@since 1.0",
"Get the spin scripting environment\n\n@param language the language name\n@return the environment script as string or null if the language is\nnot in the set of languages supported by spin.",
"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.",
"Write calendar hours.\n\n@param parentCalendar parent calendar instance\n@param record calendar hours instance\n@throws IOException",
"Returns a list of files in given addon passing given filter.",
"Start listening for device announcements and keeping track of the DJ Link devices visible on the network.\nIf already listening, has no effect.\n\n@throws SocketException if the socket to listen on port 50000 cannot be created",
"Assigns this retention policy to a metadata template, optionally with certain field values.\n@param templateID the ID of the metadata template to apply to.\n@param fieldFilters optional field value filters.\n@return info about the created assignment."
] |
private static StackTraceElement getStackTrace() {
StackTraceElement[] stack = Thread.currentThread().getStackTrace();
int i = 2; // we can skip the first two (first is getStackTrace(), second is this method)
while (i < stack.length) {
boolean isLoggingClass = false;
for (String loggingClass : loggingClasses) {
String className = stack[i].getClassName();
if (className.startsWith(loggingClass)) {
isLoggingClass = true;
break;
}
}
if (!isLoggingClass) {
break;
}
i += 1;
}
// if we didn't find anything, keep last element (probably shouldn't happen, but could if people add too many logging classes)
if (i >= stack.length) {
i = stack.length - 1;
}
return stack[i];
} | [
"Get the current stack trace element, skipping anything from known logging classes.\n@return The current stack trace for this thread"
] | [
"Returns the Euclidean distance between this vector and vector v.\n\n@return distance between this vector and v",
"Try to set specified property to given marshaller\n\n@param marshaller specified marshaller\n@param name name of property to set\n@param value value of property to set",
"Decorates a node with the affected operator, if any.\n\n@param context\n@param tree\n@param operations\n@return",
"Reply used in error cases. set the response header as null.\n\n@param errorMessage the error message\n@param stackTrace the stack trace\n@param statusCode the status code\n@param statusCodeInt the status code int",
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)",
"Use this API to Import sslfipskey resources.",
"Takes a list of Strings and combines them into a single comma-separated\nString.\n@param strings The Strings to combine.\n@return The combined, comma-separated, String.",
"Extracts the list of columns from the given field list.\n\n@param fields The fields\n@return The corresponding columns",
"Only call with monitor for 'this' held"
] |
public final int deleteOld(final long checkTimeThreshold) {
final CriteriaBuilder builder = getSession().getCriteriaBuilder();
final CriteriaDelete<PrintJobStatusExtImpl> delete =
builder.createCriteriaDelete(PrintJobStatusExtImpl.class);
final Root<PrintJobStatusExtImpl> root = delete.from(PrintJobStatusExtImpl.class);
delete.where(builder.and(builder.isNotNull(root.get("lastCheckTime")),
builder.lessThan(root.get("lastCheckTime"), checkTimeThreshold)));
return getSession().createQuery(delete).executeUpdate();
} | [
"Delete old jobs.\n\n@param checkTimeThreshold threshold for last check time\n@return the number of jobs deleted"
] | [
"Use this API to delete sslfipskey resources of given names.",
"Poll for the next N waiting jobs in line.\n\n@param size maximum amount of jobs to poll for\n@return up to \"size\" jobs",
"decodes the uriFragment\n\n@param res the resource that contains the feature holder\n@param uriFragment the fragment that should be decoded\n@return the decoded information\n@see LazyURIEncoder#encode(EObject, EReference, INode)",
"Creates an instance of a NewSimpleBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewSimpleBean instance",
"Write flow id.\n\n@param message the message\n@param flowId the flow id",
"Do synchronization of the given J2EE ODMG Transaction",
"Registers the Columngroup Buckets and creates the header cell for the columns",
"Cretae a BufferedImage from an ImageProducer.\n@param producer the ImageProducer\n@return a new TYPE_INT_ARGB BufferedImage",
"Create a new DirectByteBuffer from a given address and size.\nThe returned DirectByteBuffer does not release the memory by itself.\n\n@param addr\n@param size\n@param att object holding the underlying memory to attach to the buffer.\nThis will prevent the garbage collection of the memory area that's\nassociated with the new <code>DirectByteBuffer</code>\n@return"
] |
public static void applyToOr(ColorHolder colorHolder, TextView textView, ColorStateList colorDefault) {
if (colorHolder != null && textView != null) {
colorHolder.applyToOr(textView, colorDefault);
} else if (textView != null) {
textView.setTextColor(colorDefault);
}
} | [
"a small static helper to set the text color to a textView null save\n\n@param colorHolder\n@param textView\n@param colorDefault"
] | [
"Starts recursive delete on all delete objects object graph",
"Arrange to become the tempo master. Starts a sequence of interactions with the other players that should end\nup with us in charge of the group tempo and beat alignment.\n\n@throws IllegalStateException if we are not sending status updates\n@throws IOException if there is a problem sending the master yield request",
"Returns the index of each elem in a List.\n@param elems The list of items\n@return An array of indices",
"A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged\n\nWhen using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.\n\nA custom field's `type` cannot be updated.\n\nAn enum custom field's `enum_options` cannot be updated with this endpoint. Instead see \"Work With Enum Options\" for information on how to update `enum_options`.\n\nReturns the complete updated custom field record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n@throws Exception",
"Removes the given entity from the inverse associations it manages.",
"Iterate RMI Targets Map and remove entries loaded by protected ClassLoader",
"Finds the preferred provider for the given service. The preferred\nprovider is the last one added to the set of providers.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@return\nThe last provider added for the service if any exists.\nOtherwise, it returns <tt>null</tt>.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>",
"Returns an array with the width of the longest word per column calculated from the given table.\nDefault padding will be added per column.\nPadding for individual columns will be added if defined.\n@param rows the table rows for calculations\n@param colNumbers number of columns in the table\n@return array with width of longest word for each column, null if input table was null"
] |
private void writeExceptions(Project.Calendars.Calendar calendar, List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions)
{
// Always write legacy exception data:
// Powerproject appears not to recognise new format data at all,
// and legacy data is ignored in preference to new data post MSP 2003
writeExceptions9(dayList, exceptions);
if (m_saveVersion.getValue() > SaveVersion.Project2003.getValue())
{
writeExceptions12(calendar, exceptions);
}
} | [
"Main entry point used to determine the format used to write\ncalendar exceptions.\n\n@param calendar parent calendar\n@param dayList list of calendar days\n@param exceptions list of exceptions"
] | [
"scroll only once",
"This method displays the resource assignments for each task. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a task-by-task basis.\n\n@param file MPX file",
"A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used\nbootstrap CL instead.\n\n@return the base CL to use.",
"Sends the events to monitoring service client.\n\n@param events the events",
"Use this API to add snmpuser resources.",
"Tells you if the given ASTNode is a VariableExpression with the given name.\n@param expression\nany AST Node\n@param pattern\na string pattern to match\n@return\ntrue if the node is a variable with the specified name",
"A write through put to inner-store.\n\n@param keyBytes : keyName strings serialized as bytes eg. 'cluster.xml'\n@param valueBytes : versioned byte[] eg. UTF bytes for cluster xml\ndefinitions\n@throws VoldemortException",
"Helper method which supports creation of proper error messages.\n\n@param ex An exception to include or <em>null</em>.\n@param message The error message or <em>null</em>.\n@param objectToIdentify The current used object or <em>null</em>.\n@param topLevelClass The object top-level class or <em>null</em>.\n@param realClass The object real class or <em>null</em>.\n@param pks The associated PK values of the object or <em>null</em>.\n@return The generated exception.",
"Add columns to be returned by the SELECT query. If no columns are selected then all columns are returned by\ndefault. For classes with id columns, the id column is added to the select list automagically. This can be called\nmultiple times to add more columns to select.\n\n<p>\n<b>WARNING:</b> If you specify any columns to return, then any foreign-collection fields will be returned as null\n<i>unless</i> their {@link ForeignCollectionField#columnName()} is also in the list.\n</p>"
] |
private void processActivities(Storepoint phoenixProject)
{
final AlphanumComparator comparator = new AlphanumComparator();
List<Activity> activities = phoenixProject.getActivities().getActivity();
Collections.sort(activities, new Comparator<Activity>()
{
@Override public int compare(Activity o1, Activity o2)
{
Map<UUID, UUID> codes1 = getActivityCodes(o1);
Map<UUID, UUID> codes2 = getActivityCodes(o2);
for (UUID code : m_codeSequence)
{
UUID codeValue1 = codes1.get(code);
UUID codeValue2 = codes2.get(code);
if (codeValue1 == null || codeValue2 == null)
{
if (codeValue1 == null && codeValue2 == null)
{
continue;
}
if (codeValue1 == null)
{
return -1;
}
if (codeValue2 == null)
{
return 1;
}
}
if (!codeValue1.equals(codeValue2))
{
Integer sequence1 = m_activityCodeSequence.get(codeValue1);
Integer sequence2 = m_activityCodeSequence.get(codeValue2);
return NumberHelper.compare(sequence1, sequence2);
}
}
return comparator.compare(o1.getId(), o2.getId());
}
});
for (Activity activity : activities)
{
processActivity(activity);
}
} | [
"Process the set of activities from the Phoenix file.\n\n@param phoenixProject project data"
] | [
"Get bean manager from portlet context.\n\n@param ctx the portlet context\n@return bean manager if found",
"Convert an integer value into a TimeUnit instance.\n\n@param value time unit value\n@return TimeUnit instance",
"Handle a completed request producing an optional response",
"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.",
"Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors",
"Use this API to Import sslfipskey.",
"Logout the current session. After calling this method,\nthe session will be cleared",
"radi otsu da dobije spojena crna slova i ra\n\n@param input\n@return the processed image",
"Safe write error response.\n\n@param channel the channel\n@param header the request header\n@param error the exception"
] |
protected CDI11Deployment createDeployment(ServletContext context, CDI11Bootstrap bootstrap) {
ImmutableSet.Builder<Metadata<Extension>> extensionsBuilder = ImmutableSet.builder();
extensionsBuilder.addAll(bootstrap.loadExtensions(WeldResourceLoader.getClassLoader()));
if (isDevModeEnabled) {
extensionsBuilder.add(new MetadataImpl<Extension>(DevelopmentMode.getProbeExtension(resourceLoader), "N/A"));
}
final Iterable<Metadata<Extension>> extensions = extensionsBuilder.build();
final TypeDiscoveryConfiguration typeDiscoveryConfiguration = bootstrap.startExtensions(extensions);
final EEModuleDescriptor eeModule = new EEModuleDescriptorImpl(context.getContextPath(), ModuleType.WEB);
final DiscoveryStrategy strategy = DiscoveryStrategyFactory.create(resourceLoader, bootstrap, typeDiscoveryConfiguration.getKnownBeanDefiningAnnotations(),
Boolean.parseBoolean(context.getInitParameter(Jandex.DISABLE_JANDEX_DISCOVERY_STRATEGY)));
if (Jandex.isJandexAvailable(resourceLoader)) {
try {
Class<? extends BeanArchiveHandler> handlerClass = Reflections.loadClass(resourceLoader, JANDEX_SERVLET_CONTEXT_BEAN_ARCHIVE_HANDLER);
strategy.registerHandler((SecurityActions.newConstructorInstance(handlerClass, new Class<?>[] { ServletContext.class }, context)));
} catch (Exception e) {
throw CommonLogger.LOG.unableToInstantiate(JANDEX_SERVLET_CONTEXT_BEAN_ARCHIVE_HANDLER, Arrays.toString(new Object[] { context }), e);
}
} else {
strategy.registerHandler(new ServletContextBeanArchiveHandler(context));
}
strategy.setScanner(new WebAppBeanArchiveScanner(resourceLoader, bootstrap, context));
Set<WeldBeanDeploymentArchive> beanDeploymentArchives = strategy.performDiscovery();
String isolation = context.getInitParameter(CONTEXT_PARAM_ARCHIVE_ISOLATION);
if (isolation == null || Boolean.valueOf(isolation)) {
CommonLogger.LOG.archiveIsolationEnabled();
} else {
CommonLogger.LOG.archiveIsolationDisabled();
Set<WeldBeanDeploymentArchive> flatDeployment = new HashSet<WeldBeanDeploymentArchive>();
flatDeployment.add(WeldBeanDeploymentArchive.merge(bootstrap, beanDeploymentArchives));
beanDeploymentArchives = flatDeployment;
}
for (BeanDeploymentArchive archive : beanDeploymentArchives) {
archive.getServices().add(EEModuleDescriptor.class, eeModule);
}
CDI11Deployment deployment = new WeldDeployment(resourceLoader, bootstrap, beanDeploymentArchives, extensions) {
@Override
protected WeldBeanDeploymentArchive createAdditionalBeanDeploymentArchive() {
WeldBeanDeploymentArchive archive = super.createAdditionalBeanDeploymentArchive();
archive.getServices().add(EEModuleDescriptor.class, eeModule);
return archive;
}
};
if (strategy.getClassFileServices() != null) {
deployment.getServices().add(ClassFileServices.class, strategy.getClassFileServices());
}
return deployment;
} | [
"Create servlet deployment.\n\nCan be overridden with custom servlet deployment. e.g. exact resources listing in restricted env like GAE\n\n@param context the servlet context\n@param bootstrap the bootstrap\n@return new servlet deployment"
] | [
"Set the position of the given Matcher to the given index.\n\n@param matcher a Matcher\n@param idx the index number\n@since 1.0",
"Checks if the duration option is valid.\n\nNOTE: This does NOT check, if too many events are specified.\n\n@return a flag, indicating if the duration option is valid.",
"Use this API to fetch all the lbvserver resources that are configured on netscaler.",
"Obtain the destination hostname for a source host\n\n@param hostName\n@return",
"Return the serialized form of this Identity.\n\n@return The serialized representation\n@see #fromByteArray\n@deprecated",
"This method returns the actual raw class associated with the specified\ntype.",
"Returns the index of the eigenvalue which has the smallest magnitude.\n\n@return index of the smallest magnitude eigen value.",
"Print a day.\n\n@param day Day instance\n@return day value",
"A property tied to the map, updated when the idle state event is fired.\n\n@return"
] |
@Override
public final Integer optInt(final String key, final Integer defaultValue) {
Integer result = optInt(key);
return result == null ? defaultValue : result;
} | [
"Get a property as an int or default value.\n\n@param key the property name\n@param defaultValue the default value"
] | [
"This method validates all relationships for a task, removing\nany which have been incorrectly read from the MPP file and\npoint to a parent task.\n\n@param task task under test",
"Gets display duration for specified frame.\n\n@param n int index of frame.\n@return delay in milliseconds.",
"Get the bar size.\n\n@param settings Parameters for rendering the scalebar.",
"Use this API to save cacheobject resources.",
"Called by determineHead and may be overridden in subclasses\nif special treatment is necessary for particular categories.",
"Sets the target translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining",
"Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth",
"Token Info\nReturns the Token Information\n@return ApiResponse<TokenInfoSuccessResponse>\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Adds listeners and reads from a stream.\n\n@param reader reader for file type\n@param stream schedule data\n@return ProjectFile instance"
] |
public boolean startsWith(Bytes prefix) {
Objects.requireNonNull(prefix, "startWith(Bytes prefix) cannot have null parameter");
if (prefix.length > this.length) {
return false;
} else {
int end = this.offset + prefix.length;
for (int i = this.offset, j = prefix.offset; i < end; i++, j++) {
if (this.data[i] != prefix.data[j]) {
return false;
}
}
}
return true;
} | [
"Checks if this has the passed prefix\n\n@param prefix is a Bytes object to compare to this\n@return true or false\n@since 1.1.0"
] | [
"Calls beforeMaterialization on all registered listeners in the reverse\norder of registration.",
"Execute pull docker image on agent\n\n@param launcher\n@param imageTag\n@param username\n@param password\n@param host\n@return\n@throws IOException\n@throws InterruptedException",
"ten less than Cube Q",
"Finish initialization of the configuration.",
"For a given activity, retrieve a map of the activity code values which have been assigned to it.\n\n@param activity target activity\n@return map of activity code value UUIDs",
"All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.",
"Set the start time.\n@param date the start time to set.",
"Add the set with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The set of all packages to add.",
"Performs a similar transform on A-pI"
] |
@RequestMapping(value = "/api/profile", method = RequestMethod.DELETE)
public
@ResponseBody
HashMap<String, Object> deleteProfile(Model model, int id) throws Exception {
profileService.remove(id);
return Utils.getJQGridJSON(profileService.findAllProfiles(), "profiles");
} | [
"Delete a profile\n\n@param model\n@param id\n@return\n@throws Exception"
] | [
"Calculate start dates for a weekly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Reads a command \"tag\" from the request.",
"Writes this IIMFile to writer.\n\n@param writer\nwriter to write to\n@throws IOException\nif file can't be written to",
"Return any feedback messages and errors that were generated - but\nsuppressed - during the interpolation process. Since unresolvable\nexpressions will be left in the source string as-is, this feedback is\noptional, and will only be useful for debugging interpolation problems.\n\n@return a {@link List} that may be interspersed with {@link String} and\n{@link Throwable} instances.",
"Create a new service activator for the domain server communication services.\n\n@param endpointConfig the endpoint configuration\n@param managementURI the management connection URI\n@param serverName the server name\n@param serverProcessName the server process name\n@param authKey the authentication key\n@param managementSubsystemEndpoint whether to use the mgmt subsystem endpoint or not\n@return the service activator",
"Cretae a BufferedImage from an ImageProducer.\n@param producer the ImageProducer\n@return a new TYPE_INT_ARGB BufferedImage",
"Helper method for getting the current parameter values from a list of annotated parameters.\n\n@param parameters The list of annotated parameter to look up\n@param manager The Bean manager\n@return The object array of looked up values",
"Parses a record containing hours and add them to a container.\n\n@param ranges hours container\n@param hoursRecord hours record",
"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"
] |
public ModelNode toModelNode() {
final ModelNode node = new ModelNode().setEmptyList();
for (PathElement element : pathAddressList) {
final String value;
if (element.isMultiTarget() && !element.isWildcard()) {
value = '[' + element.getValue() + ']';
} else {
value = element.getValue();
}
node.add(element.getKey(), value);
}
return node;
} | [
"Convert this path address to its model node representation.\n\n@return the model node list of properties"
] | [
"If provided with an AVRO schema, validates it and checks if there are\nbackwards compatible.\n\nTODO should probably place some similar checks for other serializer types\nas well?\n\n@param serializerDef",
"Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed.",
"Provides a ready to use diff update for our adapter based on the implementation of the\nstandard equals method from Object.\n\n@param newList to refresh our content",
"Creates the stats items.\n\n@param statsType\nthe stats type\n@return the sorted set\n@throws IOException\nSignals that an I/O exception has occurred.",
"Gets the thread usage.\n\n@return the thread usage",
"Utility function to get the current text.",
"Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for",
"Use this API to change responderhtmlpage.",
"Get an integer property override value.\n@param name the {@link CircuitBreaker} name.\n@param key the property override key.\n@return the property override value, or null if it is not found."
] |
private void initPatternControllers() {
m_patternControllers.put(PatternType.NONE, new CmsPatternPanelNoneController());
m_patternControllers.put(PatternType.DAILY, new CmsPatternPanelDailyController(m_model, this));
m_patternControllers.put(PatternType.WEEKLY, new CmsPatternPanelWeeklyController(m_model, this));
m_patternControllers.put(PatternType.MONTHLY, new CmsPatternPanelMonthlyController(m_model, this));
m_patternControllers.put(PatternType.YEARLY, new CmsPatternPanelYearlyController(m_model, this));
// m_patternControllers.put(PatternType.INDIVIDUAL, new CmsPatternPanelIndividualController(m_model, this));
} | [
"Initialize the pattern controllers."
] | [
"Copy the data from an InputStream to a temp file.\n\n@param inputStream data source\n@param tempFileSuffix suffix to use for temp file\n@return File instance",
"Adds a new Token to the end of the linked list",
"Creates a spin wrapper for a data input of a given data format.\n\n@param input the input to wrap\n@param format the data format of the input\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')",
"Implements the instanceof operator.\n\n@param instance The value that appeared on the LHS of the instanceof\noperator\n@return true if \"this\" appears in value's prototype chain",
"Returns the logger name that should be used in the log manager.\n\n@param name the name of the logger from the resource\n\n@return the name of the logger",
"Removes all currently assigned labels for this Datum then adds all\nof the given Labels.",
"Minimize the function starting at the given initial point.",
"Returns the complete task record for a single task.\n\n@param task The task to get.\n@return Request object",
"Extract predecessor data."
] |
protected void setInputElementValue(Node element, FormInput input) {
LOGGER.debug("INPUTFIELD: {} ({})", input.getIdentification(), input.getType());
if (element == null || input.getInputValues().isEmpty()) {
return;
}
try {
switch (input.getType()) {
case TEXT:
case TEXTAREA:
case PASSWORD:
handleText(input);
break;
case HIDDEN:
handleHidden(input);
break;
case CHECKBOX:
handleCheckBoxes(input);
break;
case RADIO:
handleRadioSwitches(input);
break;
case SELECT:
handleSelectBoxes(input);
}
} catch (ElementNotVisibleException e) {
LOGGER.warn("Element not visible, input not completed.");
} catch (BrowserConnectionException e) {
throw e;
} catch (RuntimeException e) {
LOGGER.error("Could not input element values", e);
}
} | [
"Fills in the element with the InputValues for input\n\n@param element the node element\n@param input the input data"
] | [
"Function to perform forward softmax",
"The file we are working with has a byte order mark. Skip this and try again to read the file.\n\n@param stream schedule data\n@param length length of the byte order mark\n@param charset charset indicated by byte order mark\n@return ProjectFile instance",
"Add join info to the query. This can be called multiple times to join with more than one table.",
"Replaces the proxy url with the correct url from the tileMap.\n\n@return correct url to TMS service",
"123.2.3.4 is 4.3.2.123.in-addr.arpa.",
"Set the options based on the tag elements of the ClassDoc parameter",
"Read a nested table whose contents we don't understand.\n\n@param rowSize fixed row size\n@param rowMagicNumber row magic number\n@return table rows",
"Adds a filter definition to this project file.\n\n@param filter filter definition",
"Multiplied a transpose orthogonal matrix Q by the specified rotator. This is used\nto update the U and V matrices. Updating the transpose of the matrix is faster\nsince it only modifies the rows.\n\n\n@param Q Orthogonal matrix\n@param m Coordinate of rotator.\n@param n Coordinate of rotator.\n@param c cosine of rotator.\n@param s sine of rotator."
] |
public static clusternodegroup_nslimitidentifier_binding[] get(nitro_service service, String name) throws Exception{
clusternodegroup_nslimitidentifier_binding obj = new clusternodegroup_nslimitidentifier_binding();
obj.set_name(name);
clusternodegroup_nslimitidentifier_binding response[] = (clusternodegroup_nslimitidentifier_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch clusternodegroup_nslimitidentifier_binding resources of given name ."
] | [
"Creates a REST client used to perform Voldemort operations against the\nCoordinator\n\n@param storeName Name of the store to perform the operations on\n@param resolver Custom resolver as specified by the application\n@return",
"Send an ERROR log message with specified subsystem. If subsystem is not enabled the message\nwill not be logged\n@param subsystem logging subsystem\n@param tag Used to identify the source of a log message. It usually identifies the class or\nactivity where the log call occurs.\n@param msg The message you would like logged.\n@return",
"Sets the Base Calendar field indicates which calendar is the base calendar\nfor a resource calendar. The list includes the three built-in calendars,\nas well as any new base calendars you have created in the Change Working\nTime dialog box.\n\n@param val calendar name",
"Throws one RendererException if the content parent or layoutInflater are null.",
"Creates the adapter for the target database.",
"This method formats a time unit.\n\n@param timeUnit time unit instance\n@return formatted time unit instance",
"Adds title and subtitle to the TitleBand when it applies.\nIf title is not present then subtitle will be ignored",
"Join N sets.",
"Get an image using the specified URL suffix.\n\n@deprecated\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException"
] |
public synchronized void removeAllSceneObjects() {
final GVRCameraRig rig = getMainCameraRig();
final GVRSceneObject head = rig.getOwnerObject();
rig.removeAllChildren();
NativeScene.removeAllSceneObjects(getNative());
for (final GVRSceneObject child : mSceneRoot.getChildren()) {
child.getParent().removeChildObject(child);
}
if (null != head) {
mSceneRoot.addChildObject(head);
}
final int numControllers = getGVRContext().getInputManager().clear();
if (numControllers > 0)
{
getGVRContext().getInputManager().selectController();
}
getGVRContext().runOnGlThread(new Runnable() {
@Override
public void run() {
NativeScene.deleteLightsAndDepthTextureOnRenderThread(getNative());
}
});
} | [
"Remove all scene objects."
] | [
"Creates a new Table instance from data extracted from an MPP file.\n\n@param file parent project file\n@param data fixed data\n@param varMeta var meta\n@param varData var data\n@return Table instance",
"Escapes args' string values according to format\n\n@param format the Format used by the PrintStream\n@param args the array of args to escape\n@return The cloned and escaped array of args",
"Call the named method\n\n@param obj The object to call the method on\n@param c The class of the object\n@param name The name of the method\n@param args The method arguments\n@return The result of the method",
"Performs a matrix inversion operations that takes advantage of the special\nproperties of a covariance matrix.\n\n@param cov A covariance matrix. Not modified.\n@param cov_inv The inverse of cov. Modified.\n@return true if it could invert the matrix false if it could not.",
"try to find a field in class c, recurse through class hierarchy if necessary\n\n@throws NoSuchFieldException if no Field was found into the class hierarchy",
"This may cost twice what it would in the original Map.\n\n@param key key whose associated value is to be returned.\n@return the value to which this map maps the specified key, or\n<tt>null</tt> if the map contains no mapping for this key.",
"This snapshot is meant to be used when updating data.",
"Merge two maps of configuration properties. If the original contains a mapping for the same key, the new mapping is ignored.\n\n@param original\n@param toMerge",
"Extract calendar data."
] |
private int[] convertBatch(int[] batch) {
int[] conv = new int[batch.length];
for (int i=0; i<batch.length; i++) {
conv[i] = sample[batch[i]];
}
return conv;
} | [
"Converts a batch indexing into the sample, to a batch indexing into the\noriginal function.\n\n@param batch The batch indexing into the sample.\n@return A new batch indexing into the original function, containing only\nthe indices from the sample."
] | [
"Convert an object to a set.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target set element type\n@return set",
"Execute the operation.\n\n@param listener the transactional operation listener\n@param client the transactional protocol client\n@param identity the server identity\n@param operation the operation\n@param transformer the operation result transformer\n@return whether the operation was executed",
"Gets the positive integer.\n\n@param number the number\n@return the positive integer",
"Gets the list of failed invocations that has been collected by this collector.\n\n@return The failed invocations.",
"Read a long int from an input stream.\n\n@param is input stream\n@return long value",
"Whether or not points are within some threshold.\n@param point1 Point 1\n@param point2 Point 2\n@return True or false",
"Ask the specified player for the waveform preview in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param trackReference uniquely identifies the desired waveform preview\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nwaveform updates will use available caches only\n\n@return the waveform preview found, if any",
"Adds and returns a document with a new version to the given document.\n\n@param document the document to attach a new version to.\n@param newVersion the version to attach to the document\n@return a document with a new version to the given document.",
"List the addons already added to an app.\n@param appName new of the app\n@return a list of add-ons"
] |
protected VelocityContext createContext()
{
VelocityContext context = new VelocityContext();
context.put(META_KEY, META);
context.put(UTILS_KEY, UTILS);
context.put(MESSAGES_KEY, MESSAGES);
return context;
} | [
"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."
] | [
"Adds a resource collection with execution hints.",
"Build and return a foreign collection based on the field settings that matches the id argument. This can return\nnull in certain circumstances.\n\n@param parent\nThe parent object that we will set on each item in the collection.\n@param id\nThe id of the foreign object we will look for. This can be null if we are creating an empty\ncollection.",
"Sets the set of site filters based on the given string.\n\n@param filters\ncomma-separates list of site keys, or \"-\" to filter all site\nlinks",
"A recursive getAttribute method. In case a one-to-many is passed, an array will be returned.\n\n@param feature The feature wherein to search for the attribute\n@param name The attribute's full name. (can be attr1.attr2)\n@return Returns the value. In case a one-to-many is passed along the way, an array will be returned.\n@throws LayerException oops",
"Method used to extract data from the block of properties and\ninsert the key value pair into a map.\n\n@param data block of property data\n@param previousItemOffset previous offset\n@param previousItemKey item key\n@param itemOffset current item offset",
"Switches to the next tab.",
"2-D Complex Gabor function.\n\n@param x X axis coordinate.\n@param y Y axis coordinate.\n@param wavelength Wavelength.\n@param orientation Orientation.\n@param phaseOffset Phase offset.\n@param gaussVariance Gaussian variance.\n@param aspectRatio Aspect ratio.\n@return Gabor response.",
"Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found",
"object -> xml\n\n@param object\n@param childClass"
] |
Subsets and Splits