query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public JSONObject toJSON() { try { return new JSONObject(properties).putOpt("name", getName()); } catch (JSONException e) { e.printStackTrace(); Log.e(TAG, e, "toJSON()"); throw new RuntimeAssertion("NodeEntry.toJSON() failed for '%s'", this); } }
[ "Converts the node to JSON\n@return JSON object" ]
[ "Create a new entry in the database from an object.", "This method must be called on the stop of the component. Stop the directory monitor and unregister all the\ndeclarations.", "Returns the URL to the property file that contains CRS definitions.\n\n@return The URL to the epsg file containing custom EPSG codes", "List the greetings in the specified guestbook.", "Returns the ports of the server.\n\n@return the {@link Map} which contains the pairs of local {@link InetSocketAddress} and\n{@link ServerPort} is the server is started. {@link Optional#empty()} otherwise.", "To be called at node startup - it purges all job instances associated to this node.\n\n@param cnx\n@param node", "Opens the favorite dialog.\n\n@param explorer the explorer instance (null if not currently in explorer)", "Adds is Null criteria,\ncustomer_id is Null\nThe attribute will NOT be translated into column name\n\n@param column The column name to be used without translation", "Return the max bounds of the layer as envelope.\n\n@param layer the layer to get envelope from\n@return Envelope the envelope" ]
static VaultConfig loadExternalFile(File f) throws XMLStreamException { if(f == null) { throw new IllegalArgumentException("File is null"); } if(!f.exists()) { throw new XMLStreamException("Failed to locate vault file " + f.getAbsolutePath()); } final VaultConfig config = new VaultConfig(); BufferedInputStream input = null; try { final XMLMapper mapper = XMLMapper.Factory.create(); final XMLElementReader<VaultConfig> reader = new ExternalVaultConfigReader(); mapper.registerRootElement(new QName(VAULT), reader); FileInputStream is = new FileInputStream(f); input = new BufferedInputStream(is); XMLStreamReader streamReader = XMLInputFactory.newInstance().createXMLStreamReader(input); mapper.parseDocument(config, streamReader); streamReader.close(); } catch(FileNotFoundException e) { throw new XMLStreamException("Vault file not found", e); } catch(XMLStreamException t) { throw t; } finally { StreamUtils.safeClose(input); } return config; }
[ "In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config" ]
[ "get TypeSignature given the signature\n\n@param typeSignature\n@param useInternalFormFullyQualifiedName\nif true, fqn in parameterizedTypeSignature must be in the form\n'java/lang/Thread'. If false fqn must be of the form\n'java.lang.Thread'\n@return", "Performs a HTTP PUT request, saves an attachment.\n\n@return {@link Response}", "Adds the dependencies typical for particular deployment types.\nThis is not accurate and doesn't cover the real needs of the project.\nBasically it's just to have \"something\" for the initial implementation.", "In the 3.0 xsd the vault configuration and its options are part of the vault xsd.\n\n@param reader the reader at the vault element\n@param expectedNs the namespace\n@return the vault configuration", "Reads characters into a portion of an array, then replace invalid XML characters\n\n@throws IOException If an I/O error occurs\n@see ru.yandex.qatools.allure.config.AllureNamingUtils#isBadXmlCharacter(char) by space", "This looks at the servlet attributes to get the list of response headers to remove while the response object gets created by the servlet", "Return total number of connections created in all partitions.\n\n@return number of created connections", "Write to a context. Uses NullWritable for key so that only value of output string is ultimately written\n\n@param cr the DataPipe to write to", "Use this API to fetch all the auditmessages resources that are configured on netscaler.\nThis uses auditmessages_args which is a way to provide additional arguments while fetching the resources." ]
private void rebalanceStore(String storeName, final AdminClient adminClient, RebalanceTaskInfo stealInfo, boolean isReadOnlyStore) { // Move partitions if (stealInfo.getPartitionIds(storeName) != null && stealInfo.getPartitionIds(storeName).size() > 0) { logger.info(getHeader(stealInfo) + "Starting partitions migration for store " + storeName + " from donor node " + stealInfo.getDonorId()); int asyncId = adminClient.storeMntOps.migratePartitions(stealInfo.getDonorId(), metadataStore.getNodeId(), storeName, stealInfo.getPartitionIds(storeName), null, stealInfo.getInitialCluster()); rebalanceStatusList.add(asyncId); if(logger.isDebugEnabled()) { logger.debug(getHeader(stealInfo) + "Waiting for completion for " + storeName + " with async id " + asyncId); } adminClient.rpcOps.waitForCompletion(metadataStore.getNodeId(), asyncId, voldemortConfig.getRebalancingTimeoutSec(), TimeUnit.SECONDS, getStatus()); rebalanceStatusList.remove((Object) asyncId); logger.info(getHeader(stealInfo) + "Completed partition migration for store " + storeName + " from donor node " + stealInfo.getDonorId()); } logger.info(getHeader(stealInfo) + "Finished all migration for store " + storeName); }
[ "Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store" ]
[ "Build a URL with Query String and URL Parameters.\n@param base base URL\n@param queryString query string\n@param values URL Parameters\n@return URL", "Sets all dates in the list.\n@param dates the dates to set\n@param checked flag, indicating if all should be checked or unchecked.", "Extracts baseline cost from the MPP file for a specific baseline.\nReturns null if no baseline cost is present, otherwise returns\na list of timephased work items.\n\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work", "Removes any child object that has the given name by performing\ncase-sensitive search.\n\n@param name name of scene object to be removed.\n\n@return number of removed objects, 0 if none was found.", "Scan the segments to find the largest height value present.\n\n@return the largest waveform height anywhere in the preview.", "Removes an element from the observation matrix.\n\n@param index which element is to be removed", "This method writes resource data to a Planner file.", "Check if this applies to the provided authorization scope and return the credentials for that scope or\nnull if it doesn't apply to the scope.\n\n@param authscope the scope to test against.", "Receives a PropertyColumn and returns a JRDesignField" ]
private boolean isNullOrEmpty(Object paramValue) { boolean isNullOrEmpty = false; if (paramValue == null) { isNullOrEmpty = true; } if (paramValue instanceof String) { if (((String) paramValue).trim().equalsIgnoreCase("")) { isNullOrEmpty = true; } } else if (paramValue instanceof List) { return ((List) paramValue).isEmpty(); } return isNullOrEmpty; }
[ "Checks String to see if the parameter is null.\n@param paramValue Object that will be checked if null.\n@return this.true if the parameter that is being checked is not null" ]
[ "Adding environment and system variables to build info.\n\n@param builder", "Reads a PEP file from the input stream.\n\n@param is input stream representing a PEP file", "Use this API to update nsacl6.", "Get maximum gray value in the image.\n\n@param fastBitmap Image to be processed.\n@param startX Initial X axis coordinate.\n@param startY Initial Y axis coordinate.\n@param width Width.\n@param height Height.\n@return Maximum gray.", "Use this API to fetch the statistics of all protocoludp_stats resources that are configured on netscaler.", "Obtain a dbserver client session that can be used to perform some task, call that task with the client,\nthen release the client.\n\n@param targetPlayer the player number whose dbserver we wish to communicate with\n@param task the activity that will be performed with exclusive access to a dbserver connection\n@param description a short description of the task being performed for error reporting if it fails,\nshould be a verb phrase like \"requesting track metadata\"\n@param <T> the type that will be returned by the task to be performed\n\n@return the value returned by the completed task\n\n@throws IOException if there is a problem communicating\n@throws Exception from the underlying {@code task}, if any", "Internal method which is called when the user has finished editing the title.\n\n@param box the text box which has been edited", "Returns the name of the directory where the dumpfile of the given type\nand date should be stored.\n\n@param dumpContentType\nthe type of the dump\n@param dateStamp\nthe date of the dump in format YYYYMMDD\n@return the local directory name for the dumpfile", "Encodes the given URI port with the given encoding.\n@param port the port to be encoded\n@param encoding the character encoding to encode to\n@return the encoded port\n@throws UnsupportedEncodingException when the given encoding parameter is not supported" ]
private void readFieldAlias(Project.ExtendedAttributes.ExtendedAttribute attribute) { String alias = attribute.getAlias(); if (alias != null && alias.length() != 0) { FieldType field = FieldTypeHelper.getInstance(Integer.parseInt(attribute.getFieldID())); m_projectFile.getCustomFields().getCustomField(field).setAlias(attribute.getAlias()); } }
[ "Read a single field alias from an extended attribute.\n\n@param attribute extended attribute" ]
[ "Calculates the local translation and rotation for a bone.\nAssumes WorldRot and WorldPos have been calculated for the bone.", "Computes the inner product of A times A and stores the results in B. The inner product is symmetric and this\nfunction will only store the lower triangle. The value of the upper triangular matrix is undefined.\n\n<p>B = A<sup>T</sup>*A</sup>\n\n@param A (Input) Matrix\n@param B (Output) Storage for output.", "Creates a Document that can be passed to the MongoDB batch insert function", "Edit which photos are in the photoset.\n\n@param photosetId\nThe photoset ID\n@param primaryPhotoId\nThe primary photo Id\n@param photoIds\nThe photo IDs for the photos in the set\n@throws FlickrException", "Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index whose value is to be returned\n@return The value of the specified element.", "Utility method used to round a double to the given precision.\n\n@param value value to truncate\n@param precision Number of decimals to round to.\n@return double value", "Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, or the default if the value is null or the key is not part of the map.", "Calculates the world matrix based on the local matrix.", "Stops all servers linked with the current camel context\n\n@param camelContext" ]
public Map<String, Object> getArtifactFieldsFilters() { final Map<String, Object> params = new HashMap<String, Object>(); for(final Filter filter: filters){ params.putAll(filter.artifactFilterFields()); } return params; }
[ "Generates a Map of query parameters for Artifact regarding the filters\n\n@return Map<String, Object>" ]
[ "Create and register the declaration of class D with the given metadata.\n\n@param metadata the metadata to create the declaration\n@return the created declaration of class D", "Encrypt a string with HMAC-SHA1 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output.", "Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List", "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", "Update the descriptor content with values from the editor.\n@throws CmsXmlException thrown if update fails due to a wrong XML structure (should never happen)", "Checks if a given number is in the range of a byte.\n\n@param number\na number which should be in the range of a byte (positive or negative)\n\n@see java.lang.Byte#MIN_VALUE\n@see java.lang.Byte#MAX_VALUE\n\n@return number as a byte (rounding might occur)", "Start unmarshalling using the parser.\n@param parser\n@param preProcessingData\n@return the root element of a bpmn2 document.\n@throws java.io.IOException", "Formats a vertex using it's properties. Debugging purposes.", "Normalize the list of selected categories to fit for the ids of the tree items." ]
public static void registerOgmExternalizers(GlobalConfiguration globalCfg) { Map<Integer, AdvancedExternalizer<?>> externalizerMap = globalCfg.serialization().advancedExternalizers(); externalizerMap.putAll( ogmExternalizers ); }
[ "Registers all custom Externalizer implementations that Hibernate OGM needs into a running\nInfinispan CacheManager configuration.\nThis is only safe to do when Caches from this CacheManager haven't been started yet,\nor the ones already started do not contain any data needing these.\n\n@see ExternalizerIds\n@param globalCfg the Serialization section of a GlobalConfiguration builder" ]
[ "Reads numBytes bytes, and returns the corresponding string", "Compare two integers, accounting for null values.\n\n@param n1 integer value\n@param n2 integer value\n@return comparison result", "This is the main entry point used to convert the internal representation\nof timephased work into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param work timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range", "This filter adds a blur effect to the image using the specified radius and sigma.\n@param radius Radius used in the gaussian function to generate a matrix, maximum value is 150.\nThe bigger the radius more blurred will be the image.\n@param sigma Sigma used in the gaussian function.", "Gets the progress from response.\n\n@param myResponse\nthe my response\n@return the progress from response", "Read a single outline code field extended attribute.\n\n@param entityID parent entity\n@param row field data", "Retrieve column font details from a block of property data.\n\n@param data property data\n@param offset offset into property data\n@param fontBases map of font bases\n@return ColumnFontStyle instance", "Return all valid tenors for a given moneyness and maturity.\nUses the payment times of the fix schedule to determine fractions.\n\n@param moneyness The moneyness as actual offset from par swap rate for which to get the maturities.\n@param maturity The maturities as year fraction from the reference date.\n@return The tenors as year fraction from reference date.", "Computes the power of a complex number in polar notation\n\n@param a Complex number\n@param N Power it is to be multiplied by\n@param result Result" ]
public static void clearallLocalDBs() { for (final Map.Entry<MongoClient, Boolean> entry : localInstances.entrySet()) { for (final String dbName : entry.getKey().listDatabaseNames()) { entry.getKey().getDatabase(dbName).drop(); } } }
[ "Helper function that drops all local databases for every client." ]
[ "Return the regression basis functions.\n\n@param exerciseDate The date w.r.t. which the basis functions should be measurable.\n@param model The model.\n@return Array of random variables.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Get the photo or ticket id from the response.\n\n@param async\n@param response\n@return", "returns a sorted array of methods", "Adds the parent package to the java.protocol.handler.pkgs system property.", "Use this API to delete nsacl6 of given name.", "Creates an operation to deploy existing deployment content to the runtime.\n\n@param deployment the deployment to deploy\n\n@return the deploy operation", "Create an info object from an authscope object.\n\n@param authscope the authscope", "Enables support for large-payload messages.\n\n@param s3\nAmazon S3 client which is going to be used for storing\nlarge-payload messages.\n@param s3BucketName\nName of the bucket which is going to be used for storing\nlarge-payload messages. The bucket must be already created and\nconfigured in s3.", "iteration not synchronized" ]
public Triple<Double, Integer, Integer> getAccuracyInfo() { int totalCorrect = tokensCorrect; int totalWrong = tokensCount - tokensCorrect; return new Triple<Double, Integer, Integer>((((double) totalCorrect) / tokensCount), totalCorrect, totalWrong); }
[ "Return overall per token accuracy" ]
[ "A slop is dead if the destination node or the store does not exist\nanymore on the cluster.\n\n@param slop\n@return", "Enables a dark shadow for this CircularImageView.\nIf the radius is set to 0, the shadow is removed.\n@param radius Radius for the shadow to extend to.\n@param dx Horizontal shadow offset.\n@param dy Vertical shadow offset.\n@param color The color of the shadow to apply.", "Operators which affect the variables to its left and right", "Use this API to fetch filtered set of appqoepolicy resources.\nset the filter parameter values in filtervalue object.", "If credentials are incorrect or not provided for Basic Auth, then Android\nmay throw this exception when an HTTP 401 is received. A separate exception\nis thrown for proxy authentication errors. Checking for this response and\nreturning the proper status.\n@param ex the exception raised from Android\n@return HTTP Status Code", "Add a cause to the backtrace.\n\n@param cause\nthe cause\n@param bTrace\nthe backtrace list", "Adds to this set all of the elements in the specified members array\n@param members the members to add\n@return the number of members actually added", "Generates the build-info module for this docker image.\nAdditionally. this method tags the deployed docker layers with properties,\nsuch as build.name, build.number and custom properties defined in the Jenkins build.\n@param build\n@param listener\n@param config\n@param buildName\n@param buildNumber\n@param timestamp\n@return\n@throws IOException", "Extract a slice [from, to) of this buffer. This methods creates a copy of the specified region.\n@param from\n@param to\n@return" ]
public void addRequiredBundles(Set<String> bundles) { // TODO manage transitive dependencies // don't require self Set<String> bundlesToMerge; String bundleName = (String) getMainAttributes().get(BUNDLE_SYMBOLIC_NAME); if (bundleName != null) { int idx = bundleName.indexOf(';'); if (idx >= 0) { bundleName = bundleName.substring(0, idx); } } if (bundleName != null && bundles.contains(bundleName) || projectName != null && bundles.contains(projectName)) { bundlesToMerge = new LinkedHashSet<String>(bundles); bundlesToMerge.remove(bundleName); bundlesToMerge.remove(projectName); } else { bundlesToMerge = bundles; } String s = (String) getMainAttributes().get(REQUIRE_BUNDLE); Wrapper<Boolean> modified = Wrapper.wrap(this.modified); String result = mergeIntoCommaSeparatedList(s, bundlesToMerge, modified, lineDelimiter); this.modified = modified.get(); getMainAttributes().put(REQUIRE_BUNDLE, result); }
[ "adds the qualified names to the require-bundle attribute, if not already\npresent.\n\n@param bundles - passing parameterized bundled (e.g. versions, etc.) is\nnot supported" ]
[ "Release all memory addresses taken by this allocator.\nBe careful in using this method, since all of the memory addresses become invalid.", "Set the values using the specified Properties object\n\n@param properties Properties object containing specific property values\nfor the Coordinator config", "Producers returned from this method are not validated. Internal use only.", "Calculates the length of the next block of RTF data.\n\n@param text RTF data\n@param offset current offset into this data\n@return block length", "Checks to see if all the provided matrices are the expected size for an SVD. If an error is encountered\nthen an exception is thrown. This automatically handles compact and non-compact formats", "Use this API to fetch appfwprofile_safeobject_binding resources of given name .", "Remove a collaborator from an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param collaborator See {@link #listCollaborators} for collaborators that can be removed from the app.", "Use this API to fetch all the vpath resources that are configured on netscaler.", "Starts the HTTP service.\n\n@throws Exception if the service failed to started" ]
public void deploySchema(String generatedProtobufName, RemoteCache<String, String> protobufCache, SchemaCapture schemaCapture, SchemaOverride schemaOverrideService, URL schemaOverrideResource) { // user defined schema if ( schemaOverrideService != null || schemaOverrideResource != null ) { cachedSchema = new SchemaValidator( this, schemaOverrideService, schemaOverrideResource, generatedProtobufName ).provideSchema(); } // or generate them generateProtoschema(); try { protobufCache.put( generatedProtobufName, cachedSchema ); String errors = protobufCache.get( generatedProtobufName + ".errors" ); if ( errors != null ) { throw LOG.errorAtSchemaDeploy( generatedProtobufName, errors ); } LOG.successfulSchemaDeploy( generatedProtobufName ); } catch (HotRodClientException hrce) { throw LOG.errorAtSchemaDeploy( generatedProtobufName, hrce ); } if ( schemaCapture != null ) { schemaCapture.put( generatedProtobufName, cachedSchema ); } }
[ "Typically this is transparently handled by using the Protostream codecs but be aware of it when bypassing Protostream." ]
[ "Returns the name from the inverse side if the given property de-notes a one-to-one association.", "Loads the Configuration from the properties file.\n\nLoads the properties file, or uses defaults on failure.\n\n@see org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl#setFilename(java.lang.String)", "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", "Retrieves the text value for the baseline duration.\n\n@return baseline duration text", "Load the available layers.\n\n@param image the installed image\n@param productConfig the product config to establish the identity\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the layers\n@throws IOException", "Returns the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.\n\n@param namespace the namespace referring to the undo collection.\n@return the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.", "Decomposes a submatrix. The results are written to the submatrix\nand to its internal matrix L.\n\n@param mat A matrix which has a submatrix that needs to be inverted\n@param indexStart the first index of the submatrix\n@param n The width of the submatrix that is to be inverted.\n@return True if it was able to finish the decomposition.", "Delivers the correct JSON Object for the stencilId\n\n@param stencilId\n@throws org.json.JSONException", "Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag." ]
public static final String vertexAsString(Vertex vertex, int depth, String withEdgesOfLabel) { StringBuilder sb = new StringBuilder(); vertexAsString(vertex, depth, withEdgesOfLabel, sb, 0, new HashSet<>()); return sb.toString(); }
[ "Formats a vertex using it's properties. Debugging purposes." ]
[ "Update max.\n\n@param n the n\n@param c the c", "Converts a vector from eigen space into sample space.\n\n@param eigenData Eigen space data.\n@return Sample space projection.", "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", "Add a custom Log Record Handler to the root of the tree\n@param handler The handler to add\n@return this", "Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for", "Given the key, figures out which partition on the local node hosts the key.\n\n@param key\n@return", "Write file creation record.\n\n@throws IOException", "Generate and return the list of statements to drop a database table.", "Accessor method used to retrieve a Float object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field" ]
public ProgressBar stop() { target.kill(); try { thread.join(); target.consoleStream.print("\n"); target.consoleStream.flush(); } catch (InterruptedException ex) { } return this; }
[ "Stops this progress bar." ]
[ "Retrieves the timephased breakdown of the planned overtime work for this\nresource assignment.\n\n@return timephased planned work", "Used by Pipeline jobs only", "Read assignment data.", "bind attribute and value\n@param stmt\n@param index\n@param attributeOrQuery\n@param value\n@param cld\n@return\n@throws SQLException", "Determines if a mouse event is inside a box.", "Read leaf tasks attached to the WBS.\n\n@param id initial WBS ID", "Returns a String summarizing overall accuracy that will print nicely.", "Process the given key and value. First validate the value and check if there's no different value for the same key in the same source - invalid and\ndifferent values are treated as a deployment problem.\n\n@param properties\n@param key\n@param value", "Call with pathEntries lock taken" ]
public synchronized void stop() { if (m_thread != null) { long timeBeforeShutdownWasCalled = System.currentTimeMillis(); JLANServer.shutdownServer(new String[] {}); while (m_thread.isAlive() && ((System.currentTimeMillis() - timeBeforeShutdownWasCalled) < MAX_SHUTDOWN_WAIT_MILLIS)) { try { Thread.sleep(500); } catch (InterruptedException e) { // ignore } } } }
[ "Tries to stop the JLAN server and return after it is stopped, but will also return if the thread hasn't stopped after MAX_SHUTDOWN_WAIT_MILLIS." ]
[ "Validates the deployment.\n\n@param isDomain {@code true} if this is a domain server, otherwise {@code false}\n\n@throws MojoDeploymentException if the deployment is invalid", "Looks up the object from the cache\n\n@param oid The Identity to look up the object for\n@return The object if found, otherwise null", "Use this API to fetch the statistics of all service_stats resources that are configured on netscaler.", "Determines the median value of the data set.\n@return If the number of elements is odd, returns the middle element.\nIf the number of elements is even, returns the midpoint of the two\nmiddle elements.\n@since 1.0.1", "Use this API to add gslbservice resources.", "delete of files more than 1 day old", "Returns the first number available, starting at portNumberStartingPoint that's not already in the reservedPorts\nlist.\n\n@param portNumberStartingPoint first port number to start from.\n@param reservedPorts the ports already reserved.\n@return first number available not in the given list, starting at the given parameter.", "Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.\nIf it is valid, the initializer function is applied to it.", "object -> xml\n\n@param object\n@param childClass" ]
private static void reallyValidatePseudoScopedBean(Bean<?> bean, BeanManagerImpl beanManager, Set<Object> dependencyPath, Set<Bean<?>> validatedBeans) { // see if we have already seen this bean in the dependency path if (dependencyPath.contains(bean)) { // create a list that shows the path to the bean List<Object> realDependencyPath = new ArrayList<Object>(dependencyPath); realDependencyPath.add(bean); throw ValidatorLogger.LOG.pseudoScopedBeanHasCircularReferences(WeldCollections.toMultiRowString(realDependencyPath)); } if (validatedBeans.contains(bean)) { return; } dependencyPath.add(bean); for (InjectionPoint injectionPoint : bean.getInjectionPoints()) { if (!injectionPoint.isDelegate()) { dependencyPath.add(injectionPoint); validatePseudoScopedInjectionPoint(injectionPoint, beanManager, dependencyPath, validatedBeans); dependencyPath.remove(injectionPoint); } } if (bean instanceof DecorableBean<?>) { final List<Decorator<?>> decorators = Reflections.<DecorableBean<?>>cast(bean).getDecorators(); if (!decorators.isEmpty()) { for (final Decorator<?> decorator : decorators) { reallyValidatePseudoScopedBean(decorator, beanManager, dependencyPath, validatedBeans); } } } if (bean instanceof AbstractProducerBean<?, ?, ?> && !(bean instanceof EEResourceProducerField<?, ?>)) { AbstractProducerBean<?, ?, ?> producer = (AbstractProducerBean<?, ?, ?>) bean; if (!beanManager.isNormalScope(producer.getDeclaringBean().getScope()) && !producer.getAnnotated().isStatic()) { reallyValidatePseudoScopedBean(producer.getDeclaringBean(), beanManager, dependencyPath, validatedBeans); } } validatedBeans.add(bean); dependencyPath.remove(bean); }
[ "checks if a bean has been seen before in the dependencyPath. If not, it\nresolves the InjectionPoints and adds the resolved beans to the set of\nbeans to be validated" ]
[ "Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return", "Read an optional int value form a JSON value.\n@param val the JSON value that should represent the int.\n@return the int from the JSON or 0 reading the int fails.", "Parse init parameter for integer value, returning default if not found or invalid", "Remove all existing subscriptions", "Add a greeting to the specified guestbook.", "Gets information for a Box Storage Policy with optional fields.\n\n@param fields the fields to retrieve.\n@return info about this item containing only the specified fields, including storage policy.", "Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd, while reporting the\nprogress to a ProgressListener.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.\n@param listener a listener for monitoring the download's progress.", "Toggles a style name on a ui object\n\n@param uiObject Object to toggle style on\n@param toggleStyle whether or not to toggle the style name on the object\n@param styleName Style name", "Gets the groupby for ReportQueries of all Criteria and Sub Criteria\nthe elements are of class FieldHelper\n@return List of FieldHelper" ]
private synchronized Constructor getIndirectionHandlerConstructor() { if(_indirectionHandlerConstructor == null) { Class[] paramType = {PBKey.class, Identity.class}; try { _indirectionHandlerConstructor = getIndirectionHandlerClass().getConstructor(paramType); } catch(NoSuchMethodException ex) { throw new MetadataException("The class " + _indirectionHandlerClass.getName() + " specified for IndirectionHandlerClass" + " is required to have a public constructor with signature (" + PBKey.class.getName() + ", " + Identity.class.getName() + ")."); } } return _indirectionHandlerConstructor; }
[ "Returns the constructor of the indirection handler class.\n\n@return The constructor for indirection handlers" ]
[ "Complete the current operation and persist the current state to the disk. This will also trigger the invalidation\nof outdated modules.\n\n@param modification the current modification\n@param callback the completion callback", "Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.", "Resets the state of the scope.\nUseful for automation testing when we want to reset the scope used to install test modules.", "Use this API to add lbroute.", "Roll the years forward or backward.\n\n@param startDate - The start date\n@param years - Negative to rollbackwards.", "Provides a RunAs client login context", "Gets the explorer file entry options.\n\n@return the explorer file entry options", "Generate a call to the delegate object.", "Allows the closure to be called for NullObject\n\n@param closure the closure to call on the object\n@return result of calling the closure" ]
public static boolean isPrimitiveWrapperArray(Class<?> clazz) { Assert.notNull(clazz, "Class must not be null"); return (clazz.isArray() && isPrimitiveWrapper(clazz.getComponentType())); }
[ "Check if the given class represents an array of primitive wrappers,\ni.e. Boolean, Byte, Character, Short, Integer, Long, Float, or Double.\n@param clazz the class to check\n@return whether the given class is a primitive wrapper array class" ]
[ "Use this API to restore appfwprofile.", "Set the individual dates.\n@param dates the dates to set.", "Use this API to fetch aaauser_vpntrafficpolicy_binding resources of given name .", "Returns the first product found in the vector of calibration products\nwhich matches the given symbol, where symbol is the String set in\nthe calibrationSpecs.\n\n@param symbol A given symbol string.\n@return The product associated with that symbol.", "Returns iterable containing assignments for this single legal hold policy.\nParameters can be used to filter retrieved assignments.\n@param type filter assignments of this type only.\nCan be \"file_version\", \"file\", \"folder\", \"user\" or null if no type filter is necessary.\n@param id filter assignments to this ID only. Can be null if no id filter is necessary.\n@param limit the limit of entries per page. Default limit is 100.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy.", "Returns an iterator over the items in the trash.\n@return an iterator over the items in the trash.", "Get the rate types set.\n\n@return the rate types set, or an empty array, but never null.", "Verifies application name. Avoids characters that Zookeeper does not like in nodes & Hadoop\ndoes not like in HDFS paths.\n\n@param name Application name\n@throws IllegalArgumentException If name contains illegal characters", "Returns the JSON String representation of the payload\naccording to Apple APNS specification\n\n@return the String representation as expected by Apple" ]
public static base_responses update(nitro_service client, onlinkipv6prefix resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { onlinkipv6prefix updateresources[] = new onlinkipv6prefix[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new onlinkipv6prefix(); updateresources[i].ipv6prefix = resources[i].ipv6prefix; updateresources[i].onlinkprefix = resources[i].onlinkprefix; updateresources[i].autonomusprefix = resources[i].autonomusprefix; updateresources[i].depricateprefix = resources[i].depricateprefix; updateresources[i].decrementprefixlifetimes = resources[i].decrementprefixlifetimes; updateresources[i].prefixvalidelifetime = resources[i].prefixvalidelifetime; updateresources[i].prefixpreferredlifetime = resources[i].prefixpreferredlifetime; } result = update_bulk_request(client, updateresources); } return result; }
[ "Use this API to update onlinkipv6prefix resources." ]
[ "Unloads the sound file for this source, if any.", "Register the Rowgroup buckets and places the header cells for the rows", "Copies the given container page to the provided root path.\n@param originalPage the page to copy\n@param targetPageRootPath the root path of the copy target.\n@throws CmsException thrown if something goes wrong.\n@throws NoCustomReplacementException if a custom replacement is not found for a type which requires it.", "Writes an activity to a PM XML file.\n\n@param mpxj MPXJ Task instance", "Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be XML.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')", "Curries a function that takes three arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes two arguments. Never <code>null</code>.", "Initialises JMX stuff.\n@param doRegister if true, perform registration, if false unregister", "Return true only if the node has any of the named annotations\n@param node - the AST Node to check\n@param names - the names of the annotations\n@return true only if the node has any of the named annotations", "Reads an argument of type \"number\" from the request." ]
public void splitSpan(int n) { int x = (xKnots[n] + xKnots[n+1])/2; addKnot(x, getColor(x/256.0f), knotTypes[n]); rebuildGradient(); }
[ "Split a span into two by adding a knot in the middle.\n@param n the span index" ]
[ "Returns the getter method associated with the object's field.\n\n@param object\nthe object\n@param fieldName\nthe name of the field\n@return the getter method\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible", "Extract resource provider from a resource ID string.\n@param id the resource ID string\n@return the resource group name", "Use this API to fetch authenticationldappolicy_authenticationvserver_binding resources of given name .", "Prints a debug log message that details the time taken for the Http\nrequest to be parsed by the coordinator\n\n@param operationType\n@param receivedTimeInMs", "Evaluates the body if current member has no tag with the specified name.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException Description of Exception\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"paramNum\" description=\"The zero-based parameter number. It's used if the user\nused the space-separated format for specifying parameters.\"\[email protected] name=\"error\" description=\"Show this error message if no tag found.\"", "Exchanges the initial fully-formed messages which establishes the transaction context for queries to\nthe dbserver.\n\n@throws IOException if there is a problem during the exchange", "Account for key being fetched.\n\n@param key", "Retrieve a duration in the form required by Primavera.\n\n@param duration Duration instance\n@return formatted duration", "Try to build an default PBKey for convenience PB create method.\n\n@return PBKey or <code>null</code> if default key was not declared in\nmetadata" ]
public static DMatrixRMaj wrap(int numRows , int numCols , double []data ) { DMatrixRMaj s = new DMatrixRMaj(); s.data = data; s.numRows = numRows; s.numCols = numCols; return s; }
[ "Creates a new DMatrixRMaj around the provided data. The data must encode\na row-major matrix. Any modification to the returned matrix will modify the\nprovided data.\n\n@param numRows Number of rows in the matrix.\n@param numCols Number of columns in the matrix.\n@param data Data that is being wrapped. Referenced Saved.\n@return A matrix which references the provided data internally." ]
[ "Tell a device to turn sync on or off.\n\n@param deviceNumber the device whose sync state is to be set\n@param synced {@code} true if sync should be turned on, else it will be turned off\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network", "Starts advertising on Hyperbahn at a fixed interval.\n\n@return a future that resolves to the response of the first advertise request", "Append the WHERE part of the statement to the StringBuilder.", "Read project data from a database.\n\n@return ProjectFile instance\n@throws MPXJException", "Clear history for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client", "Retrieves the registar linked to the bus.\nCreates a new registar is not present.\n\n@param bus\n@return", "Get a signature for a list of parameters using the given shared secret.\n\n@param sharedSecret\nThe shared secret\n@param params\nThe parameters\n@return The signature String", "Make an individual Datum out of the data list info, focused at position\nloc.\n@param info A List of WordInfo objects\n@param loc The position in the info list to focus feature creation on\n@param featureFactory The factory that constructs features out of the item\n@return A Datum (BasicDatum) representing this data instance", "Get interfaces implemented by clazz\n\n@param clazz\n@return" ]
public static double blackScholesDigitalOptionDelta( double initialStockValue, double riskFreeRate, double volatility, double optionMaturity, double optionStrike) { if(optionStrike <= 0.0 || optionMaturity <= 0.0) { // The Black-Scholes model does not consider it being an option return 0.0; } else { // Calculate delta double dPlus = (Math.log(initialStockValue / optionStrike) + (riskFreeRate + 0.5 * volatility * volatility) * optionMaturity) / (volatility * Math.sqrt(optionMaturity)); double dMinus = dPlus - volatility * Math.sqrt(optionMaturity); double delta = Math.exp(-0.5*dMinus*dMinus) / (Math.sqrt(2.0 * Math.PI * optionMaturity) * initialStockValue * volatility); return delta; } }
[ "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" ]
[ "Add hours to a parent object.\n\n@param parentNode parent node\n@param hours list of ranges", "Returns an input stream that applies the required decompression to the\ngiven input stream.\n\n@param inputStream\nthe input stream with the (possibly compressed) data\n@param compressionType\nthe kind of compression\n@return an input stream with decompressed data\n@throws IOException\nif there was a problem creating the decompression streams", "Sets the RDF serialization tasks based on the given string value.\n\n@param tasks\na space-free, comma-separated list of task names", "Creates an appropriate HSGE for a domain-wide resource of a type that is mappable to server groups", "Create a JMX ObjectName\n\n@param domain The domain of the object\n@param type The type of the object\n@return An ObjectName representing the name", "Add a column to be set to a value for UPDATE statements. This will generate something like columnName = 'value'\nwith the value escaped if necessary.", "NOT IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery", "Sets the necessary height for all bands in the report, to hold their children", "Move sections relative to each other in a board view. One of\n`before_section` or `after_section` is required.\n\nSections cannot be moved between projects.\n\nAt this point in time, moving sections is not supported in list views, only board views.\n\nReturns an empty data block.\n\n@param project The project in which to reorder the given section\n@return Request object" ]
public static Info eye( final Variable A , ManagerTempVariables manager) { Info ret = new Info(); final VariableMatrix output = manager.createMatrix(); ret.output = output; if( A instanceof VariableMatrix ) { ret.op = new Operation("eye-m") { @Override public void process() { DMatrixRMaj mA = ((VariableMatrix)A).matrix; output.matrix.reshape(mA.numRows,mA.numCols); CommonOps_DDRM.setIdentity(output.matrix); } }; } else if( A instanceof VariableInteger ) { ret.op = new Operation("eye-i") { @Override public void process() { int N = ((VariableInteger)A).value; output.matrix.reshape(N,N); CommonOps_DDRM.setIdentity(output.matrix); } }; } else { throw new RuntimeException("Unsupported variable type "+A); } return ret; }
[ "Returns an identity matrix" ]
[ "Creates the server bootstrap.", "Write the criteria elements, extracting the information of the sub-model.\n\n@param writer the xml stream writer\n@param subModel the interface model\n@param nested whether it the criteria elements are nested as part of <not /> or <any />\n@throws XMLStreamException", "Used when setting the \"visible\" field in the response. See the \"List Conversations\" docs for details\n@param filters Filter strings to be applied to the visibility of conversations\n@return this to continue building options", "Returns all migrations starting from and excluding the given version. Usually you want to provide the version of\nthe database here to get all migrations that need to be executed. In case there is no script with a newer\nversion than the one given, an empty list is returned.\n\n@param version the version that is currently in the database\n@return all versions since the given version or an empty list if no newer script is available. Never null.\nDoes not include the given version.", "Create a new server group for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception", "Get the JSON representation of the metadata field filter.\n@return the JSON object representing the filter.", "Calculates the bounds of the non-transparent parts of the given image.\n@param p the image\n@return the bounds of the non-transparent area", "end AnchorImplementation class", "Removes all of the markers from the map." ]
public static base_response add(nitro_service client, tmtrafficaction resource) throws Exception { tmtrafficaction addresource = new tmtrafficaction(); addresource.name = resource.name; addresource.apptimeout = resource.apptimeout; addresource.sso = resource.sso; addresource.formssoaction = resource.formssoaction; addresource.persistentcookie = resource.persistentcookie; addresource.initiatelogout = resource.initiatelogout; addresource.kcdaccount = resource.kcdaccount; addresource.samlssoprofile = resource.samlssoprofile; return addresource.add_resource(client); }
[ "Use this API to add tmtrafficaction." ]
[ "Initialize elements from the duration panel.", "Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed.", "Retrieve a field from a particular entity using its alias.\n\n@param typeClass the type of entity we are interested in\n@param alias the alias\n@return the field type referred to be the alias, or null if not found", "Write the field to the specified channel.\n\n@param channel the channel to which it should be written\n\n@throws IOException if there is a problem writing to the channel", "Returns the default privacy level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@throws FlickrException\n@return privacyLevel", "Write a boolean field to the JSON file.\n\n@param fieldName field name\n@param value field value", "The cell String is the string representation of the object.\nIf padLeft is greater than 0, it is padded. Ditto right", "Add a '&lt;' clause so the column must be less-than the value.", "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." ]
public static String termValue(String term) { int i = term.indexOf(MtasToken.DELIMITER); String value = null; if (i >= 0) { value = term.substring((i + MtasToken.DELIMITER.length())); value = (value.length() > 0) ? value : null; } return (value == null) ? null : value.replace("\u0000", ""); }
[ "Term value.\n\n@param term\nthe term\n@return the string" ]
[ "This method is called to alert project listeners to the fact that\na calendar has been read from a project file.\n\n@param calendar calendar instance", "Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise", "Used by FreeStyle Maven jobs only", "Given a path to a VFS resource, the method removes the OpenCms context,\nin case the path is prefixed by that context.\n@param path the path where the OpenCms context should be removed\n@return the adjusted path", "Use this API to fetch statistics of lbvserver_stats resource of given name .", "Use this API to disable vserver of given name.", "Initialize the metadata cache with system store list", "Convert the server side feature to a DTO feature that can be sent to the client.\n\n@param feature\nThe server-side feature representation.\n@param featureIncludes\nIndicate which aspects of the should be included see {@link VectorLayerService}\n@return Returns the DTO feature.", "the 1st request from the manager." ]
@PrefMetadata(type = CmsTimeWarpPreference.class) public String getTimeWarp() { long warp = m_settings.getTimeWarp(); return warp < 0 ? "" : "" + warp; // if timewarp < 0 (i.e. time warp is not set), use the empty string because we don't want the date selector widget to interpret the negative value }
[ "Gets the time warp.\n\n@return the time warp" ]
[ "Create a new linear interpolated time discrete process by\nusing the time discretization of this process and the sum of this process and the given one\nas its values.\n\n@param process A given process.\n@return A new process representing the of this and the given process.\n@throws CalculationException Thrown if the given process fails to evaluate at a certain time point.", "Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed.", "Retrieve the start slack.\n\n@return start slack", "Determine if a task field contains data.\n\n@param task task instance\n@param field target field\n@return true if the field contains data", "Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds", "Return cached object by key. The key will be concatenated with\ncurrent session id when fetching the cached object\n\n@param key\n@param <T>\nthe object type\n@return the cached object", "Append environment variables and system properties from othre PipelineEvn object", "Find out which field in the incoming message contains the payload that is.\ndelivered to the service method.", "Helper method used to peel off spurious wrappings of DateTimeException\n\n@param e DateTimeException to peel\n\n@return DateTimeException that does not have another DateTimeException as its cause." ]
public double Function1D(double x) { double frequency = initFrequency; double amplitude = initAmplitude; double sum = 0; // octaves for (int i = 0; i < octaves; i++) { sum += SmoothedNoise(x * frequency) * amplitude; frequency *= 2; amplitude *= persistence; } return sum; }
[ "1-D Perlin noise function.\n\n@param x X Value.\n@return Returns function's value at point x." ]
[ "Roll back to the previous configuration.\n\n@throws GeomajasException\nindicates an unlikely problem with the rollback (see cause)", "Returns values aggregated from all the delegates, without overriding\nvalues that already exist.\n\n@return The Map of aggregated values", "Extract data for a single predecessor.\n\n@param task parent task\n@param row Synchro predecessor data", "set custom response for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise", "Records that there is media mounted in a particular media player slot, updating listeners if this is a change.\nAlso send a query to the player requesting details about the media mounted in that slot, if we don't already\nhave that information.\n\n@param slot the slot in which media is mounted", "Count the number of queued resource requests for a specific pool.\n\n@param key The key\n@return The count of queued resource requests. Returns 0 if no queue\nexists for given key.", "Get the directory where the compiled jasper reports should be put.\n\n@param configuration the configuration for the current app.", "Pauses the playback of a sound.", "Use this API to fetch all the sslcipher resources that are configured on netscaler." ]
private void nodeProperties(Options opt) { Options def = opt.getGlobalOptions(); if (opt.nodeFontName != def.nodeFontName) w.print(",fontname=\"" + opt.nodeFontName + "\""); if (opt.nodeFontColor != def.nodeFontColor) w.print(",fontcolor=\"" + opt.nodeFontColor + "\""); if (opt.nodeFontSize != def.nodeFontSize) w.print(",fontsize=" + fmt(opt.nodeFontSize)); w.print(opt.shape.style); w.println("];"); }
[ "Print the common class node's properties" ]
[ "Get a property as a double or null.\n\n@param key the property name", "For a cert we have generated, return the private key.\n@param cert\n@return\n@throws CertificateEncodingException\n@throws KeyStoreException\n@throws UnrecoverableKeyException\n@throws NoSuchAlgorithmException", "Return a key to identify the connection descriptor.", "Returns true if the lattice contains an entry at the specified location.\n\n@param maturityInMonths The maturity in months to check.\n@param tenorInMonths The tenor in months to check.\n@param moneynessBP The moneyness in bp to check.\n@return True iff there is an entry at the specified location.", "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", "This method retrieves an integer of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required integer data", "Get all field attributes in an unmodifiable Map, or null if no attributes have been added\n\n@return all field attributes, or <code>NULL</code> if none exist", "Accessor method used to retrieve a char representing the\ncontents of an individual field. If the field does not exist in the\nrecord, the default character is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Compute singular values and U and V at the same time" ]
public void addAliasToConfigSite(String alias, String redirect, String offset) { long timeOffset = 0; try { timeOffset = Long.parseLong(offset); } catch (Throwable e) { // ignore } CmsSiteMatcher siteMatcher = new CmsSiteMatcher(alias, timeOffset); boolean redirectVal = new Boolean(redirect).booleanValue(); siteMatcher.setRedirect(redirectVal); m_aliases.add(siteMatcher); }
[ "Adds an alias to the currently configured site.\n\n@param alias the URL of the alias server\n@param redirect <code>true</code> to always redirect to main URL\n@param offset the optional time offset for this alias" ]
[ "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.", "Creates a favorite widget for a favorite entry.\n\n@param entry the favorite entry\n@return the favorite widget\n\n@throws CmsException if something goes wrong", "Returns the query string currently in the text field.\n\n@return the query string", "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.", "Resets the handler data to a basic state.", "Create a transactional protocol client.\n\n@param channelAssociation the channel handler\n@return the transactional protocol client", "Check for exceptions.\n\n@return the list", "Build the query to perform a batched read get orderBy settings from CollectionDescriptor\n\n@param ids Collection containing all identities of objects of the ONE side", "Stops the processing and prints the final time." ]
public boolean isWorkingDate(Date date) { Calendar cal = DateHelper.popCalendar(date); Day day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK)); DateHelper.pushCalendar(cal); return isWorkingDate(date, day); }
[ "This method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions.\n\n@param date Date to be tested\n@return boolean value" ]
[ "Use this API to unset the properties of nsip6 resource.\nProperties that need to be unset are specified in args array.", "Creates the HikariCP configuration based on the configuration of a pool defined in opencms.properties.\n\n@param config the configuration object with the properties\n@param key the pool name (without the opencms prefix)\n\n@return the HikariCP configuration for the pool", "Handles subscription verification callback from Facebook.\n@param subscription The subscription name.\n@param challenge A challenge that Facebook expects to be returned.\n@param verifyToken A verification token that must match with the subscription's token given when the controller was created.\n@return The challenge if the verification token matches; blank string otherwise.", "Probe the existing cluster to retrieve the current cluster xml and stores\nxml.\n\n@return Pair of Cluster and List<StoreDefinition> from current cluster.", "Filter everything until we found the first NL character.", "Use this API to clear Interface resources.", "Reset the combination generator.", "Detach the component of the specified type from this scene object.\n\nEach scene object has a list of components. Only one component\nof a particular type can be attached. Components are detached based on their type.\n\n@return GVRComponent detached or null if component not found\n@param type type of component to detach\n@see GVRSceneObject#attachComponent(GVRComponent)", "Deletes the device pin." ]
@Override public void clear() { values.clear(); listBox.clear(); clearStatusText(); if (emptyPlaceHolder != null) { insertEmptyPlaceHolder(emptyPlaceHolder); } reload(); if (isAllowBlank()) { addBlankItemIfNeeded(); } }
[ "Removes all items from the list box." ]
[ "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", "Use this API to fetch crvserver_policymap_binding resources of given name .", "Sets the top padding character for all cells in the row.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining", "Sets the current class definition derived from the current class, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"accept-locks\" optional=\"true\" description=\"The accept locks setting\" values=\"true,false\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the class as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"determine-extents\" optional=\"true\" description=\"Whether to determine\npersistent direct sub types automatically\" values=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a no-argument factory method that is\nused to create instances (not yet implemented !)\"\[email protected] name=\"factory-class\" optional=\"true\" description=\"Specifies a factory class to be used for creating\nobjects of this class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a static no-argument method in the factory class\"\[email protected] name=\"generate-repository-info\" optional=\"true\" description=\"Whether repository data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"generate-table-info\" optional=\"true\" description=\"Whether table data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"include-inherited\" optional=\"true\" description=\"Whether to include\nfields/references/collections of supertypes\" values=\"true,false\"\[email protected] name=\"initialization-method\" optional=\"true\" description=\"Specifies a no-argument instance method that is\ncalled right after an instance has been read from the database\"\[email protected] name=\"isolation-level\" optional=\"true\" description=\"The isolation level setting\"\[email protected] name=\"proxy\" optional=\"true\" description=\"The proxy setting for this class\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects of\nobjects of this class to prefetch in collections\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Can be set to force OJB to refresh instances when\nloaded from the cache\" values=\"true,false\"\[email protected] name=\"row-reader\" optional=\"true\" description=\"The row reader for the class\"\[email protected] name=\"schema\" optional=\"true\" description=\"The schema for the type\"\[email protected] name=\"table\" optional=\"true\" description=\"The table for the class\"\[email protected] name=\"table-documentation\" optional=\"true\" description=\"Documentation on the table\"", "Returns the smallest prefix length possible such that this address division grouping includes the block of addresses for that prefix.\n\n@return the prefix length", "Parse a version String and add the components to a properties object.\n\n@param version the version to parse", "If the column name is a dotted column, returns the first part.\nReturns null otherwise.\n\n@param column the column that might have a prefix\n@return the first part of the prefix of the column or {@code null} if the column does not have a prefix.", "Return the item view type used by the adapter to implement recycle mechanism.\n\n@param content to be rendered.\n@return an integer that represents the renderer inside the adapter.", "Translate this rectangle over the specified following distances.\n\n@param rect rectangle to move\n@param dx delta x\n@param dy delta y" ]
private TimeUnit getFormat(int format) { TimeUnit result; if (format == 0xFFFF) { result = TimeUnit.HOURS; } else { result = MPPUtility.getWorkTimeUnits(format); } return result; }
[ "Converts an integer into a time format.\n\n@param format integer format value\n@return TimeUnit instance" ]
[ "Find the index of the specified name in field name array.", "Returns an identity matrix", "Returns a string that should be used as a label for the given item. The\nmethod also ensures that each label is used for only one class. Other\nclasses with the same label will have their QID added for disambiguation.\n\n@param entityIdValue\nthe item to label\n@return the label", "Sets all dates in the list.\n@param dates the dates to set\n@param checked flag, indicating if all should be checked or unchecked.", "Searches for a declared method with a given name. If the class declares multiple methods with the given name,\nthere is no guarantee as of which methods is returned. Null is returned if the class does not declare a method\nwith the given name.\n@param clazz the given class\n@param methodName the given method name\n@return method method with the given name declared by the given class or null if no such method exists", "get the result speech recognize and find match in strings file.\n\n@param speechResult", "Tokenizes the input file and extracts the required data.\n\n@param is input stream\n@throws MPXJException", "Attaches the menu drawer to the content view.", "This method writes predecessor data to a Planner file.\nWe have to deal with a slight anomaly in this method that is introduced\nby the MPX file format. It would be possible for someone to create an\nMPX file with both the predecessor list and the unique ID predecessor\nlist populated... which means that we must process both and avoid adding\nduplicate predecessors. Also interesting to note is that MSP98 populates\nthe predecessor list, not the unique ID predecessor list, as you might\nexpect.\n\n@param mpxjTask MPXJ task instance\n@param plannerTask planner task instance" ]
private GraphicsDocument createLabelDocument(StringWriter writer, LabelStyleInfo labelStyleInfo) throws RenderException { if (TileMetadata.PARAM_SVG_RENDERER.equalsIgnoreCase(renderer)) { DefaultSvgDocument document = new DefaultSvgDocument(writer, false); document.setMaximumFractionDigits(MAXIMUM_FRACTION_DIGITS); document.registerWriter(InternalTileImpl.class, new SvgLabelTileWriter(getTransformer(), labelStyleInfo, geoService, textService)); return document; } else if (TileMetadata.PARAM_VML_RENDERER.equalsIgnoreCase(renderer)) { DefaultVmlDocument document = new DefaultVmlDocument(writer); int coordWidth = tile.getScreenWidth(); int coordHeight = tile.getScreenHeight(); document.registerWriter(InternalFeatureImpl.class, new VmlFeatureWriter(getTransformer(), coordWidth, coordHeight)); document.registerWriter(InternalTileImpl.class, new VmlLabelTileWriter(coordWidth, coordHeight, getTransformer(), labelStyleInfo, geoService, textService)); document.setMaximumFractionDigits(MAXIMUM_FRACTION_DIGITS); return document; } else { throw new RenderException(ExceptionCode.RENDERER_TYPE_NOT_SUPPORTED, renderer); } }
[ "Create a document that parses the tile's labelFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@param labelStyleInfo\nlabel style info\n@return graphics document\n@throws RenderException\ncannot render" ]
[ "Scale all widgets in Main Scene hierarchy\n@param scale", "returns the XmlCapable id associated with the literal.\nOJB maintains a RepositoryTags table that provides\na mapping from xml-tags to XmlCapable ids.\n\n@param literal the literal to lookup\n@return the int value representing the XmlCapable\n\n@throws MetadataException if no literal was found in tags mapping", "Moves to the step with the given number.\n\n<p>The step number is only updated if no exceptions are thrown when instantiating/displaying the given step\n\n@param stepNo the step number to move to", "Returns the simple name of the builder class that should be generated for the given type.\n\n<p>This is simply the {@link #BUILDER_SIMPLE_NAME_TEMPLATE} with the original type name\nsubstituted in. (If the original type is nested, its enclosing classes will be included,\nseparated with underscores, to ensure uniqueness.)", "Get the element at the index as a string.\n\n@param i the index of the element to access", "This handler will be triggered when search is finish", "Gets the info for a running build\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param buildId the unique identifier of the build", "Static factory method to build a JSON Patch out of a JSON representation.\n\n@param node the JSON representation of the generated JSON Patch\n@return a JSON Patch\n@throws IOException input is not a valid JSON patch\n@throws NullPointerException input is null", "Traverses the test case annotations. Will inject a HiveShell in the test case that envelopes the HiveServer." ]
public static <T, U extends Closeable> T withCloseable(U self, @ClosureParams(value=FirstParam.class) Closure<T> action) throws IOException { try { T result = action.call(self); Closeable temp = self; self = null; temp.close(); return result; } finally { DefaultGroovyMethodsSupport.closeWithWarning(self); } }
[ "Allows this closeable to be used within the closure, ensuring that it\nis closed once the closure has been executed and before this method returns.\n\n@param self the Closeable\n@param action the closure taking the Closeable as parameter\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 2.4.0" ]
[ "Divides the elements at the specified column by 'val'. Takes in account\nleading zeros and one.", "Returns the y-coordinate of a vertex tangent.\n\n@param vertex the vertex index\n@return the y coordinate", "Select this tab item.", "Return the class of one of the properties of another class from which the Hibernate metadata is given.\n\n@param meta\nThe parent class to search a property in.\n@param propertyName\nThe name of the property in the parent class (provided by meta)\n@return Returns the class of the property in question.\n@throws HibernateLayerException\nThrows an exception if the property name could not be retrieved.", "Use this API to unset the properties of systemuser resource.\nProperties that need to be unset are specified in args array.", "Converts a parameter map to the parameter string.\n@param parameters the parameter map.\n@return the parameter string.", "create partitions in the broker\n\n@param topic topic name\n@param partitionNum partition numbers\n@param enlarge enlarge partition number if broker configuration has\nsetted\n@return partition number in the broker\n@throws IOException if an I/O error occurs", "Lookup the group for the specified URL.\n\n@param url\nThe url\n@return The group\n@throws FlickrException", "Process the deployment root for the manifest.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException" ]
public static URL asUrlOrResource(String s) { if (Strings.isNullOrEmpty(s)) { return null; } try { return new URL(s); } catch (MalformedURLException e) { //If its not a valid URL try to treat it as a local resource. return findConfigResource(s); } }
[ "Convert a string to a URL and fallback to classpath resource, if not convertible.\n\n@param s\nThe string to convert.\n\n@return The URL." ]
[ "Signal that all threads have run to completion, and the multithreaded\nenvironment is over.\n@param check The name of the thread group passed to startThreads()", "If the Artifact does not exist, it will add it to the database. Nothing if it already exit.\n\n@param fromClient DbArtifact", "If the `invokerClass` specified is singleton, or without field or all fields are\nstateless, then return an instance of the invoker class. Otherwise, return null\n@param invokerClass the invoker class\n@param app the app\n@return an instance of the invokerClass or `null` if invoker class is stateful class", "Adds the includes of the fileset to the handling.\n\n@param handling The handling\n@param fileSet The fileset", "Assembles the exception message when the value received by a CellProcessor isn't of the correct type.\n\n@param expectedType\nthe expected type\n@param actualValue\nthe value received by the CellProcessor\n@return the message\n@throws NullPointerException\nif expectedType is null", "Permanently deletes a trashed file.\n@param fileID the ID of the trashed folder to permanently delete.", "Combines adjacent blocks of the same type.", "Find all methods on classes under scanBase that are annotated with annotationClass.\n\n@param scanBase Package to scan recursively, in dot notation (ie: org.jrugged...)\n@param annotationClass Class of the annotation to search for\n@return Set&lt;Method&gt; The set of all @{java.lang.reflect.Method}s having the annotation", "Converts a date series configuration to a date series bean.\n@return the date series bean." ]
public List<com.groupon.odo.proxylib.models.Method> getMethodsNotInGroup(int groupId) throws Exception { List<com.groupon.odo.proxylib.models.Method> allMethods = getAllMethods(); List<com.groupon.odo.proxylib.models.Method> methodsNotInGroup = new ArrayList<com.groupon.odo.proxylib.models.Method>(); List<com.groupon.odo.proxylib.models.Method> methodsInGroup = editService.getMethodsFromGroupId(groupId, null); for (int i = 0; i < allMethods.size(); i++) { boolean add = true; String methodName = allMethods.get(i).getMethodName(); String className = allMethods.get(i).getClassName(); for (int j = 0; j < methodsInGroup.size(); j++) { if ((methodName.equals(methodsInGroup.get(j).getMethodName())) && (className.equals(methodsInGroup.get(j).getClassName()))) { add = false; } } if (add) { methodsNotInGroup.add(allMethods.get(i)); } } return methodsNotInGroup; }
[ "returns all methods not in the group\n\n@param groupId Id of group\n@return List of Methods for a group\n@throws Exception exception" ]
[ "Sets the baseline finish text value.\n\n@param baselineNumber baseline number\n@param value baseline finish text value", "Generate a sql where-clause matching the contraints defined by the array of fields\n\n@param columns array containing all columns used in WHERE clause", "This static method calculated the rho of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The rho of the option", "Returns tag formatted as an HTTP tag string.\n\n@return The formatted HTTP tag string.\n\n@see <a\nhref=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11\">HTTP\nEntity Tags</a>", "Helper to read a line from the config file.\n@param propValue the property value\n@return the value of the variable set at this line.", "Use this API to add autoscaleaction resources.", "Writes a buffered some-value restriction.\n\n@param propertyUri\nURI of the property to which the restriction applies\n@param rangeUri\nURI of the class or datatype to which the restriction applies\n@param bnode\nblank node representing the restriction\n@throws RDFHandlerException\nif there was a problem writing the RDF triples", "Returns the associated SQL WHERE statement.", "Prepares this DAG for node enumeration using getNext method, each call to getNext returns next node\nin the DAG with no dependencies." ]
public void finished() throws Throwable { if( state == FINISHED ) { return; } State previousState = state; state = FINISHED; methodInterceptor.enableMethodInterception( false ); try { if( previousState == STARTED ) { callFinishLifeCycleMethods(); } } finally { listener.scenarioFinished(); } }
[ "Has to be called when the scenario is finished in order to execute after methods." ]
[ "Checks the preconditions for creating a new IsIncludedIn processor with a Set of Objects.\n\n@param possibleValues\nthe Set of possible values\n@throws NullPointerException\nif possibleValues is null\n@throws IllegalArgumentException\nif possibleValues is empty", "Use this API to add nsacl6.", "Processes all entities in a Wikidata dump using the given entity\nprocessor. By default, the most recent JSON dump will be used. In offline\nmode, only the most recent previously downloaded file is considered.\n\n@param entityDocumentProcessor\nthe object to use for processing entities in this dump", "Get the processor graph to use for executing all the processors for the template.\n\n@return the processor graph.", "Sets the country for which currencies should be requested.\n\n@param countries The ISO countries.\n@return the query for chaining.", "The full path of a jrxml file, or the path in the classpath of a jrxml\nresource.\n\n@param path\n@return", "Implements get by delegating to getAll.", "Reads the bundle descriptor, sets m_desc and m_descContent.\n@throws CmsXmlException thrown when unmarshalling fails.\n@throws CmsException thrown when reading the resource fails or several bundle descriptors for the bundle exist.", "Transfer the ownership of an application to another user.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param to Username of the person to transfer the app to. This is usually in the form of \"[email protected]\"." ]
public DynamicReport build() { if (built) { throw new DJBuilderException("DynamicReport already built. Cannot use more than once."); } else { built = true; } report.setOptions(options); if (!globalVariablesGroup.getFooterVariables().isEmpty() || !globalVariablesGroup.getHeaderVariables().isEmpty() || !globalVariablesGroup.getVariables().isEmpty() || hasPercentageColumn()) { report.getColumnsGroups().add(0, globalVariablesGroup); } createChartGroups(); addGlobalCrosstabs(); addSubreportsToGroups(); concatenateReports(); report.setAutoTexts(autoTexts); return report; }
[ "Builds the DynamicReport object. Cannot be used twice since this produced\nundesired results on the generated DynamicReport object\n\n@return" ]
[ "Use this API to delete cacheselector of given name.", "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.", "Propagate onNoPick events to listeners\n@param picker GVRPicker which generated the event", "Adds a word to the end of the token list\n@param word word which is to be added\n@return The new Token created around symbol", "Write the summary file, if requested.", "Answer the search class.\nThis is the class of the example object or\nthe class represented by Identity.\n@return Class", "The method determines if the type can be resolved and if not, will try to guess the qualified name using the information from the imports.", "performs a DELETE operation against RDBMS.\n@param cld ClassDescriptor providing mapping information.\n@param obj The object to be deleted.", "Reads and returns the mediator URN from the JSON content.\n\n@see #RegistrationConfig(String)" ]
@SuppressWarnings("unchecked") public static Type getSuperclassTypeParameter(Class<?> subclass) { Type superclass = subclass.getGenericSuperclass(); if (superclass instanceof Class) { throw new RuntimeException("Missing type parameter."); } return ((ParameterizedType) superclass).getActualTypeArguments()[0]; }
[ "Gets type from super class's type parameter." ]
[ "Calculate the units percent complete.\n\n@param row task data\n@return percent complete", "Begin writing a named list attribute.\n\n@param name attribute name", "Returns the matrix's rank. Automatic selection of threshold\n\n@param A Matrix. Not modified.\n@return The rank of the decomposed matrix.", "Check if information model entity referenced by archetype\nhas right name or type", "This method sends the same message to many agents.\n\n@param agent_name\nThe id of the agents that receive the message\n@param msgtype\n@param message_content\nThe content of the message\n@param connector\nThe connector to get the external access", "Puts a message in the wake-up queue of this node to send the message on wake-up.\n@param serialMessage the message to put in the wake-up queue.", "Determines whether there is an element of the collection that evaluates to true\nfor the predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tTrue if there is an element of the collection that evaluates to true\nfor the predicate, otherwise false.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Replaces all characters in the second parameter found in the first\nparameter with the final character.\n@param value the string to replace characters in\n@param chars the characters to replace\n@param replacement the character to insert as replacement", "Creates the button for converting an XML bundle in a property bundle.\n@return the created button." ]
public synchronized void bindShader(GVRScene scene, boolean isMultiview) { GVRRenderPass pass = mRenderPassList.get(0); GVRShaderId shader = pass.getMaterial().getShaderType(); GVRShader template = shader.getTemplate(getGVRContext()); if (template != null) { template.bindShader(getGVRContext(), this, scene, isMultiview); } for (int i = 1; i < mRenderPassList.size(); ++i) { pass = mRenderPassList.get(i); shader = pass.getMaterial().getShaderType(); template = shader.getTemplate(getGVRContext()); if (template != null) { template.bindShader(getGVRContext(), pass, scene, isMultiview); } } }
[ "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" ]
[ "Use this API to add systemuser.", "Search one prototype using the prototype index which is equals to the view type. This method\nhas to be implemented because prototypes member is declared with Collection and that interface\ndoesn't allow the client code to get one element by index.\n\n@param prototypeIndex used to search.\n@return prototype renderer.", "Updates the statements of the item document identified by the given item\nid. The updates are computed with respect to the current data found\nonline, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged.\n\n@param itemIdValue\nid of the document to be updated\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are IO problems, such as missing network connection", "Samples a batch of indices in the range [0, numExamples) without replacement.", "Returns the comma separated list of available scopes\n\n@return String", "Uncompresses the textual contents in the given map and and writes them to the files\ndenoted by the keys of the map.\n\n@param dir The base directory into which the files will be written\n@param contents The map containing the contents indexed by the filename\n@throws IOException If an error occurred", "Register the DAO with the cache. This will allow folks to build a DAO externally and then register so it can be\nused internally as necessary.\n\n<p>\n<b>NOTE:</b> By default this registers the DAO to be associated with the class that it uses. If you need to\nregister multiple dao's that use different {@link DatabaseTableConfig}s then you should use\n{@link #registerDaoWithTableConfig(ConnectionSource, Dao)}.\n</p>\n\n<p>\n<b>NOTE:</b> You should maybe use the {@link DatabaseTable#daoClass()} and have the DaoManager construct the DAO\nif possible.\n</p>", "Convert an Object of type Class to an Object.", "Given a json node, find a nested node using given composed key.\n\n@param jsonNode the parent json node\n@param composedKey a key combines multiple keys using flattening dots.\nFlattening dots are dot character '.' those are not preceded by slash '\\'\nEach flattening dot represents a level with following key as field key in that level\n@return nested json node located using given composed key" ]
protected void recordPreparedOperation(final ServerIdentity identity, final TransactionalProtocolClient.PreparedOperation<ServerTaskExecutor.ServerOperation> prepared) { final ModelNode preparedResult = prepared.getPreparedResult(); // Hmm do the server results need to get translated as well as the host one? // final ModelNode transformedResult = prepared.getOperation().transformResult(preparedResult); updatePolicy.recordServerResult(identity, preparedResult); executor.recordPreparedOperation(prepared); }
[ "Record a prepared operation.\n\n@param identity the server identity\n@param prepared the prepared operation" ]
[ "Get a unique reference to the media slot on the network from which the specified data was loaded.\n\n@param dataReference the data whose media slot is of interest\n\n@return the instance that will always represent the slot associated with the specified data", "Check whether the URL contains one of the patterns.\n\n@param uri URI\n@param patterns possible patterns\n@return true when URL contains one of the patterns", "Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus", "Returns all the persistent id generators which potentially require the creation of an object in the schema.", "Parses command-line and gets metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "Creates a Bytes object by copying the data of the given byte array", "Use this API to update clusternodegroup.", "Links the two field names into a single left.right field name.\nIf the left field is empty, right is returned\n\n@param left one field name\n@param right the other field name\n\n@return left.right or right if left is an empty string", "Utility method to retrieve the previous working date finish time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of previous work finish" ]
private void setRequestSitefilter(WbGetEntitiesActionData properties) { if (this.filter.excludeAllSiteLinks() || this.filter.getSiteLinkFilter() == null) { return; } properties.sitefilter = ApiConnection.implodeObjects(this.filter .getSiteLinkFilter()); }
[ "Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters" ]
[ "Throws an IllegalStateException when the given value is not false.", "Returns the text value of all of the elements in the collection.\n\n@return the text value of all the elements in the collection or null", "Calculate start dates for a weekly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Initializes the counters for a property to zero if not done yet.\n\n@param usageStatistics\nstatistics object to initialize\n@param property\nthe property to count", "Sets the specified many-to-one attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Loads the leap second rules from a URL, often in a jar file.\n\n@param url the jar file to load, not null\n@throws Exception if an error occurs", "Determine the size of a field in a fixed data block.\n\n@param type field data type\n@return field size in bytes", "Delete rows that match the prepared statement.", "Returns a new created connection\n\n@param jcd the connection descriptor\n@return an instance of Connection from the drivermanager" ]
public void insert(Platform platform, Database model, int batchSize) throws SQLException { if (batchSize <= 1) { for (Iterator it = _beans.iterator(); it.hasNext();) { platform.insert(model, (DynaBean)it.next()); } } else { for (int startIdx = 0; startIdx < _beans.size(); startIdx += batchSize) { platform.insert(model, _beans.subList(startIdx, startIdx + batchSize)); } } }
[ "Inserts the currently contained data objects into the database.\n\n@param platform The (connected) database platform for inserting data\n@param model The database model\n@param batchSize The batch size; use 1 for not using batch mode" ]
[ "Registers the parameter for the value formatter for the given variable and puts\nit's implementation in the parameters map.\n@param djVariable\n@param variableName", "For each node in specified zones, tries swapping some minimum number of\nrandom partitions per node with some minimum number of random partitions\nfrom other specified nodes. Chooses the best swap in each iteration.\nLarge values of the greedSwapMaxPartitions... arguments make this method\nequivalent to comparing every possible swap. This may get very expensive.\n\nSo if a node had partitions P1, P2, P3 and P4 and the other partitions\nset was Q1, Q2, Q3, Q4, Q5 The combinations that will be tried for\nswapping will be the cartesian product of the two sets. That is, {P1,\nQ1}, {P2, Q2}...{P2,Q1}, {P2,Q2}, in total 20 such swap pairs will be\ngenerated. The best among these swap pairs will be chosen.\n\n@param nextCandidateCluster\n@param nodeIds Node IDs within which to shuffle partitions\n@param greedySwapMaxPartitionsPerNode See RebalanceCLI.\n@param greedySwapMaxPartitionsPerZone See RebalanceCLI.\n@param storeDefs\n@return updated cluster", "Creates a copy of a matrix but swaps the rows as specified by the order array.\n\n@param order Specifies which row in the dest corresponds to a row in the src. Not modified.\n@param src The original matrix. Not modified.\n@param dst A Matrix that is a row swapped copy of src. Modified.", "Get the value of the fist child element with the given name.\n\n@param element\nThe parent element\n@param name\nThe child element name\n@return The child element value or null", "Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null", "Generates the build-info module for this docker image.\nAdditionally. this method tags the deployed docker layers with properties,\nsuch as build.name, build.number and custom properties defined in the Jenkins build.\n@param build\n@param listener\n@param config\n@param buildName\n@param buildNumber\n@param timestamp\n@return\n@throws IOException", "Get MultiJoined ClassDescriptors\n@param cld", "Create User Application Properties\nCreate application properties for a user\n@param userId User Id (required)\n@param properties Properties to be updated (required)\n@param aid Application ID (optional)\n@return PropertiesEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "Sets the name of the attribute group with which this attribute is associated.\n\n@param attributeGroup the attribute group name. Cannot be an empty string but can be {@code null}\nif the attribute is not associated with a group.\n@return a builder that can be used to continue building the attribute definition" ]
public PlanarImage toDirectColorModel(RenderedImage img) { BufferedImage dest = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_4BYTE_ABGR); BufferedImage source = new BufferedImage(img.getColorModel(), (WritableRaster) img.getData(), img .getColorModel().isAlphaPremultiplied(), null); ColorConvertOp op = new ColorConvertOp(null); op.filter(source, dest); return PlanarImage.wrapRenderedImage(dest); }
[ "Converts an image to a RGBA direct color model using a workaround via buffered image directly calling the\nColorConvert operation fails for unknown reasons ?!\n\n@param img image to convert\n@return converted image" ]
[ "Retrieve a flag value.\n\n@param index flag index (1-20)\n@return flag value", "Use this API to add snmpuser.", "Use this API to fetch snmpalarm resource of given name .", "Accessor method used to retrieve an Rate object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails", "Read the file header data.\n\n@param is input stream", "Sets the text alignment for all cells in the table.\n@param textAlignment new text alignment\n@throws NullPointerException if the argument was null\n@return this to allow chaining\n@throws {@link NullPointerException} if the argument was null", "Finds all variables in the context with the given names, and also attaches all WindupFreeMarkerMethods from all addons into the map.\n\nThis allows external addons to extend the capabilities in the freemarker reporting system.", "Merge all reports in reportOverall.\n@param reportOverall destination file of merge.\n@param reports files to be merged.", "Indicates if a set of types are all proxyable\n\n@param types The types to test\n@return True if proxyable, false otherwise" ]
@Override public CopticDate date(int prolepticYear, int month, int dayOfMonth) { return CopticDate.of(prolepticYear, month, dayOfMonth); }
[ "Obtains a local date in Coptic calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Coptic local date, not null\n@throws DateTimeException if unable to create the date" ]
[ "Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return", "Converts an object to an instance of the target type.\n\n@param mapper the object mapper\n@param source the source to convert\n@param targetType the target class type\n@return target instance\n@see SquigglyUtils#objectify(ObjectMapper, Object, Class)", "Add a calendar node.\n\n@param parentNode parent node\n@param calendar calendar", "Returns a string that represents a valid Solr query range.\n\n@param from Lower bound of the query range.\n@param to Upper bound of the query range.\n@return String that represents a Solr query range.", "Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be JSON.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')", "Transforms a list of Integer objects to an array of primitive int values.\n\n@param integers\n@return", "Returns the foreignkey to the specified table.\n\n@param name The name of the foreignkey\n@param tableName The name of the referenced table\n@return The foreignkey def or <code>null</code> if it does not exist", "Returns the coordinates of the vertex points of this hull.\n\n@param coords\nreturns the x, y, z coordinates of each vertex. This length of\nthis array must be at least three times the number of\nvertices.\n@return the number of vertices\n@see QuickHull3D#getVertices()\n@see QuickHull3D#getFaces()", "Returns an iterator over the items in this folder.\n\n@return an iterator over the items in this folder." ]
public void setParent(ProjectCalendar calendar) { // I've seen a malformed MSPDI file which sets the parent calendar to itself. // Silently ignore this here. if (calendar != this) { if (getParent() != null) { getParent().removeDerivedCalendar(this); } super.setParent(calendar); if (calendar != null) { calendar.addDerivedCalendar(this); } clearWorkingDateCache(); } }
[ "Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance" ]
[ "Renders in LI tags, Wraps with UL tags optionally.", "Extracts the bindingId from a Server.\n@param server\n@return", "Convert a date to the String representation we use in the JSON.\n@param d the date to convert\n@return the String representation we use in the JSON.", "Returns a flag, indicating if the current event is a multi-day event.\nThe method is only called if the single event has an explicitely set end date\nor an explicitely changed whole day option.\n\n@return a flag, indicating if the current event takes lasts over more than one day.", "Helper function to find the beat grid section in a rekordbox track analysis file.\n\n@param anlzFile the file that was downloaded from the player\n\n@return the section containing the beat grid", "Gets the default options to be passed when no custom properties are given.\n\n@return properties with formatter options", "Returns a compact representation of all of the tags the task has.\n\n@param task The task to get tags on.\n@return Request object", "Unchecks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already unchecked; {@code false} otherwise.", "Add a line symbolizer definition to the rule.\n\n@param styleJson The old style." ]
public void transformPose(Matrix4f trans) { Bone bone = mBones[0]; bone.LocalMatrix.set(trans); bone.WorldMatrix.set(trans); bone.Changed = WORLD_POS | WORLD_ROT; mNeedSync = true; sync(); }
[ "Transform the root bone of the pose by the given matrix.\n@param trans matrix to transform the pose by." ]
[ "Remove contents from the deployment and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException", "Deserialize an `AppDescriptor` from byte array\n\n@param bytes\nthe byte array\n@return\nan `AppDescriptor` instance", "Copy the contents of this buffer begginning from the srcOffset to a destination byte array\n@param srcOffset\n@param destArray\n@param destOffset\n@param size", "Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1", "Use this API to fetch a appfwglobal_auditnslogpolicy_binding resources.", "Read filename from spec.", "Executes a query. The query results will be added to the ExecutionResults using the\ngiven 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@return", "Returns the designer version from the manifest.\n@param context\n@return version", "Create button message key.\n\n@param gallery name\n@return Button message key as String" ]
public String getRejectionLogMessageId() { String id = logMessageId; if (id == null) { id = getRejectionLogMessage(Collections.<String, ModelNode>emptyMap()); } logMessageId = id; return logMessageId; }
[ "Returns the log message id used by this checker. This is used to group it so that all attributes failing a type of rejction\nend up in the same error message. This default implementation uses the formatted log message with an empty attribute map as the id.\n\n@return the log message id" ]
[ "Register custom filter types especially for serializer of specification json file", "Go over the task list and create a map of stealerId -> Tasks\n\n@param sbTaskList List of all stealer-based rebalancing tasks to be\nscheduled.", "Dumps a single material property to stdout.\n\n@param property the property", "Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class", "Returns the zip entry for a file in the archive.\n@param filename the file name\n@return the zip entry for the file with the provided name\n@throws ZipException thrown if the file is not in the zip archive", "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", "Method to create a new proxy that wraps the bean instance.\n\n@param beanInstance the bean instance\n@return a new proxy object", "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", "Checks if the required option exists.\n\n@param options OptionSet to checked\n@param opt Required option to check\n@throws VoldemortException" ]
protected void associateBatched(Collection owners, Collection children) { ObjectReferenceDescriptor ord = getObjectReferenceDescriptor(); ClassDescriptor cld = getOwnerClassDescriptor(); Object owner; Object relatedObject; Object fkValues[]; Identity id; PersistenceBroker pb = getBroker(); PersistentField field = ord.getPersistentField(); Class topLevelClass = pb.getTopLevelClass(ord.getItemClass()); HashMap childrenMap = new HashMap(children.size()); for (Iterator it = children.iterator(); it.hasNext(); ) { relatedObject = it.next(); childrenMap.put(pb.serviceIdentity().buildIdentity(relatedObject), relatedObject); } for (Iterator it = owners.iterator(); it.hasNext(); ) { owner = it.next(); fkValues = ord.getForeignKeyValues(owner,cld); if (isNull(fkValues)) { field.set(owner, null); continue; } id = pb.serviceIdentity().buildIdentity(null, topLevelClass, fkValues); relatedObject = childrenMap.get(id); field.set(owner, relatedObject); } }
[ "Associate the batched Children with their owner object.\nLoop over owners" ]
[ "This method writes assignment data to a Planner file.", "Use this API to change responderhtmlpage.", "Determine the common ancestor of the given classes, if any.\n@param clazz1 the class to introspect\n@param clazz2 the other class to introspect\n@return the common ancestor (i.e. common superclass, one interface\nextending the other), or {@code null} if none found. If any of the\ngiven classes is {@code null}, the other class will be returned.\n@since 2.0", "Delete a database for a given path and userId.\n@param appInfo the info for this application\n@param serviceName the name of the associated service\n@param clientFactory the associated factory that creates clients\n@param userId the id of the user's to delete\n@return true if successfully deleted, false if not", "Round the size of a rectangle with double values.\n\n@param rectangle The rectangle.\n@return", "Copy a single named resource from the classpath to the output directory.\n@param outputDirectory The destination directory for the copied resource.\n@param resourceName The filename of the resource.\n@param targetFileName The name of the file created in {@literal outputDirectory}.\n@throws IOException If the resource cannot be copied.", "Creates a Profile object from a SQL resultset\n\n@param result resultset containing the profile\n@return Profile\n@throws Exception exception", "Read a four byte integer from the data.\n\n@param offset current offset into data block\n@param data data block\n@return int value", "Use this API to fetch a systemglobal_authenticationldappolicy_binding resources." ]
public static boolean isTypesProxyable(Iterable<? extends Type> types, ServiceRegistry services) { return getUnproxyableTypesException(types, services) == null; }
[ "Indicates if a set of types are all proxyable\n\n@param types The types to test\n@return True if proxyable, false otherwise" ]
[ "Retrieve column font details from a block of property data.\n\n@param data property data\n@param offset offset into property data\n@param fontBases map of font bases\n@return ColumnFontStyle instance", "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.", "Shrinks the alert message body so that the resulting payload\nmessage fits within the passed expected payload length.\n\nThis method performs best-effort approach, and its behavior\nis unspecified when handling alerts where the payload\nwithout body is already longer than the permitted size, or\nif the break occurs within word.\n\n@param payloadLength the expected max size of the payload\n@param postfix for the truncated body, e.g. \"...\"\n@return this", "Appends the String representation of the given operand to this CharSequence.\n\n@param left a CharSequence\n@param value any Object\n@return the original toString() of the CharSequence with the object appended\n@since 1.8.2", "Get the items for the key.\n\n@param key\n@return the items for the given key", "Adds an edge between the current and new state.\n\n@return true if the new state is not found in the state machine.", "Returns an iterator over the items in this folder.\n\n@return an iterator over the items in this folder.", "Excludes Vertices that are of the provided type.", "Start the first inner table of a class." ]
public static dos_stats get(nitro_service service, options option) throws Exception{ dos_stats obj = new dos_stats(); dos_stats[] response = (dos_stats[])obj.stat_resources(service,option); return response[0]; }
[ "Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler." ]
[ "Append the text supplied by the Writer at the end of the File, using a specified encoding.\n\n@param file a File\n@param writer the Writer supplying 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 2.3", "Returns the default safety level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_MODERATE\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_RESTRICTED\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_SAFE\n@return The current users safety-level\n@throws FlickrException", "Get the list of store names from a list of store definitions\n\n@param list\n@param ignoreViews\n@return list of store names", "Builds IMAP envelope String from pre-parsed data.", "Write resource assignment workgroup.\n\n@param record resource assignment workgroup instance\n@throws IOException", "Entry point for processing filter definitions.\n\n@param properties project properties\n@param filters project filters\n@param fixedData filter fixed data\n@param varData filter var data", "Notification that a connection was closed.\n\n@param closed the closed connection", "Gets a collection of all the email aliases for this user.\n\n<p>Note that the user's primary login email is not included in the collection of email aliases.</p>\n\n@return a collection of all the email aliases for this user.", "Creates a Sink Processor\n\n@param dataSink the data sink itself\n@param parallelism the parallelism of this processor\n@param description the description for this processor\n@param taskConf the configuration for this processor\n@param system actor system\n@return the new created sink processor" ]
public ItemRequest<Task> addProject(String task) { String path = String.format("/tasks/%s/addProject", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "Adds the task to the specified project, in the optional location\nspecified. If no location arguments are given, the task will be added to\nthe end of the project.\n\n`addProject` can also be used to reorder a task within a project or section that\nalready contains it.\n\nAt most one of `insert_before`, `insert_after`, or `section` should be\nspecified. Inserting into a section in an non-order-dependent way can be\ndone by specifying `section`, otherwise, to insert within a section in a\nparticular place, specify `insert_before` or `insert_after` and a task\nwithin the section to anchor the position of this task.\n\nReturns an empty data block.\n\n@param task The task to add to a project.\n@return Request object" ]
[ "Returns all values that can be selected in the widget.\n@param cms the current CMS object\n@param rootPath the root path to the currently edited xml file (sitemap config)\n@param allRemoved flag, indicating if all inheritedly available formatters should be disabled\n@return all values that can be selected in the widget.", "Creates a temporary folder using the given prefix to generate its name.\n@param prefix the prefix string to be used in generating the directory's name; may be <i>null</i>\n@return the <code>File</code> to the newly created folder\n@throws IOException", "Calculate where within the beat grid array the information for the specified beat can be found.\nYes, this is a super simple calculation; the main point of the method is to provide a nice exception\nwhen the beat is out of bounds.\n\n@param beatNumber the beat desired\n\n@return the offset of the start of our cache arrays for information about that beat", "marks the message as read", "Compares the StoreVersionManager's internal state with the content on the file-system\nof the rootDir provided at construction time.\n\nTODO: If the StoreVersionManager supports non-RO stores in the future,\nwe should move some of the ReadOnlyUtils functions below to another Utils class.", "Login for a specific authentication, creating a specific token if given.\n\n@param token token to use\n@param authentication authentication to assign to token\n@return token", "Use this API to update nsip6.", "Add a dependency task item for this model.\n\n@param dependency the dependency task item.\n@return key to be used as parameter to taskResult(string) method to retrieve result the task item", "Type-safe wrapper around setVariable which sets only one framed vertex." ]
public int removeChildObjectsByName(final String name) { int removed = 0; if (null != name && !name.isEmpty()) { removed = removeChildObjectsByNameImpl(name); } return removed; }
[ "Removes any child object that has the given name by performing\ncase-sensitive search.\n\n@param name name of scene object to be removed.\n\n@return number of removed objects, 0 if none was found." ]
[ "Send a master changed announcement to all registered master listeners.\n\n@param update the message announcing the new tempo master", "Registers Jersey HeaderDelegateProviders for the specified TinyTypes.\n\n@param head a TinyType\n@param tail other TinyTypes\n@throws IllegalArgumentException when a non-TinyType is given", "Use this API to delete ntpserver resources of given names.", "This method allows a pre-existing resource calendar to be attached to a\nresource.\n\n@param calendar resource calendar", "Term prefix.\n\n@param term\nthe term\n@return the string", "Returns the accrued interest of the bond for a given time.\n\n@param time The time of interest as double.\n@param model The model under which the product is valued.\n@return The accrued interest.", "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.", "Parses coordinates into a Spatial4j point shape.", "Execute a CLI command. This can be any command that you might execute on\nthe CLI command line, including both server-side operations and local\ncommands such as 'cd' or 'cn'.\n\n@param cliCommand A CLI command.\n@return A result object that provides all information about the execution\nof the command." ]
public static Polygon calculateBounds(final MapfishMapContext context) { double rotation = context.getRootContext().getRotation(); ReferencedEnvelope env = context.getRootContext().toReferencedEnvelope(); Coordinate centre = env.centre(); AffineTransform rotateInstance = AffineTransform.getRotateInstance(rotation, centre.x, centre.y); double[] dstPts = new double[8]; double[] srcPts = { env.getMinX(), env.getMinY(), env.getMinX(), env.getMaxY(), env.getMaxX(), env.getMaxY(), env.getMaxX(), env.getMinY() }; rotateInstance.transform(srcPts, 0, dstPts, 0, 4); return new GeometryFactory().createPolygon(new Coordinate[]{ new Coordinate(dstPts[0], dstPts[1]), new Coordinate(dstPts[2], dstPts[3]), new Coordinate(dstPts[4], dstPts[5]), new Coordinate(dstPts[6], dstPts[7]), new Coordinate(dstPts[0], dstPts[1]) }); }
[ "Create a polygon that represents in world space the exact area that will be visible on the printed\nmap.\n\n@param context map context" ]
[ "Adds a single value to the data set and updates any\nstatistics that are calculated cumulatively.\n@param value The value to add.", "Resolve the server registry.\n\n@param mgmtVersion the mgmt version\n@param subsystems the subsystems\n@return the transformer registry", "Either a single file extension or a comma-separated list of extensions for which the language\nshall be registered.", "Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS strike", "Return all option names that not already have a value\nand is enabled", "Close tracks when the JVM shuts down.\n@return this", "Parses the input stream to read the header\n\n@param input data input to read from\n@return the parsed protocol header\n@throws IOException", "Use this API to delete sslcertkey.", "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" ]
protected Map<String, AbstractServer> createServices(ServerSetup[] config, Managers mgr) { Map<String, AbstractServer> srvc = new HashMap<>(); for (ServerSetup setup : config) { if (srvc.containsKey(setup.getProtocol())) { throw new IllegalArgumentException("Server '" + setup.getProtocol() + "' was found at least twice in the array"); } final String protocol = setup.getProtocol(); if (protocol.startsWith(ServerSetup.PROTOCOL_SMTP)) { srvc.put(protocol, new SmtpServer(setup, mgr)); } else if (protocol.startsWith(ServerSetup.PROTOCOL_POP3)) { srvc.put(protocol, new Pop3Server(setup, mgr)); } else if (protocol.startsWith(ServerSetup.PROTOCOL_IMAP)) { srvc.put(protocol, new ImapServer(setup, mgr)); } } return srvc; }
[ "Create the required services according to the server setup\n\n@param config Service configuration\n@return Services map" ]
[ "Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data", "Parses a String email address to an IMAP address string.", "Factory method that returns an Identity object created from a serializated representation.\n\n@param anArray The serialized representation\n@return The identity\n@see {@link #serialize}.\n@deprecated", "Extract data for a single resource.\n\n@param row Synchro resource data", "Removes columns from the matrix.\n\n@param A Matrix. Modified\n@param col0 First column\n@param col1 Last column, inclusive.", "Use this API to fetch clusternodegroup_nslimitidentifier_binding resources of given name .", "Return primary key values of given Identity object.\n\n@param cld\n@param oid\n@return Object[]\n@throws PersistenceBrokerException", "Adds a member to this group with the specified role.\n@param user the member to be added to this group.\n@param role the role of the user in this group. Can be null to assign the default role.\n@return info about the new group membership.", "Controls whether we are currently staying in sync with the tempo master. Will only be meaningful if we are\nsending status packets.\n\n@param sync if {@code true}, our status packets will be tempo and beat aligned with the tempo master" ]
private Class[] getInterfaces(Class clazz) { Class superClazz = clazz; Class[] interfaces = clazz.getInterfaces(); // clazz can be an interface itself and when getInterfaces() // is called on an interface it returns only the extending // interfaces, not the interface itself. if (clazz.isInterface()) { Class[] tempInterfaces = new Class[interfaces.length + 1]; tempInterfaces[0] = clazz; System.arraycopy(interfaces, 0, tempInterfaces, 1, interfaces.length); interfaces = tempInterfaces; } // add all interfaces implemented by superclasses to the interfaces array while ((superClazz = superClazz.getSuperclass()) != null) { Class[] superInterfaces = superClazz.getInterfaces(); Class[] combInterfaces = new Class[interfaces.length + superInterfaces.length]; System.arraycopy(interfaces, 0, combInterfaces, 0, interfaces.length); System.arraycopy(superInterfaces, 0, combInterfaces, interfaces.length, superInterfaces.length); interfaces = combInterfaces; } /** * Must remove duplicate interfaces before calling Proxy.getProxyClass(). * Duplicates can occur if a subclass re-declares that it implements * the same interface as one of its ancestor classes. **/ HashMap unique = new HashMap(); for (int i = 0; i < interfaces.length; i++) { unique.put(interfaces[i].getName(), interfaces[i]); } /* Add the OJBProxy interface as well */ unique.put(OJBProxy.class.getName(), OJBProxy.class); interfaces = (Class[])unique.values().toArray(new Class[unique.size()]); return interfaces; }
[ "Get interfaces implemented by clazz\n\n@param clazz\n@return" ]
[ "Creates a ProjectCalendar instance from the Asta data.\n\n@param calendarRow basic calendar data\n@param workPatternMap work pattern map\n@param workPatternAssignmentMap work pattern assignment map\n@param exceptionAssignmentMap exception assignment map\n@param timeEntryMap time entry map\n@param exceptionTypeMap exception type map", "Creates a Bytes object by copying the data of the given ByteBuffer.\n\n@param bb Data will be read from this ByteBuffer in such a way that its position is not\nchanged.", "Use this API to update vlan.", "Set the values of all the knots.\nThis version does not require the \"extra\" knots at -1 and 256\n@param x the knot positions\n@param rgb the knot colors\n@param types the knot types", "Prints the plan to a file.\n\n@param outputDirName\n@param plan", "Updates the properties of a tag. Only the fields provided in the `data`\nblock will be updated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated tag record.\n\n@param tag The tag to update.\n@return Request object", "defines the KEY in the parent report parameters map where to get the subreport parameters map.\n@param path where to get the parameter map for the subrerpot.\n@return", "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.", "Query for an object in the database which matches the id argument." ]
public Organization getModuleOrganization(final String moduleName, final String moduleVersion) throws GrapesCommunicationException { final Client client = getClient(); final WebResource resource = client.resource(serverURL).path(RequestUtils.getModuleOrganizationPath(moduleName, moduleVersion)); final ClientResponse response = resource .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); client.destroy(); if(ClientResponse.Status.OK.getStatusCode() != response.getStatus()){ final String message = "Failed to get module's organization"; if(LOG.isErrorEnabled()) { LOG.error(String.format(HTTP_STATUS_TEMPLATE_MSG, message, response.getStatus())); } throw new GrapesCommunicationException(message, response.getStatus()); } return response.getEntity(Organization.class); }
[ "Returns the organization of a given module\n\n@return Organization" ]
[ "Extract all operations and attributes from the given object that have\nbeen annotated with the Jmx annotation. Operations are all methods that\nare marked with the JmxOperation annotation.\n\n@param object The object to process\n@return An array of operations taken from the object", "Write a standard CoNLL format output file.\n\n@param doc The document: A List of CoreLabel\n@param out Where to send the answers to", "Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value.", "Returns the number of history entries for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param searchFilter unused\n@return number of history entries", "Make superclasses method protected??", "Read relationship data from a PEP file.", "Use this API to delete nsacl6 resources of given names.", "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", "Determine whether or not a given serializedr is \"AVRO\" based\n\n@param serializerName\n@return" ]
public static List<String> getValueList(List<String> valuePairs, String delim) { List<String> valueList = Lists.newArrayList(); for(String valuePair: valuePairs) { String[] value = valuePair.split(delim, 2); if(value.length != 2) throw new VoldemortException("Invalid argument pair: " + valuePair); valueList.add(value[0]); valueList.add(value[1]); } return valueList; }
[ "Utility function that gives list of values from list of value-pair\nstrings.\n\n@param valuePairs List of value-pair strings\n@param delim Delimiter that separates the value pair\n@returns The list of values; empty if no value-pair is present, The even\nelements are the first ones of the value pair, and the odd\nelements are the second ones. For example, if the list of\nvalue-pair is [\"cluster.xml=file1\", \"stores.xml=file2\"], and the\npair delimiter is '=', we will then have the list of values in\nreturn: [\"cluster.xml\", \"file1\", \"stores.xml\", \"file2\"]." ]
[ "Classify stdin by senteces seperated by blank line\n@param readerWriter\n@return\n@throws IOException", "Populate time ranges.\n\n@param ranges time ranges from a Synchro table\n@param container time range container", "Create a temporary directory under a given workspace", "Get the present keys of all entries with a given type, checking hereby if assignable.\n\n@param type The attribute type, not null.\n@return all present keys of attributes being assignable to the type, never null.", "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", "Retrieve and validate vector clock value from the REST request.\n\"X_VOLD_VECTOR_CLOCK\" is the vector clock header.\n\n@return true if present, false if missing", "fetch correct array index if index is less than 0\n\nArrayNode will convert all negative integers into 0...\n\n@param index wanted index\n@return {@link Integer} new index", "Update the default time unit for work based on data read from the file.\n\n@param column column data", "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" ]
public static DMatrixSparseCSC diag(double... values ) { int N = values.length; return diag(new DMatrixSparseCSC(N,N,N),values,0,N); }
[ "Returns a diagonal matrix with the specified diagonal elements.\n@param values values of diagonal elements\n@return A diagonal matrix" ]
[ "Validate arguments and state.", "This method is called to alert project listeners to the fact that\na task has been read from a project file.\n\n@param task task instance", "Executes the sequence of operations", "Transform the operation into something the proxy controller understands.\n\n@param identity the server identity\n@return the transformed operation", "Append Join for SQL92 Syntax without parentheses", "LRN cross-channel forward computation. Double parameters cast to tensor data type", "Returns the service id with the propertype.\n\n@param serviceReference\n@return long value for the service id", "Creates the main component of the editor with all sub-components.\n@return the completely filled main component of the editor.\n@throws IOException thrown if setting the table's content data source fails.\n@throws CmsException thrown if setting the table's content data source fails.", "Hashes a path, if the path points to a directory then hashes the contents recursively.\n@param messageDigest the digest used to hash.\n@param path the file/directory we want to hash.\n@return the resulting hash.\n@throws IOException" ]
public void writeTo(File file) throws IOException { FileChannel channel = new FileOutputStream(file).getChannel(); try { writeTo(channel); } finally { channel.close(); } }
[ "Dump the buffer contents to a file\n@param file\n@throws IOException" ]
[ "This method extracts data for a single calendar from an MSPDI file.\n\n@param calendar Calendar data\n@param map Map of calendar UIDs to names\n@param baseCalendars list of base calendars", "Returns a new iterator filtering any null references.\n\n@param unfiltered\nthe unfiltered iterator. May not be <code>null</code>.\n@return an unmodifiable iterator containing all elements of the original iterator without any <code>null</code>\nreferences. Never <code>null</code>.", "Returns the Class object of the Event implementation.", "This method is used to finalize the configuration\nafter the configuration items have been set.", "Reads the table data from an input stream and breaks\nit down into rows.\n\n@param is input stream", "Zeros an inner rectangle inside the matrix.\n\n@param A Matrix that is to be modified.\n@param row0 Start row.\n@param row1 Stop row+1.\n@param col0 Start column.\n@param col1 Stop column+1.", "Get unique values form the array.\n\n@param values Array of values.\n@return Unique values.", "Split an artifact gavc to get the groupId\n@param gavc\n@return String", "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" ]
@Nonnull public static Map<String, Integer> parseForcedGroups(@Nonnull final HttpServletRequest request) { final String forceGroupsList = getForceGroupsStringFromRequest(request); return parseForceGroupsList(forceGroupsList); }
[ "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" ]
[ "Creates a new child folder inside this folder.\n\n@param name the new folder's name.\n@return the created folder's info.", "Synchronize the required files to a slave HC from the master DC if this is required.\n@param fileRepository the HostFileRepository of the HC.\n@param contentRepository the ContentRepository of the HC.\n@param backup inidcates if this is a DC backup HC.\n@param oldHash the hash of the deployment to be replaced.\n@return true if the content should be pulled by the slave HC - false otherwise.", "Use this API to fetch appfwprofile_xmlvalidationurl_binding resources of given name .", "Serialize a content into a targeted file, checking that the parent directory exists.\n\n@param folder File\n@param content String\n@param fileName String", "Returns all values that can be selected in the widget.\n@param cms the current CMS object\n@param rootPath the root path to the currently edited xml file (sitemap config)\n@param allRemoved flag, indicating if all inheritedly available formatters should be disabled\n@return all values that can be selected in the widget.", "Adds a parameter to the argument list if the given integer is non-null.\nIf the value is null, then the argument list remains unchanged.", "Writes the body of this request to an HttpURLConnection.\n\n<p>Subclasses overriding this method must remember to close the connection's OutputStream after writing.</p>\n\n@param connection the connection to which the body should be written.\n@param listener an optional listener for monitoring the write progress.\n@throws BoxAPIException if an error occurs while writing to the connection.", "Creates a ClassNode containing the wrapper of a ClassNode\nof primitive type. Any ClassNode representing a primitive\ntype should be created using the predefined types used in\nclass. The method will check the parameter for known\nreferences of ClassNode representing a primitive type. If\nReference is found, then a ClassNode will be contained that\nrepresents the wrapper class. For example for boolean, the\nwrapper class is java.lang.Boolean.\n\nIf the parameter is no primitive type, the redirected\nClassNode will be returned\n\n@see #make(Class)\n@see #make(String)\n@param cn the ClassNode containing a possible primitive type", "Recycles the Renderer getting it from the tag associated to the renderer root view. This view\nis not used with RecyclerView widget.\n\n@param convertView that contains the tag.\n@param content to be updated in the recycled renderer.\n@return a recycled renderer." ]
public static base_response Shutdown(nitro_service client, shutdown resource) throws Exception { shutdown Shutdownresource = new shutdown(); return Shutdownresource.perform_operation(client); }
[ "Use this API to Shutdown shutdown." ]
[ "Performs the update to the persistent configuration model. This default implementation simply removes\nthe targeted resource.\n\n@param context the operation context\n@param operation the operation\n@throws OperationFailedException if there is a problem updating the model", "Queues a job for execution in specified time.\n\n@param job the job.\n@param millis execute the job in this time.", "Revert all the working copy changes.", "Stops the scavenger.", "Implements get by delegating to getAll.", "Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is\nunique. Will create a transaction on the given entity manager.", "Create a new instance of a single input function from an operator character\n@param op Which operation\n@param input Input variable\n@return Resulting operation", "Adds an audio source to the audio manager.\nAn audio source cannot be played unless it is\nadded to the audio manager. A source cannot be\nadded twice.\n@param audioSource audio source to add", "Set the weekdays at which the event should take place.\n@param weekDays the weekdays at which the event should take place." ]
public void init(LblTree t1, LblTree t2) { LabelDictionary ld = new LabelDictionary(); it1 = new InfoTree(t1, ld); it2 = new InfoTree(t2, ld); size1 = it1.getSize(); size2 = it2.getSize(); IJ = new int[Math.max(size1, size2)][Math.max(size1, size2)]; delta = new double[size1][size2]; deltaBit = new byte[size1][size2]; costV = new long[3][size1][size2]; costW = new long[3][size2]; // Calculate delta between every leaf in G (empty tree) and all the nodes in F. // Calculate it both sides: leafs of F and nodes of G & leafs of G and nodes of // F. int[] labels1 = it1.getInfoArray(POST2_LABEL); int[] labels2 = it2.getInfoArray(POST2_LABEL); int[] sizes1 = it1.getInfoArray(POST2_SIZE); int[] sizes2 = it2.getInfoArray(POST2_SIZE); for (int x = 0; x < sizes1.length; x++) { // for all nodes of initially left tree for (int y = 0; y < sizes2.length; y++) { // for all nodes of initially right tree // This is an attempt for distances of single-node subtree and anything alse // The differences between pairs of labels are stored if (labels1[x] == labels2[y]) { deltaBit[x][y] = 0; } else { deltaBit[x][y] = 1; // if this set, the labels differ, cost of relabeling is set // to costMatch } if (sizes1[x] == 1 && sizes2[y] == 1) { // both nodes are leafs delta[x][y] = 0; } else { if (sizes1[x] == 1) { delta[x][y] = sizes2[y] - 1; } if (sizes2[y] == 1) { delta[x][y] = sizes1[x] - 1; } } } } }
[ "Initialization method.\n\n@param t1\n@param t2" ]
[ "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", "Calculate the file to compile a jasper report template to.\n\n@param configuration the configuration for the current app.\n@param jasperFileXml the jasper report template in xml format.\n@param extension the extension of the compiled report template.\n@param logger the logger to log errors to if an occur.", "This method retrieves a string of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required string data", "Features are only cacheable when not converted lazily as lazy features are incomplete, it would put detached\nobjects in the cache.\n\n@return true when features are not converted lazily", "Stop a managed server.", "Use the universal project reader to open the file.\nThrow an exception if we can't determine the file type.\n\n@param inputFile file name\n@return ProjectFile instance", "On host controller reload, remove a not running server registered in the process controller declared as stopping.", "Returns the foreignkey to the specified table.\n\n@param name The name of the foreignkey\n@param tableName The name of the referenced table\n@return The foreignkey def or <code>null</code> if it does not exist", "adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported" ]
public static gslbsite[] get(nitro_service service, options option) throws Exception{ gslbsite obj = new gslbsite(); gslbsite[] response = (gslbsite[])obj.get_resources(service,option); return response; }
[ "Use this API to fetch all the gslbsite resources that are configured on netscaler." ]
[ "For each node, checks if the store exists and then verifies that the remote schema\nmatches the new one. If the remote store doesn't exist, it creates it.", "Use this API to fetch statistics of nsacl6_stats resource of given name .", "Generate a string with all selected checkboxes separated with ','.\n\n@return a string with all selected checkboxes", "Before cluster management operations, i.e. remember and disable quota\nenforcement settings", "Seeks forward or backwards to a particular season based on the current date\n\n@param seasonString The season to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek", "Generates a torque schema for the model.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"", "Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque", "Return the list of module that uses the targeted artifact\n\n@param gavc String\n@param filters FiltersHolder\n@return List<DbModule>", "Returns a new instance of the class with the given qualified name using the constructor with\nthe specified signature.\n\n@param className The qualified name of the class to instantiate\n@param types The parameter types\n@param args The arguments\n@return The instance" ]
public <T> T decodeSignedRequest(String signedRequest, Class<T> type) throws SignedRequestException { String[] split = signedRequest.split("\\."); String encodedSignature = split[0]; String payload = split[1]; String decoded = base64DecodeToString(payload); byte[] signature = base64DecodeToBytes(encodedSignature); try { T data = objectMapper.readValue(decoded, type); String algorithm = objectMapper.readTree(decoded).get("algorithm").textValue(); if (algorithm == null || !algorithm.equals("HMAC-SHA256")) { throw new SignedRequestException("Unknown encryption algorithm: " + algorithm); } byte[] expectedSignature = encrypt(payload, secret); if (!Arrays.equals(expectedSignature, signature)) { throw new SignedRequestException("Invalid signature."); } return data; } catch (IOException e) { throw new SignedRequestException("Error parsing payload.", e); } }
[ "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" ]
[ "Creates metadata on this file in the specified template type.\n\n@param typeName the metadata template type name.\n@param metadata the new metadata values.\n@return the metadata returned from the server.", "Build data model for serialization.", "Convert an Object to a Date, without an Exception", "Calculate start dates for a monthly absolute recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Fetch the outermost Hashmap as a TwoDHashMap.\n\n@param firstKey\nfirst key\n@return the the innermost hashmap", "Find the latest task finish date. We treat this as the\nfinish date for the project.\n\n@return finish date", "Add the dependencies if the deployment contains a service activator loader entry.\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException", "Return a logger associated with a particular class name.", "Find and return the appropriate getter method for field.\n\n@return Get method or null (or throws IllegalArgumentException) if none found." ]
public PlaybackState getFurthestPlaybackState() { PlaybackState result = null; for (PlaybackState state : playbackStateMap.values()) { if (result == null || (!result.playing && state.playing) || (result.position < state.position) && (state.playing || !result.playing)) { result = state; } } return result; }
[ "Look up the playback state that has reached furthest in the track, but give playing players priority over stopped players.\nThis is used to choose the scroll center when auto-scrolling is active.\n\n@return the playback state, if any, with the highest playing {@link PlaybackState#position} value" ]
[ "Command line method to walk the directories provided on the command line\nand print out their contents\n\n@param args Directory names", "Read FTS file data from the configured source and return a populated ProjectFile instance.\n\n@return ProjectFile instance", "Validates this string is a valid address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws AddressStringException", "Releases a database connection, and cleans up any resources\nassociated with that connection.", "Returns true if super class of the parameter exists and is abstract and package private. In such case we want to omit such method.\n\nSee WELD-2507 and Oracle issue - https://bugs.java.com/view_bug.do?bug_id=6342411\n\n@return true if the super class exists and is abstract and package private", "Send JSON representation of given data object to all connections of a user\n@param data the data object\n@param username the username", "Creates a new deployment for the file. If the file is a directory the content will be deployed exploded using\nthe file system location.\n\n@param content the file containing the content\n\n@return the deployment", "Wraps a StatisticsMatrix around 'm'. Does NOT create a copy of 'm' but saves a reference\nto it.", "Signal that all threads have run to completion, and the multithreaded\nenvironment is over.\n@param check The name of the thread group passed to startThreads()" ]
public static synchronized void register(final String serviceName, final Callable<Class< ? >> factory) { if ( serviceName == null ) { throw new IllegalArgumentException( "serviceName cannot be null" ); } if ( factory != null ) { if ( factories == null ) { factories = new HashMap<String, List<Callable<Class< ? >>>>(); } List<Callable<Class< ? >>> l = factories.get( serviceName ); if ( l == null ) { l = new ArrayList<Callable<Class< ? >>>(); factories.put( serviceName, l ); } l.add( factory ); } }
[ "Adds the given service provider factory to the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>" ]
[ "Generate the next permutation and return a list containing\nthe elements in the appropriate order.\n@see #nextPermutationAsList(java.util.List)\n@see #nextPermutationAsArray()\n@return The next permutation as a list.", "all objects in list1 that are not in list2\n\n@param <T>\n@param list1\nFirst collection\n@param list2\nSecond collection\n@return The collection difference list1 - list2", "Compute singular values and U and V at the same time", "Initialize new instance\n@param instance\n@param logger\n@param auditor", "Reset a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked", "Use this API to enable Interface of given name.", "Send an announcement packet so the other devices see us as being part of the DJ Link network and send us\nupdates.", "Returns the currently scheduled job description identified by the given id.\n\n@param id the job id\n\n@return a job or <code>null</code> if not found", "Creates a new remote proxy controller using an existing channel.\n\n@param channelAssociation the channel association\n@param pathAddress the address within the model of the created proxy controller\n@param addressTranslator the translator to use translating the address for the remote proxy\n@return the proxy controller\n\n@deprecated only present for test case use" ]
private static Document getProjection(List<String> fieldNames) { Document projection = new Document(); for ( String column : fieldNames ) { projection.put( column, 1 ); } return projection; }
[ "Returns a projection object for specifying the fields to retrieve during a specific find operation." ]
[ "Searches for descriptions of integer sequences and array ranges that have a colon character in them\n\nExamples of integer sequences:\n1:6\n2:4:20\n:\n\nExamples of array range\n2:\n2:4:", "Request a database sends a list of UUIDs.\n\n@param count The count of UUIDs.", "returns the values of the orientation tag", "Generates the routing Java source code", "Restore backup data\n\n@param fileData - json file with restore data\n@return\n@throws Exception", "If a given x is into an interval of the partition, this method returns the reference point of the corresponding interval.\nIf the given x is not contained in any interval of the partition, this method returns x.\n\n@param x The point of interest.\n@return The discretized value.", "Initializes the Stitch SDK so that app clients can be created.\n\n@param context An Android context value.", "Returns the configured fields of the current field configuration.\n\n@return the configured fields of the current field configuration", "Return a logger associated with a particular class name." ]
public void synchTransaction(SimpleFeatureStore featureStore) { // check if transaction is active, otherwise do nothing (auto-commit mode) if (TransactionSynchronizationManager.isActualTransactionActive()) { DataAccess<SimpleFeatureType, SimpleFeature> dataStore = featureStore.getDataStore(); if (!transactions.containsKey(dataStore)) { Transaction transaction = null; if (dataStore instanceof JDBCDataStore) { JDBCDataStore jdbcDataStore = (JDBCDataStore) dataStore; transaction = jdbcDataStore.buildTransaction(DataSourceUtils .getConnection(jdbcDataStore.getDataSource())); } else { transaction = new DefaultTransaction(); } transactions.put(dataStore, transaction); } featureStore.setTransaction(transactions.get(dataStore)); } }
[ "Synchronize the geotools transaction with the platform transaction, if such a transaction is active.\n\n@param featureStore\n@param dataSource" ]
[ "Throws an IllegalArgumentException when the given value is not true.\n@param value the value to assert if true\n@param message the message to display if the value is false\n@return the value", "Set the String-representation of size.\n\nLike: Square, Thumbnail, Small, Medium, Large, Original.\n\n@param label", "Painter the tile, by building a URL where the image can be found.\n\n@param tile\nMust be an instance of {@link InternalTile}, and must have a non-null {@link RasterUrlBuilder}.\n@return Returns a {@link InternalTile}.", "Pop the record number from the front of the list, and parse it to ensure that\nit is a valid integer.\n\n@param list MPX record", "Empirical data from 3.x, actual =40", "Shutdown task scheduler.", "Recursively sort the supplied child tasks.\n\n@param container child tasks", "True if deleted, false if not found.", "Create a collection object of the given collection type. If none has been given,\nOJB uses RemovalAwareList, RemovalAwareSet, or RemovalAwareCollection depending\non the field type.\n\n@param desc The collection descriptor\n@param collectionClass The collection class specified in the collection-descriptor\n@return The collection object" ]
public void put(final K key, V value) { ManagedReference<V> ref = new ManagedReference<V>(bundle, value) { @Override public void finalizeReference() { super.finalizeReference(); internalMap.remove(key, get()); } }; internalMap.put(key, ref); }
[ "Sets a new value for a given key. an older value is overwritten.\n@param key a non null key\n@param value the new value" ]
[ "Convolve with a 2D kernel.\n@param kernel the kernel\n@param inPixels the input pixels\n@param outPixels the output pixels\n@param width the width\n@param height the height\n@param alpha include alpha channel\n@param edgeAction what to do at the edges", "Sets the elements of this vector to uniformly distributed random values\nin a specified range, using a supplied random number generator.\n\n@param lower\nlower random value (inclusive)\n@param upper\nupper random value (exclusive)\n@param generator\nrandom number generator", "given the groupName, it returns the groupId\n\n@param groupName name of group\n@return ID of group", "Returns true if the addon depends on reporting.", "Registers a new user with the given email and password.\n\n@param email the email to register with. This will be the username used during log in.\n@param password the password to associated with the email. The password must be between\n6 and 128 characters long.\n@return A {@link Task} that completes when registration completes/fails.", "Sets a parameter for the creator.", "Generic version of getting value by key from the JobContext of current thread\n@param key the key\n@param clz the val class\n@param <T> the val type\n@return the value", "Use this API to add snmpmanager.", "required for rest assured base URI configuration." ]
public List<Message> requestArtistMenuFrom(final SlotReference slotReference, final int sortOrder) throws Exception { ConnectionManager.ClientTask<List<Message>> task = new ConnectionManager.ClientTask<List<Message>>() { @Override public List<Message> useClient(Client client) throws Exception { if (client.tryLockingForMenuOperations(MetadataFinder.MENU_TIMEOUT, TimeUnit.SECONDS)) { try { logger.debug("Requesting Artist menu."); Message response = client.menuRequest(Message.KnownType.ARTIST_MENU_REQ, Message.MenuIdentifier.MAIN_MENU, slotReference.slot, new NumberField(sortOrder)); return client.renderMenuItems(Message.MenuIdentifier.MAIN_MENU, slotReference.slot, CdjStatus.TrackType.REKORDBOX, response); } finally { client.unlockForMenuOperations(); } } else { throw new TimeoutException("Unable to lock player for menu operations."); } } }; return ConnectionManager.getInstance().invokeWithClientSession(slotReference.player, task, "requesting artist menu"); }
[ "Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the artist menu\n\n@throws Exception if there is a problem obtaining the menu" ]
[ "Remove a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@return the builder", "Check if the gravity and orientation are not in conflict one with other.\n@param gravity\n@param orientation\n@return true if orientation and gravity can be applied together, false - otherwise", "Throws an IllegalArgumentException when the given value is not true.\n@param value the value to assert if true\n@param message the message to display if the value is false\n@return the value", "Use this API to apply nspbr6 resources.", "Compare the controlDOM and testDOM and save and return the differences in a list.\n\n@return list with differences", "Get a boolean value from the values or null.\n\n@param key the look up key of the value", "Deploys application reading resources from specified classpath location\n\n@param applicationName to configure in cluster\n@param classpathLocations where resources are read\n@throws IOException", "Checks the extents specifications and removes unnecessary entries.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "Used to retrieve the watermark for the item.\nIf the item does not have a watermark applied to it, a 404 Not Found will be returned by API.\n@param itemUrl url template for the item.\n@param fields the fields to retrieve.\n@return the watermark associated with the item." ]
protected void parseNegOp(TokenList tokens, Sequence sequence) { if( tokens.size == 0 ) return; TokenList.Token token = tokens.first; while( token != null ) { TokenList.Token next = token.next; escape: if( token.getSymbol() == Symbol.MINUS ) { if( token.previous != null && token.previous.getType() != Type.SYMBOL) break escape; if( token.previous != null && token.previous.getType() == Type.SYMBOL && (token.previous.symbol == Symbol.TRANSPOSE)) break escape; if( token.next == null || token.next.getType() == Type.SYMBOL) break escape; if( token.next.getType() != Type.VARIABLE ) throw new RuntimeException("Crap bug rethink this function"); // create the operation Operation.Info info = Operation.neg(token.next.getVariable(),functions.getManagerTemp()); // add the operation to the sequence sequence.addOperation(info.op); // update the token list TokenList.Token t = new TokenList.Token(info.output); tokens.insert(token.next,t); tokens.remove(token.next); tokens.remove(token); next = t; } token = next; } }
[ "Searches for cases where a minus sign means negative operator. That happens when there is a minus\nsign with a variable to its right and no variable to its left\n\nExample:\na = - b * c" ]
[ "Obtain plugin information\n\n@return", "Generates new individual particle radius based on min and max radius setting.\n\n@return new particle radius", "Main entry point to read criteria data.\n\n@param properties project properties\n@param data criteria data block\n@param dataOffset offset of the data start within the larger data block\n@param entryOffset offset of start node for walking the tree\n@param prompts optional list to hold prompts\n@param fields optional list of hold fields\n@param criteriaType optional array representing criteria types\n@return first node of the criteria", "Returns the number of key-value mappings in this map for the third key.\n\n@param firstKey\nthe first key\n@param secondKey\nthe second key\n@return Returns the number of key-value mappings in this map for the third key.", "Button onClick listener.\n\n@param v", "Output the SQL type for a Java String.", "Validates operations against their description providers\n\n@param operations The operations to validate\n@throws IllegalArgumentException if any operation is not valid", "Create a new path address by appending more elements to the end of this address.\n\n@param additionalElements the elements to append\n@return the new path address", "Returns the secret key matching the specified identifier.\n\n@param input the input stream containing the keyring collection\n@param keyId the 4 bytes identifier of the key" ]
public boolean shouldIncrementVersionBasedOnResources(CmsObject cms) throws CmsException { if (m_checkpointTime == 0) { return true; } // adjust the site root, if necessary CmsObject cmsClone = adjustSiteRootIfNecessary(cms, this); // calculate the module resources List<CmsResource> moduleResources = calculateModuleResources(cmsClone, this); for (CmsResource resource : moduleResources) { try { List<CmsResource> resourcesToCheck = Lists.newArrayList(); resourcesToCheck.add(resource); if (resource.isFolder()) { resourcesToCheck.addAll(cms.readResources(resource, CmsResourceFilter.IGNORE_EXPIRATION, true)); } for (CmsResource resourceToCheck : resourcesToCheck) { if (resourceToCheck.getDateLastModified() > m_checkpointTime) { return true; } } } catch (CmsException e) { LOG.warn(e.getLocalizedMessage(), e); continue; } } return false; }
[ "Determines if the version should be incremented based on the module resources' modification dates.\n\n@param cms the CMS context\n@return true if the version number should be incremented\n\n@throws CmsException if something goes wrong" ]
[ "Use this API to fetch servicegroup_lbmonitor_binding resources of given name .", "Examines the list of variables for any unknown variables and throws an exception if one is found", "Sets the provided metadata on the folder, overwriting any existing metadata keys already present.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server.", "Returns the latest change events for a given namespace.\n\n@param namespace the namespace to get events for.\n@return the latest change events for a given namespace.", "Initialize the container for the current application deployment\n\n@param deploymentManager\n@param deploymentServices", "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", "Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of the operation performed.\n@throws Exception Nitro exception is thrown.", "Check from another ConcurrentGroupServerUpdatePolicy whose plans are meant to\nexecute once this policy's plans are successfully completed.\n\n@return <code>true</code> if the successor can proceed", "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" ]
public static <T, X> ObserverMethodImpl<T, X> create(EnhancedAnnotatedMethod<T, ? super X> method, RIBean<X> declaringBean, BeanManagerImpl manager, boolean isAsync) { if (declaringBean instanceof ExtensionBean) { return new ExtensionObserverMethodImpl<T, X>(method, declaringBean, manager, isAsync); } return new ObserverMethodImpl<T, X>(method, declaringBean, manager, isAsync); }
[ "Creates an observer\n\n@param method The observer method abstraction\n@param declaringBean The declaring bean\n@param manager The Bean manager\n@return An observer implementation built from the method abstraction" ]
[ "Register the entity as batch loadable, if enabled\n\nCopied from {@link org.hibernate.type.ManyToOneType#scheduleBatchLoadIfNeeded}", "Deals with the case where we have had to map a task ID to a new value.\n\n@param id task ID from database\n@return mapped task ID", "Maps an integer field ID to a field type.\n\n@param field field ID\n@return field type", "Determines the constraints relating to a task.\n\n@param row row data\n@param task Task instance", "Attachments are only structurally different if one step has an inline attachment\nand the other step either has no inline attachment or the inline attachment is\ndifferent.", "Deletes a redirect by id\n\n@param id redirect ID", "Split string of comma-delimited ints into an a int array\n\n@param str\n@return\n@throws IllegalArgumentException", "Populate the container, converting raw data into Java types.\n\n@param field custom field to which these values belong\n@param values raw value data\n@param descriptions raw description data", "Get an CollectionDescriptor by name BRJ\n@param name\n@return CollectionDescriptor or null" ]
private static void addVersionInfo(byte[] grid, int size, int version) { // TODO: Zint masks with 0x41 instead of 0x01; which is correct? https://sourceforge.net/p/zint/tickets/110/ long version_data = QR_ANNEX_D[version - 7]; for (int i = 0; i < 6; i++) { grid[((size - 11) * size) + i] += (version_data >> (i * 3)) & 0x01; grid[((size - 10) * size) + i] += (version_data >> ((i * 3) + 1)) & 0x01; grid[((size - 9) * size) + i] += (version_data >> ((i * 3) + 2)) & 0x01; grid[(i * size) + (size - 11)] += (version_data >> (i * 3)) & 0x01; grid[(i * size) + (size - 10)] += (version_data >> ((i * 3) + 1)) & 0x01; grid[(i * size) + (size - 9)] += (version_data >> ((i * 3) + 2)) & 0x01; } }
[ "Adds version information." ]
[ "If task completed success or failure from response.\n\n@param myResponse\nthe my response\n@return true, if successful", "Remove colProxy from list of pending collections and\nregister its contents with the transaction.", "Will scale the image down before processing for\nperformance enhancement and less memory usage\nsacrificing image quality.\n\n@param scaleInSample value greater than 1 will scale the image width/height, so 2 will getFromDiskCache you 1/4\nof the original size and 4 will getFromDiskCache you 1/16 of the original size - this just sets\nthe inSample size in {@link android.graphics.BitmapFactory.Options#inSampleSize } and\nbehaves exactly the same, so keep the value 2^n for least scaling artifacts", "Create a counter if one is not defined already, otherwise return the existing one.\n\n@param counterName unique name for the counter\n@param initialValue initial value for the counter\n@return a {@link StrongCounter}", "Rethrows platform specific OperationCanceledExceptions and unwraps OperationCanceledErrors. Does nothing for any other type of Throwable.", "Gets the status text from given session.\n\n@param lastActivity miliseconds since last activity\n@return status string", "Translates the Fluo row, column, and value set into the persistent format that is stored in\nAccumulo.\n\n<p>\nThe objects returned by this method are reused each time its called. So each time this is\ncalled it invalidates what was returned by previous calls to this method.\n\n@return A an array of Accumulo key values in correct sorted order.", "Return the discount factor within a given model context for a given maturity.\n@param model The model used as a context (not required for this class).\n@param maturity The maturity in terms of ACT/365 daycount form this curve reference date. Note that this parameter might get rescaled to a different time parameter.\n@see net.finmath.marketdata.model.curves.DiscountCurveInterface#getDiscountFactor(net.finmath.marketdata.model.AnalyticModelInterface, double)", "Calculate the units percent complete.\n\n@param row task data\n@return percent complete" ]
private void WebPageCloseOnClick(GVRViewSceneObject gvrWebViewSceneObject, GVRSceneObject gvrSceneObjectAnchor, String url) { final String urlFinal = url; webPagePlusUISceneObject = new GVRSceneObject(gvrContext); webPagePlusUISceneObject.getTransform().setPosition(webPagePlusUIPosition[0], webPagePlusUIPosition[1], webPagePlusUIPosition[2]); GVRScene mainScene = gvrContext.getMainScene(); Sensor webPageSensor = new Sensor(urlFinal, Sensor.Type.TOUCH, gvrWebViewSceneObject, true); final GVRSceneObject gvrSceneObjectAnchorFinal = gvrSceneObjectAnchor; final GVRSceneObject gvrWebViewSceneObjectFinal = gvrWebViewSceneObject; final GVRSceneObject webPagePlusUISceneObjectFinal = webPagePlusUISceneObject; webPagePlusUISceneObjectFinal.addChildObject(gvrWebViewSceneObjectFinal); gvrSceneObjectAnchorFinal.addChildObject(webPagePlusUISceneObjectFinal); webPageSensor.addISensorEvents(new ISensorEvents() { boolean uiObjectIsActive = false; boolean clickDown = true; @Override public void onSensorEvent(SensorEvent event) { if (event.isActive()) { clickDown = !clickDown; if (clickDown) { // Delete the WebView page gvrSceneObjectAnchorFinal.removeChildObject(webPagePlusUISceneObjectFinal); webPageActive = false; webPagePlusUISceneObject = null; webPageClosed = true; // Make sure click up doesn't open web page behind it } } } }); }
[ "Display web page, but no user interface - close" ]
[ "Add a EXISTS clause with a sub-query inside of parenthesis.\n\n<p>\n<b>NOTE:</b> The sub-query will be prepared at the same time that the outside query is.\n</p>", "This method is called to format a relation.\n\n@param relation relation instance\n@return formatted relation instance", "Begin building a url for this host with the specified image.", "Returns the WDTK datatype IRI for the property datatype as represented by\nthe given JSON datatype string.\n\n@param jsonDatatype\nthe JSON datatype string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known", "Updates a path table value for column columnName\n\n@param columnName name of the column to update\n@param newData new content to set\n@param path_id ID of the path to update", "Check that an array only contains elements that are not null.\n@param values, can't be null\n@return", "Process the requestJsonAttributes using the attributes and the MapfishParser and add all resulting\nvalues to this values object.\n\n@param template the template of the current request.\n@param attributes the attributes that will be used to add values to this values object\n@param requestJsonAttributes the json data for populating the attribute values", "Retrieves the value component of a criteria expression.\n\n@param field field type\n@param block block data\n@return field value", "Computes FPS average" ]
public String generateInitScript(EnvVars env) throws IOException, InterruptedException { StringBuilder initScript = new StringBuilder(); InputStream templateStream = getClass().getResourceAsStream("/initscripttemplate.gradle"); String templateAsString = IOUtils.toString(templateStream, Charsets.UTF_8.name()); File extractorJar = PluginDependencyHelper.getExtractorJar(env); FilePath dependencyDir = PluginDependencyHelper.getActualDependencyDirectory(extractorJar, rootPath); String absoluteDependencyDirPath = dependencyDir.getRemote(); absoluteDependencyDirPath = absoluteDependencyDirPath.replace("\\", "/"); String str = templateAsString.replace("${pluginLibDir}", absoluteDependencyDirPath); initScript.append(str); return initScript.toString(); }
[ "Generate the init script from the Artifactory URL.\n\n@return The generated script." ]
[ "Parse a string representation of a Boolean value.\nXER files sometimes have \"N\" and \"Y\" to indicate boolean\n\n@param value string representation\n@return Boolean value", "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", "Modify a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder", "Use this API to fetch authenticationradiusaction resource of given name .", "Checks if provided class package is on the exclude list\n\n@param classPackageName\nname of class package\n@return false if class package is on the {@link #excludePackages} list", "Deletes a vertex from this list.", "Notifies that multiple header items are removed.\n\n@param positionStart the position.\n@param itemCount the item count.", "Method to create a new proxy that wraps the bean instance.\n\n@param beanInstance the bean instance\n@return a new proxy object", "See also WELD-1454.\n\n@param ij\n@return the formatted string" ]
public Set<String> rangeByLexReverse(final LexRange lexRange) { return doWithJedis(new JedisCallable<Set<String>>() { @Override public Set<String> call(Jedis jedis) { if (lexRange.hasLimit()) { return jedis.zrevrangeByLex(getKey(), lexRange.fromReverse(), lexRange.toReverse(), lexRange.offset(), lexRange.count()); } else { return jedis.zrevrangeByLex(getKey(), lexRange.fromReverse(), lexRange.toReverse()); } } }); }
[ "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns all the elements in the sorted set with a value in the given range.\n@param lexRange\n@return the range of elements" ]
[ "Deletes the given directory.\n\n@param directory The directory to delete.", "Set the list of supported resolutions. Each resolution is specified in map units per pixel.\n\n@param resolutions\nresolutions\n@deprecated use {@link #setZoomLevels()}", "Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance", "Searches all descendant folders using a given query and query parameters.\n@param offset is the starting position.\n@param limit the maximum number of items to return. The default is 30 and the maximum is 200.\n@param bsp containing query and advanced search capabilities.\n@return a PartialCollection containing the search results.", "Obtains a Ethiopic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "retrieve a collection of type collectionClass matching the Query query\nif lazy = true return a CollectionProxy\n\n@param collectionClass\n@param query\n@param lazy\n@return ManageableCollection\n@throws PersistenceBrokerException", "Creates a random Hermitian matrix with elements from min to max value.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.", "Append the given char as a decimal HTML entity.\n\n@param out\nThe StringBuilder to write to.\n@param value\nThe character.", "Given a date represented by a Date instance, set the time\ncomponent of the date based on the hours and minutes of the\ntime supplied by the Date instance.\n\n@param date Date instance representing the date\n@param canonicalTime Date instance representing the time of day\n@return new Date instance with the required time set" ]
protected void markStatementsForInsertion( StatementDocument currentDocument, List<Statement> addStatements) { for (Statement statement : addStatements) { addStatement(statement, true); } for (StatementGroup sg : currentDocument.getStatementGroups()) { if (this.toKeep.containsKey(sg.getProperty())) { for (Statement statement : sg) { if (!this.toDelete.contains(statement.getStatementId())) { addStatement(statement, false); } } } } }
[ "Marks a given list of statements for insertion into the current document.\nInserted statements can have an id if they should update an existing\nstatement, or use an empty string as id if they should be added. The\nmethod removes duplicates and avoids unnecessary modifications by\nchecking the current content of the given document before marking\nstatements for being written.\n\n@param currentDocument\nthe document with the current statements\n@param addStatements\nthe list of new statements to be added" ]
[ "Get the int resource id with specified type definition\n@param context\n@param id String resource id\n@return int resource id", "2-D Integer array to float array.\n\n@param array Integer array.\n@return Float array.", "Presents the Cursor Settings to the User. Only works if scene is set.", "Registers annotations which will be considered as bean defining annotations.\n\nNOTE - If used along with {@code <trim/>} bean archives and/or with Weld configuration key\n{@code org.jboss.weld.bootstrap.vetoTypesWithoutBeanDefiningAnnotation}, these annotations will be ignored.\n\n@param annotations annotations which will be considered as Bean Defining Annotations.\n@return self", "Replies to this comment with another message.\n@param message the message for the reply.\n@return info about the newly created reply comment.", "Applies this patch to a JSON value.\n\n@param node the value to apply the patch to\n@return the patched JSON value\n@throws JsonPatchException failed to apply patch\n@throws NullPointerException input is null", "Adds tags to the If-Match header.\n\n@param tag the tag to add, may be null. This means the same as adding {@link Tag#ALL}\n@throws IllegalArgumentException if ALL is supplied more than once, or you add a null tag more than once.\n@return a new Conditionals object with the If-Match tag added.", "Random string from string array\n\n@param s Array\n@return String", "get string from post stream\n\n@param is\n@param encoding\n@return" ]
@SuppressWarnings("unused") public Phonenumber.PhoneNumber getPhoneNumber() { try { String iso = null; if (mSelectedCountry != null) { iso = mSelectedCountry.getIso(); } return mPhoneUtil.parse(mPhoneEdit.getText().toString(), iso); } catch (NumberParseException ignored) { return null; } }
[ "Get PhoneNumber object\n\n@return PhonenUmber | null on error" ]
[ "Sets the provided square matrix to be a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param A The matrix that is to be modified. Must be square. Modified.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.", "We will always try to gather as many results as possible and never throw an exception.\n\nTODO: Make MemberResponse hold an exception that we can populate if something bad happens so we always\nget to return something for a member in order to indicate a failure. Getting the result when there\nis an error should throw an exception.\n\n@param execSvc\n@param members\n@param callable\n@param maxWaitTime - a value of 0 indicates forever\n@param unit\n@return", "Load the given metadata profile for the current thread.", "Return a list of the top 100 unique places clustered by a given placetype for a user.\n\n@param placeType\nUse Type-constants at {@link Place}\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null.\n@param placeId\nA Flickr Places ID. Optional, can be null.\n@param threshold\nThe minimum number of photos that a place type must have to be included. If the number of photos is lowered then the parent place type for\nthat place will be used. Optional, can be null.\n@param minUploadDate\nOptional, can be null.\n@param maxUploadDate\nOptional, can be null.\n@param minTakenDate\nOptional, can be null.\n@param maxTakenDate\nOptional, can be null.\n@return A PlacesList\n@throws FlickrException", "Convert this object to a json object.", "Write a calendar.\n\n@param record calendar instance\n@throws IOException", "Helper method to find Strings of form \"all digits\" and \"digits-comma-digits\"", "generate a message for loglevel WARN\n\n@param pObject the message Object", "generate a prepared DELETE-Statement for the Class\ndescribed by cld.\n@param cld the ClassDescriptor" ]
public int compareTo(WordLemmaTag wordLemmaTag) { int first = word().compareTo(wordLemmaTag.word()); if (first != 0) return first; int second = lemma().compareTo(wordLemmaTag.lemma()); if (second != 0) return second; else return tag().compareTo(wordLemmaTag.tag()); }
[ "Orders first by word, then by lemma, then by tag.\n\n@param wordLemmaTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)" ]
[ "Sanity check precondition for above setters", "Parse the string representation of a double.\n\n@param value string representation\n@return Java representation\n@throws ParseException", "Build the key for the TableAlias based on the path and the hints\n@param aPath\n@param hintClasses\n@return the key for the TableAlias", "updates the groupname in the table given the id\n\n@param newGroupName new group name\n@param id ID of group", "Use this API to fetch all the cachecontentgroup resources that are configured on netscaler.", "Register a new PerformanceMonitor with Spring if it does not already exist.\n\n@param beanName The name of the bean that this performance monitor is wrapped around\n@param registry The registry where all the spring beans are registered", "Retrieves a vertex attribute as a float array.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>float</i>\n@see #setFloatVec(String, FloatBuffer)\n@see #getFloatArray(String)", "True if a CharSequence only contains whitespace characters.\n\n@param self The CharSequence to check the characters in\n@return true If all characters are whitespace characters\n@see #isAllWhitespace(String)\n@since 1.8.2", "Polls from the URL provided.\n\n@param url the URL to poll from.\n@return the raw response." ]
private void readResources() { for (MapRow row : getTable("RTAB")) { Resource resource = m_projectFile.addResource(); setFields(RESOURCE_FIELDS, row, resource); m_eventManager.fireResourceReadEvent(resource); // TODO: Correctly handle calendar } }
[ "Read resource data from a PEP file." ]
[ "Use this API to add ntpserver.", "This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance", "Returns the plugins classpath elements.", "any possible bean invocations from other ADV observers", "Obtain the destination hostname for a source host\n\n@param hostName\n@return", "This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.", "Creates a solver for symmetric positive definite matrices.\n\n@return A new solver for symmetric positive definite matrices.", "Close a transaction and do all the cleanup associated with it.", "Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return" ]
public static void compress(File dir, File zipFile) throws IOException { FileOutputStream fos = new FileOutputStream(zipFile); ZipOutputStream zos = new ZipOutputStream(fos); recursiveAddZip(dir, zos, dir); zos.finish(); zos.close(); }
[ "Compress a directory into a zip file\n\n@param dir Directory\n@param zipFile ZIP file to create\n@throws IOException I/O Error" ]
[ "Returns the index of the median of the three indexed chars.", "Input method, called by a Subscriber indicating its intent into receive notification about a given topic.\n\n@param sr DTO containing the info given by the protocol", "Use this API to update snmpuser.", "Executes a query. The query results will be added to the ExecutionResults using the\ngiven 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@return", "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", "Gets the invalid message.\n\n@param key the key\n@return the invalid message", "Create constant name.\n@param state STATE_UNCHANGED, STATE_CHANGED, STATE_NEW or STATE_DELETED.\n@return cconstanname as String", "Resolve the boot updates and register at the local HC.\n\n@param controller the model controller\n@param callback the completed callback\n@throws Exception for any error", "Use this API to fetch a dnsglobal_binding resource ." ]
public synchronized void releaseRebalancingPermit(int nodeId) { boolean removed = rebalancePermits.remove(nodeId); logger.info("Releasing rebalancing permit for node id " + nodeId + ", returned: " + removed); if(!removed) throw new VoldemortException(new IllegalStateException("Invalid state, must hold a " + "permit to release")); }
[ "Release the rebalancing permit for a particular node id\n\n@param nodeId The node id whose permit we want to release" ]
[ "Removes the given row.\n\n@param row the row to remove", "Returns the user defined field without its prefix.\n\n@param field the name of the user defined field\n@return the user defined field without the prefix, or null if the fields\ndoesn't apply to this control file.\n@since 1.1", "Use this API to fetch spilloverpolicy resource of given name .", "Zeros an inner rectangle inside the matrix.\n\n@param A Matrix that is to be modified.\n@param row0 Start row.\n@param row1 Stop row+1.\n@param col0 Start column.\n@param col1 Stop column+1.", "Returns the orthogonal U matrix.\n\n@param U If not null then the results will be stored here. Otherwise a new matrix will be created.\n@return The extracted Q matrix.", "Gets id of a property and creates the new one if necessary.\n\n@param txn transaction\n@param propertyName name of the property.\n@param allowCreate if set to true and if there is no property named as propertyName,\ncreate the new id for the propertyName.\n@return < 0 if there is no such property and create=false, else id of the property", "One of facade methods for operating the Shell.\n\nRun the obtained Shell with commandLoop().\n\n@see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List)\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param handlers Command handlers\n@return Shell that can be either further customized or run directly by calling commandLoop().", "Get the metadata of all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the track information reported by all current players, including any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the MetadataFinder is not running", "Are we running in Jetty with JMX enabled?" ]
public static UserStub getStubWithRandomParams(UserTypeVal userType) { // Java coerces the return type as a Tuple2 of Objects -- but it's declared as a Tuple2 of Doubles! // Oh the joys of type erasure. Tuple2<Double, Double> tuple = SocialNetworkUtilities.getRandomGeographicalLocation(); return new UserStub(userType, new Tuple2<>((Double) tuple._1(), (Double) tuple._2()), SocialNetworkUtilities.getRandomIsSecret()); }
[ "Get random stub matching this user type\n@param userType User type\n@return Random stub" ]
[ "Get the number of views, comments and favorites on a collection for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n(Required) The id (from the URL!) of the collection to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionStats.htm\"", "A fairly basic 5-way classifier, that notes digits, and upper\nand lower case, mixed, and non-alphanumeric.\n\n@param s String to find word shape of\n@return Its word shape: a 5 way classification", "Use this API to add dnsview.", "Gets the JsonObject representation of the Field Operation.\n@param fieldOperation represents the template update operation\n@return the json object", "Generate a schedule for the given start and end date.\n\n@param referenceDate The reference date (corresponds to \\( t = 0 \\).\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule", "Attempts exclusive acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success.", "Read the top level tasks from GanttProject.\n\n@param gpProject GanttProject project", "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", "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." ]
public static void recursiveAddZip(File parent, ZipOutputStream zout, File fileSource) throws IOException { File[] files = fileSource.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { recursiveAddZip(parent, zout, files[i]); continue; } byte[] buffer = new byte[1024]; FileInputStream fin = new FileInputStream(files[i]); ZipEntry zipEntry = new ZipEntry(files[i].getAbsolutePath() .replace(parent.getAbsolutePath(), "").substring(1)); //$NON-NLS-1$ zout.putNextEntry(zipEntry); int length; while ((length = fin.read(buffer)) > 0) { zout.write(buffer, 0, length); } zout.closeEntry(); fin.close(); } }
[ "Recursively add files to a ZipOutputStream\n\n@param parent Parent file\n@param zout ZipOutputStream to append\n@param fileSource The file source\n@throws IOException I/O Error" ]
[ "Send a media details response to all registered listeners.\n\n@param details the response that has just arrived", "get the getter method corresponding to given property", "copy all fields from the \"from\" object to the \"to\" object.\n\n@param from source object\n@param to from's clone\n@param fields fields to be populated\n@param accessible 'true' if all 'fields' have been made accessible during\ntraversal", "Authenticates the API connection by obtaining access and refresh tokens using the auth code that was obtained\nfrom the first half of OAuth.\n@param authCode the auth code obtained from the first half of the OAuth process.", "Get the value of the fist child element with the given name.\n\n@param element\nThe parent element\n@param name\nThe child element name\n@return The child element value or null", "Retrieves and validates the content length from the REST request.\n\n@return true if has content length", "Return all tenors for which data exists.\n\n@return The tenors in months.", "This ensures that we are able to use the default preference from JSDK, to check basically if we are in Android or Not\n@param preference\n@throws BackingStoreException", "Generates the context diagram for a single class" ]
private static JSONObject parseProperties(HashMap<String, String> properties) throws JSONException { if (properties != null) { JSONObject propertiesObject = new JSONObject(); for (String key : properties.keySet()) { String propertyValue = properties.get(key); /* * if(propertyValue.matches("true|false")) { * * propertiesObject.put(key, propertyValue.equals("true")); * * } else if(propertyValue.matches("[0-9]+")) { * * Integer value = Integer.parseInt(propertyValue); * propertiesObject.put(key, value); * * } else */ if (propertyValue.startsWith("{") && propertyValue.endsWith("}")) { propertiesObject.put(key, new JSONObject(propertyValue)); } else { propertiesObject.put(key, propertyValue.toString()); } } return propertiesObject; } return new JSONObject(); }
[ "Delivers the correct JSON Object for properties\n\n@param properties\n@throws org.json.JSONException" ]
[ "Calculate the highlight color. Saturate at 0xff to make sure that high values\ndon't result in aliasing.\n\n@param _Slice The Slice which will be highlighted.", "Restore backup data\n\n@param fileData - json file with restore data\n@return\n@throws Exception", "Writes this JAR to an output stream, and closes the stream.", "Updates the backing render texture. This method should not\nbe called when capturing is in progress.\n\n@param width The width of the backing texture in pixels.\n@param height The height of the backing texture in pixels.\n@param sampleCount The MSAA sample count.", "Return true if the expression is a constructor call on a class that matches the supplied.\n@param expression - the expression\n@param classNamePattern - the possible List of class names\n@return as described", "Updates the indices in the index buffer from a Java CharBuffer.\nAll of the entries of the input buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data CharBuffer containing the new values\n@throws IllegalArgumentException if char array is wrong size", "Removes the specified entry point\n\n@param controlPoint The entry point", "Perform all Cursor cleanup here.", "Layout children inside the layout container" ]
public void generateMapFile(File jarFile, String mapFileName, boolean mapClassMethods) throws XMLStreamException, IOException, ClassNotFoundException, IntrospectionException { m_responseList = new LinkedList<String>(); writeMapFile(mapFileName, jarFile, mapClassMethods); }
[ "Generate a map file from a jar file.\n\n@param jarFile jar file\n@param mapFileName map file name\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws XMLStreamException\n@throws IOException\n@throws ClassNotFoundException\n@throws IntrospectionException" ]
[ "Update database schema\n\n@param migrationPath path to migrations", "if any item in toCheck is present in collection\n@param <T>\n@param collection\n@param toCheck\n@return", "Make sure that the Identity objects of garbage collected cached\nobjects are removed too.", "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", "Finds the missing value. Seems to lose a degree of freedom, but it\ndoesn't. That degree of freedom is already lost by the sensor.", "Remove a variable in the top variables layer.", "Create a canonical represenation of the data type value. Defaults to the value converter.\n\n@since 2.9", "Store the char in the internal buffer", "Read a FastTrack file.\n\n@param file FastTrack file" ]
private void saveLocalization() { SortedProperties localization = new SortedProperties(); for (Object itemId : m_container.getItemIds()) { Item item = m_container.getItem(itemId); String key = item.getItemProperty(TableProperty.KEY).getValue().toString(); String value = item.getItemProperty(TableProperty.TRANSLATION).getValue().toString(); if (!(key.isEmpty() || value.isEmpty())) { localization.put(key, value); } } m_keyset.updateKeySet(m_localizations.get(m_locale).keySet(), localization.keySet()); m_localizations.put(m_locale, localization); }
[ "Saves the current translations from the container to the respective localization." ]
[ "Overloads the left shift operator to provide an easy way to append multiple\nobjects as string representations to a String.\n\n@param self a String\n@param value an Object\n@return a StringBuffer built from this string\n@since 1.0", "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.", "Read a text file resource into a single string\n\n@param context\nA non-null Android Context\n@param resourceId\nAn Android resource id\n@return The contents, or null on error.", "Magnitude of complex number.\n\n@param z Complex number.\n@return Magnitude of complex number.", "Load resource content from given path into variable with\ntype specified by `spec`.\n\n@param resourcePath the resource path\n@param spec {@link BeanSpec} specifies the return value type\n@return the resource content in a specified type or `null` if resource not found\n@throws UnexpectedException if return value type not supported", "If this node represents a bean property this method returns all annotations of its getter.\n\n@return A set of annotations of this nodes property getter or an empty set.", "The main method called from the command line.\n\n@param args the command line arguments", "Return true if c has a @hidden tag associated with it", "Sets the stream for a resource.\nThis function allows you to provide a stream that is already open to\nan existing resource. It will throw an exception if that resource\nalready has an open stream.\n@param s InputStream currently open stream to use for I/O." ]
public List<Method> getMethodsFromGroupIds(int[] groupIds, String[] filters) throws Exception { ArrayList<Method> methods = new ArrayList<Method>(); for (int groupId : groupIds) { methods.addAll(getMethodsFromGroupId(groupId, filters)); } return methods; }
[ "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" ]
[ "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.", "Given a read-only store name and a directory, swaps it in while returning\nthe directory path being swapped out\n\n@param storeName The name of the read-only store\n@param directory The directory being swapped in\n@return The directory path which was swapped out\n@throws VoldemortException", "Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Call this method to initialize the Fluo connection props\n\n@param conf Job configuration\n@param props Use {@link org.apache.fluo.api.config.FluoConfiguration} to set props\nprogrammatically", "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", "Runs through the log removing segments older than a certain age\n\n@throws IOException", "Indicate whether the given URI matches this template.\n@param uri the URI to match to\n@return {@code true} if it matches; {@code false} otherwise", "Write a resource.\n\n@param record resource instance\n@throws IOException", "Locate the no arg constructor for the class." ]
public static boolean isPropertyAllowed(Class defClass, String propertyName) { HashMap props = (HashMap)_properties.get(defClass); return (props == null ? true : props.containsKey(propertyName)); }
[ "Checks whether the property of the given name is allowed for the model element.\n\n@param defClass The class of the model element\n@param propertyName The name of the property\n@return <code>true</code> if the property is allowed for this type of model elements" ]
[ "Checks if class package match provided list of action packages\n\n@param classPackageName\nname of class package\n@return true if class package is on the {@link #actionPackages} list", "Creates the next permutation in the sequence.\n\n@return An array containing the permutation. The returned array is modified each time this function is called.", "Whether the given column is part of this key family or not.\n\n@return {@code true} if the given column is part of this key, {@code false} otherwise.", "Creates the event type.\n\n@param type the EventEnumType\n@return the event type", "Closes the server socket. No new clients are accepted afterwards.", "below is testing code", "Use this API to unset the properties of nsrpcnode resources.\nProperties that need to be unset are specified in args array.", "Modies the matrix to make sure that at least one element in each column has a value", "Sets the invalid values for the TextBox\n@param invalidValues\n@param isCaseSensitive\n@param invalidValueErrorMessage" ]
@SafeVarargs public static <T> Set<T> asSet(T... ts) { if ( ts == null ) { return null; } else if ( ts.length == 0 ) { return Collections.emptySet(); } else { Set<T> set = new HashSet<T>( getInitialCapacityFromExpectedSize( ts.length ) ); Collections.addAll( set, ts ); return Collections.unmodifiableSet( set ); } }
[ "Returns an unmodifiable set containing the given elements.\n\n@param ts the elements from which to create a set\n@param <T> the type of the element in the set\n@return an unmodifiable set containing the given elements or {@code null} in case the given element array is\n{@code null}." ]
[ "Obtain a connection asynchronously by queueing a request to obtain a connection in a separate thread.\n\nUse as follows:<p>\nFuture&lt;Connection&gt; result = pool.getAsyncConnection();<p>\n... do something else in your application here ...<p>\nConnection connection = result.get(); // get the connection<p>\n\n@return A Future task returning a connection.", "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", "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.", "Number of failed actions in scheduler", "Delete an object from the database.", "Returns the list of module dependencies regarding the provided filters\n\n@param moduleId String\n@param filters FiltersHolder\n@return List<Dependency>", "Send message to all connections tagged with all given tags\n@param message the message\n@param labels the tag labels", "Add a URL pattern to the routing table.\n\n@param urlPattern A regular expression\n@throws RouteAlreadyMappedException", "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" ]
public static base_response update(nitro_service client, gslbsite resource) throws Exception { gslbsite updateresource = new gslbsite(); updateresource.sitename = resource.sitename; updateresource.metricexchange = resource.metricexchange; updateresource.nwmetricexchange = resource.nwmetricexchange; updateresource.sessionexchange = resource.sessionexchange; updateresource.triggermonitor = resource.triggermonitor; return updateresource.update_resource(client); }
[ "Use this API to update gslbsite." ]
[ "Reads color table as 256 RGB integer values.\n\n@param ncolors int number of colors to read.\n@return int array containing 256 colors (packed ARGB with full alpha).", "Provides a RunAs client login context", "poll the response queue for response\n\n@param timeout timeout amount\n@param timeUnit timeUnit of timeout\n@return same result of BlockQueue.poll(long, TimeUnit)\n@throws InterruptedException", "Prepares the CmsObject for jumping to this favorite location, and returns the appropriate URL.\n\n@param cms the CmsObject to initialize for jumping to the favorite\n@return the link for the favorite location\n\n@throws CmsException if something goes wrong", "Attemps to delete all provided segments from a log and returns how many it was able to", "Given a list of store definitions, filters the list depending on the\nboolean\n\n@param storeDefs Complete list of store definitions\n@param isReadOnly Boolean indicating whether filter on read-only or not?\n@return List of filtered store definition", "Helper method for formatting connection termination messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@param terminationReason\nThe reason for terminating the connection\n@return A formatted message in the format:\n\"[&lt;connectionName&gt;] remote host[&lt;host&gt;] &lt;connectionReason&gt; - &lt;terminationReason&gt;\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG -\nterminated by remote host.", "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", "Inserts a vertex into this list before another specificed vertex." ]
protected void destroy() { ContextLogger.LOG.contextCleared(this); final BeanStore beanStore = getBeanStore(); if (beanStore == null) { throw ContextLogger.LOG.noBeanStoreAvailable(this); } for (BeanIdentifier id : beanStore) { destroyContextualInstance(beanStore.get(id)); } beanStore.clear(); }
[ "Destroys the context" ]
[ "The list of device types on which this application can run.", "Returns the AirMapView implementation as requested by the mapType argument. Use this method if\nyou need to request a specific AirMapView implementation that is not necessarily the preferred\ntype. For example, you can use it to explicit request a web-based map implementation.\n\n@param mapType Map type for the requested AirMapView implementation.\n@return An {@link AirMapViewBuilder} for the requested {@link AirMapViewTypes} mapType.", "Use this API to add systemuser resources.", "Use this API to fetch vrid_nsip6_binding resources of given name .", "Clear all overrides, reset repeat counts for a request path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception", "Execute a partitioned query using an index and a query selector.\n\nOnly available in partitioned databases. To verify a database is partitioned call\n{@link Database#info()} and check that {@link DbInfo.Props#getPartitioned()} returns\n{@code true}.\n\n<p>Example usage:</p>\n<pre>\n{@code\n// Query database partition 'Coppola'.\nQueryResult<Movie> movies = db.query(\"Coppola\", new QueryBuilder(and(\ngt(\"Movie_year\", 1960),\neq(\"Person_name\", \"Al Pacino\"))).\nfields(\"Movie_name\", \"Movie_year\").\nbuild(), Movie.class);\n}\n</pre>\n\n@param partitionKey Database partition to query.\n@param query String representation of a JSON object describing criteria used to\nselect documents.\n@param classOfT The class of Java objects to be returned in the {@code docs} field of\nresult.\n@param <T> The type of the Java object to be returned in the {@code docs} field of\nresult.\n@return A {@link QueryResult} object, containing the documents matching the query\nin the {@code docs} field.\n@see com.cloudant.client.api.Database#query(String, Class)", "Use this API to update cmpparameter.", "Apply a filter to the list of all tasks, and show the results.\n\n@param project project file\n@param filter filter", "Returns the Class object of the class specified in the OJB.properties\nfile for the \"PersistentFieldClass\" property.\n\n@return Class The Class object of the \"PersistentFieldClass\" class\nspecified in the OJB.properties file." ]
public void setup( int numSamples , int sampleSize ) { mean = new double[ sampleSize ]; A.reshape(numSamples,sampleSize,false); sampleIndex = 0; numComponents = -1; }
[ "Must be called before any other functions. Declares and sets up internal data structures.\n\n@param numSamples Number of samples that will be processed.\n@param sampleSize Number of elements in each sample." ]
[ "Remove a PropertyChangeListener for a specific property from this node.\nThis functionality has. Please note that the listener this does not remove\na listener that has been added without specifying the property it is\ninterested in.", "Use this API to fetch all the lbvserver resources that are configured on netscaler.", "Start with specifying the artifactId", "Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registry", "Use this API to update dospolicy resources.", "Sets the submatrix of W up give Y is already configured and if it is being cached or not.", "Indicates if the type is a simple Web Bean\n\n@param clazz The type to inspect\n@return True if simple Web Bean, false otherwise", "Use this API to unset the properties of sslparameter resource.\nProperties that need to be unset are specified in args array.", "Makes the scene object pickable by eyes. However, the object has to be touchable to process\nthe touch events.\n\n@param sceneObject" ]
public synchronized void withTransaction(Closure closure) throws SQLException { boolean savedCacheConnection = cacheConnection; cacheConnection = true; Connection connection = null; boolean savedAutoCommit = true; try { connection = createConnection(); savedAutoCommit = connection.getAutoCommit(); connection.setAutoCommit(false); callClosurePossiblyWithConnection(closure, connection); connection.commit(); } catch (SQLException e) { handleError(connection, e); throw e; } catch (RuntimeException e) { handleError(connection, e); throw e; } catch (Error e) { handleError(connection, e); throw e; } catch (Exception e) { handleError(connection, e); throw new SQLException("Unexpected exception during transaction", e); } finally { if (connection != null) { try { connection.setAutoCommit(savedAutoCommit); } catch (SQLException e) { LOG.finest("Caught exception resetting auto commit: " + e.getMessage() + " - continuing"); } } cacheConnection = false; closeResources(connection, null); cacheConnection = savedCacheConnection; if (dataSource != null && !cacheConnection) { useConnection = null; } } }
[ "Performs the closure within a transaction using a cached connection.\nIf the closure takes a single argument, it will be called\nwith the connection, otherwise it will be called with no arguments.\n\n@param closure the given closure\n@throws SQLException if a database error occurs" ]
[ "Saves the favorites.\n\n@param favorites the list of favorites to save\n@throws CmsException if something goes wrong", "Retrieves the column title for the given locale.\n\n@param locale required locale for the default column title\n@return column title", "Converts a vector from eigen space into sample space.\n\n@param eigenData Eigen space data.\n@return Sample space projection.", "Operations to do after all subthreads finished their work on index\n\n@param backend", "Merge the source skeleton with this one.\nThe result will be that this skeleton has all of its\noriginal bones and all the bones in the new skeleton.\n\n@param newSkel skeleton to merge with this one", "Convenience method for getting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field whose value to return.", "Tells you if the expression is the false expression, either literal or constant.\n@param expression\nexpression\n@return\nas described", "Perform the given work with a Jedis connection from the given pool.\nWraps any thrown checked exceptions in a RuntimeException.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work", "If there is a zero on the diagonal element, the off diagonal element needs pushed\noff so that all the algorithms assumptions are two and so that it can split the matrix." ]
public static String format(String pattern, Object... arguments) { String msg = pattern; if (arguments != null) { for (int index = 0; index < arguments.length; index++) { msg = msg.replaceAll("\\{" + (index + 1) + "\\}", String.valueOf(arguments[index])); } } return msg; }
[ "Format the message using the pattern and the arguments.\n\n@param pattern the pattern in the format of \"{1} this is a {2}\"\n@param arguments the arguments.\n@return the formatted result." ]
[ "Use this API to delete lbroute.", "Determine whether we should use the normal repaint process, or delegate that to another component that is\nhosting us in a soft-loaded manner to save memory.\n\n@param x the left edge of the region that we want to have redrawn\n@param y the top edge of the region that we want to have redrawn\n@param width the width of the region that we want to have redrawn\n@param height the height of the region that we want to have redrawn", "Returns the value for a given key from the database properties.\n\n@param key the property key\n\n@return the string value for a given key", "dispatch to gravity state", "The conditional expectation is calculated using a Monte-Carlo regression technique.\n\n@param exerciseTime The exercise time\n@param model The valuation model\n@return The condition expectation estimator\n@throws CalculationException Thrown if underlying model failed to calculate stochastic process.", "Starts the HTTP service.\n\n@throws Exception if the service failed to started", "Map originator type.\n\n@param originatorType the originator type\n@return the originator", "Get a property as a double or throw an exception.\n\n@param key the property name", "Returns the index of the first invalid character of the zone, or -1 if the zone is valid\n\n@param sequence\n@return" ]
public static URL buildUrl(String scheme, String host, int port, String path, Map<String, String> parameters) throws MalformedURLException { checkSchemeAndPort(scheme, port); StringBuilder buffer = new StringBuilder(); if (!host.startsWith(scheme + "://")) { buffer.append(scheme).append("://"); } buffer.append(host); if (port > 0) { buffer.append(':'); buffer.append(port); } if (path == null) { path = "/"; } buffer.append(path); if (!parameters.isEmpty()) { buffer.append('?'); } int size = parameters.size(); for (Map.Entry<String, String> entry : parameters.entrySet()) { buffer.append(entry.getKey()); buffer.append('='); Object value = entry.getValue(); if (value != null) { String string = value.toString(); try { string = URLEncoder.encode(string, UTF8); } catch (UnsupportedEncodingException e) { // Should never happen, but just in case } buffer.append(string); } if (--size != 0) { buffer.append('&'); } } /* * RequestContext requestContext = RequestContext.getRequestContext(); Auth auth = requestContext.getAuth(); if (auth != null && * !ignoreMethod(getMethod(parameters))) { buffer.append("&api_sig="); buffer.append(AuthUtilities.getSignature(sharedSecret, parameters)); } */ return new URL(buffer.toString()); }
[ "Build a request URL using a given scheme.\n\n@param scheme the scheme, either {@code http} or {@code https}\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException" ]
[ "Checks the preconditions for creating a new IsIncludedIn processor with a Set of Objects.\n\n@param possibleValues\nthe Set of possible values\n@throws NullPointerException\nif possibleValues is null\n@throws IllegalArgumentException\nif possibleValues is empty", "Obtain parameters from query\n\n@param query query to scan\n@return Map of parameters", "Sets the specified many-to-one attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Updates the value in HashMap and writeBack as Atomic step", "Get a writer implementation to push data into Canvas.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param <T> A writer implementation\n@return A writer implementation class", "Throw IllegalStateException if key is not present in map.\n@param key the key to expect.\n@param map the map to search.\n@throws IllegalArgumentException if key is not in map.", "Retrieves the value of the given accessible field of the given receiver.\n\n@param receiver the container of the field, not <code>null</code>\n@param fieldName the field's name, not <code>null</code>\n@return the value of the field\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#get(Object)}\n@throws IllegalArgumentException see {@link Field#get(Object)}", "Creates a new instance from the given configuration file.\n\n@throws IOException if failed to load the configuration from the specified file", "Creates a ClassNode containing the wrapper of a ClassNode\nof primitive type. Any ClassNode representing a primitive\ntype should be created using the predefined types used in\nclass. The method will check the parameter for known\nreferences of ClassNode representing a primitive type. If\nReference is found, then a ClassNode will be contained that\nrepresents the wrapper class. For example for boolean, the\nwrapper class is java.lang.Boolean.\n\nIf the parameter is no primitive type, the redirected\nClassNode will be returned\n\n@see #make(Class)\n@see #make(String)\n@param cn the ClassNode containing a possible primitive type" ]
protected static Connection memorize(final Connection target, final ConnectionHandle connectionHandle) { return (Connection) Proxy.newProxyInstance( ConnectionProxy.class.getClassLoader(), new Class[] {ConnectionProxy.class}, new MemorizeTransactionProxy(target, connectionHandle)); }
[ "Wrap connection with a proxy.\n@param target connection handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a connection." ]
[ "Gets the value of the task property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the task property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetTask().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link GanttDesignerRemark.Task }", "Iterates over all tags of current member and evaluates the template for each one.\n\n@param template The template to be evaluated\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" optional=\"true\" description=\"The parameter name.\"", "Return the single class name from a class-name string.", "Initialize the fat client for the given store.\n\n1. Updates the coordinatorMetadata 2.Gets the new store configs from the\nconfig file 3.Creates a new @SocketStoreClientFactory 4. Subsequently\ncaches the @StoreClient obtained from the factory.\n\n\nThis is synchronized because if Coordinator Admin is already doing some\nchange we want the AsyncMetadataVersionManager to wait.\n\n@param storeName", "Add a greeting to the specified guestbook.", "private multi-value handlers and helpers", "Creates a method signature.\n\n@param method Method instance\n@return method signature", "Re-Tag the websocket connection hold by this context with label specified.\nThis method will remove all previous tags on the websocket connection and then\ntag it with the new label.\n@param label the label.\n@return this websocket conext.", "Confirms that both clusters have the same number of total partitions.\n\n@param lhs\n@param rhs" ]
private void readWeekDay(ProjectCalendar mpxjCalendar, WeekDay day) { if (day.isIsDayWorking()) { ProjectCalendarHours hours = mpxjCalendar.addCalendarHours(day.getDay()); for (Document.Calendars.Calendar.WeekDays.WeekDay.TimePeriods.TimePeriod period : day.getTimePeriods().getTimePeriod()) { hours.addRange(new DateRange(period.getFrom(), period.getTo())); } } }
[ "Reads a single day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT week day" ]
[ "Use this API to unset the properties of cmpparameter resource.\nProperties that need to be unset are specified in args array.", "Adds the includes of the fileset to the handling.\n\n@param handling The handling\n@param fileSet The fileset", "This method is called by the ++ operator for the class CharSequence.\nIt increments the last character in the given CharSequence. If the last\ncharacter in the CharSequence is Character.MAX_VALUE a Character.MIN_VALUE\nwill be appended. The empty CharSequence is incremented to a string\nconsisting of the character Character.MIN_VALUE.\n\n@param self a CharSequence\n@return a value obtained by incrementing the toString() of the CharSequence\n@since 1.8.2", "Skip to the next matching short value.\n\n@param buffer input data array\n@param offset start offset into the input array\n@param value value to match\n@return offset of matching pattern", "There is a race condition that is not handled properly by the DialogFragment class.\nIf we don't check that this onDismiss callback isn't for the old progress dialog from before\nthe device orientation change, then this will cause the newly created dialog after the\norientation change to be dismissed immediately.", "The local event will decide the next state of the document in question.\n\n@param <T> the type of class represented by the document in the change event.\n@return the local full document which may be null.", "Start check of execution time\n@param extra", "Use this API to fetch aaagroup_vpnsessionpolicy_binding resources of given name .", "compares two AST nodes" ]
private Collection parseCollection(Element collectionElement) { Collection collection = new Collection(); collection.setId(collectionElement.getAttribute("id")); collection.setServer(collectionElement.getAttribute("server")); collection.setSecret(collectionElement.getAttribute("secret")); collection.setChildCount(collectionElement.getAttribute("child_count")); collection.setIconLarge(collectionElement.getAttribute("iconlarge")); collection.setIconSmall(collectionElement.getAttribute("iconsmall")); collection.setDateCreated(collectionElement.getAttribute("datecreate")); collection.setTitle(XMLUtilities.getChildValue(collectionElement, "title")); collection.setDescription(XMLUtilities.getChildValue(collectionElement, "description")); Element iconPhotos = XMLUtilities.getChild(collectionElement, "iconphotos"); if (iconPhotos != null) { NodeList photoElements = iconPhotos.getElementsByTagName("photo"); for (int i = 0; i < photoElements.getLength(); i++) { Element photoElement = (Element) photoElements.item(i); collection.addPhoto(PhotoUtils.createPhoto(photoElement)); } } return collection; }
[ "Parse the XML for a collection as returned by getInfo call.\n\n@param collectionElement\n@return" ]
[ "Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print", "Main method for testing fetching", "Use this API to fetch all the transformpolicy resources that are configured on netscaler.", "EAP 7.0", "Sinc function.\n\n@param x Value.\n@return Sinc of the value.", "Use this API to diff nsconfig.", "called when we are completed finished with using the TcpChannelHub", "Log a warning for the given operation at the provided address for the given attribute, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attribute attribute we that has problem", "Get an ObjectReferenceDescriptor by name BRJ\n@param name\n@return ObjectReferenceDescriptor or null" ]