query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
protected void doSplitTokenImpl(Token token, ITokenAcceptor result) { String text = token.getText(); int indentation = computeIndentation(text); if (indentation == -1 || indentation == currentIndentation) { // no change of indentation level detected simply process the token result.accept(token); } else if (indentation > currentIndentation) { // indentation level increased splitIntoBeginToken(token, indentation, result); } else if (indentation < currentIndentation) { // indentation level decreased int charCount = computeIndentationRelevantCharCount(text); if (charCount > 0) { // emit whitespace including newline splitWithText(token, text.substring(0, charCount), result); } // emit end tokens at the beginning of the line decreaseIndentation(indentation, result); if (charCount != text.length()) { handleRemainingText(token, text.substring(charCount), indentation, result); } } else { throw new IllegalStateException(String.valueOf(indentation)); } }
[ "The token was previously determined as potentially to-be-splitted thus we\nemit additional indentation or dedenting tokens." ]
[ "Get a property as a string or throw an exception.\n\n@param key the property name", "Attempts to insert a colon so that a value without a colon can\nbe parsed.", "Converts the string representation of the days bit field into an integer.\n\n@param days string bit field\n@return integer bit field", "Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException", "Renumbers all entity unique IDs.", "Randomly shuffle partitions between nodes within every zone.\n\n@param nextCandidateCluster cluster object.\n@param randomSwapAttempts See RebalanceCLI.\n@param randomSwapSuccesses See RebalanceCLI.\n@param randomSwapZoneIds The set of zoneIds to consider. Each zone is done\nindependently.\n@param storeDefs List of store definitions\n@return updated cluster", "Get the named method from the class\n\n@param c The class to get the method from\n@param name The method name\n@param argTypes The argument types\n@return The method", "Read the table headers. This allows us to break the file into chunks\nrepresenting the individual tables.\n\n@param is input stream\n@return list of tables in the file", "Return given duration in a human-friendly format. For example, \"4\nminutes\" or \"1 second\". Returns only largest meaningful unit of time,\nfrom seconds up to hours.\n\nThe longest duration it supports is hours.\n\nThis method assumes that there are 60 minutes in an hour,\n60 seconds in a minute and 1000 milliseconds in a second.\nAll currently supplied chronologies use this definition." ]
String decodeCString(ByteBuf buffer) throws IOException { int length = buffer.bytesBefore(BsonConstants.STRING_TERMINATION); if (length < 0) throw new IOException("string termination not found"); String result = buffer.toString(buffer.readerIndex(), length, StandardCharsets.UTF_8); buffer.skipBytes(length + 1); return result; }
[ "default visibility for unit test" ]
[ "Returns true if the given method has a possibly matching instance method with the given name and arguments.\n\n@param name the name of the method of interest\n@param arguments the arguments to match against\n@return true if a matching method was found", "Sets the HTTP poller processor to handle Async API.\nWill auto enable the pollable mode with this call\n\n@param httpPollerProcessor\nthe http poller processor\n@return the parallel task builder", "If there is an unprocessed change event for a particular document ID, fetch it from the\nchange stream listener, and remove it. By reading the event here, we are assuming it will be\nprocessed by the consumer.\n\n@return the latest unprocessed change event for the given document ID, or null if none exists.", "Rollback the last applied patch.\n\n@param contentPolicy the content policy\n@param resetConfiguration whether to reset the configuration\n@param modification the installation modification\n@return the patching result\n@throws PatchingException", "Removes an audio source from the audio manager.\n@param audioSource audio source to remove", "Determine the current state the server is in.\n\n@return the server status", "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", "Prep for a new connection\n@return if stats are enabled, return the nanoTime when this connection was requested.\n@throws SQLException", "Use this API to update inat." ]
public static String decodeUrl(String stringToDecode) { try { return URLDecoder.decode(stringToDecode, "UTF-8"); } catch (UnsupportedEncodingException e1) { throw new RuntimeException(e1); } }
[ "URL-Decodes a given string using UTF-8. No UnsupportedEncodingException to handle as it is dealt with in this\nmethod." ]
[ "Use this API to fetch authenticationradiusaction resource of given name .", "Instruct a query to use a specific index.\n@param designDocument Design document to use.\n@param indexName Index name to use.\n@return {@code QueryBuilder} object for method chaining.", "Tells you if the ASTNode is a method node for the given name, arity, and return type.\n@param node\nthe node to inspect\n@param methodNamePattern\nthe expected name of the method\n@param numArguments\nthe expected number of arguments, optional\n@param returnType\nthe expected return type, optional\n@return\ntrue if this node is a MethodNode meeting the parameters. false otherwise", "Get an InputStream for the original image. Callers must close the stream upon completion.\n\n@deprecated\n@see PhotosInterface#getImageAsStream(Photo, int)\n@return The InputStream\n@throws IOException", "Retrieve an instance of the ConstraintField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ConstraintField instance", "Closes all the producers in the pool", "Returns PatternParser used to parse the conversion string. Subclasses may\noverride this to return a subclass of PatternParser which recognize\ncustom conversion characters.\n\n@since 0.9.0", "Tokenize the the string as a package hierarchy\n\n@param str\n@return", "Retrieves the timephased breakdown of actual cost.\n\n@return timephased actual cost" ]
private static int med3(int a, int b, int c, IntComparator comp) { int ab = comp.compare(a,b); int ac = comp.compare(a,c); int bc = comp.compare(b,c); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); }
[ "Returns the index of the median of the three indexed chars." ]
[ "Method to initialize the list.\n\n@param resList a given instance or null\n@return an instance", "Get info about the shards in the database.\n\n@return List of shards\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-database-_shards-\"\ntarget=\"_blank\">_shards</a>", "Extract assignment hyperlink data.\n\n@param assignment assignment instance\n@param data hyperlink data", "Main entry point. Reads a directory containing a P3 Btrieve database files\nand returns a map of table names and table content.\n\n@param directory directory containing the database\n@param prefix file name prefix used to identify files from the same database\n@return Map of table names to table data", "Check exactly the week check-boxes representing the given weeks.\n@param weeksToCheck the weeks selected.", "Gets a SerialMessage with the BASIC SET command\n@param the level to set.\n@return the serial message", "Reads a string of single byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nReading begins at the supplied offset into the array.\n\n@param data byte array of data\n@param offset offset into the array\n@return string value", "Reads the NTriples file from the reader, pushing statements into\nthe handler.", "Prep for a new connection\n@return if stats are enabled, return the nanoTime when this connection was requested.\n@throws SQLException" ]
private void updateBundleDescriptorContent() throws CmsXmlException { if (m_descContent.hasLocale(Descriptor.LOCALE)) { m_descContent.removeLocale(Descriptor.LOCALE); } m_descContent.addLocale(m_cms, Descriptor.LOCALE); int i = 0; Property<Object> descProp; String desc; Property<Object> defaultValueProp; String defaultValue; Map<String, Item> keyItemMap = getKeyItemMap(); List<String> keys = new ArrayList<String>(keyItemMap.keySet()); Collections.sort(keys, CmsCaseInsensitiveStringComparator.getInstance()); for (Object key : keys) { if ((null != key) && !key.toString().isEmpty()) { m_descContent.addValue(m_cms, Descriptor.N_MESSAGE, Descriptor.LOCALE, i); i++; String messagePrefix = Descriptor.N_MESSAGE + "[" + i + "]/"; m_descContent.getValue(messagePrefix + Descriptor.N_KEY, Descriptor.LOCALE).setStringValue( m_cms, (String)key); descProp = keyItemMap.get(key).getItemProperty(TableProperty.DESCRIPTION); if ((null != descProp) && (null != descProp.getValue())) { desc = descProp.getValue().toString(); m_descContent.getValue(messagePrefix + Descriptor.N_DESCRIPTION, Descriptor.LOCALE).setStringValue( m_cms, desc); } defaultValueProp = keyItemMap.get(key).getItemProperty(TableProperty.DEFAULT); if ((null != defaultValueProp) && (null != defaultValueProp.getValue())) { defaultValue = defaultValueProp.getValue().toString(); m_descContent.getValue(messagePrefix + Descriptor.N_DEFAULT, Descriptor.LOCALE).setStringValue( m_cms, defaultValue); } } } }
[ "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)" ]
[ "Sets the HTML entity translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining", "Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests.", "Creates a new indirection handler instance.\n\n@param brokerKey The associated {@link PBKey}.\n@param id The subject's ids\n@return The new instance", "Verify that the given queues are all valid.\n\n@param queues the given queues", "Provides a collection of all the nodes in the tree\nusing a depth first traversal.\n\n@return the list of (depth-first) ordered nodes", "This method tokenizes a string by space characters,\nbut ignores spaces in quoted parts,that are parts in\n'' or \"\". The method does allows the usage of \"\" in ''\nand '' in \"\". The space character between tokens is not\nreturned.\n\n@param s the string to tokenize\n@return the tokens", "Inserts a column name, value pair into the SQL.\n\n@param column\nName of the table column.\n@param value\nValue to substitute in. InsertBuilder does *no* interpretation\nof this. If you want a string constant inserted, you must\nprovide the single quotes and escape the internal quotes. It\nis more common to use a question mark or a token in the style\nof {@link ParameterizedPreparedStatementCreator}, e.g. \":foo\".", "To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!", "Creates a real valued diagonal matrix of the specified type" ]
public GenericCriteria process(ProjectProperties properties, byte[] data, int dataOffset, int entryOffset, List<GenericCriteriaPrompt> prompts, List<FieldType> fields, boolean[] criteriaType) { m_properties = properties; m_prompts = prompts; m_fields = fields; m_criteriaType = criteriaType; m_dataOffset = dataOffset; if (m_criteriaType != null) { m_criteriaType[0] = true; m_criteriaType[1] = true; } m_criteriaBlockMap.clear(); m_criteriaData = data; m_criteriaTextStart = MPPUtility.getShort(m_criteriaData, m_dataOffset + getCriteriaTextStartOffset()); // // Populate the map // int criteriaStartOffset = getCriteriaStartOffset(); int criteriaBlockSize = getCriteriaBlockSize(); //System.out.println(); //System.out.println(ByteArrayHelper.hexdump(data, dataOffset, criteriaStartOffset, false)); if (m_criteriaData.length <= m_criteriaTextStart) { return null; // bad data } while (criteriaStartOffset + criteriaBlockSize <= m_criteriaTextStart) { byte[] block = new byte[criteriaBlockSize]; System.arraycopy(m_criteriaData, m_dataOffset + criteriaStartOffset, block, 0, criteriaBlockSize); m_criteriaBlockMap.put(Integer.valueOf(criteriaStartOffset), block); //System.out.println(Integer.toHexString(criteriaStartOffset) + ": " + ByteArrayHelper.hexdump(block, false)); criteriaStartOffset += criteriaBlockSize; } if (entryOffset == -1) { entryOffset = getCriteriaStartOffset(); } List<GenericCriteria> list = new LinkedList<GenericCriteria>(); processBlock(list, m_criteriaBlockMap.get(Integer.valueOf(entryOffset))); GenericCriteria criteria; if (list.isEmpty()) { criteria = null; } else { criteria = list.get(0); } return criteria; }
[ "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" ]
[ "Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.", "Invokes the method on the class of the passed instance, not the declaring\nclass. Useful with proxies\n\n@param instance The instance to invoke\n@param manager The Bean manager\n@return A reference to the instance", "Fetch the outermost Hashmap as a TwoDHashMap.\n\n@param firstKey\nfirst key\n@return the the innermost hashmap", "Returns an encrypted token combined with answer.", "After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime", "Look up the database server port reported by a given player. You should not use this port directly; instead\nask this class for a session to use while you communicate with the database.\n\n@param player the player number of interest\n\n@return the port number on which its database server is running, or -1 if unknown\n\n@throws IllegalStateException if not running", "Stores the gathered usage statistics about property uses to a CSV file.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use", "Implementation of FNV-1a hash algorithm.\n@see <a href=\"https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function\">\nttps://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function</a>\n@param doc the document to hash\n@return", "Gets the current page\n@return" ]
public static String getContent(String stringUrl) throws IOException { InputStream stream = getContentStream(stringUrl); return MyStreamUtils.readContent(stream); }
[ "Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened" ]
[ "Gets axis dimension\n@param axis Axis. It might be either {@link Layout.Axis#X X} or\n{@link Layout.Axis#Y Y} or {@link Layout.Axis#Z Z}\n@return axis dimension", "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", "Parses int value and returns the provided default if the value can't be parsed.\n@param value the int to parse.\n@param defaultValue the default value.\n@return the parsed int, or the default value if parsing fails.", "Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path", "Removes the given entity from the inverse associations it manages.", "Remove a key for all language versions. If a descriptor is present, the key is only removed in the descriptor.\n\n@param key the key to remove.\n@return <code>true</code> if removing was successful, <code>false</code> otherwise.", "Connect and register at the remote domain controller.\n\n@return connection the established connection\n@throws IOException", "Access all of the elements of the collection that evaluate to true for the\nprovided query predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tAn iterator used to iterate over the elements that evaluated true for the predicate.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Write the management protocol header.\n\n@param header the mgmt protocol header\n@param os the output stream\n@throws IOException" ]
private boolean isRedeployAfterRemoval(ModelNode operation) { return operation.hasDefined(DEPLOYMENT_OVERLAY_LINK_REMOVAL) && operation.get(DEPLOYMENT_OVERLAY_LINK_REMOVAL).asBoolean(); }
[ "Check if this is a redeployment triggered after the removal of a link.\n@param operation the current operation.\n@return true if this is a redeploy after the removal of a link.\n@see org.jboss.as.server.deploymentoverlay.DeploymentOverlayDeploymentRemoveHandler" ]
[ "Concatenates of list of Bytes objects to create a byte array\n\n@param listOfBytes Bytes objects to concatenate\n@return Bytes", "Insert an entity into the datastore.\n\nThe entity must have no ids.\n\n@return The key for the inserted entity.\n@throws DatastoreException on error", "Assign FK value to all n-side objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation", "Send message to socket's output stream.\n\n@param messageToSend message to send.\n\n@return {@code true} if message was sent successfully, {@code false} otherwise.", "This is a convenience method to add a default derived\ncalendar to the project.\n\n@return new ProjectCalendar instance", "Delete an object from the database by id.", "A tie-in for subclasses such as AdaGrad.", "Allocates a database connection.\n\n@throws SQLException", "Add columns to be returned by the SELECT query. If no columns are selected then all columns are returned by\ndefault. For classes with id columns, the id column is added to the select list automagically. This can be called\nmultiple times to add more columns to select.\n\n<p>\n<b>WARNING:</b> If you specify any columns to return, then any foreign-collection fields will be returned as null\n<i>unless</i> their {@link ForeignCollectionField#columnName()} is also in the list.\n</p>" ]
public static transformpolicy get(nitro_service service, String name) throws Exception{ transformpolicy obj = new transformpolicy(); obj.set_name(name); transformpolicy response = (transformpolicy) obj.get_resource(service); return response; }
[ "Use this API to fetch transformpolicy resource of given name ." ]
[ "Retrieves and validates the content type from the REST requests\n\n@return true if has content type.", "Converts a class into a signature token.\n\n@param c class\n@return signature token text", "Returns the accrued interest of the bond for a given date.\n\n@param date The date of interest.\n@param model The model under which the product is valued.\n@return The accrued interest.", "Read custom property definitions for resources.\n\n@param gpResources GanttProject resources", "Create a new file but fail if it already exists. The check for\nexistance of the file and it's creation are an atomic operation with\nrespect to other filesystem activities.", "Retrieve a finish date.\n\n@param data byte array\n@param offset offset into byte array\n@return finish date", "Evaluates the filter, returns true if the supplied Task or Resource\ninstance matches the filter criteria.\n\n@param container Task or Resource instance\n@param promptValues respose to prompts\n@return boolean flag", "Send message to all connections connected to the same URL of this context\n\n@param message the message to be sent\n@param excludeSelf whether the connection of this context should be sent to\n@return this context", "Returns a map from a category path to the wrapper of all the sub-categories of the category with the path given as key.\n\n@return a map from a category path to all sub-categories of the path's category." ]
public ObjectReferenceDescriptor getObjectReferenceDescriptorByName(String name) { ObjectReferenceDescriptor ord = (ObjectReferenceDescriptor) getObjectReferenceDescriptorsNameMap().get(name); // // BRJ: if the ReferenceDescriptor is not found // look in the ClassDescriptor referenced by 'super' for it // if (ord == null) { ClassDescriptor superCld = getSuperClassDescriptor(); if (superCld != null) { ord = superCld.getObjectReferenceDescriptorByName(name); } } return ord; }
[ "Get an ObjectReferenceDescriptor by name BRJ\n@param name\n@return ObjectReferenceDescriptor or null" ]
[ "Throws an IllegalArgumentException when the given value is null.\n@param value the value to assert if not null\n@param name the name of the argument\n@param <T> The generic type of the value to assert if not null\n@return the value", "Validate the Combination filter field in Multi configuration jobs", "Determines whether or not two axially aligned bounding boxes in\nthe same coordinate space intersect.\n@param bv1 first bounding volume to test.\n@param bv2 second bounding volume to test.\n@return true if the boxes intersect, false if not.", "Converts a string representation of an integer into an Integer object.\nSilently ignores any parse exceptions and returns null.\n\n@param value String representation of an integer\n@return Integer instance", "Read data for an individual task from the tables in a PEP file.\n\n@param parent parent task\n@param id task ID\n@return task instance", "Use this API to fetch clusternodegroup_binding resource of given name .", "Returns iterable with all enterprise assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all enterprise assignments.", "Write the given long value as a 4 byte unsigned integer. Overflow is\nignored.\n\n@param buffer The buffer to write to\n@param index The position in the buffer at which to begin writing\n@param value The value to write", "Creates a resource key with given id for bundle specified by given class.\n@param clazz the class owning the bundle.\n@param id value identifier\n@return the resource key" ]
@Inline(value = "$1.remove($2.getKey(), $2.getValue())", statementExpression = true) public static <K, V> boolean operator_remove(Map<K, V> map, Pair<? extends K, ? extends V> entry) { //TODO use the JRE 1.8 API: map.remove(entry.getKey(), entry.getValue()); final K key = entry.getKey(); final V storedValue = map.get(entry.getKey()); if (!Objects.equal(storedValue, entry.getValue()) || (storedValue == null && !map.containsKey(key))) { return false; } map.remove(key); return true; }
[ "Remove the given pair into the map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param entry the entry (key, value) to remove from the map.\n@return {@code true} if the pair was removed.\n@since 2.15" ]
[ "Create a request for elevations for multiple locations.\n\n@param req\n@param callback", "Attempts to locate the activity type value extracted from an existing P6 schedule.\nIf necessary converts to the form which can be used in the PMXML file.\nReturns \"Resource Dependent\" as the default value.\n\n@param task parent task\n@return activity type", "Write the auxiliary RDF data for encoding the given value.\n\n@param value\nthe value to write\n@param resource\nthe (subject) URI to use to represent this value in RDF\n@throws RDFHandlerException", "Creates an SslHandler\n\n@param bufferAllocator the buffer allocator\n@return instance of {@code SslHandler}", "A safe wrapper to destroy the given resource request.", "This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar. The\ncalendar used is the \"Standard\" calendar. If this calendar does not exist,\nand exception will be thrown.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object\n@throws MPXJException normally when no Standard calendar is available\n@deprecated use calendar.getDuration(startDate, endDate)", "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", "Convenience method to escape any character that is special to the regex system.\n\n@param inString\nthe string to fix\n\n@return the fixed string", "Returns an encrypted token combined with answer." ]
@Override public void run() { try { startBarrier.await(); int idleCount = 0; while (!isRunning.compareAndSet(idleCount > LINGER_ITERATIONS && deadPool.isEmpty() && completionKeyToProcessMap.isEmpty(), false)) { idleCount = (!shutdown && process()) ? 0 : (idleCount + 1); } } catch (Exception e) { // TODO: how to handle this error? e.printStackTrace(); isRunning.set(false); } }
[ "The primary run loop of the kqueue event processor." ]
[ "Count the number of occurrences of a sub CharSequence.\n\n@param self a CharSequence\n@param text a sub CharSequence\n@return the number of occurrences of the given CharSequence inside this CharSequence\n@see #count(String, String)\n@since 1.8.2", "Store an Object.\n@see org.apache.ojb.broker.PersistenceBroker#store(Object)", "This main method provides an easy command line tool to compare two\nschemas.", "Read the project data and return a ProjectFile instance.\n\n@return ProjectFile instance", "Process a single project.\n\n@param reader Primavera reader\n@param projectID required project ID\n@param outputFile output file name", "Specify a specific index to run the query against\n\n@param designDocument set the design document to use\n@param indexName set the index name to use\n@return this to set additional options", "Get the max extent as a envelop object.", "Creates a Document that can be passed to the MongoDB batch insert function", "Preloads a sound file.\n\n@param soundFile path/name of the file to be played." ]
public void process(Resource resource, int index, byte[] data) { CostRateTable result = new CostRateTable(); if (data != null) { for (int i = 16; i + 44 <= data.length; i += 44) { Rate standardRate = new Rate(MPPUtility.getDouble(data, i), TimeUnit.HOURS); TimeUnit standardRateFormat = getFormat(MPPUtility.getShort(data, i + 8)); Rate overtimeRate = new Rate(MPPUtility.getDouble(data, i + 16), TimeUnit.HOURS); TimeUnit overtimeRateFormat = getFormat(MPPUtility.getShort(data, i + 24)); Double costPerUse = NumberHelper.getDouble(MPPUtility.getDouble(data, i + 32) / 100.0); Date endDate = MPPUtility.getTimestampFromTenths(data, i + 40); CostRateTableEntry entry = new CostRateTableEntry(standardRate, standardRateFormat, overtimeRate, overtimeRateFormat, costPerUse, endDate); result.add(entry); } Collections.sort(result); } else { // // MS Project economises by not actually storing the first cost rate // table if it doesn't need to, so we take this into account here. // if (index == 0) { Rate standardRate = resource.getStandardRate(); Rate overtimeRate = resource.getOvertimeRate(); Number costPerUse = resource.getCostPerUse(); CostRateTableEntry entry = new CostRateTableEntry(standardRate, standardRate.getUnits(), overtimeRate, overtimeRate.getUnits(), costPerUse, CostRateTableEntry.DEFAULT_ENTRY.getEndDate()); result.add(entry); } else { result.add(CostRateTableEntry.DEFAULT_ENTRY); } } resource.setCostRateTable(index, result); }
[ "Creates a CostRateTable instance from a block of data.\n\n@param resource parent resource\n@param index cost rate table index\n@param data data block" ]
[ "Retrieve the fixed data offset for a specific field.\n\n@param type field type\n@return offset", "Determine if a key version is invalid by comparing the version's\nexistence and required writes configuration\n\n@param keyVersionNodeSetMap A map that contains keys mapping to a map\nthat maps versions to set of PrefixNodes\n@param requiredWrite Required Write configuration", "Try to get the line number associated with the given member.\n\nThe reflection API does not expose such an info and so we need to analyse the bytecode. Unfortunately, it seems there is no way to get this kind of\ninformation for fields. Moreover, the <code>LineNumberTable</code> attribute is just optional, i.e. the compiler is not required to store this\ninformation at all. See also <a href=\"http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1\">Java Virtual Machine Specification</a>\n\nImplementation note: it wouldn't be appropriate to add a bytecode scanning dependency just for this functionality, therefore Apache BCEL included in\nOracle JDK 1.5+ and OpenJDK 1.6+ is used. Other JVMs should not crash as we only use it if it's on the classpath and by means of reflection calls.\n\n@param member\n@param resourceLoader\n@return the line number or 0 if it's not possible to find it", "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", "Try Oracle update batching and call sendBatch or revert to\nJDBC update batching.\n@param stmt the batched prepared statement about to be executed\n@return always <code>null</code> if Oracle update batching is used,\nsince it is impossible to dissolve total row count into distinct\nstatement counts. If JDBC update batching is used, an int array is\nreturned containing number of updated rows for each batched statement.\n@throws PlatformException upon JDBC failure", "Main method to run the bot.\n\n@param args\n@throws LoginFailedException\n@throws IOException\n@throws MediaWikiApiErrorException", "Populates a calendar hours instance.\n\n@param record MPX record\n@param hours calendar hours instance\n@throws MPXJException", "Use this API to fetch vpnvserver_authenticationradiuspolicy_binding resources of given name .", "a small static helper class to get the color from the colorHolder\n\n@param colorHolder\n@param ctx\n@return" ]
private boolean renameKeyForAllLanguages(String oldKey, String newKey) { try { loadAllRemainingLocalizations(); lockAllLocalizations(oldKey); if (hasDescriptor()) { lockDescriptor(); } } catch (CmsException | IOException e) { LOG.error(e.getLocalizedMessage(), e); return false; } for (Entry<Locale, SortedProperties> entry : m_localizations.entrySet()) { SortedProperties localization = entry.getValue(); if (localization.containsKey(oldKey)) { String value = localization.getProperty(oldKey); localization.remove(oldKey); localization.put(newKey, value); m_changedTranslations.add(entry.getKey()); } } if (hasDescriptor()) { CmsXmlContentValueSequence messages = m_descContent.getValueSequence( Descriptor.N_MESSAGE, Descriptor.LOCALE); for (int i = 0; i < messages.getElementCount(); i++) { String prefix = messages.getValue(i).getPath() + "/"; String key = m_descContent.getValue(prefix + Descriptor.N_KEY, Descriptor.LOCALE).getStringValue(m_cms); if (key == oldKey) { m_descContent.getValue(prefix + Descriptor.N_KEY, Descriptor.LOCALE).setStringValue(m_cms, newKey); break; } } m_descriptorHasChanges = true; } m_keyset.renameKey(oldKey, newKey); return true; }
[ "Rename a key for all languages.\n@param oldKey the key to rename\n@param newKey the new key name\n@return <code>true</code> if renaming was successful, <code>false</code> otherwise." ]
[ "Get the authentication for a specific token.\n\n@param token token\n@return authentication if any", "Runs a query that returns a single int.", "Get the Attribute metadata for an MBean by name.\n@return the {@link Map} of {@link String} attribute names to {@link MBeanAttributeInfo} values.", "Use this API to update nsip6.", "Adds the supplied marker to the map.\n\n@param marker", "Sets the CircularImageView's border width in pixels.\n@param borderWidth Width in pixels for the border.", "Utility function to get the current value.", "Finds an entity given its primary key.\n\n@throws RowNotFoundException\nIf no such object was found.\n@throws TooManyRowsException\nIf more that one object was returned for the given ID.", "Extracts the elements from the source matrix by their 1D index.\n\n@param src Source matrix. Not modified.\n@param indexes array of row indexes\n@param length maximum element in row array\n@param dst output matrix. Must be a vector of the correct length." ]
public static final String printDateTime(Date value) { return (value == null ? null : DATE_FORMAT.get().format(value)); }
[ "Print a date time value.\n\n@param value date time value\n@return string representation" ]
[ "Starts listening for shakes on devices with appropriate hardware.\n\n@return true if the device supports shake detection.", "Create an `AppDescriptor` with appName and package name specified\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param packageName\nthe package name of the app\n@return\nan `AppDescriptor` instance", "Map message info.\n\n@param messageInfoType the message info type\n@return the message info", "Convert the continuous values into discrete values by chopping up\nthe distribution into several equally-sized intervals.", "Returns the default output for functions without configured JSPs.\n\n@param request the current request\n@return the default HTML output", "Use this API to fetch statistics of appfwpolicylabel_stats resource of given name .", "Adds the specified list of users as members of the project. Returns the updated project record.\n\n@param project The project to add members to.\n@return Request object", "Computes the likelihood of the random draw\n\n@return The likelihood.", "This method converts an offset value into an array index, which in\nturn allows the data present in the fixed block to be retrieved. Note\nthat if the requested offset is not found, then this method returns -1.\n\n@param offset Offset of the data in the fixed block\n@return Index of data item within the fixed data block" ]
public Set<String> rangeByScoreReverse(final ScoreRange scoreRange) { return doWithJedis(new JedisCallable<Set<String>>() { @Override public Set<String> call(Jedis jedis) { if (scoreRange.hasLimit()) { return jedis.zrevrangeByScore(getKey(), scoreRange.fromReverse(), scoreRange.toReverse(), scoreRange.offset(), scoreRange.count()); } else { return jedis.zrevrangeByScore(getKey(), scoreRange.fromReverse(), scoreRange.toReverse()); } } }); }
[ "Returns all the elements in the sorted set with a score in the given range.\nIn contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered\nfrom high to low scores.\nThe elements having the same score are returned in reverse lexicographical order.\n@param scoreRange\n@return elements in the specified score range" ]
[ "Set some initial values.", "Utility function that checks if store names are valid on a node.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch stores from\n@param storeNames Store names to check", "Format a date that is parseable from JavaScript, according to ISO-8601.\n\n@param date the date to format to a JSON string\n@return a formatted date in the form of a string", "Execute a slave process. Pump events to the given event bus.", "Write an unsigned short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at", "Set the amount of padding between child objects.\n@param axis {@link Axis}\n@param padding", "Calculates the distance between two points\n\n@return distance between two points", "Wait for the read side to close. Used when the writer needs to know when\nthe reader finishes consuming a message.", "Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException" ]
public static base_response update(nitro_service client, inatparam resource) throws Exception { inatparam updateresource = new inatparam(); updateresource.nat46v6prefix = resource.nat46v6prefix; updateresource.nat46ignoretos = resource.nat46ignoretos; updateresource.nat46zerochecksum = resource.nat46zerochecksum; updateresource.nat46v6mtu = resource.nat46v6mtu; updateresource.nat46fragheader = resource.nat46fragheader; return updateresource.update_resource(client); }
[ "Use this API to update inatparam." ]
[ "Returns the expression string required\n\n@param ds\n@return", "Ensure that the nodeList is either null or empty.\n\n@param nodeList the nodeList to ensure to be either null or empty\n@param expression the expression was used to fine the nodeList\n@throws SpinXPathException if the nodeList is either null or empty", "Performs a put operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key and\nvalue\n@return Version of the value for the successful put", "Gets the persistence broker used by this indirection handler.\nIf no PBKey is available a runtime exception will be thrown.\n\n@return a PersistenceBroker", "Sets the offset for the animation.\n\n@param startOffset animation will start at the specified offset value\n\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code startOffset} is either negative or greater than\nthe animation duration", "add a new producer, either synchronous or asynchronous, connecting\nto the specified broker\n\n@param broker broker to producer", "Returns the portion of the field name after the last dot, as field names\nmay actually be paths.", "Disposes resources created to service this connection context", "Changes the message of this comment.\n@param newMessage the new message for this comment.\n@return updated info about this comment." ]
public int getIndexFromOffset(int offset) { int result = -1; for (int loop = 0; loop < m_offset.length; loop++) { if (m_offset[loop] == offset) { result = loop; break; } } return (result); }
[ "This method converts an offset value into an array index, which in\nturn allows the data present in the fixed block to be retrieved. Note\nthat if the requested offset is not found, then this method returns -1.\n\n@param offset Offset of the data in the fixed block\n@return Index of data item within the fixed data block" ]
[ "Call the Yahoo! PlaceFinder service for a result.\n\n@param q\nsearch string\n@param maxRows\nmax number of rows in result, or 0 for all\n@param locale\nlocale for strings\n@return list of found results\n@throws Exception\noops\n@see <a\nhref=\"http://developer.yahoo.com/boss/geo/docs/free_YQL.html#table_pf\">Yahoo!\nBoss Geo PlaceFinder</a>", "Want to make arbitrary probability queries? Then this is the method for\nyou. Given the filename, it reads it in and breaks it into documents, and\nthen makes a CRFCliqueTree for each document. you can then ask the clique\ntree for marginals and conditional probabilities of almost anything you\nwant.", "Get the original image URL.\n\n@return The original image URL", "Guesses the best set to use at the specified index by looking at the surrounding sets. In general, characters in\nlower-numbered sets are more common, so we choose them if we can. If no good surrounding sets can be found, the default\nvalue returned is the first value from the valid set.\n\n@param index the current index\n@param length the maximum length to look at\n@param valid the valid sets for this index\n@return the best set to use at the specified index", "Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect", "Helper function to return the minimum size of the workspace to be passed to the reduction given the input and output\ntensors", "Use this API to add clusternodegroup.", "Use this API to fetch appqoepolicy resource of given name .", "If the DefaultActionInvocation has been executed before and the Result is\nan instance of ActionChainResult, this method will walk down the chain of\nActionChainResults until it finds a non-chain result, which will be\nreturned. If the DefaultActionInvocation's result has not been executed\nbefore, the Result instance will be created and populated with the result\nparams.\n\n@return a Result instance\n@throws Exception" ]
public void checkpoint(ObjectEnvelope mod) throws org.apache.ojb.broker.PersistenceBrokerException { mod.doDelete(); mod.setModificationState(StateTransient.getInstance()); }
[ "rollback the transaction" ]
[ "Creates an operation to list the deployments.\n\n@return the operation", "Determines if the queue identified by the given key is used.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key is used, false otherwise", "Creates an InputObjectStream and an OutputObjectStream from a Socket, and\npasses them to the closure. The streams will be closed after the closure\nreturns, even if an exception is thrown.\n\n@param socket this Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.0", "Returns the portion of the field name after the last dot, as field names\nmay actually be paths.", "Checks if a new version of the file can be uploaded with the specified name and size.\n@param name the new name for the file.\n@param fileSize the size of the new version content in bytes.\n@return whether or not the file version can be uploaded.", "Return a copy of the result as a String.\n\n<p>The default version of this method copies the result into a temporary byte array and then\ntries to decode it using the configured encoding.\n\n@return string version of the result.\n@throws IOException if the data cannot be produced or could not be decoded to a String.", "Multiply two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the multiply of specified complex numbers.", "Searches for a sequence of integers\n\nexample:\n1 2 3 4 6 7 -3", "Returns all found resolvers\n@return" ]
public void refresh() { this.refreshLock.writeLock().lock(); if (!this.canRefresh()) { this.refreshLock.writeLock().unlock(); throw new IllegalStateException("The BoxAPIConnection cannot be refreshed because it doesn't have a " + "refresh token."); } URL url = null; try { url = new URL(this.tokenURL); } catch (MalformedURLException e) { this.refreshLock.writeLock().unlock(); assert false : "An invalid refresh URL indicates a bug in the SDK."; throw new RuntimeException("An invalid refresh URL indicates a bug in the SDK.", e); } String urlParameters = String.format("grant_type=refresh_token&refresh_token=%s&client_id=%s&client_secret=%s", this.refreshToken, this.clientID, this.clientSecret); BoxAPIRequest request = new BoxAPIRequest(this, url, "POST"); request.shouldAuthenticate(false); request.setBody(urlParameters); String json; try { BoxJSONResponse response = (BoxJSONResponse) request.send(); json = response.getJSON(); } catch (BoxAPIException e) { this.notifyError(e); this.refreshLock.writeLock().unlock(); throw e; } JsonObject jsonObject = JsonObject.readFrom(json); this.accessToken = jsonObject.get("access_token").asString(); this.refreshToken = jsonObject.get("refresh_token").asString(); this.lastRefresh = System.currentTimeMillis(); this.expires = jsonObject.get("expires_in").asLong() * 1000; this.notifyRefresh(); this.refreshLock.writeLock().unlock(); }
[ "Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed." ]
[ "Checks if two claims are equivalent in the sense that they have the same\nmain snak and the same qualifiers, but possibly in a different order.\n\n@param claim1\n@param claim2\n@return true if claims are equivalent", "Replace error msg.\n\n@param origMsg\nthe orig msg\n@return the string", "Generated the report.", "Computes the likelihood of the random draw\n\n@return The likelihood.", "Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)", "perform the actual matching", "Use this API to unset the properties of nsconfig resource.\nProperties that need to be unset are specified in args array.", "Set the group name\n\n@param name new name of server group\n@param id ID of group", "Removes a tag from the resource.\n@param key the key of the tag to remove\n@return the next stage of the definition/update" ]
public MaterializeBuilder withActivity(Activity activity) { this.mRootView = (ViewGroup) activity.findViewById(android.R.id.content); this.mActivity = activity; return this; }
[ "Pass the activity you use the drawer in ;)\nThis is required if you want to set any values by resource\n\n@param activity\n@return" ]
[ "Return a key to identify the connection descriptor.", "Add a mapping of properties between two beans\n\n@param beanToBeanMapping", "Get the value of the specified column.\n\n@param columnName the name of the column\n@return the corresponding value of the column, {@code null} if the column does not exist in the row key", "Calculate start dates for a yearly recurrence.\n\n@param calendar current date\n@param dates array of start dates", "SuppressWarnings I really want to return HazeltaskTasks instead of Runnable", "Seeks to the given season within the given year\n\n@param seasonString\n@param yearString", "Removes all documents from the collection that match the given query filter. If no documents\nmatch, the collection is not modified.\n\n@param filter the query filter to apply the the delete operation\n@return the result of the remove many operation", "Normalizes elements in 'u' by dividing by max and computes the norm2 of the normalized\narray u. Adjust the sign of the returned value depending on the size of the first\nelement in 'u'. Normalization is done to avoid overflow.\n\n<pre>\nfor i=j:numRows\nu[i] = u[i] / max\ntau = tau + u[i]*u[i]\nend\ntau = sqrt(tau)\nif( u[j] &lt; 0 )\ntau = -tau;\n</pre>\n\n@param j Element in 'u' that it starts at.\n@param numRows Element in 'u' that it stops at.\n@param u Array\n@param max Max value in 'u' that is used to normalize it.\n@return norm2 of 'u'", "Upgrade the lock on the given object to the given lock mode. The call has\nno effect if the object's current lock is already at or above that level of\nlock mode.\n\n@param obj object to acquire a lock on.\n@param lockMode lock mode to acquire. The lock modes\nare <code>READ</code> , <code>UPGRADE</code> , and <code>WRITE</code> .\n\n@exception LockNotGrantedException Description of Exception" ]
public void setTargetBytecode(String version) { if (CompilerConfiguration.PRE_JDK5.equals(version) || CompilerConfiguration.POST_JDK5.equals(version)) { this.targetBytecode = version; } }
[ "Sets the bytecode compatibility mode\n\n@param version the bytecode compatibility mode" ]
[ "This method is used to push install referrer via UTM source, medium & campaign parameters\n@param source The UTM source parameter\n@param medium The UTM medium parameter\n@param campaign The UTM campaign parameter", "Rebuild logging systems with updated mode\n@param newMode log mode", "Use this API to reset appfwlearningdata.", "Draw an elliptical interior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for filling", "Sets the set of property filters based on the given string.\n\n@param filters\ncomma-separates list of property ids, or \"-\" to filter all\nstatements", "Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass", "Log a message line to the output.", "Adds a free connection.\n\n@param connectionHandle\n@throws SQLException on error", "Determines the java.sql.Types constant value from an OJB\nFIELDDESCRIPTOR value.\n\n@param type The FIELDDESCRIPTOR which JDBC type is to be determined.\n\n@return int the int value representing the Type according to\n\n@throws SQLException if the type is not a valid jdbc type.\njava.sql.Types" ]
private boolean removeKeyForAllLanguages(String key) { try { if (hasDescriptor()) { lockDescriptor(); } loadAllRemainingLocalizations(); lockAllLocalizations(key); } catch (CmsException | IOException e) { LOG.warn("Not able lock all localications for bundle.", e); return false; } if (!hasDescriptor()) { for (Entry<Locale, SortedProperties> entry : m_localizations.entrySet()) { SortedProperties localization = entry.getValue(); if (localization.containsKey(key)) { localization.remove(key); m_changedTranslations.add(entry.getKey()); } } } return true; }
[ "Remove a key for all language versions. If a descriptor is present, the key is only removed in the descriptor.\n\n@param key the key to remove.\n@return <code>true</code> if removing was successful, <code>false</code> otherwise." ]
[ "Convenience method to convert a CSV string list to a set. Note that this\nwill suppress duplicates.\n\n@param str the input String\n@return a Set of String entries in the list", "Returns an integer array that contains the default values for all the\ntexture parameters.\n\n@return an integer array that contains the default values for all the\ntexture parameters.", "Extracts a house holder vector from the rows of A and stores it in u\n@param A Complex matrix with householder vectors stored in the upper right triangle\n@param row Row in A\n@param col0 first row in A (implicitly assumed to be r + i0)\n@param col1 last row +1 in A\n@param u Output array storage\n@param offsetU first index in U", "Get the type created by selecting only a subset of properties from this\ntype. The type must be a map for this to work\n\n@param properties The properties to select\n@return The new type definition", "Access all of the elements of the collection that evaluate to true for the\nprovided query predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tAn iterator used to iterate over the elements that evaluated true for the predicate.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Return a new client that may be cached or not. Given properties are always use when not cached, and only used at creation time for\ncached clients.\n\n@param name\nif null, default client. Otherwise, helpful to retrieve cached clients later.\n@param p\na set of properties. Implementation specific. Unknown properties are silently ignored.\n@param cached\nif false, the client will not be cached and subsequent calls with the same name will return different objects.", "Iterates through this file line by line, splitting each line using\nthe given regex separator. For each line, the given closure is called with\na single parameter being the list of strings computed by splitting the line\naround matches of the given regular expression.\nFinally the resources used for processing the file are closed.\n\n@param self a File\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see IOGroovyMethods#splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5", "Gets the object whose index is the integer argument.\n\n@param i the integer index to be queried for the corresponding argument\n@return the object whose index is the integer argument.", "Loads the file content in the properties collection\n@param filePath The path of the file to be loaded" ]
public static final void setBounds(UIObject o, Rect bounds) { setPosition(o, bounds); setSize(o, bounds); }
[ "Sets the bounds of a UIObject, moving and sizing to match the\nbounds specified. Currently used for the itemhover and useful\nfor other absolutely positioned elements." ]
[ "Return an artifact regarding its gavc\n\n@param gavc String\n@return DbArtifact", "ensures that the first invocation of a date seeking\nrule is captured", "Creates the publish button.\n\n@param updateListener the update listener\n@return the publish button", "Add a '&lt;&gt;' clause so the column must be not-equal-to the value.", "Obtains a Julian zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Use this API to export sslfipskey resources.", "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", "Returns the list of nodes which match the expression xpathExpr in the Document dom.\n\n@param dom the Document to search in\n@param xpathExpr the xpath query\n@return the list of nodes which match the query\n@throws XPathExpressionException On error.", "Construct a new instance.\n\n@return the new instance" ]
public static SimpleDeploymentDescription of(final String name, @SuppressWarnings("TypeMayBeWeakened") final Set<String> serverGroups) { final SimpleDeploymentDescription result = of(name); if (serverGroups != null) { result.addServerGroups(serverGroups); } return result; }
[ "Creates a simple deployment description.\n\n@param name the name for the deployment\n@param serverGroups the server groups\n\n@return the deployment description" ]
[ "for testing purpose", "Method signature without \"public void\" prefix\n\n@return The method signature in String format", "Checks whether two internet addresses are on the same subnet.\n\n@param prefixLength the number of bits within an address that identify the network\n@param address1 the first address to be compared\n@param address2 the second address to be compared\n\n@return true if both addresses share the same network bits", "Returns all scripts\n\n@param model\n@param type - optional to specify type of script to return\n@return\n@throws Exception", "Should use as destroy method. Disconnects from a Service Locator server.\nAll endpoints that were registered before are removed from the server.\nSet property locatorClient to null.\n\n@throws InterruptedException\n@throws ServiceLocatorException", "Reads a stringtemplate group from a stream.\n\nThis will always return a group (empty if necessary), even if reading it from the stream fails.\n\n@param stream the stream to read from\n@return the string template group", "Remove the realm name block.\n\n@see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String)", "Use this API to fetch bridgegroup_vlan_binding resources of given name .", "Checks, if all values necessary for a specific pattern are valid.\n@return a flag, indicating if all values required for the pattern are valid." ]
public CurrencyQueryBuilder setCountries(Locale... countries) { return set(CurrencyQuery.KEY_QUERY_COUNTRIES, Arrays.asList(countries)); }
[ "Sets the country for which currencies should be requested.\n\n@param countries The ISO countries.\n@return the query for chaining." ]
[ "Identifies the canonical type of an object heuristically.\n\n@return the canonical type identifier of the object's class\naccording to Jackson's type format (see {@link TypeFactory#constructFromCanonical(String)})", "Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order", "Ask the specified player for the album art in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param artReference uniquely identifies the desired album art\n@param trackType the kind of track that owns the art\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nartwork updates will use available caches only\n\n@return the album art found, if any", "Create the index and associate it with all project models in the Application", "Returns the associated SQL WHERE statement.", "Retrieve the frequency of an exception.\n\n@param exception XML calendar exception\n@return frequency", "Use this API to unset the properties of systemcollectionparam resource.\nProperties that need to be unset are specified in args array.", "This constructs and returns the request object for the producer pool\n\n@param topic the topic to which the data should be published\n@param bidPid the broker id and partition id\n@param data the data to be published\n@return producer data of builder", "Click handler for bottom drawer items." ]
public static IntRange GetRange( int[] values, double percent ){ int total = 0, n = values.length; // for all values for ( int i = 0; i < n; i++ ) { // accumalate total total += values[i]; } int min, max, hits; int h = (int) ( total * ( percent + ( 1 - percent ) / 2 ) ); // get range min value for ( min = 0, hits = total; min < n; min++ ) { hits -= values[min]; if ( hits < h ) break; } // get range max value for ( max = n - 1, hits = total; max >= 0; max-- ) { hits -= values[max]; if ( hits < h ) break; } return new IntRange( min, max ); }
[ "Get range around median containing specified percentage of values.\n@param values Values.\n@param percent Values percentage around median.\n@return Returns the range which containes specifies percentage of values." ]
[ "Removes a parameter from this configuration.\n\n@param key the parameter to remove", "Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return", "Use this API to Import application.", "Encode a long into a byte array at an offset\n\n@param ba Byte array\n@param offset Offset\n@param v Long value\n@return byte array given in input", "Returns the z-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the z coordinate", "Write an integer field to the JSON file.\n\n@param fieldName field name\n@param value field value", "First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe error\n@param errorMessage\nthe error message\n@param stackTrace\nthe stack trace\n@param statusCode\nthe status code\n@param statusCodeInt\nthe status code int", "Return a string representation of the object.", "Add a new Corporate GroupId to an organization.\n\n@param credential DbCredential\n@param organizationId String Organization name\n@param corporateGroupId String\n@return Response" ]
public static void checkDelegateType(Decorator<?> decorator) { Set<Type> types = new HierarchyDiscovery(decorator.getDelegateType()).getTypeClosure(); for (Type decoratedType : decorator.getDecoratedTypes()) { if(!types.contains(decoratedType)) { throw BeanLogger.LOG.delegateMustSupportEveryDecoratedType(decoratedType, decorator); } } }
[ "Check whether the delegate type implements or extends all decorated types.\n\n@param decorator\n@throws DefinitionException If the delegate type doesn't implement or extend all decorated types" ]
[ "Use this API to clear gslbldnsentries.", "If converters are set on a table, this function tests if these can convert a cell value. The first\nconverter, which claims that it can convert, will be used to do the conversion.", "Adds parameters contained in the annotation into the annotation type reference\n\n@param typeRef\n@param node", "Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@return The value of the element.", "Sets any application-specific custom fields. The values\nare presented to the application and the iPhone doesn't\ndisplay them automatically.\n\nThis can be used to pass specific values (urls, ids, etc) to\nthe application in addition to the notification message\nitself.\n\n@param key the custom field name\n@param value the custom field value\n@return this", "Extracts the list of columns from the given field list.\n\n@param fields The fields\n@return The corresponding columns", "This is a service method that takes care of putting al the target values in a single array.\n@return", "Set the Log4j appender.\n\n@param appender the log4j appender", "Set the position of the pick ray.\nThis function is used internally to update the\npick ray with the new controller position.\n@param x the x value of the position.\n@param y the y value of the position.\n@param z the z value of the position." ]
public FieldDescriptor getAutoIncrementField() { if (m_autoIncrementField == null) { FieldDescriptor[] fds = getPkFields(); for (int i = 0; i < fds.length; i++) { FieldDescriptor fd = fds[i]; if (fd.isAutoIncrement()) { m_autoIncrementField = fd; break; } } } if (m_autoIncrementField == null) { LoggerFactory.getDefaultLogger().warn( this.getClass().getName() + ": " + "Could not find autoincrement attribute for class: " + this.getClassNameOfObject()); } return m_autoIncrementField; }
[ "Returns the first found autoincrement field\ndefined in this class descriptor. Use carefully\nwhen multiple autoincrement field were defined.\n@deprecated does not make sense because it's possible to\ndefine more than one autoincrement field. Alternative\nsee {@link #getAutoIncrementFields}" ]
[ "Sets an Integer attribute.\n\n@param key the key, non null.\n@param value the value\n@return the Builder, for chaining.", "Get the short exception message using the requested locale. This does not include the cause exception message.\n\n@param locale locale for message\n@return (short) exception message", "get the bean property type\n\n@param clazz\n@param propertyName\n@param originalType\n@return", "Returns true if the information in this link should take\nprecedence over the information in the other link.", "Throws an IllegalStateException when the given value is not true.", "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", "Sets the text alignment for all cells in the row.\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", "Shutdown each AHC client in the map.", "Set a bean in the context.\n\n@param name bean name\n@param object bean value" ]
public boolean clearSelection(boolean requestLayout) { Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "clearSelection [%d]", mSelectedItemsList.size()); boolean updateLayout = false; List<ListItemHostWidget> views = getAllHosts(); for (ListItemHostWidget host: views) { if (host.isSelected()) { host.setSelected(false); updateLayout = true; if (requestLayout) { host.requestLayout(); } } } clearSelectedItemsList(); return updateLayout; }
[ "Clear the selection of all items.\n@param requestLayout request layout after clear selection if the flag is true, no layout\nrequested otherwise\n@return {@code true} if at least one item was deselected,\n{@code false} otherwise." ]
[ "Calculates a column title using camel humps to separate words.\n@param _property the property descriptor.\n@return the column title for the given property.", "handle case where Instant is outside the bounds of OffsetDateTime", "Convert an Object to a Timestamp.", "Method that takes an inputstream, read it preserving the end lines, and subtitute using commons-lang-3 calls\nthe variables, first searching as system properties vars and then in environment var list.\nIn case of missing the property is replaced by white space.\n@param stream\n@return", "Attempts to clear the global log context used for embedded servers.", "Record a content loader for a given patch id.\n\n@param patchID the patch id\n@param contentLoader the content loader", "Request the list of all tracks in the specified slot, given a dbserver connection to a player that has already\nbeen set up.\n\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved track list entry items\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations", "Calculate Euclidean distance between two points.\n\n@param anotherPoint Point to calculate distance to.\n@return Euclidean distance between this point and anotherPoint points.", "Parse the string representation of a timestamp.\n\n@param value string representation\n@return Java representation" ]
public int[] next() { boolean hasNewPerm = false; escape:while( level >= 0) { // boolean foundZero = false; for( int i = iter[level]; i < data.length; i = iter[level] ) { iter[level]++; if( data[i] == -1 ) { level++; data[i] = level-1; if( level >= data.length ) { // a new permutation has been created return the results. hasNewPerm = true; System.arraycopy(data,0,ret,0,ret.length); level = level-1; data[i] = -1; break escape; } else { valk[level] = i; } } } data[valk[level]] = -1; iter[level] = 0; level = level-1; } if( hasNewPerm ) return ret; return null; }
[ "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." ]
[ "That is, of size 6, which become 8, since HashMaps are powers of 2. Still, it's half the size", "Subtract two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the subtract of specified complex numbers.", "Method signature without \"public void\" prefix\n\n@return The method signature in String format", "Return all option names that not already have a value\nand is enabled", "Converts a vector from eigen space into sample space.\n\n@param eigenData Eigen space data.\n@return Sample space projection.", "Writes image files for all data that was collected and the statistics\nfile for all sites.", "Creates an element that represents a single positioned box containing the specified text string.\n@param data the text string to be contained in the created box.\n@return the resulting DOM element", "Build the tree of joins for the given criteria", "Submits the configured assembly to Transloadit for processing.\n\n@param isResumable boolean value that tells the assembly whether or not to use tus.\n@return {@link AssemblyResponse} the response received from the Transloadit server.\n@throws RequestException if request to Transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations." ]
private static double pointsDistance(Point a, Point b) { int dx = b.x - a.x; int dy = b.y - a.y; return Math.sqrt(dx * dx + dy * dy); }
[ "calculate distance of two points\n\n@param a\n@param b\n@return" ]
[ "Gets the progress from response.\n\n@param myResponse\nthe my response\n@return the progress from response", "Creates a simple, annotation defined Web Bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return A Web Bean", "Returns the coupon payment of the period with the given index. The analytic model is needed in case of floating bonds.\n\n@param periodIndex The index of the period of interest.\n@param model The model under which the product is valued.\n@return The value of the coupon payment in the given period.", "Put event.\n\n@param eventType the event type\n@throws Exception the exception", "Parse the URI and get all the parameters in map form. Query name -&gt; List of Query values.\n\n@param rawQuery query portion of the uri to analyze.", "Checks if the method being invoked should be wrapped by a service.\nIt looks the method name up in the methodList. If its in the list, then\nthe method should be wrapped. If the list is null, then all methods\nare wrapped.\n\n@param methodName The method being called\n\n@return boolean", "helper to calculate the actionBar height\n\n@param context\n@return", "Use this API to fetch all the sslfipskey resources that are configured on netscaler.", "Scales a process type\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param processType type of process to maintain\n@param quantity number of processes to maintain" ]
public static <T> T load(String resourcePath, BeanSpec spec) { return load(resourcePath, spec, false); }
[ "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" ]
[ "Set the pattern scheme to either \"by weekday\" or \"by day of month\".\n@param isByWeekDay flag, indicating if the pattern \"by weekday\" should be set.\n@param fireChange flag, indicating if a value change event should be fired.", "Update the state of the picker. If it has an owner, the picker\nwill use that object to derive its position and orientation.\nThe \"active\" state of this controller is used to indicate touch.\nThe cursor position is updated after picking.", "Use this API to fetch all the systemeventhistory resources that are configured on netscaler.\nThis uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources.", "Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.", "Use this API to update snmpalarm.", "Writes no-value restriction.\n\n@param rdfWriter\nthe writer to write the restrictions to\n@param propertyUri\nURI of the property to which the restriction applies\n@param rangeUri\nURI of the class or datatype to which the restriction applies\n@param subject\nnode representing the restriction\n@throws RDFHandlerException\nif there was a problem writing the RDF triples", "Get the account knowing his position\n@param position the position of the account (it can change at runtime!)\n@return the account", "Adds a new role to the list of defined roles.\n\n@param roleName - The name of the role being added.", "Convert a document List into arrays storing the data features and labels.\n\n@param document\nTraining documents\n@return A Pair, where the first element is an int[][][] representing the\ndata and the second element is an int[] representing the labels" ]
public void updateBitmapShader() { if (image == null) return; shader = new BitmapShader(image, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); if(canvasSize != image.getWidth() || canvasSize != image.getHeight()) { Matrix matrix = new Matrix(); float scale = (float) canvasSize / (float) image.getWidth(); matrix.setScale(scale, scale); shader.setLocalMatrix(matrix); } }
[ "Re-initializes the shader texture used to fill in\nthe Circle upon drawing." ]
[ "Given a string with the scenario or story name, creates a Class Name with\nno spaces and first letter capital\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name", "Used to determine if a particular day of the week is normally\na working day.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day Day instance\n@return boolean flag", "Pause the current entry point, and invoke the provided listener when all current requests have finished.\n\nIf individual control point tracking is not enabled then the listener will be invoked straight away\n\n@param requestCountListener The listener to invoke", "Gen error response.\n\n@param t\nthe t\n@return the response on single request", "Expands the directories from the given list and and returns a list of subfiles.\nFiles from the original list are kept as is.", "Calculates all dates of the series.\n@return all dates of the series in milliseconds.", "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", "If needed declares and sets up internal data structures.\n\n@param A Matrix being decomposed.", "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" ]
public void set(int numRows, int numCols, boolean rowMajor, double ...data) { reshape(numRows,numCols); int length = numRows*numCols; if( length > this.data.length ) throw new IllegalArgumentException("The length of this matrix's data array is too small."); if( rowMajor ) { System.arraycopy(data,0,this.data,0,length); } else { int index = 0; for( int i = 0; i < numRows; i++ ) { for( int j = 0; j < numCols; j++ ) { this.data[index++] = data[j*numRows+i]; } } } }
[ "Sets this matrix equal to the matrix encoded in the array.\n\n@param numRows The number of rows.\n@param numCols The number of columns.\n@param rowMajor If the array is encoded in a row-major or a column-major format.\n@param data The formatted 1D array. Not modified." ]
[ "returns an Array with an Objects NON-PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values", "Add a '&gt;' clause so the column must be greater-than the value.", "Retrieves the table structure for an Asta PP file. Subclasses determine the exact contents of the structure\nfor a specific version of the Asta PP file.\n\n@return PP file table structure", "Set default values for annotations.\nInitial annotation take precedence over the default annotation when both annotation types are present\n\n@param defaultAnnotations default value for annotations", "This filter changes the amount of color in each of the three channels.\n\n@param r The amount of redness in the picture. Can range from -100 to 100 in percentage.\n@param g The amount of greenness in the picture. Can range from -100 to 100 in percentage.\n@param b The amount of blueness in the picture. Can range from -100 to 100 in percentage.\n@throws IllegalArgumentException if {@code r}, {@code g}, or {@code b} are outside of bounds.", "get target hosts from line by line.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the list\n@throws TargetHostsLoadException\nthe target hosts load exception", "Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer", "Clears the collection and uses the iterator to run through the dao and delete all of the items in the collection\nfrom the associated database table. This is different from removing all of the elements in the table since this\niterator is across just one item's foreign objects.", "Populate a sorted list of custom fields to ensure that these fields\nare written to the file in a consistent order." ]
public static appfwprofile_xmlvalidationurl_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_xmlvalidationurl_binding obj = new appfwprofile_xmlvalidationurl_binding(); obj.set_name(name); appfwprofile_xmlvalidationurl_binding response[] = (appfwprofile_xmlvalidationurl_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch appfwprofile_xmlvalidationurl_binding resources of given name ." ]
[ "Print the given values after displaying the provided message.", "Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid", "Sets the maxConnectionAge. Any connections older than this setting will be closed\noff whether it is idle or not. Connections currently in use will not be affected until they\nare returned to the pool.\n\n@param maxConnectionAge the maxConnectionAge to set.\n@param timeUnit the unit of the maxConnectionAge argument.", "Mapping originator.\n\n@param originator the originator\n@return the originator type", "Destroys the context", "This method writes data for a single task to a Planner file.\n\n@param mpxjTask MPXJ Task instance\n@param taskList list of child tasks for current parent", "Optional operations to do before the multiple-threads start indexing\n\n@param backend", "Print the class's attributes fd", "Set whether the player holding the waveform is playing, which changes the indicator color to white from red.\nThis method can only be used in situations where the component is tied to a single player, and therefore has\na single playback position.\n\n@param playing if {@code true}, draw the position marker in white, otherwise red\n\n@see #setPlaybackState" ]
@SuppressWarnings({"unused", "WeakerAccess"}) public UTMDetail getUTMDetails() { UTMDetail ud = new UTMDetail(); ud.setSource(source); ud.setMedium(medium); ud.setCampaign(campaign); return ud; }
[ "Returns a UTMDetail object which consists of UTM parameters like source, medium & campaign\n@return The {@link UTMDetail} object" ]
[ "This method must be called on the stop of the component. Stop the directory monitor and unregister all the\ndeclarations.", "Count some stats on what occurs in a file.", "Parses command-line and removes metadata related to rebalancing.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "Construct new path by replacing file directory part. No\nfiles are actually modified.\n@param file path to move\n@param target new path directory", "Use this API to fetch all the autoscaleaction resources that are configured on netscaler.", "Log original incoming request\n\n@param requestType\n@param request\n@param history", "Return the list of galleries created by a user. Sorted from newest to oldest.\n\n@param userId\nThe user you want to check for\n@param perPage\nNumber of galleries per page\n@param page\nThe page number\n@return gallery\n@throws FlickrException\n\n@see <a hrerf=\"http://www.flickr.com/services/api/flickr.galleries.getList.html\">flickr.galleries.getList</a>", "A specific, existing section can be deleted by making a DELETE request\non the URL for that section.\n\nNote that sections must be empty to be deleted.\n\nThe last remaining section in a board view cannot be deleted.\n\nReturns an empty data block.\n\n@param section The section to delete.\n@return Request object", "Retrieve the value of a field using its alias.\n\n@param alias field alias\n@return field value" ]
@SuppressWarnings("unchecked") public static boolean addPropertyDefault(PropertiesImpl props, PropertyDefinition<?> propDef) { if ((props == null) || (props.getProperties() == null)) { throw new IllegalArgumentException("Props must not be null!"); } if (propDef == null) { return false; } List<?> defaultValue = propDef.getDefaultValue(); if ((defaultValue != null) && (!defaultValue.isEmpty())) { switch (propDef.getPropertyType()) { case BOOLEAN: props.addProperty(new PropertyBooleanImpl(propDef.getId(), (List<Boolean>)defaultValue)); break; case DATETIME: props.addProperty(new PropertyDateTimeImpl(propDef.getId(), (List<GregorianCalendar>)defaultValue)); break; case DECIMAL: props.addProperty(new PropertyDecimalImpl(propDef.getId(), (List<BigDecimal>)defaultValue)); break; case HTML: props.addProperty(new PropertyHtmlImpl(propDef.getId(), (List<String>)defaultValue)); break; case ID: props.addProperty(new PropertyIdImpl(propDef.getId(), (List<String>)defaultValue)); break; case INTEGER: props.addProperty(new PropertyIntegerImpl(propDef.getId(), (List<BigInteger>)defaultValue)); break; case STRING: props.addProperty(new PropertyStringImpl(propDef.getId(), (List<String>)defaultValue)); break; case URI: props.addProperty(new PropertyUriImpl(propDef.getId(), (List<String>)defaultValue)); break; default: throw new RuntimeException("Unknown datatype! Spec change?"); } return true; } return false; }
[ "Adds the default value of property if defined.\n\n@param props the Properties object\n@param propDef the property definition\n\n@return true if the property could be added" ]
[ "Add a date with a certain check state.\n@param date the date to add.\n@param checkState the check state.", "Returns the bounding sphere of the vertices.\n@param sphere destination array to get bounding sphere.\nThe first entry is the radius, the next\nthree are the center.\n@return radius of bounding sphere or 0.0 if no vertices", "Sets the specified long attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Lift a Java Func2 to a Scala Function2\n\n@param f the function to lift\n\n@returns the Scala function", "Returns a new analysis context builder that extracts the information about the available extensions from\nthe provided Revapi instance.\n\n<p>The extensions have to be known so that both old and new style of configuration can be usefully worked with.\n\n@param revapi the revapi instance to read the available extensions from\n@return a new analysis context builder", "Append data to JSON response.\n@param param\n@param value", "Start a server.\n\n@return the http server\n@throws Exception the exception", "Create a table model from an object's properties.\n\n@param object target object\n@param excludedMethods method names to exclude\n@return table model", "Return a replica of this instance with the quality value of the given MediaType.\n@return the same instance if the given MediaType doesn't have a quality value, or a new one otherwise" ]
public void addFile(String description, FileModel fileModel) { Map<FileModel, ProblemFileSummary> files = addDescription(description); if (files.containsKey(fileModel)) { files.get(fileModel).addOccurrence(); } else { files.put(fileModel, new ProblemFileSummary(fileModel, 1)); } }
[ "Adds a file with the provided description." ]
[ "Extracts the postal code, country code and service code from the primary data and returns the corresponding primary message\ncodewords.\n\n@return the primary message codewords", "Use this API to unset the properties of cmpparameter resource.\nProperties that need to be unset are specified in args array.", "Obtains a International Fixed zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Use this API to delete ntpserver.", "Replaces the translations in an existing container with the translations for the provided locale.\n@param locale the locale for which translations should be loaded.\n@return <code>true</code> if replacing succeeded, <code>false</code> otherwise.", "This will check to see if certain configuration values exist from the ConfigurationService\nIf not then it redirects to the configuration screen", "Write the classifications of the Sequence classifier out to a writer in a\nformat determined by the DocumentReaderAndWriter used.\n\n@param doc Documents to write out\n@param printWriter Writer to use for output\n@throws IOException If an IO problem", "Starts given docker machine.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n@param machineName\nto be started.", "Utility function that fetches user defined store definitions\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch store definitions from\n@return The map container that maps store names to store definitions" ]
public static List<DockerImage> getDockerImagesFromAgents(final int buildInfoId, TaskListener listener) throws IOException, InterruptedException { List<DockerImage> dockerImages = new ArrayList<DockerImage>(); // Collect images from the master: dockerImages.addAll(getAndDiscardImagesByBuildId(buildInfoId)); // Collect images from all the agents: List<Node> nodes = Jenkins.getInstance().getNodes(); for (Node node : nodes) { if (node == null || node.getChannel() == null) { continue; } try { List<DockerImage> partialDockerImages = node.getChannel().call(new MasterToSlaveCallable<List<DockerImage>, IOException>() { public List<DockerImage> call() throws IOException { List<DockerImage> dockerImages = new ArrayList<DockerImage>(); dockerImages.addAll(getAndDiscardImagesByBuildId(buildInfoId)); return dockerImages; } }); dockerImages.addAll(partialDockerImages); } catch (Exception e) { listener.getLogger().println("Could not collect docker images from Jenkins node '" + node.getDisplayName() + "' due to: " + e.getMessage()); } } return dockerImages; }
[ "Retrieves from all the Jenkins agents all the docker images, which have been registered for a specific build-info ID\nOnly images for which manifests have been captured are returned.\n\n@param buildInfoId\n@return\n@throws IOException\n@throws InterruptedException" ]
[ "Adds a boolean refinement for the next queries.\n\n@param attribute the attribute to refine on.\n@param value the value to refine with.\n@return this {@link Searcher} for chaining.", "Extract note text.\n\n@param row task data\n@return note text", "Use this API to update dospolicy.", "Use this API to fetch all the filterhtmlinjectionparameter resources that are configured on netscaler.", "Remove the report directory.", "Set RGB input range.\n\n@param inRGB Range.", "Set editable state on an attribute. This needs to also set the state on the associated attributes.\n\n@param attribute attribute for which the editable state needs to be set\n@param editable new editable state", "calculate distance of two points\n\n@param a\n@param b\n@return", "Returns an iterable containing all the enterprise users that matches the filter and specifies which child fields\nto retrieve from the API.\n@param api the API connection to be used when retrieving the users.\n@param filterTerm used to filter the results to only users starting with this string in either the name or the\nlogin. Can be null to not filter the results.\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing all the enterprise users that matches the filter." ]
public void remove(int profileId) { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement("DELETE FROM " + Constants.DB_TABLE_PROFILE + " WHERE " + Constants.GENERIC_ID + " = ?"); statement.setInt(1, profileId); statement.executeUpdate(); statement.close(); //also want to delete what is in the server redirect table statement = sqlConnection.prepareStatement("DELETE FROM " + Constants.DB_TABLE_SERVERS + " WHERE " + Constants.GENERIC_PROFILE_ID + " = ?"); statement.setInt(1, profileId); statement.executeUpdate(); statement.close(); //also want to delete the path_profile table statement = sqlConnection.prepareStatement("DELETE FROM " + Constants.DB_TABLE_PATH + " WHERE " + Constants.GENERIC_PROFILE_ID + " = ?"); statement.setInt(1, profileId); statement.executeUpdate(); statement.close(); //and the enabled overrides table statement = sqlConnection.prepareStatement("DELETE FROM " + Constants.DB_TABLE_ENABLED_OVERRIDE + " WHERE " + Constants.GENERIC_PROFILE_ID + " = ?"); statement.setInt(1, profileId); statement.executeUpdate(); statement.close(); //and delete all the clients associated with this profile including the default client statement = sqlConnection.prepareStatement("DELETE FROM " + Constants.DB_TABLE_CLIENT + " WHERE " + Constants.GENERIC_PROFILE_ID + " = ?"); statement.setInt(1, profileId); statement.executeUpdate(); statement.close(); } catch (SQLException e) { e.printStackTrace(); } finally { try { if (statement != null) { statement.close(); } } catch (Exception e) { } } }
[ "Deletes data associated with the given profile ID\n\n@param profileId ID of profile" ]
[ "Creates and returns a matrix which is idential to this one.\n\n@return A new identical matrix.", "Read the parameters on initialization.\n\n@see org.apache.solr.update.processor.UpdateRequestProcessorFactory#init(org.apache.solr.common.util.NamedList)", "Formats a percentage value.\n\n@param number MPXJ percentage value\n@return Primavera percentage value", "Show or hide the options column dependent on the provided edit mode.\n@param oldMode the old edit mode\n@param newMode the edit mode for which the options column's visibility should be adjusted.", "Gets external resource for an HTML page in the setup-resources folder.\n\n@param context the context\n@param name the file name\n\n@return the resource for the HTML page", "123.2.3.4 is 4.3.2.123.in-addr.arpa.", "Overridden to skip some symbolizers.", "Shuts down a managed domain container. The servers are first stopped, then the host controller is shutdown.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to shutdown the managed domain failed", "Use this API to flush nssimpleacl." ]
public static String createOdataFilterForTags(String tagName, String tagValue) { if (tagName == null) { return null; } else if (tagValue == null) { return String.format("tagname eq '%s'", tagName); } else { return String.format("tagname eq '%s' and tagvalue eq '%s'", tagName, tagValue); } }
[ "Creates an Odata filter string that can be used for filtering list results by tags.\n\n@param tagName the name of the tag. If not provided, all resources will be returned.\n@param tagValue the value of the tag. If not provided, only tag name will be filtered.\n@return the Odata filter to pass into list methods" ]
[ "Get a subset of the attributes of the provided class. An attribute is each public field in the class\nor super class.\n\n@param classToInspect the class to inspect\n@param filter a predicate that returns true when a attribute should be kept in resulting\ncollection.", "Returns the cost rate table index for this assignment.\n\n@return cost rate table index", "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", "A map of the header key value pairs. Keys are strings and values are either list of strings or a\nstring.\n\n@param headers the header map", "Creates a new random symmetric matrix that will have the specified real eigenvalues.\n\n@param num Dimension of the resulting matrix.\n@param rand Random number generator.\n@param eigenvalues Set of real eigenvalues that the matrix will have.\n@return A random matrix with the specified eigenvalues.", "Performs a HTTP DELETE request.\n\n@return {@link Response}", "once animation is setup, start the animation record the beginning and\nending time for the animation", "Perform the given work with a Jedis connection from the given pool.\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\n@throws Exception if something went wrong", "Makes the scene object pickable by eyes. However, the object has to be touchable to process\nthe touch events.\n\n@param sceneObject" ]
private void setProperties(Properties properties) { Props props = new Props(properties); if(props.containsKey(ClientConfig.ENABLE_JMX_PROPERTY)) { this.setEnableJmx(props.getBoolean(ClientConfig.ENABLE_JMX_PROPERTY)); } if(props.containsKey(ClientConfig.BOOTSTRAP_URLS_PROPERTY)) { List<String> urls = props.getList(ClientConfig.BOOTSTRAP_URLS_PROPERTY); if(urls.size() > 0) { setHttpBootstrapURL(urls.get(0)); } } if(props.containsKey(ClientConfig.MAX_TOTAL_CONNECTIONS_PROPERTY)) { setMaxR2ConnectionPoolSize(props.getInt(ClientConfig.MAX_TOTAL_CONNECTIONS_PROPERTY, maxR2ConnectionPoolSize)); } if(props.containsKey(ClientConfig.ROUTING_TIMEOUT_MS_PROPERTY)) this.setTimeoutMs(props.getLong(ClientConfig.ROUTING_TIMEOUT_MS_PROPERTY, timeoutMs), TimeUnit.MILLISECONDS); // By default, make all the timeouts equal to routing timeout timeoutConfig = new TimeoutConfig(timeoutMs, false); if(props.containsKey(ClientConfig.GETALL_ROUTING_TIMEOUT_MS_PROPERTY)) timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_ALL_OP_CODE, props.getInt(ClientConfig.GETALL_ROUTING_TIMEOUT_MS_PROPERTY)); if(props.containsKey(ClientConfig.GET_ROUTING_TIMEOUT_MS_PROPERTY)) timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_OP_CODE, props.getInt(ClientConfig.GET_ROUTING_TIMEOUT_MS_PROPERTY)); if(props.containsKey(ClientConfig.PUT_ROUTING_TIMEOUT_MS_PROPERTY)) { long putTimeoutMs = props.getInt(ClientConfig.PUT_ROUTING_TIMEOUT_MS_PROPERTY); timeoutConfig.setOperationTimeout(VoldemortOpCode.PUT_OP_CODE, putTimeoutMs); // By default, use the same thing for getVersions() also timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_VERSION_OP_CODE, putTimeoutMs); } // of course, if someone overrides it, we will respect that if(props.containsKey(ClientConfig.GET_VERSIONS_ROUTING_TIMEOUT_MS_PROPERTY)) timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_VERSION_OP_CODE, props.getInt(ClientConfig.GET_VERSIONS_ROUTING_TIMEOUT_MS_PROPERTY)); if(props.containsKey(ClientConfig.DELETE_ROUTING_TIMEOUT_MS_PROPERTY)) timeoutConfig.setOperationTimeout(VoldemortOpCode.DELETE_OP_CODE, props.getInt(ClientConfig.DELETE_ROUTING_TIMEOUT_MS_PROPERTY)); if(props.containsKey(ClientConfig.ALLOW_PARTIAL_GETALLS_PROPERTY)) timeoutConfig.setPartialGetAllAllowed(props.getBoolean(ClientConfig.ALLOW_PARTIAL_GETALLS_PROPERTY)); }
[ "Set the values using the specified Properties object.\n\n@param properties Properties object containing specific property values\nfor the RESTClient config\n\nNote: We're using the same property names as that in ClientConfig\nfor backwards compatibility." ]
[ "return a prepared Insert Statement fitting for the given ClassDescriptor", "Extracts a numeric id from a string, which can be either a Wikidata\nentity URI or a short entity or property id.\n\n@param idString\n@param isUri\n@return numeric id, or 0 if there was an error", "Use this API to fetch the statistics of all nslimitidentifier_stats resources that are configured on netscaler.", "Create button message key.\n\n@param gallery name\n@return Button message key as String", "returns the total count of objects in the GeneralizedCounter.", "Return any feedback messages and errors that were generated - but\nsuppressed - during the interpolation process. Since unresolvable\nexpressions will be left in the source string as-is, this feedback is\noptional, and will only be useful for debugging interpolation problems.\n\n@return a {@link List} that may be interspersed with {@link String} and\n{@link Throwable} instances.", "Only call with monitor for 'this' held", "Parses the supplied text and converts it to a Long\ncorresponding to that midnight in UTC on the specified date.\n\n@return null if it fails to parsing using the specified\nDateTimeFormat", "Performs a HTTP DELETE request.\n\n@return {@link Response}" ]
public static final BigInteger printConstraintType(ConstraintType value) { return (value == null ? null : BigInteger.valueOf(value.getValue())); }
[ "Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value" ]
[ "This method extracts data for a single day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data\n@param readExceptionsFromDays read exceptions form day definitions", "Detects if the current device is a Nintendo game device.\n@return detection of Nintendo", "Private recursive helper function to actually do the type-safe checking\nof assignability.", "Adds a node to this graph.\n\n@param node the node", "Create all the links possible between the Declaration and all the ImporterService matching the.\nImporterServiceFilter of the Linker.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration", "Checks if two parameterized types are exactly equal, under the variable\nreplacement described in the typeVarMap.", "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", "Adds an environment variable to the process being created.\n\n@param key they key for the variable\n@param value the value for the variable\n\n@return the launcher", "List the addons already added to an app.\n@param appName new of the app\n@return a list of add-ons" ]
@Override protected AbstractFilePickerFragment<File> getFragment( final String startPath, final int mode, final boolean allowMultiple, final boolean allowDirCreate, final boolean allowExistingFile, final boolean singleClick) { // startPath is allowed to be null. // In that case, default folder should be SD-card and not "/" String path = (startPath != null ? startPath : Environment.getExternalStorageDirectory().getPath()); currentFragment = new BackHandlingFilePickerFragment(); currentFragment.setArgs(path, mode, allowMultiple, allowDirCreate, allowExistingFile, singleClick); return currentFragment; }
[ "Return a copy of the new fragment and set the variable above." ]
[ "Consumes the next character in the request, checking that it matches the\nexpected one. This method should be used when the", "Format a calendar instance that is parseable from JavaScript, according to ISO-8601.\n\n@param cal the calendar to format to a JSON string\n@return a formatted date in the form of a string", "Starts the animation with the given index.\n@param animIndex 0-based index of {@link GVRAnimator} to start;\n@see GVRAvatar#stop()\n@see #start(String)", "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", "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", "Determines if a mouse event is inside a box.", "Print a task type.\n\n@param value TaskType instance\n@return task type value", "a small helper to get the color from the colorHolder\n\n@param ctx\n@return", "Computes the best fit set of polynomial coefficients to the provided observations.\n\n@param samplePoints where the observations were sampled.\n@param observations A set of observations." ]
protected void processDescriptions(List<MonolingualTextValue> descriptions) { for(MonolingualTextValue description : descriptions) { NameWithUpdate currentValue = newDescriptions.get(description.getLanguageCode()); // only mark the description as added if the value we are writing is different from the current one if (currentValue == null || !currentValue.value.equals(description)) { newDescriptions.put(description.getLanguageCode(), new NameWithUpdate(description, true)); } } }
[ "Adds descriptions to the item.\n\n@param descriptions\nthe descriptions to add" ]
[ "Use this API to update nsrpcnode.", "Finish configuration.", "Launch Navigation Service residing in the navigation module", "Declaration of the variable within a block", "Moves a particular enum option to be either before or after another specified enum option in the custom field.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object", "Set the specific device class of the node.\n@param specificDeviceClass the specificDeviceClass to set\n@exception IllegalArgumentException thrown when the specific device class does not match\nthe generic device class.", "This method is designed to be called from the diverse subclasses", "Returns server group by ID\n\n@param id ID of server group\n@return ServerGroup\n@throws Exception exception", "Load a test file, run the classifier on it, and then write a Viterbi search\ngraph for each sequence.\n\n@param testFile\nThe file to test on." ]
public int getNumWeights() { if (weights == null) return 0; int numWeights = 0; for (double[] wts : weights) { numWeights += wts.length; } return numWeights; }
[ "Returns the total number of weights associated with this classifier.\n\n@return number of weights" ]
[ "Unlinks a set of dependencies from this task.\n\n@param task The task to remove dependencies from.\n@return Request object", "Add the dependencies if the deployment contains a service activator loader entry.\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException", "1-D Double array to integer array.\n\n@param array Double array.\n@return Integer array.", "Update the server group's name\n\n@param serverGroupId ID of server group\n@param name new name of server group\n@return updated ServerGroup", "This method is called to format a priority.\n\n@param value priority instance\n@return formatted priority value", "Return the authorization URL which is used to perform the authorization_code based OAuth2 flow.\n@param clientID the client ID to use with the connection.\n@param redirectUri the URL to which Box redirects the browser when authentication completes.\n@param state the text string that you choose.\nBox sends the same string to your redirect URL when authentication is complete.\n@param scopes this optional parameter identifies the Box scopes available\nto the application once it's authenticated.\n@return the authorization URL", "Return whether or not the field value passed in is the default value for the type of the field. Null will return\ntrue.", "Sets the initial pivot ordering and compute the F-norm squared for each column", "Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.\n@return a JSON string containing the pending changes." ]
public static final String printDuration(Duration value) { return value == null ? null : Double.toString(value.getDuration()); }
[ "Print a duration value.\n\n@param value Duration instance\n@return string representation of a duration" ]
[ "Load a system library from a stream. Copies the library to a temp file\nand loads from there.\n\n@param libname name of the library (just used in constructing the library name)\n@param is InputStream pointing to the library", "Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5", "Replace default values will null, allowing them to be ignored.\n\n@param value value to test\n@return filtered value", "Size of a queue.\n\n@param jedis\n@param queueName\n@return", "Return the key if there is one else return -1", "Removes empty space when \"fitToContent\" is true and real height of object is\ntaller than current bands height, otherwise, it is not modified\n\n@param band\n@param currHeigth\n@param fitToContent", "Return a string representation of the object.", "Backup all xml files in a given directory.\n\n@param source the source directory\n@param target the target directory\n@throws IOException for any error", "Register custom filter types especially for serializer of specification json file" ]
public Credentials toGrgit() { if (username != null && password != null) { return new Credentials(username, password); } else { return null; } }
[ "Converts to credentials for use in Grgit.\n@return {@code null} if both username and password are {@code null},\notherwise returns credentials in Grgit format." ]
[ "Retrieve the number of minutes per year for this calendar.\n\n@return minutes per year", "Use this method to enable device network-related information tracking, including IP address.\nThis reporting is disabled by default. To re-disable tracking call this method with enabled set to false.\n\n@param value boolean Whether device network info reporting should be enabled/disabled.", "Retrieve a duration field.\n\n@param type field type\n@return Duration instance", "Adds a port that serves the HTTP requests. If unspecified, cleartext HTTP on port 36462 is used.\n\n@param localAddress the TCP/IP load address to bind\n@param protocol {@link SessionProtocol#HTTP} or {@link SessionProtocol#HTTPS}", "Returns an array of all endpoints\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param filters filters to apply to endpoints\n@return Collection of endpoints\n@throws Exception exception", "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)", "Check whether the URL start with one of the given prefixes.\n\n@param uri URI\n@param patterns possible prefixes\n@return true when URL starts with one of the prefixes", "Add several jvm metrics.", "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" ]
public float getMetallic() { Property p = getProperty(PropertyKey.METALLIC.m_key); if (null == p || null == p.getData()) { throw new IllegalArgumentException("Metallic property not found"); } Object rawValue = p.getData(); if (rawValue instanceof java.nio.ByteBuffer) { java.nio.FloatBuffer fbuf = ((java.nio.ByteBuffer) rawValue).asFloatBuffer(); return fbuf.get(); } else { return (Float) rawValue; } }
[ "Returns the metallic factor for PBR shading" ]
[ "Convert a Java date into a Planner date.\n\n20070222\n\n@param value Java Date instance\n@return Planner date", "Creates an operation to list the deployments.\n\n@return the operation", "Returns a new instance of the given class, using the constructor with the specified parameter types.\n\n@param target The class to instantiate\n@param types The parameter types\n@param args The arguments\n@return The instance", "Returns with an iterable of URIs that points to all elements that are\nreferenced by the argument or vice-versa.\n\n@return an iterable of URIs that are referenced by the argument or the\nother way around.", "Retrieve a boolean field.\n\n@param type field type\n@return field data", "Write an int attribute.\n\n@param name attribute name\n@param value attribute value", "Sets a request header with the given name and value. If a header with the\nspecified name has already been set then the new value overwrites the\ncurrent value.\n\n@param header the name of the header\n@param value the value of the header\n\n@throws NullPointerException if header or value are null\n@throws IllegalArgumentException if header or value are the empty string", "Use this API to add dnssuffix resources.", "Loads the currently known phases from Furnace to the map." ]
@UiThread public int getChildAdapterPosition() { int flatPosition = getAdapterPosition(); if (mExpandableAdapter == null || flatPosition == RecyclerView.NO_POSITION) { return RecyclerView.NO_POSITION; } return mExpandableAdapter.getChildPosition(flatPosition); }
[ "Returns the adapter position of the Child associated with this ChildViewHolder\n\n@return The adapter position of the Child if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled." ]
[ "Returns the accrued interest of the bond for a given date.\n\n@param date The date of interest.\n@param model The model under which the product is valued.\n@return The accrued interest.", "Process a compilation unit already parsed and build.", "Use this API to add vpnclientlessaccesspolicy.", "Creates and returns a temporary directory for a printing task.", "Use this API to renumber nspbr6 resources.", "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", "Distributed process finish.\n\n@param rb the rb\n@param mtasFields the mtas fields\n@throws IOException Signals that an I/O exception has occurred.", "Retrieve the value from the REST request body.\n\nTODO: REST-Server value cannot be null ( null/empty string ?)", "Set up the services to create a channel listener and operation handler service.\n@param serviceTarget the service target to install the services into\n@param endpointName the endpoint name to install the services into\n@param channelName the name of the channel\n@param executorServiceName service name of the executor service to use in the operation handler service\n@param scheduledExecutorServiceName service name of the scheduled executor service to use in the operation handler service" ]
@Override public Map<String, Set<String>> cleanObsoleteContent() { if(!readWrite) { return Collections.emptyMap(); } Map<String, Set<String>> cleanedContents = new HashMap<>(2); cleanedContents.put(MARKED_CONTENT, new HashSet<>()); cleanedContents.put(DELETED_CONTENT, new HashSet<>()); synchronized (contentHashReferences) { for (ContentReference fsContent : listLocalContents()) { if (!readWrite) { return Collections.emptyMap(); } if (!contentHashReferences.containsKey(fsContent.getHexHash())) { //We have no reference to this content if (markAsObsolete(fsContent)) { cleanedContents.get(DELETED_CONTENT).add(fsContent.getContentIdentifier()); } else { cleanedContents.get(MARKED_CONTENT).add(fsContent.getContentIdentifier()); } } else { obsoleteContents.remove(fsContent.getHexHash()); //Remove existing references from obsoleteContents } } } return cleanedContents; }
[ "Clean obsolete contents from the content repository. It will first mark contents as obsolete then after some time\nif these contents are still obsolete they will be removed.\n\n@return a map containing the list of marked contents and the list of deleted contents." ]
[ "Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable", "Add an individual class to the map file.\n\n@param loader jar file class loader\n@param jarEntry jar file entry\n@param writer XML stream writer\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException", "Scroll to the next page. To process the scrolling by pages LayoutScroller must be constructed\nwith a pageSize greater than zero.\n@return the new current item after the scrolling processed.", "add a join between two aliases\n\nTODO BRJ : This needs refactoring, it looks kind of weird\n\nno extents\nA1 -> A2\n\nextents on the right\nA1 -> A2\nA1 -> A2E0\n\nextents on the left : copy alias on right, extents point to copies\nA1 -> A2\nA1E0 -> A2C0\n\nextents on the left and right\nA1 -> A2\nA1 -> A2E0\nA1E0 -> A2C0\nA1E0 -> A2E0C0\n\n@param left\n@param leftKeys\n@param right\n@param rightKeys\n@param outer\n@param name", "Generates a mapping between attribute names and data types.\n\n@param name name of the map\n@param types types to write", "Invoke the setters for the given variables on the given instance.\n@param <T> the instance type\n@param instance the instance to inject with the variables\n@param vars the variables to inject\n@return the instance\n@throws ReflectiveOperationException if there was a problem finding or invoking a setter method", "Use this API to update vpnclientlessaccesspolicy.", "Print classes that were parts of relationships, but not parsed by javadoc", "Gets an item that was shared with a shared link.\n@param api the API connection to be used by the shared item.\n@param sharedLink the shared link to the item.\n@return info about the shared item." ]
public synchronized void persistProperties() throws IOException { beginPersistence(); // Read the properties file into memory // Shouldn't be so bad - it's a small file List<String> content = readFile(propertiesFile); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(propertiesFile), StandardCharsets.UTF_8)); try { for (String line : content) { String trimmed = line.trim(); if (trimmed.length() == 0) { bw.newLine(); } else { Matcher matcher = PROPERTY_PATTERN.matcher(trimmed); if (matcher.matches()) { final String key = cleanKey(matcher.group(1)); if (toSave.containsKey(key) || toSave.containsKey(key + DISABLE_SUFFIX_KEY)) { writeProperty(bw, key, matcher.group(2)); toSave.remove(key); toSave.remove(key + DISABLE_SUFFIX_KEY); } else if (trimmed.startsWith(COMMENT_PREFIX)) { // disabled user write(bw, line, true); } } else { write(bw, line, true); } } } endPersistence(bw); } finally { safeClose(bw); } }
[ "Saves changes in properties file. It reads the property file into memory, modifies it and saves it back to the file.\n\n@throws IOException" ]
[ "Convert to IPv6 EUI-64 section\n\nhttp://standards.ieee.org/develop/regauth/tut/eui64.pdf\n\n@param asMAC if true, this address is considered MAC and the EUI-64 is extended using ff-ff, otherwise this address is considered EUI-48 and extended using ff-fe\nNote that IPv6 treats MAC as EUI-48 and extends MAC to IPv6 addresses using ff-fe\n@return", "Create and serialize a WorkerStatus for a pause event.\n\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus", "Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build.\n@throws IOException\n@throws InterruptedException", "Populate a task from a Row instance.\n\n@param row Row instance\n@param task Task instance", "Return true only if the MethodCallExpression represents a method call for the specified method name\n@param methodCall - the AST MethodCallExpression\n@param methodNamePattern - the expected name of the method being called\n@param numArguments - The number of expected arguments\n@return true only if the method call name matches", "Draw the specified geometry.\n\n@param geometry geometry to draw\n@param symbol symbol for geometry\n@param fillColor fill colour\n@param strokeColor stroke colour\n@param lineWidth line width\n@param clipRect clipping rectangle", "Calls a function script associated with this component.\nThe function is called even if the component\nis not enabled and not attached to a scene object.\n@param funcName name of script function to call.\n@param args function parameters as an array of objects.\n@return true if function was called, false if no such function\n@see org.gearvrf.script.GVRScriptFile#invokeFunction(String, Object[]) invokeFunction", "By default all bean archives see each other.", "Closes the output. Should be called after the JSON serialization was\nfinished.\n\n@throws IOException\nif there was a problem closing the output" ]
public static appflowpolicy_binding get(nitro_service service, String name) throws Exception{ appflowpolicy_binding obj = new appflowpolicy_binding(); obj.set_name(name); appflowpolicy_binding response = (appflowpolicy_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch appflowpolicy_binding resource of given name ." ]
[ "Gets a list of split keys given a desired number of splits.\n\n<p>This list will contain multiple split keys for each split. Only a single split key\nwill be chosen as the split point, however providing multiple keys allows for more uniform\nsharding.\n\n@param numSplits the number of desired splits.\n@param query the user query.\n@param partition the partition to run the query in.\n@param datastore the datastore containing the data.\n@throws DatastoreException if there was an error when executing the datastore query.", "Returns all information related to a single texture.\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture information", "Parse a string representation of an Integer value.\n\n@param value string representation\n@return Integer value", "Returns an HTML table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.", "Tests whether the given string is the name of a java.lang type.", "Given counters of true positives, false positives, and false\nnegatives, prints out precision, recall, and f1 for each key.", "Match the Origin header with the allowed origins.\nIf it doesn't match then a 403 response code is set on the response and it returns null.\n@param exchange the current HttpExchange.\n@param allowedOrigins list of sanitized allowed origins.\n@return the first matching origin, null otherwise.\n@throws Exception", "Closes the window containing the given component.\n\n@param component a component", "Removes all candidates from this collection which are not\nassociated with an initialising method.\n\n@return a {@code Collection} containing the removed\nunassociated candidates. This list is empty if none\nwere removed, i. e. the result is never {@code null}." ]
@SuppressWarnings("serial") private Component createCloseButton() { Button closeBtn = CmsToolBar.createButton( FontOpenCms.CIRCLE_INV_CANCEL, m_messages.key(Messages.GUI_BUTTON_CANCEL_0)); closeBtn.addClickListener(new ClickListener() { public void buttonClick(ClickEvent event) { closeAction(); } }); return closeBtn; }
[ "Create the close button UI Component.\n@return the close button." ]
[ "Convert a color to an angle.\n\n@param color The RGB value of the color to \"find\" on the color wheel.\n\n@return The angle (in rad) the \"normalized\" color is displayed on the\ncolor wheel.", "Use this API to fetch aaapreauthenticationpolicy_binding resource of given name .", "Load an animation for the current avatar.\n@param animResource resource with the animation\n@param boneMap optional bone map to map animation skeleton to avatar", "Returns true if the ASTNode is a declaration of a closure, either as a declaration\nor a field.\n@param expression\nthe target expression\n@return\nas described", "Takes the file, reads it in, and prints out the likelihood of each possible\nlabel at each point.\n\n@param filename\nThe path to the specified file", "Loads the given class, respecting the given classloader.\n@param clazz class to load\n@return Loaded class\n@throws ClassNotFoundException", "Default settings set type loader to ClasspathTypeLoader if not set before.", "Checks if the given AnnotatedType is sensible, otherwise provides warnings.", "Adds a data set to IIM file.\n\n@param ds\ndata set id (see constants in IIM class)\n@param value\ndata set value. Null values are silently ignored.\n@throws SerializationException\nif value can't be serialized by data set's serializer\n@throws InvalidDataSetException\nif data set isn't defined" ]
public <E extends Enum<E> & FieldType> E nextField(Class<E> clazz, UserFieldDataType type) { for (String name : m_names[type.ordinal()]) { int i = NumberHelper.getInt(m_counters.get(name)) + 1; try { E e = Enum.valueOf(clazz, name + i); m_counters.put(name, Integer.valueOf(i)); return e; } catch (IllegalArgumentException ex) { // try the next name } } // no more fields available throw new IllegalArgumentException("No fields for type " + type + " available"); }
[ "Generate the next available field for a user defined field.\n\n@param <E> field type class\n@param clazz class of the desired field enum\n@param type user defined field type.\n@return field of specified type" ]
[ "Add a simple property to the map file.\n\n@param writer xml stream writer\n@param name property name\n@param propertyType property type\n@param readMethod read method name\n@param writeMethod write method name\n@throws XMLStreamException", "Get the content-type, including the optional \";base64\".", "Commit all written data to the physical disk\n\n@throws IOException any io exception", "Record the duration of a put operation, along with the size of the values\nreturned.", "Returns the simplified name of the type of the specified object.", "Finds and returns the date for the given event summary and year within the given ics file,\nor null if not present.", "Adds a metadata classification to the specified file.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type added to the file.", "Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction", "Executes the given transaction within the context of a write lock.\n\n@param t The transaction to execute." ]
public static long directorySize(File self) throws IOException, IllegalArgumentException { final long[] size = {0L}; eachFileRecurse(self, FileType.FILES, new Closure<Void>(null) { public void doCall(Object[] args) { size[0] += ((File) args[0]).length(); } }); return size[0]; }
[ "Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory" ]
[ "Read a FastTrack file.\n\n@param file FastTrack file", "Invoke an HTTP GET request on a remote host. You must close the InputStream after you are done with.\n\n@param path The request path\n@param parameters The parameters (collection of Parameter objects)\n@return The Response", "Read custom property definitions for tasks.\n\n@param gpTasks GanttProject tasks", "Visits a dependence of the current module.\n\n@param module the qualified name of the dependence.\n@param access the access flag of the dependence among\nACC_TRANSITIVE, ACC_STATIC_PHASE, ACC_SYNTHETIC\nand ACC_MANDATED.\n@param version the module version at compile time or null.", "Print an earned value method.\n\n@param value EarnedValueMethod instance\n@return earned value method value", "Checks if a given number is in the range of a float.\n\n@param number\na number which should be in the range of a float (positive or negative)\n\n@see java.lang.Float#MIN_VALUE\n@see java.lang.Float#MAX_VALUE\n\n@return number as a float", "Process an individual UDF.\n\n@param udf UDF definition", "Use this API to add nsip6.", "This method dumps the entire contents of a file to an output\nprint writer as hex and ASCII data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors" ]
private String findLoggingProfile(final ResourceRoot resourceRoot) { final Manifest manifest = resourceRoot.getAttachment(Attachments.MANIFEST); if (manifest != null) { final String loggingProfile = manifest.getMainAttributes().getValue(LOGGING_PROFILE); if (loggingProfile != null) { LoggingLogger.ROOT_LOGGER.debugf("Logging profile '%s' found in '%s'.", loggingProfile, resourceRoot); return loggingProfile; } } return null; }
[ "Find the logging profile attached to any resource.\n\n@param resourceRoot the root resource\n\n@return the logging profile name or {@code null} if one was not found" ]
[ "Replies the elements of the given map except the pair with the given key.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param key the key to remove.\n@return the map with the content of the map except the key.\n@since 2.15", "Add join info to the query. This can be called multiple times to join with more than one table.", "Retrieves list of inbox messages based on given userId\n@param userId String userid\n@return ArrayList of {@link CTMessageDAO}", "Prepare a parallel HTTP DELETE Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder", "Adds the given value to the list of values that should still be\nserialized. The given RDF resource will be used as a subject.\n\n@param value\nthe value to be serialized\n@param resource\nthe RDF resource that is used as a subject for serialization", "Returns the configured page size, or the default page size if it is not configured.\n@return The configured page size, or the default page size if it is not configured.", "Deletes a vertex from this list.", "Executes a method on the server asynchronously", "Executes the API action \"wbsetlabel\" for the given parameters.\n@param id\nthe id of the entity to be edited; if used, the site and title\nparameters must be null\n@param site\nwhen selecting an entity by title, the site key for the title,\ne.g., \"enwiki\"; if used, title must also be given but id must\nbe null\n@param title\nstring used to select an entity by title; if used, site must\nalso be given but id must be null\n@param newEntity\nused for creating a new entity of a given type; the value\nindicates the intended entity type; possible values include\n\"item\" and \"property\"; if used, the parameters id, site, and\ntitle must be null\n@param language\nthe language code for the label\n@param value\nthe value of the label to set. Set it to null to remove the label.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the label as returned by the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException" ]
public void setString(String[] newValue) { if ( newValue != null ) { this.string.setValue(newValue.length, newValue); } }
[ "Assign float value within allowed range of [0,infinity) to initializeOnly SFFloat field named spacing.\n@param newValue" ]
[ "Checks if a given number is in the range of an integer.\n\n@param number\na number which should be in the range of an integer (positive or negative)\n\n@see java.lang.Integer#MIN_VALUE\n@see java.lang.Integer#MAX_VALUE\n\n@return number as an integer (rounding might occur)", "Gets the type to use for the Vaadin table column corresponding to the c-th column in this result.\n\n@param c the column index\n@return the class to use for the c-th Vaadin table column", "Creates a map of metadata from json.\n@param jsonObject metadata json object for metadata field in get /files?fileds=,etadata.scope.template response\n@return Map of String as key a value another Map with a String key and Metadata value", "Acquires a broker instance. If no PBKey is available a runtime exception will be thrown.\n\n@return A broker instance", "Return the hostname of this address such as \"MYCOMPUTER\".", "Returns a string array of the methods loaded for a class\n\n@param pluginClass name of class\n@return string array of the methods loaded for the class\n@throws Exception exception", "Specifies the maximum capacity of the counter.\n\n@param capacity\n<code>long</code>\n@throws IllegalArgumentException\nif windowMillis is less than 1.", "Requests Change notifications of feed type normal.\n\n@return {@link ChangesResult} encapsulating the normal feed changes", "Update the Target Filter of the ImporterService.\nApply the induce modifications on the links of the ImporterService\n\n@param serviceReference" ]
public double getSpread(double bondPrice, Curve referenceCurve, AnalyticModel model) { GoldenSectionSearch search = new GoldenSectionSearch(-2.0, 2.0); while(search.getAccuracy() > 1E-11 && !search.isDone()) { double x = search.getNextPoint(); double fx=getValueWithGivenSpreadOverCurve(0.0,referenceCurve,x,model); double y = (bondPrice-fx)*(bondPrice-fx); search.setValue(y); } return search.getBestPoint(); }
[ "Returns the spread value such that the sum of cash flows of the bond discounted with a given reference curve\nwith the additional spread coincides with a given price.\n\n@param bondPrice The target price as double.\n@param referenceCurve The reference curve used for discounting the coupon payments.\n@param model The model under which the product is valued.\n@return The optimal spread value." ]
[ "Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object.", "Grab random holiday from the equivalence class that falls between the two dates\n\n@param earliest the earliest date parameter as defined in the model\n@param latest the latest date parameter as defined in the model\n@return a holiday that falls between the dates", "Sets all elements in this matrix to their absolute values. Note\nthat this operation is in-place.\n@see MatrixFunctions#abs(DoubleMatrix)\n@return this matrix", "Reads the next \"word from the request, comprising all characters up to the next SPACE.\nCharacters are tested by the supplied CharacterValidator, and an exception is thrown\nif invalid characters are encountered.", "Set the mesh to be tested against.\n\n@param mesh\nThe {@link GVRMesh} that the picking ray will test against.", "Converts a value to the appropriate type.\n\n@param type target type\n@param value input value\n@return output value", "Returns the object pointed by the result-type parameter \"parameters\"\n@param _invocation\n@return", "Encodes the given URI fragment with the given encoding.\n@param fragment the fragment to be encoded\n@param encoding the character encoding to encode to\n@return the encoded fragment\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "Get the element at the index as a float.\n\n@param i the index of the element to access" ]
public static void main(String[] args) { Treebank treebank = new DiskTreebank(); treebank.loadPath(args[0]); WordStemmer ls = new WordStemmer(); for (Tree tree : treebank) { ls.visitTree(tree); System.out.println(tree); } }
[ "Reads, stems, and prints the trees in the file.\n\n@param args Usage: WordStemmer file" ]
[ "read the prefetchInLimit from Config based on OJB.properties", "Divide two complex numbers, in-place\n\n@param c complex number to divide this by\n@param result complex number to hold result\n@return same as result", "Retrieve the number of minutes per month for this calendar.\n\n@return minutes per month", "Read hints from a file and merge with the given hints map.", "return the squared area of the triangle defined by the half edge hedge0\nand the point at the head of hedge1.\n\n@param hedge0\n@param hedge1\n@return", "Creates a block matrix the same size as A_inv, inverts the matrix and copies the results back\nonto A_inv.\n\n@param A_inv Where the inverted matrix saved. Modified.", "Notifies all registered BufferChangeLogger instances of a change.\n\n@param newData the buffer that contains the new data being added\n@param numChars the number of valid characters in the buffer", "Parses an item IRI\n\n@param iri\nthe item IRI like http://www.wikidata.org/entity/Q42\n@throws IllegalArgumentException\nif the IRI is invalid or does not ends with an item id", "Sets the whole day flag.\n@param isWholeDay flag, indicating if the event lasts whole days." ]
public Diff compare(File f1, File f2) throws Exception { return this.compare(getCtType(f1), getCtType(f2)); }
[ "compares two java files" ]
[ "Calculate the name of the output value.\n\n@param outputPrefix a nullable prefix to prepend to the name if non-null and non-empty\n@param outputMapper the name mapper\n@param field the field containing the value", "Execute for result.\n\n@param executionContext the execution context\n@return the result\n@throws IOException for any error", "Builds the radio input to set the export and secure property.\n\n@param propName the name of the property to build the radio input for\n\n@return html for the radio input\n\n@throws CmsException if the reading of a property fails", "Get information about this database.\n\n@return DbInfo encapsulating the database info\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/database.html#getting-database-details\"\ntarget=\"_blank\">Databases - read</a>", "Use this API to reset appfwlearningdata resources.", "Adds the specified class to the internal class graph along with its\nrelations and dependencies, eventually inferring them, according to the\nOptions specified for this matcher\n@param cd", "Create a new AwsServiceClient instance with a different codec registry.\n\n@param codecRegistry the new {@link CodecRegistry} for the client.\n@return a new AwsServiceClient instance with the different codec registry", "If there are any observer methods, they must be static or business\nmethods.", "This method is called to format an accrue type value.\n\n@param type accrue type\n@return formatted accrue type" ]
private final void replyErrors(final String errorMessage, final String stackTrace, final String statusCode, final int statusCodeInt) { reply(true, errorMessage, stackTrace, statusCode, statusCodeInt, PcConstants.NA, null); }
[ "Reply used in error cases. set the response header as null.\n\n@param errorMessage the error message\n@param stackTrace the stack trace\n@param statusCode the status code\n@param statusCodeInt the status code int" ]
[ "Parse a string representation of password spec.\n\nA password spec string should be `<trait spec><length spec>`.\n\nWhere \"trait spec\" should be a composition of\n\n* `a` - indicate lowercase letter required\n* `A` - indicate uppercase letter required\n* `0` - indicate digit letter required\n* `#` - indicate special character required\n\n\"length spec\" should be `[min,max]` where `max` can be omitted.\n\nHere are examples of valid \"length spec\":\n\n* `[6,20]` // min length: 6, max length: 20\n* `[8,]` // min length: 8, max length: unlimited\n\nAnd examples of invalid \"length spec\":\n\n* `[8]` // \",\" required after min part\n* `[a,f]` // min and max part needs to be decimal digit(s)\n* `[3,9)` // length spec must be started with `[` and end with `]`\n\n@param spec a string representation of password spec\n@return a {@link PasswordSpec} instance", "Return true if the processor of the node has previously been executed.\n\n@param processorGraphNode the node to test.", "Retrieve the configuration of the named template.\n\n@param name the template name;", "Creates a new tag in a workspace or organization.\n\nEvery tag is required to be created in a specific workspace or\norganization, and this cannot be changed once set. Note that you can use\nthe `workspace` parameter regardless of whether or not it is an\norganization.\n\nReturns the full record of the newly created tag.\n\n@param workspace The workspace or organization to create the tag in.\n@return Request object", "Adds the index input to list.\n\n@param name the name\n@param in the in\n@param postingsFormatName the postings format name\n@return the string\n@throws IOException Signals that an I/O exception has occurred.", "Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either\njar files or references to directories containing class files.\n\nThe sourcePaths must be a reference to the top level directory for sources (eg, for a file\nsrc/main/java/org/example/Foo.java, the source path would be src/main/java).\n\nThe wildcard resolver provides a fallback for processing wildcard imports that the underlying parser was unable\nto resolve.", "Use this API to fetch the statistics of all spilloverpolicy_stats resources that are configured on netscaler.", "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", "If status is in failed state then throw CloudException." ]
private static <D extends DatastoreConfiguration<G>, G extends GlobalContext<?, ?>> AppendableConfigurationContext invokeOptionConfigurator( OptionConfigurator configurator) { ConfigurableImpl configurable = new ConfigurableImpl(); configurator.configure( configurable ); return configurable.getContext(); }
[ "Invokes the given configurator, obtaining the correct global context type via the datastore configuration type of\nthe current datastore provider.\n\n@param configurator the configurator to invoke\n@return a context object containing the options set via the given configurator" ]
[ "Checks whether an XPath expression starts with an XPath eventable condition.\n\n@param dom The DOM String.\n@param eventableCondition The eventable condition.\n@param xpath The XPath.\n@return boolean whether xpath starts with xpath location of eventable condition xpath\ncondition\n@throws XPathExpressionException\n@throws CrawljaxException when eventableCondition is null or its inXPath has not been set", "Calculate the child size along the axis\n@param dataIndex data index\n@param axis {@link Axis}\n@return child size", "Use this API to fetch tunneltrafficpolicy resource of given name .", "Sets the baseline start text value.\n\n@param baselineNumber baseline number\n@param value baseline start text value", "Throws an IllegalStateException when the given value is not false.", "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.", "Set the TimeSensor's cycleInterval property\nCurrently, this does not change the duration of the animation.\n@param newCycleInterval", "Use this API to enable Interface resources of given names.", "Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error" ]
public ProducerPoolData<V> getProducerPoolData(String topic, Partition bidPid, List<V> data) { return new ProducerPoolData<V>(topic, bidPid, data); }
[ "This constructs and returns the request object for the producer pool\n\n@param topic the topic to which the data should be published\n@param bidPid the broker id and partition id\n@param data the data to be published\n@return producer data of builder" ]
[ "Gets the global and adds it ot the BatchExecutionresults using the alternative outIdentifier.\n\n@param identifier\nThe identifier of the global\n@param outIdentifier\nThe identifier used in the ExecutionResults to store the global.\n@return", "Returns the given collection persister for the inverse side in case the given persister represents the main side\nof a bi-directional many-to-many association.\n\n@param mainSidePersister the collection persister on the main side of a bi-directional many-to-many association\n@return the collection persister for the inverse side of the given persister or {@code null} in case it\nrepresents the inverse side itself or the association is uni-directional", "Whether the address is IPv4-compatible\n\n@see java.net.Inet6Address#isIPv4CompatibleAddress()", "Execute a slave process. Pump events to the given event bus.", "Stores the gathered usage statistics about property uses to a CSV file.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use", "Use this API to fetch onlinkipv6prefix resource of given name .", "Updates the image information.", "Returns the portion of the field name after the last dot, as field names\nmay actually be paths.", "Gets an exception reporting an unexpected XML element.\n\n@param reader a reference to the stream reader.\n@return the constructed {@link javax.xml.stream.XMLStreamException}." ]
public List<String> getCorporateGroupIds(final String organizationId) { final DbOrganization dbOrganization = getOrganization(organizationId); return dbOrganization.getCorporateGroupIdPrefixes(); }
[ "Returns the list view of corporate groupIds of an organization\n\n@param organizationId String\n@return ListView" ]
[ "except for the ones that make the content appear under the system bars.", "Process each regex group matched substring of the given CharSequence. If the closure\nparameter takes one argument, an array with all match groups is passed to it.\nIf the closure takes as many arguments as there are match groups, then each\nparameter will be one match group.\n\n@param self the source CharSequence\n@param regex a Regex CharSequence\n@param closure a closure with one parameter or as much parameters as groups\n@return the source CharSequence\n@see #eachMatch(String, String, groovy.lang.Closure)\n@since 1.8.2", "Initialize dates panel elements.", "Build the Criteria using multiple ORs\n@param ids collection of identities\n@param fields\n@return Criteria", "Chooses a single segment to be compressed, or null if no segment could be chosen.\n@param options\n@param createMixed\n@return", "Checks the second, hour, month, day, month and year are equal.", "Retrieve an instance of the TaskField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return TaskField instance", "Execute the operation.\n\n@param listener the transactional operation listener\n@param client the transactional protocol client\n@param identity the server identity\n@param operation the operation\n@param transformer the operation result transformer\n@return whether the operation was executed", "Adds BETWEEN criteria,\ncustomer_id between 1 and 10\n\n@param attribute The field name to be used\n@param value1 The lower boundary\n@param value2 The upper boundary" ]
public Metadata createMetadata(String templateName, String scope, Metadata metadata) { URL url = METADATA_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID(), scope, templateName); BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "POST"); request.addHeader("Content-Type", "application/json"); request.setBody(metadata.toString()); BoxJSONResponse response = (BoxJSONResponse) request.send(); return new Metadata(JsonObject.readFrom(response.getJSON())); }
[ "Creates metadata on this folder using a specified scope and template.\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." ]
[ "Retrieves the timephased breakdown of cost.\n\n@return timephased cost", "Promote a module in the Grapes server\n\n@param name\n@param version\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Set work connection.\n\n@param db the db setup bean", "Load a list of entities using the information in the context\n\n@param session The session\n@param lockOptions The locking details\n@param ogmContext The context with the information to load the entities\n@return the list of entities corresponding to the given context", "Execute for result.\n\n@param executionContext the execution context\n@return the result\n@throws IOException for any error", "Log the values for the provided template.\n\n@param templateName the name of the template the values came from\n@param template the template object\n@param values the resultant values", "Naive implementation of the difference in days between two dates", "Populate a resource assignment workgroup instance.\n\n@param record MPX record\n@param workgroup workgroup instance\n@throws MPXJException", "returns IsolationLevel literal as matching\nto the corresponding id\n@return the IsolationLevel literal" ]
public StatementBuilder withQualifierValue(PropertyIdValue propertyIdValue, Value value) { withQualifier(factory.getValueSnak(propertyIdValue, value)); return getThis(); }
[ "Adds a qualifier with the given property and value to the constructed\nstatement.\n\n@param propertyIdValue\nthe property of the qualifier\n@param value\nthe value of the qualifier\n@return builder object to continue construction" ]
[ "Checks if the dependency server is available\n\n@return true if the server is reachable, false otherwise", "when divisionPrefixLen is null, isAutoSubnets has no effect", "Remove any device announcements that are so old that the device seems to have gone away.", "Returns iterable with all non-deleted file version legal holds for this legal hold policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing file version legal holds info.", "Used to NOT the argument clause specified.", "Use this API to update onlinkipv6prefix resources.", "Converts a boolean array containing the pixel data in BINARY mode to an\ninteger array with the pixel data in RGB mode.\n\n@param binaryArray pixel binary data\n@return pixel integer data in RGB mode.", "Creates a new RDF serializer based on the current configuration of this\nobject.\n\n@return the newly created RDF serializer\n@throws IOException\nif there were problems opening the output files", "Sets the global. Does not add the global to the ExecutionResults.\n\n@param identifier\nThe identifier of the global\n@param object\nThe instance to be set as the global.\n@return" ]
public JSONObject toJson() throws JSONException { JSONObject result = new JSONObject(); if (m_detailId != null) { result.put(JSON_DETAIL, "" + m_detailId); } if (m_siteRoot != null) { result.put(JSON_SITEROOT, m_siteRoot); } if (m_structureId != null) { result.put(JSON_STRUCTUREID, "" + m_structureId); } if (m_projectId != null) { result.put(JSON_PROJECT, "" + m_projectId); } if (m_type != null) { result.put(JSON_TYPE, "" + m_type.getJsonId()); } return result; }
[ "Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail" ]
[ "Print a date time value.\n\n@param value date time value\n@return string representation", "Process the start of this element.\n\n@param attributes The attribute list for this element\n@param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace\naware or the element has no namespace\n@param name the local name if the parser is namespace aware, or just the element name otherwise\n@throws Exception if something goes wrong", "Boot the controller. Called during service start.\n\n@param context the boot context\n@throws ConfigurationPersistenceException\nif the configuration failed to be loaded", "when divisionPrefixLen is null, isAutoSubnets has no effect", "Get info about the shards in the database.\n\n@return List of shards\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-database-_shards-\"\ntarget=\"_blank\">_shards</a>", "Check if the node matches the column values\n\n@param nodeProperties the properties on the node\n@param keyColumnNames the name of the columns to check\n@param keyColumnValues the value of the columns to check\n@return true if the properties of the node match the column names and values", "convert selector used in an upsert statement into a document", "Make log segment file name from offset bytes. All this does is pad out the offset number\nwith zeros so that ls sorts the files numerically\n@param offset offset value (padding with zero)\n@return filename with offset", "callers of doLogin should be serialized before calling in." ]
public List<ProjectFile> readAll() throws MPXJException { Map<Integer, String> projects = listProjects(); List<ProjectFile> result = new ArrayList<ProjectFile>(projects.keySet().size()); for (Integer id : projects.keySet()) { setProjectID(id.intValue()); result.add(read()); } return result; }
[ "Convenience method which allows all projects in the database to\nbe read in a single operation.\n\n@return list of ProjectFile instances\n@throws MPXJException" ]
[ "Static factory method.\n\n@param targetVariable\nthe variable to find the effective {@code putfield} or\n{@code putstatic} instruction for.\n@param controlFlowBlocks\nall control flow blocks of an initialising constructor or\nmethod.\n@return a new instance of this class.", "Add the string representation of the given object to this sequence at the given index. The given indentation will\nbe prepended to each line except the first one if the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.\n@param index\nthe index in the list of segments.", "Support the range subscript operator for CharSequence\n\n@param text a CharSequence\n@param range a Range\n@return the subsequence CharSequence\n@since 1.0", "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.", "Set a proxy for REST-requests.\n\n@param proxyHost\n@param proxyPort", "Recovers the state of synchronization in case a system failure happened. The goal is to revert\nto a known, good state.", "Builds IMAP envelope String from pre-parsed data.", "Calls afterMaterialization on all registered listeners in the reverse\norder of registration.", "Delete an object." ]
protected static Statement memorize(final Statement target, final ConnectionHandle connectionHandle) { return (Statement) Proxy.newProxyInstance( StatementProxy.class.getClassLoader(), new Class[] {StatementProxy.class}, new MemorizeTransactionProxy(target, connectionHandle)); }
[ "Wrap Statement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a statement." ]
[ "Gets a design document using the id and revision from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}", "Retrieves the class object for the class with the given name.\n\n@param name The class name\n@return The class object\n@throws ClassNotFoundException If the class is not on the classpath (the exception message contains the class name)", "Assign float value to inputOutput SFFloat field named speed.\nNote that our implementation with ExoPlayer that pitch and speed will be set to the same value.\n@param newValue", "Get the directory where the compiled jasper reports should be put.\n\n@param configuration the configuration for the current app.", "Compares two annotated parameters and returns true if they are equal", "In managed environment do internal close the used connection", "Adds listeners and reads from a file.\n\n@param reader reader for file type\n@param file schedule data\n@return ProjectFile instance", "called when we are completed finished with using the TcpChannelHub", "The test that checks if clipping is needed.\n\n@param f\nfeature to test\n@param scale\nscale\n@return true if clipping is needed" ]
public static NodeList evaluateXpathExpression(String domStr, String xpathExpr) throws XPathExpressionException, IOException { Document dom = DomUtils.asDocument(domStr); return evaluateXpathExpression(dom, xpathExpr); }
[ "Returns the list of nodes which match the expression xpathExpr in the String domStr.\n\n@return the list of nodes which match the query\n@throws XPathExpressionException\n@throws IOException" ]
[ "Promote a module in the Grapes server\n\n@param name\n@param version\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Launch Navigation Service residing in the navigation module", "Creates a window visually showing the matrix's state. Block means an element is zero.\nRed positive and blue negative. More intense the color larger the element's absolute value\nis.\n\n@param A A matrix.\n@param title Name of the window.", "Draw an elliptical interior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for filling", "Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance", "loads a class using the name of the class", "If there are any observer methods, they must be static or business\nmethods.", "Returns the intersection of sets s1 and s2.", "Calculates the column width according to its type.\n@param _property the property.\n@return the column width." ]
public void merge() { Thread currentThread = Thread.currentThread(); if(!stats.get(currentThread).equals(this) || currentThread instanceof WindupChildThread) { throw new IllegalArgumentException("Trying to merge executionstatistics from a " + "different thread that is not registered as main thread of application run"); } for (Thread thread : stats.keySet()) { if(thread instanceof WindupChildThread && ((WindupChildThread) thread).getParentThread().equals(currentThread)) { merge(stats.get(thread)); } } }
[ "Merge this ExecutionStatistics with all the statistics created within the child threads. All the child threads had to be created using Windup-specific\nThreadFactory in order to contain a reference to the parent thread." ]
[ "This method is called to format a rate.\n\n@param value rate value\n@return formatted rate", "Specialized version of readValue just for reading map keys, because the StdDeserializer methods like\n_parseIntPrimitive blow up when the current JsonToken is FIELD_NAME", "Returns an empty Promotion details in Json\n\n@return String\n@throws IOException", "Detaches or removes the value from this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.", "Finds the last entry of the address list and returns it as a property.\n\n@param address the address to get the last part of\n\n@return the last part of the address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty", "Calculates the static drift. Static means, that the drift does not change direction or intensity over time.\n\n@param tracks Tracks which seems to exhibit a local drift\n@return The static drift over all trajectories", "Calculates the Boundedness value to given confinement radius, diffusion coefficient, timlag and number of steps.\n@param D diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param confRadius Confinement radius\n@return Boundedness value", "Retrieve a UUID in the form required by Primavera PMXML.\n\n@param guid UUID instance\n@return formatted UUID", "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" ]
private double sumSquaredDiffs() { double mean = getArithmeticMean(); double squaredDiffs = 0; for (int i = 0; i < getSize(); i++) { double diff = mean - dataSet[i]; squaredDiffs += (diff * diff); } return squaredDiffs; }
[ "Helper method for variance calculations.\n@return The sum of the squares of the differences between\neach value and the arithmetic mean.\n@throws EmptyDataSetException If the data set is empty." ]
[ "Returns all tags that designate this tag. E.g., for \"tesla-model3\", this would return \"car\", \"vehicle\", \"vendor-tesla\" etc.", "Return the list of module dependencies\n\n@param moduleName\n@param moduleVersion\n@param fullRecursive\n@param corporate\n@param thirdParty\n@return List<Dependency>\n@throws GrapesCommunicationException", "Parses an item IRI\n\n@param iri\nthe item IRI like http://www.wikidata.org/entity/Q42\n@throws IllegalArgumentException\nif the IRI is invalid or does not ends with an item id", "Returns status message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String", "Call batch tasks inside of a connection which may, or may not, have been \"saved\".", "Set the property on the given object to the new value.\n\n@param object on which to set the property\n@param newValue the new value of the property\n@throws RuntimeException if the property could not be set", "This method attempts to locate a suitable directory by checking a number of different configuration sources.\n\n1 - serverConfigUserDirPropertyName - This value is used to check it a matching system property has been set. 2 -\nsuppliedConfigDir - If a path was specified on the command line it is expected to be passed in as this parameter. 3 -\nserverConfigDirPropertyName - This is a second system property to check.\n\nAnd finally if none of these match defaultBaseDir specifies the configuration being searched and is appended to the JBoss\nHome value discovered when the utility started.", "Validates a space separated list of emails.\n\n@param emails Space separated list of emails\n@return {@link hudson.util.FormValidation.ok()} if valid or empty, error otherwise", "Returns information for a specific path id\n\n@param pathId ID of path\n@param clientUUID client UUID\n@param filters filters to set on endpoint\n@return EndpointOverride\n@throws Exception exception" ]
public Vector3Axis delta(Vector3f v) { Vector3Axis ret = new Vector3Axis(Float.NaN, Float.NaN, Float.NaN); if (x != Float.NaN && v.x != Float.NaN && !equal(x, v.x)) { ret.set(x - v.x, Layout.Axis.X); } if (y != Float.NaN && v.y != Float.NaN && !equal(y, v.y)) { ret.set(y - v.y, Layout.Axis.Y); } if (z != Float.NaN && v.z != Float.NaN && !equal(z, v.z)) { ret.set(z - v.z, Layout.Axis.Z); } return ret; }
[ "Calculate delta with another vector\n@param v another vector\n@return delta vector" ]
[ "Calls the specified function with the specified arguments. This is used for v2 response overrides\n\n@param className name of class\n@param methodName name of method\n@param pluginArgs plugin arguments\n@param args arguments to supply to function\n@throws Exception exception", "Method to declare Video-VideoRenderer mapping.\nFavorite videos will be rendered using FavoriteVideoRenderer.\nLive videos will be rendered using LiveVideoRenderer.\nLiked videos will be rendered using LikeVideoRenderer.\n\n@param content used to map object-renderers.\n@return VideoRenderer subtype class.", "Publish the changes to main registry", "disables the responses for a given pathname and user id\n\n@param model\n@param path_id\n@param clientUUID\n@return\n@throws Exception", "Determine whether the user has followed bean-like naming convention or not.", "Instantiate Service Locator client. After successful instantiation\nestablish a connection to the Service Locator server. This method will be\ncalled if property locatorClient is null. For this purpose was defined\nadditional properties to instantiate ServiceLocatorImpl.\n\n@throws InterruptedException\n@throws ServiceLocatorException", "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", "Notifies that a footer item is inserted.\n\n@param position the position of the content item.", "Map message info.\n\n@param messageInfoType the message info type\n@return the message info" ]
public static dospolicy[] get(nitro_service service) throws Exception{ dospolicy obj = new dospolicy(); dospolicy[] response = (dospolicy[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the dospolicy resources that are configured on netscaler." ]
[ "Adds a logical operator block.\n\n@param list parent criteria list\n@param block current block\n@param operator logical operator represented by this block", "Log a fatal message with a throwable.", "Shows the Loader component", "Returns the average event value in the current interval", "Called on mouse up in the caption area, ends dragging by ending event\ncapture.\n\n@param event the mouse up event that ended dragging\n\n@see DOM#releaseCapture\n@see #beginDragging\n@see #endDragging", "A smoothed step function. A cubic function is used to smooth the step between two thresholds.\n@param a the lower threshold position\n@param b the upper threshold position\n@param x the input parameter\n@return the output value", "Given a directory, determine if it contains a multi-file database whose format\nwe can process.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null", "Creates a metadata cache archive file of all tracks in the specified slot on the specified player. Any\nprevious contents of the specified file will be replaced.\n\n@param slot the slot in which the media to be cached can be found\n@param playlistId the id of playlist to be cached, or 0 of all tracks should be cached\n@param cache the file into which the metadata cache should be written\n\n@throws Exception if there is a problem communicating with the player or writing the cache file.", "Deletes the VFS XML bundle file.\n@throws CmsException thrown if the delete operation fails." ]
public void run() { ConnectionHandle connection = null; long tmp; long nextCheckInMs = this.maxAgeInMs; int partitionSize= this.partition.getAvailableConnections(); long currentTime = System.currentTimeMillis(); for (int i=0; i < partitionSize; i++){ try { connection = this.partition.getFreeConnections().poll(); if (connection != null){ connection.setOriginatingPartition(this.partition); tmp = this.maxAgeInMs - (currentTime - connection.getConnectionCreationTimeInMs()); if (tmp < nextCheckInMs){ nextCheckInMs = tmp; } if (connection.isExpired(currentTime)){ // kill off this connection closeConnection(connection); continue; } if (this.lifoMode){ // we can't put it back normally or it will end up in front again. if (!(connection.getOriginatingPartition().getFreeConnections().offer(connection))){ connection.internalClose(); } } else { this.pool.putConnectionBackInPartition(connection); } Thread.sleep(20L); // test slowly, this is not an operation that we're in a hurry to deal with (avoid CPU spikes)... } } catch (Throwable e) { logger.error("Connection max age thread exception.", e); } } // throw it back on the queue }
[ "Invoked periodically." ]
[ "moves to the next row of the underlying ResultSet and returns the\ncorresponding Object materialized from this row.", "Escape a value to be HTML friendly.\n@param value the Object value.\n@return the HTML-escaped String, or <null> if the value is null.", "Set a custom response for this path\n\n@param pathName name of path\n@param customResponse value of custom response\n@return true if success, false otherwise\n@throws Exception exception", "Get the element value in the list by index\n@param index the position in the list from which to get the element\n@return the element value", "helper to calculate the statusBar height\n\n@param context\n@param force pass true to get the height even if the device has no translucent statusBar\n@return", "Iterates through this file line by line, splitting each line using\nthe given regex separator. For each line, the given closure is called with\na single parameter being the list of strings computed by splitting the line\naround matches of the given regular expression.\nFinally the resources used for processing the file are closed.\n\n@param self a File\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see IOGroovyMethods#splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5", "Creates a style definition used for the body element.\n@return The body style definition.", "Creates a new CRFDatum from the preprocessed allData format, given the\ndocument number, position number, and a List of Object labels.\n\n@return A new CRFDatum", "Throws an exception if the current thread is not a GL thread.\n\n@since 1.6.5" ]
public synchronized static <D extends Dao<T, ?>, T> D lookupDao(ConnectionSource connectionSource, DatabaseTableConfig<T> tableConfig) { if (connectionSource == null) { throw new IllegalArgumentException("connectionSource argument cannot be null"); } TableConfigConnectionSource key = new TableConfigConnectionSource(connectionSource, tableConfig); Dao<?, ?> dao = lookupDao(key); if (dao == null) { return null; } else { @SuppressWarnings("unchecked") D castDao = (D) dao; return castDao; } }
[ "Helper method to lookup a DAO if it has already been associated with the table-config. Otherwise this returns\nnull." ]
[ "Gets a collection of photo counts for the given date ranges for the calling user.\n\nThis method requires authentication with 'read' permission.\n\n@param dates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@param takenDates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@return A Collection of Photocount objects", "Specify the socket to be used as underlying socket to connect\nto the APN service.\n\nThis assumes that the socket connects to a SOCKS proxy.\n\n@deprecated use {@link ApnsServiceBuilder#withProxy(Proxy)} instead\n@param proxySocket the underlying socket for connections\n@return this", "Read an int from an input stream.\n\n@param is input stream\n@return int value", "Receive an expected number of bytes from the player, logging a warning if we get a different number of them.\n\n@param is the input stream associated with the player metadata socket.\n@param size the number of bytes we expect to receive.\n@param description the type of response being processed, for use in the warning message.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response.", "Return the containing group if it contains exactly one element.\n\n@since 2.14", "Populate the constraint type and constraint date.\nNote that Merlin allows both start and end constraints simultaneously.\nAs we can't have both, we'll prefer the start constraint.\n\n@param row task data from database\n@param task Task instance", "A smoothed pulse function. A cubic function is used to smooth the step between two thresholds.\n@param a1 the lower threshold position for the start of the pulse\n@param a2 the upper threshold position for the start of the pulse\n@param b1 the lower threshold position for the end of the pulse\n@param b2 the upper threshold position for the end of the pulse\n@param x the input parameter\n@return the output value", "Use this API to update tmtrafficaction.", "Recurses the given folder and adds references to these files to the graph as FileModels.\n\nWe don't set the parent file model in the case of the initial children, as the direct parent is really the archive itself. For example for file\n\"root.zip/pom.xml\" - the parent for pom.xml is root.zip, not the directory temporary directory that happens to hold it." ]
@SuppressWarnings("WeakerAccess") public Color segmentColor(final int segment, final boolean front) { final ByteBuffer bytes = getData(); if (isColor) { final int base = segment * 6; final int backHeight = segmentHeight(segment, false); if (backHeight == 0) { return Color.BLACK; } final int maxLevel = front? 255 : 191; final int red = Util.unsign(bytes.get(base + 3)) * maxLevel / backHeight; final int green = Util.unsign(bytes.get(base + 4)) * maxLevel / backHeight; final int blue = Util.unsign(bytes.get(base + 5)) * maxLevel / backHeight; return new Color(red, green, blue); } else { final int intensity = getData().get(segment * 2 + 1) & 0x07; return (intensity >= 5) ? INTENSE_COLOR : NORMAL_COLOR; } }
[ "Determine the color of the waveform given an index into it.\n\n@param segment the index of the first waveform byte to examine\n@param front if {@code true} the front (brighter) segment of a color waveform preview is returned,\notherwise the back (dimmer) segment is returned. Has no effect for blue previews.\n\n@return the color of the waveform at that segment, which may be based on an average\nof a number of values starting there, determined by the scale" ]
[ "Switches to the next tab.", "Saves the current translations from the container to the respective localization.", "Provides a nicely formatted string of the method definition. For simplicity, generic types on some of the elements\nare not displayed.\n@return\nstring form of node with some generic elements suppressed", "Converts the given hash code into an index into the\nhash table.", "Sets the character translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator", "Convenience method to allow a cause. Grrrr.", "A specific, existing project can be updated by making a PUT request on the\nURL for that project. Only the fields provided in the `data` block will be\nupdated; 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 project record.\n\n@param project The project to update.\n@return Request object", "Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.", "makes object obj persistent to the Objectcache under the key oid." ]
@SuppressWarnings("deprecation") private void cancelRequestAndWorkerOnHost(List<String> targetHosts) { List<String> validTargetHosts = new ArrayList<String>(workers.keySet()); validTargetHosts.retainAll(targetHosts); logger.info("targetHosts for cancel: Total: {}" + " Valid in current manager with worker threads: {}", targetHosts.size(), validTargetHosts.size()); for (String targetHost : validTargetHosts) { ActorRef worker = workers.get(targetHost); if (worker != null && !worker.isTerminated()) { worker.tell(OperationWorkerMsgType.CANCEL, getSelf()); logger.info("Submitted CANCEL request on Host {}", targetHost); } else { logger.info( "Did NOT Submitted " + "CANCEL request on Host {} as worker on this host is null or already killed", targetHost); } } }
[ "Cancel request and worker on host.\n\n@param targetHosts\nthe target hosts" ]
[ "Split string content into list, ignoring matches of the pattern\n@param content String content\n@param ignorePattern Pattern to ignore\n@return list", "Set OAuth 1 authentication credentials for the replication target\n\n@param consumerSecret client secret\n@param consumerKey client identifier\n@param tokenSecret OAuth server token secret\n@param token OAuth server issued token\n@return this Replication instance to set more options or trigger the replication", "Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops", "Check if the current node is part of routing request based on cluster.xml\nor throw an exception.\n\n@param key The key we are checking\n@param routingStrategy The routing strategy\n@param currentNode Current node", "Update environment variables to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param config Key/Value pairs of environment variables.", "Log a trace message.", "Create a set containing all the processor at the current node and the entire subgraph.", "Transforms a config file with an XSLT transform.\n\n@param name file name of the config file\n@param transform file name of the XSLT file\n\n@throws Exception if something goes wrong", "Save map to file\n@param map Map to save\n@param file File to save\n@throws IOException I/O error" ]
public static authenticationnegotiatepolicy_binding get(nitro_service service, String name) throws Exception{ authenticationnegotiatepolicy_binding obj = new authenticationnegotiatepolicy_binding(); obj.set_name(name); authenticationnegotiatepolicy_binding response = (authenticationnegotiatepolicy_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch authenticationnegotiatepolicy_binding resource of given name ." ]
[ "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", "Call the appropriate handler for handling the httprequest. 404 if path is not found. 405 if path is found but\nhttpMethod does not match what's configured.\n\n@param request instance of {@code HttpRequest}\n@param responder instance of {@code HttpResponder} to handle the request.", "URLDecode a string\n@param s\n@return", "Serializes Number value and writes it into specified buffer.", "Use this API to fetch statistics of gslbservice_stats resource of given name .", "Checks if is single position prefix.\n\n@param fieldInfo\nthe field info\n@param prefix\nthe prefix\n@return true, if is single position prefix\n@throws IOException\nSignals that an I/O exception has occurred.", "Clears the handler hierarchy.", "Print a duration represented by an arbitrary fraction of minutes.\n\n@param duration Duration instance\n@param factor required factor\n@return duration represented as an arbitrary fraction of minutes", "Internal method used to locate an remove an item from a list Relations.\n\n@param relationList list of Relation instances\n@param targetTask target relationship task\n@param type target relationship type\n@param lag target relationship lag\n@return true if a relationship was removed" ]
public static boolean isAvroSchema(String serializerName) { if(serializerName.equals(AVRO_GENERIC_VERSIONED_TYPE_NAME) || serializerName.equals(AVRO_GENERIC_TYPE_NAME) || serializerName.equals(AVRO_REFLECTIVE_TYPE_NAME) || serializerName.equals(AVRO_SPECIFIC_TYPE_NAME)) { return true; } else { return false; } }
[ "Determine whether or not a given serializedr is \"AVRO\" based\n\n@param serializerName\n@return" ]
[ "Creates a cube with each face as a separate mesh using a different texture.\nThe meshes will share a common vertex array but will have separate index buffers.\n@param gvrContext context to use for creating cube\n@param facingOut true for outward normals, false for inward normals\n@param vertexDesc string describing which vertex components are desired\n@param textureList list of 6 textures, one for each face", "Update the lastCheckTime of the given record.\n\n@param id the id\n@param lastCheckTime the new value", "Adds a command class to the list of supported command classes by this node.\nDoes nothing if command class is already added.\n@param commandClass the command class instance to add.", "Gets all checked widget indexes in the group. The indexes are counted from 0 to size -1,\nwhere size is the number of Checkable widgets in the group. It does not take into account\nany non-Checkable widgets added to the group widget.\n\n@return list of checked widget indexes", "Sends a multipart response. Each body part represents a versioned value\nof the given key.\n\n@throws IOException\n@throws MessagingException", "Parses a single query item for the query facet.\n@param item JSON object of the query item.\n@return the parsed query item, or <code>null</code> if parsing failed.", "Returns the compact records for all teams in the organization visible to\nthe authorized user.\n\n@param organization Globally unique identifier for the workspace or organization.\n@return Request object", "This method is called by the client to load the most recent list of resources.\nThis method should only be called by the service client.\n\n@param result the most recent list of resources.", "Adapt the size of the tiles so that we have the same amount of tiles as we would have had with maxWidth\nand maxHeight, but with the smallest tiles as possible." ]
public static String getXPathExpression(Node node) { Object xpathCache = node.getUserData(FULL_XPATH_CACHE); if (xpathCache != null) { return xpathCache.toString(); } Node parent = node.getParentNode(); if ((parent == null) || parent.getNodeName().contains("#document")) { String xPath = "/" + node.getNodeName() + "[1]"; node.setUserData(FULL_XPATH_CACHE, xPath, null); return xPath; } if (node.hasAttributes() && node.getAttributes().getNamedItem("id") != null) { String xPath = "//" + node.getNodeName() + "[@id = '" + node.getAttributes().getNamedItem("id").getNodeValue() + "']"; node.setUserData(FULL_XPATH_CACHE, xPath, null); return xPath; } StringBuffer buffer = new StringBuffer(); if (parent != node) { buffer.append(getXPathExpression(parent)); buffer.append("/"); } buffer.append(node.getNodeName()); List<Node> mySiblings = getSiblings(parent, node); for (int i = 0; i < mySiblings.size(); i++) { Node el = mySiblings.get(i); if (el.equals(node)) { buffer.append('[').append(Integer.toString(i + 1)).append(']'); // Found so break; break; } } String xPath = buffer.toString(); node.setUserData(FULL_XPATH_CACHE, xPath, null); return xPath; }
[ "Reverse Engineers an XPath Expression of a given Node in the DOM.\n\n@param node the given node.\n@return string xpath expression (e.g., \"/html[1]/body[1]/div[3]\")." ]
[ "Emit an enum event with parameters supplied.\n\nThis will invoke all {@link SimpleEventListener} bound to the specific\nenum value and all {@link SimpleEventListener} bound to the enum class\ngiven the listeners has the matching argument list.\n\nFor example, given the following enum definition:\n\n```java\npublic enum UserActivity {LOGIN, LOGOUT}\n```\n\nWe have the following simple event listener methods:\n\n```java\n{@literal @}OnEvent\npublic void handleUserActivity(UserActivity, User user) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGIN)\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGOUT)\npublic void logUserLogout(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` method:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGIN, user, System.currentTimeMills());\n```\n\nThe `handleUserActivity` is not invoked because\n\n* The method parameter `(UserActivity, User, long)` does not match the declared argument list `(UserActivity, User)`\n\nWhile the following code will invoke both `handleUserActivity` and `logUserLogout` methods:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGOUT, user);\n```\n\nThe `logUserLogin` method will not be invoked because\n\n1. the method is bound to `UserActivity.LOGIN` enum value specifically, while `LOGOUT` is triggered\n2. the method has a `long timestamp` in the argument list and it is not passed to `eventBus.emit`\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener", "Reopen the associated static logging stream. Set to null to redirect to System.out.", "Sends a normal HTTP response containing the serialization information in\na XML format", "Main method to run the bot.\n\n@param args\n@throws LoginFailedException\n@throws IOException\n@throws MediaWikiApiErrorException", "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", "Writes one or more String columns as a line to the CsvWriter.\n\n@param columns\nthe columns to write\n@throws IllegalArgumentException\nif columns.length == 0\n@throws IOException\nIf an I/O error occurs\n@throws NullPointerException\nif columns is null", "Will auto format the given string to provide support for pickadate.js formats.", "Get the original-image using the specified URL suffix.\n\n@deprecated\n@see PhotosInterface#getImage(Photo, int)\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException\n@throws FlickrException", "Get file extension for script language.\n\n@param language the language name\n@return the file extension as string or null if the language is not in the set of languages supported by spin" ]
private String addIndexInputToList(String name, IndexInput in, String postingsFormatName) throws IOException { if (indexInputList.get(name) != null) { indexInputList.get(name).close(); } if (in != null) { String localPostingsFormatName = postingsFormatName; if (localPostingsFormatName == null) { localPostingsFormatName = in.readString(); } else if (!in.readString().equals(localPostingsFormatName)) { throw new IOException("delegate codec " + name + " doesn't equal " + localPostingsFormatName); } indexInputList.put(name, in); indexInputOffsetList.put(name, in.getFilePointer()); return localPostingsFormatName; } else { log.debug("no " + name + " registered"); return null; } }
[ "Adds the index input to list.\n\n@param name the name\n@param in the in\n@param postingsFormatName the postings format name\n@return the string\n@throws IOException Signals that an I/O exception has occurred." ]
[ "Add several jvm metrics.", "Forces removal of one or several faceted attributes for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining.", "Use this API to fetch all the cachepolicylabel resources that are configured on netscaler.", "Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Retrieves the amount of work on a given day, and\nreturns it in the specified format.\n\n@param date target date\n@param format required format\n@return work duration", "Construct a new instance.\n\n@return the new instance", "returns true if there are still more rows in the underlying ResultSet.\nReturns false if ResultSet is exhausted.", "Set the color at \"index\" to \"color\". Entries are interpolated linearly from\nthe existing entries at \"firstIndex\" and \"lastIndex\" to the new entry.\nfirstIndex < index < lastIndex must hold.\n@param index the position to set\n@param firstIndex the position of the first color from which to interpolate\n@param lastIndex the position of the second color from which to interpolate\n@param color the color to set", "Runs intermediate check on the Assembly status until it is finished executing,\nthen returns it as a response.\n\n@return {@link AssemblyResponse}\n@throws LocalOperationException if something goes wrong while running non-http operations.\n@throws RequestException if request to Transloadit server fails." ]
public void addOrder(String columnName, boolean ascending) { if (columnName == null) { return; } for (int i = 0; i < columns.size(); i++) { if (!columnName.equals(columns.get(i).getData())) { continue; } order.add(new Order(i, ascending ? "asc" : "desc")); } }
[ "Add an order on the given column\n\n@param columnName the name of the column\n@param ascending whether the sorting is ascending or descending" ]
[ "Mapping originator.\n\n@param originator the originator\n@return the originator type", "Enables or disables sound.\nWhen sound is disabled, nothing is played but the\naudio sources remain intact.\n@param flag true to enable sound, false to disable.", "Returns an iterator that iterates over all elements greater or equal to key in ascending order\n\n@param key key\n@return iterator", "Gets all rows.\n\n@return the list of all rows", "Checks whether a String satisfies the number range selection filter.\nThe test is evaluated based on the rightmost natural number found in\nthe String. Note that this is just evaluated on the String as given.\nIt is not trying to interpret it as a filename and to decide whether\nthe file exists, is a directory or anything like that.\n\n@param str The String to check for a number in\n@return true If the String is within the ranges filtered for", "Append the text at the end of the Path.\n\n@param self a Path\n@param text the text to append at the end of the Path\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0", "Returns the position for a given number of occurrences or NOT_FOUND if\nthis value is not found.\n\n@param nOccurrence\nnumber of occurrences\n@return the position for a given number of occurrences or NOT_FOUND if\nthis value is not found", "Create a list of operations required to a boot a managed server.\n\n@param serverName the server name\n@param domainModel the complete domain model\n@param hostModel the local host model\n@param domainController the domain controller\n@return the list of boot operations", "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." ]
public boolean getFlag(int index) { return BooleanHelper.getBoolean((Boolean) getCachedValue(selectField(ResourceFieldLists.CUSTOM_FLAG, index))); }
[ "Retrieve a flag value.\n\n@param index flag index (1-20)\n@return flag value" ]
[ "Use this API to fetch all the auditmessages resources that are configured on netscaler.", "Use this API to fetch all the gslbrunningconfig resources that are configured on netscaler.", "get the setter method corresponding to given property", "Copy a subsequence of Bytes to specific byte array. Uses the specified offset in the dest byte\narray to start the copy.\n\n@param start index of subsequence start (inclusive)\n@param end index of subsequence end (exclusive)\n@param dest destination array\n@param destPos starting position in the destination data.\n@exception IndexOutOfBoundsException if copying would cause access of data outside array\nbounds.\n@exception NullPointerException if either <code>src</code> or <code>dest</code> is\n<code>null</code>.\n@since 1.1.0", "Creates an IBlur instance for the given algorithm enum\n\n@param algorithm\n@param contextWrapper\n@return", "note this string is used by hashCode", "Retrieves a prompt value.\n\n@param field field type\n@param block criteria data block\n@return prompt value", "Returns a row matrix which contains all the elements in A which are flagged as true in 'marked'\n\n@param A Input matrix\n@param marked Input matrix marking elements in A\n@param output Storage for output row vector. Can be null. Will be reshaped.\n@return Row vector with marked elements", "Execute a set of API calls as batch request.\n@param requests list of api requests that has to be executed in batch.\n@return list of BoxAPIResponses" ]
public Search groupField(String fieldName, boolean isNumber) { assertNotEmpty(fieldName, "fieldName"); if (isNumber) { databaseHelper.query("group_field", fieldName + "<number>"); } else { databaseHelper.query("group_field", fieldName); } return this; }
[ "Group results by the specified field.\n\n@param fieldName by which to group results\n@param isNumber whether field isNumeric.\n@return this for additional parameter setting or to query" ]
[ "For a particular stealer node find all the primary partitions tuples it\nwill steal.\n\n@param currentCluster The cluster definition of the existing cluster\n@param finalCluster The final cluster definition\n@param stealNodeId Node id of the stealer node\n@return Returns a list of primary partitions which this stealer node will\nget", "The way calendars are stored in an MPP14 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects", "build an Authentication.\n\nTypes:\n<ul>\n<li>plain:jafka</li>\n<li>md5:77be29f6d71ec4e310766ddf881ae6a0</li>\n<li>crc32:1725717671</li>\n</ul>\n@param crypt password style\n@return an authentication\n@throws IllegalArgumentException password error", "Called by spring on initialization.", "Reads a \"date-time\" argument from the request.", "changes the color of the image - more red and less blue\n\n@return new pixel array", "Restores the dropout descriptor to a previously saved-off state", "Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations", "Initializes module enablement.\n\n@see ModuleEnablement" ]
private static void listAssignments(ProjectFile file) { Task task; Resource resource; String taskName; String resourceName; for (ResourceAssignment assignment : file.getResourceAssignments()) { task = assignment.getTask(); if (task == null) { taskName = "(null task)"; } else { taskName = task.getName(); } resource = assignment.getResource(); if (resource == null) { resourceName = "(null resource)"; } else { resourceName = resource.getName(); } System.out.println("Assignment: Task=" + taskName + " Resource=" + resourceName); if (task != null) { listTimephasedWork(assignment); } } System.out.println(); }
[ "This method lists all resource assignments defined in the file.\n\n@param file MPX file" ]
[ "Resets the calendar", "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", "Deletes a redirect by id\n\n@param id redirect ID", "Find the logging profile attached to any resource.\n\n@param resourceRoot the root resource\n\n@return the logging profile name or {@code null} if one was not found", "This method converts a node to text.\n\nLeading and trailing text from hidden tokens (whitespace/comments) is removed. Text from hidden tokens that is\nsurrounded by text from non-hidden tokens is summarized to a single whitespace.\n\nThe preferred use case of this method is to convert the {@link ICompositeNode} that has been created for a data\ntype rule to text.\n\nThis is also the recommended way to convert a node to text if you want to invoke\n{@link org.eclipse.xtext.conversion.IValueConverterService#toValue(String, String, INode)}", "Get top deployment unit.\n\n@param unit the current deployment unit\n@return top deployment unit", "this method is called from the event methods", "Boot with the given operations, performing full model and capability registry validation.\n\n@param bootOperations the operations. Cannot be {@code null}\n@param rollbackOnRuntimeFailure {@code true} if the boot should fail if operations fail in the runtime stage\n@return {@code true} if boot was successful\n@throws ConfigurationPersistenceException", "Updates the terms and statements of the item document identified by the\ngiven item id. The updates are computed with respect to the current data\nfound online, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in a given language are kept distinct.\n\n@param itemIdValue\nid of the document to be updated\n@param addLabels\nlabels to be set on the item. They will overwrite existing values\nin the same language.\n@param addDescriptions\ndescription to be set on the item. They will overwrite existing values\nin the same language.\n@param addAliases\naliases to be added. Existing aliases will be kept.\n@param deleteAliases\naliases to be deleted.\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 any IO errors, such as missing network connection" ]
public Map<String, CmsJspCategoryAccessBean> getReadResourceCategories() { if (null == m_resourceCategories) { m_resourceCategories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() { public Object transform(Object resourceName) { try { CmsResource resource = m_cms.readResource( getRequestContext().removeSiteRoot((String)resourceName)); return new CmsJspCategoryAccessBean(m_cms, resource); } catch (CmsException e) { LOG.warn(e.getLocalizedMessage(), e); return null; } } }); } return m_resourceCategories; }
[ "Reads the categories assigned to a resource.\n\n@return map from the resource path (root path) to the assigned categories" ]
[ "Returns the header with the specified name from the supplied map. The\nheader lookup is case-insensitive.\n\n@param headers A <code>Map</code> containing the HTTP request headers.\n@param name The name of the header to return.\n@return The value of specified header, or a comma-separated list if there\nwere multiple headers of that name.", "Sets the specified starting partition key.\n\n@param paging a paging state", "Replaces new line delimiters in the input stream with the Unix line feed.\n\n@param input", "To sql pattern.\n\n@param attribute the attribute\n@return the string", "Throws an exception or logs a message\n\n@param message The message for the exception or the log message. Must be internationalized", "Returns the ViewGroup used as a parent for the content view.\n\n@return The content view's parent.", "Start the rendering of the scalebar.", "Checks whether an uploaded file can be created in the VFS, and throws an exception otherwise.\n\n@param cms the current CMS context\n@param config the form configuration\n@param name the file name of the uploaded file\n@param size the size of the uploaded file\n\n@throws CmsUgcException if something goes wrong", "A connection to the database. Should be short-lived. No transaction active by default.\n\n@return a new open connection." ]
private void processDumpFileContentsRecovery(InputStream inputStream) throws IOException { JsonDumpFileProcessor.logger .warn("Entering recovery mode to parse rest of file. This might be slightly slower."); BufferedReader br = new BufferedReader(new InputStreamReader( inputStream)); String line = br.readLine(); if (line == null) { // can happen if iterator already has consumed all // the stream return; } if (line.length() >= 100) { line = line.substring(0, 100) + "[...]" + line.substring(line.length() - 50); } JsonDumpFileProcessor.logger.warn("Skipping rest of current line: " + line); line = br.readLine(); while (line != null && line.length() > 1) { try { EntityDocument document; if (line.charAt(line.length() - 1) == ',') { document = documentReader.readValue(line.substring(0, line.length() - 1)); } else { document = documentReader.readValue(line); } handleDocument(document); } catch (JsonProcessingException e) { logJsonProcessingException(e); JsonDumpFileProcessor.logger.error("Problematic line was: " + line.substring(0, Math.min(50, line.length())) + "..."); } line = br.readLine(); } }
[ "Process dump file data from the given input stream. The method can\nrecover from an errors that occurred while processing an input stream,\nwhich is assumed to contain the JSON serialization of a list of JSON\nentities, with each entity serialization in one line. To recover from the\nprevious error, the first line is skipped.\n\n@param inputStream\nthe stream to read from\n@throws IOException\nif there is a problem reading the stream" ]
[ "Adds a new leap second to these rules.\n\n@param mjDay the Modified Julian Day that the leap second occurs at the end of\n@param leapAdjustment the leap seconds to add/remove at the end of the day, either -1 or 1\n@throws IllegalArgumentException if the leap adjustment is invalid\n@throws IllegalArgumentException if the day is before or equal the last known leap second day\nand the definition does not match a previously registered leap\n@throws ConcurrentModificationException if another thread updates the rules at the same time", "Checks that the targetClass is widening the argument class\n\n@param argumentClass\n@param targetClass\n@return", "Generate a call to the delegate object.", "Use this API to convert sslpkcs8.", "Heuristic check if string might be an IPv6 address.\n\n@param input Any string or null\n@return true, if input string contains only hex digits and at least two colons, before '.' or '%' character.", "Gets the index of a ExpandableWrapper within the helper item list based on\nthe index of the ExpandableWrapper.\n\n@param parentPosition The index of the parent in the list of parents\n@return The index of the parent in the merged list of children and parents", "Polls the next ParsedWord from the stack.\n\n@return next ParsedWord", "Processes the most recent dump of the given type using the given dump\nprocessor.\n\n@see DumpProcessingController#processMostRecentMainDump()\n@see DumpProcessingController#processAllRecentRevisionDumps()\n\n@param dumpContentType\nthe type of dump to process\n@param dumpFileProcessor\nthe processor to use\n@deprecated Use {@link #getMostRecentDump(DumpContentType)} and\n{@link #processDump(MwDumpFile)} instead; method will vanish\nin WDTK 0.5", "Get the label distance..\n\n@param settings Parameters for rendering the scalebar." ]
private void deliverMasterYieldResponse(int fromPlayer, boolean yielded) { for (final MasterHandoffListener listener : getMasterHandoffListeners()) { try { listener.yieldResponse(fromPlayer, yielded); } catch (Throwable t) { logger.warn("Problem delivering master yield response to listener", t); } } }
[ "Send a master handoff yield response to all registered listeners.\n\n@param fromPlayer the device number that is responding to our request that it yield the tempo master role to us\n@param yielded will be {@code true} if we should now be the tempo master" ]
[ "Use this API to fetch the statistics of all service_stats resources that are configured on netscaler.", "Clear history for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client", "Extract calendar data from the file.\n\n@throws SQLException", "Obtains a British Cutover zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Use this API to add nsacl6.", "Cancels all requests still waiting for a response.\n\n@return this {@link Searcher} for chaining.", "Fetch flag resource by Country\n\n@param country Country\n@return int of resource | 0 value if not exists", "Convert the holiday format from EquivalenceClassTransformer into a date format\n\n@param holiday the date\n@return a date String in the format yyyy-MM-dd", "Obtains a International Fixed local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed local date-time, not null\n@throws DateTimeException if unable to create the date-time" ]
public static void ensureXPathNotEmpty(NodeList nodeList, String expression) { if (nodeList == null || nodeList.getLength() == 0) { throw LOG.unableToFindXPathExpression(expression); } }
[ "Ensure that the nodeList is either null or empty.\n\n@param nodeList the nodeList to ensure to be either null or empty\n@param expression the expression was used to fine the nodeList\n@throws SpinXPathException if the nodeList is either null or empty" ]
[ "Reconnect to the HC.\n\n@return whether the server is still in sync\n@throws IOException", "visibility increased for testing", "Set the url for the shape file.\n\n@param url shape file url\n@throws LayerException file cannot be accessed\n@since 1.7.1", "Add groups for given group parent item.\n\n@param type the tree type\n@param ouItem group parent item", "Encodes the given URI host with the given encoding.\n@param host the host to be encoded\n@param encoding the character encoding to encode to\n@return the encoded host\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "Merge another AbstractTransition's states into this object, such that the other AbstractTransition\ncan be discarded.\n\n@param another\n@return true if the merge is successful.", "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 ViewPort visibility of the object.\n\n@see ViewPortVisibility\n@param viewportVisibility\nThe ViewPort visibility of the object.\n@return {@code true} if the ViewPort visibility was changed, {@code false} if it\nwasn't.", "handles when a member leaves and hazelcast partition data is lost. We want\nto find the Futures that are waiting on lost data and error them" ]
public void clearHandlers() { for (Map<String, CmsAttributeHandler> handlers : m_handlers) { for (CmsAttributeHandler handler : handlers.values()) { handler.clearHandlers(); } handlers.clear(); } m_handlers.clear(); m_handlers.add(new HashMap<String, CmsAttributeHandler>()); m_handlerById.clear(); }
[ "Clears the handler hierarchy." ]
[ "Determine if a key version is invalid by comparing the version's\nexistence and required writes configuration\n\n@param keyVersionNodeSetMap A map that contains keys mapping to a map\nthat maps versions to set of PrefixNodes\n@param requiredWrite Required Write configuration", "Sets this matrix equal to the matrix encoded in the array.\n\n@param numRows The number of rows.\n@param numCols The number of columns.\n@param rowMajor If the array is encoded in a row-major or a column-major format.\n@param data The formatted 1D array. Not modified.", "Print the parameters of the parameterized type t", "Create a classname from a given path\n\n@param path\n@return", "Read all top level tasks.", "Processes the original class rather than the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Starts a background thread which calls the controller every\ncheck_interval milliseconds. Returns immediately, leaving the\nbackground thread running.", "Utility function that creates directory.\n\n@param dir Directory path\n@return File object of directory.", "Extracts the value of this bit flag from the supplied byte array\nand sets the value in the supplied container.\n\n@param container container\n@param data byte array" ]
private void insert(int position, int c) { for (int i = 143; i > position; i--) { set[i] = set[i - 1]; character[i] = character[i - 1]; } character[position] = c; }
[ "Moves everything up so that the specified shift or latch character can be inserted.\n\n@param position the position beyond which everything needs to be shifted\n@param c the latch or shift character to insert at the specified position, after everything has been shifted" ]
[ "Load a list of entities using the information in the context\n\n@param session The session\n@param lockOptions The locking details\n@param ogmContext The context with the information to load the entities\n@return the list of entities corresponding to the given context", "Set the dates for the specified photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param datePosted\nThe date the photo was posted or null\n@param dateTaken\nThe date the photo was taken or null\n@param dateTakenGranularity\nThe granularity of the taken date or null\n@throws FlickrException", "Returns an integer between interval\n@param min Minimum value\n@param max Maximum value\n@return int number", "Gets a property with a default value.\n@param key\nThe key string.\n@param defaultValue\nThe default value.\n@return The property string.", "Save current hostname and reuse it.\n\n@return hostname as String", "Draw a rounded rectangular boundary.\n\n@param rect rectangle\n@param color colour\n@param linewidth line width\n@param r radius for rounded corners", "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().", "Add a post-effect to this camera's render chain.\n\nPost-effects are GL shaders, applied to the texture (hardware bitmap)\ncontaining the rendered scene graph. Each post-effect combines a shader\nselector with a set of parameters: This lets you pass different\nparameters to the shaders for each eye.\n\n@param postEffectData\nPost-effect to append to this camera's render chain", "Find the node corresponding to an entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}\n@return the corresponding node" ]
public static void waitForStandalone(final ModelControllerClient client, final long startupTimeout) throws InterruptedException, RuntimeException, TimeoutException { waitForStandalone(null, client, startupTimeout); }
[ "Waits the given amount of time in seconds for a standalone server to start.\n\n@param client the client used to communicate with the server\n@param startupTimeout the time, in seconds, to wait for the server start\n\n@throws InterruptedException if interrupted while waiting for the server to start\n@throws RuntimeException if the process has died\n@throws TimeoutException if the timeout has been reached and the server is still not started" ]
[ "Drop down item view\n\n@param position position of item\n@param convertView View of item\n@param parent parent view of item's view\n@return covertView", "Find a given range object in a list of ranges by a value in that range. Does a binary\nsearch over the ranges but instead of checking for equality looks within the range.\nTakes the array size as an option in case the array grows while searching happens\n@param <T> Range type\n@param ranges data list\n@param value value in the list\n@param arraySize the max search index of the list\n@return search result of range\nTODO: This should move into SegmentList.scala", "Remove a management request handler factory from this context.\n\n@param instance the request handler factory\n@return {@code true} if the instance was removed, {@code false} otherwise", "Count the statements and property uses of an item or property document.\n\n@param usageStatistics\nstatistics object to store counters in\n@param statementDocument\ndocument to count the statements of", "Accessor method used to retrieve a Number instance 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", "Update environment variables to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param config Key/Value pairs of environment variables.", "If the resource has ordered child types, those child types will be stored in the attachment. If there are no\nordered child types, this method is a no-op.\n\n@param resourceAddress the address of the resource\n@param resource the resource which may or may not have ordered children.", "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", "Use this API to delete sslcertkey resources of given names." ]
public static Collection<CurrencyUnit> getCurrencies(String... providers) { return Optional.ofNullable(MONETARY_CURRENCIES_SINGLETON_SPI()).orElseThrow( () -> new MonetaryException("No MonetaryCurrenciesSingletonSpi loaded, check your system setup.")) .getCurrencies(providers); }
[ "Access all currencies known.\n\n@param providers the (optional) specification of providers to consider.\n@return the list of known currencies, never null." ]
[ "Reads all text of the XML tag and returns it as a String.\nAssumes that a '<' character has already been read.\n\n@param r The reader to read from\n@return The String representing the tag, or null if one couldn't be read\n(i.e., EOF). The returned item is a complete tag including angle\nbrackets, such as <code>&lt;TXT&gt;</code>", "another media scan way", "Push an event which describes a purchase made.\n\n@param eventName Has to be specified as \"Charged\". Anything other than this\nwill result in an {@link InvalidEventNameException} being thrown.\n@param chargeDetails A {@link HashMap}, with keys as strings, and values as {@link String},\n{@link Integer}, {@link Long}, {@link Boolean}, {@link Float}, {@link Double},\n{@link java.util.Date}, or {@link Character}\n@param items An {@link ArrayList} which contains up to 15 {@link HashMap} objects,\nwhere each HashMap object describes a particular item purchased\n@throws InvalidEventNameException Thrown if the event name is not \"Charged\"\n@deprecated use {@link CleverTapAPI#pushChargedEvent(HashMap chargeDetails, ArrayList items)}", "Get the set of metadata providers that can offer metadata for tracks loaded from the specified media.\n\n@param sourceMedia the media whose metadata providers are desired, or {@code null} to get the set of\nmetadata providers that can offer metadata for all media.\n\n@return any registered metadata providers that reported themselves as supporting tracks from that media", "Begin a \"track;\" that is, begin logging at one level deeper.\nChannels other than the FORCE channel are ignored.\n@param args The title of the track to begin, with an optional FORCE flag.", "Gets the URL of the first service that have been created during the current session.\n\n@return URL of the first service.", "compares two AST nodes", "we can't call this method 'of', cause it won't compile on JDK7", "Write the domain controller data to a byte buffer.\n\n@param data the domain controller data\n@return the byte buffer\n@throws Exception" ]
public int createLogs(String topic, final int partitions, final boolean forceEnlarge) { TopicNameValidator.validate(topic); synchronized (logCreationLock) { final int configPartitions = getPartition(topic); if (configPartitions >= partitions || !forceEnlarge) { return configPartitions; } topicPartitionsMap.put(topic, partitions); if (config.getEnableZookeeper()) { if (getLogPool(topic, 0) != null) {//created already topicRegisterTasks.add(new TopicTask(TopicTask.TaskType.ENLARGE, topic)); } else { topicRegisterTasks.add(new TopicTask(TopicTask.TaskType.CREATE, topic)); } } return partitions; } }
[ "create logs with given partition number\n\n@param topic the topic name\n@param partitions partition number\n@param forceEnlarge enlarge the partition number of log if smaller than runtime\n@return the partition number of the log after enlarging" ]
[ "Updates the database. Never call this during normal operations, upgrade is a user-controlled operation.", "Returns the x-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the x coordinate", "Reads and consumes a number of characters from the underlying reader,\nfilling the byte array provided.\n\n@param holder A byte array which will be filled with bytes read from the underlying reader.\n@throws ProtocolException If a char can't be read into each array element.", "Returns the device push token or null\n\n@param type com.clevertap.android.sdk.PushType (FCM or GCM)\n@return String device token or null\nNOTE: on initial install calling getDevicePushToken may return null, as the device token is\nnot yet available\nImplement CleverTapAPI.DevicePushTokenRefreshListener to get a callback once the token is\navailable", "returns a sorted array of nested classes and interfaces", "This method extracts resource data from an MSPDI file.\n\n@param project Root node of the MSPDI file\n@param calendarMap Map of calendar UIDs to names", "Get the collection of the server groups\n\n@return Collection of active server groups", "Tests whether the ClassNode implements the specified method name\n\n@param classNode The ClassNode\n@param methodName The method name\n@param argTypes\n@return True if it implements the method", "Concatenate all the arrays in the list into a vector.\n\n@param arrays List of arrays.\n@return Vector." ]
private static void setCmsOfflineProject(CmsObject cms) { if (null == cms) { return; } final CmsRequestContext cmsContext = cms.getRequestContext(); final CmsProject cmsProject = cmsContext.getCurrentProject(); if (cmsProject.isOnlineProject()) { CmsProject cmsOfflineProject; try { cmsOfflineProject = cms.readProject("Offline"); cmsContext.setCurrentProject(cmsOfflineProject); } catch (CmsException e) { LOG.warn("Could not set the current project to \"Offline\". "); } } }
[ "Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object." ]
[ "Execute a slave process. Pump events to the given event bus.", "Writes and reads the XOP attachment using a CXF JAX-RS Proxy\nThe proxy automatically sets the \"mtom-enabled\" property by checking\nthe CXF EndpointProperty set on the XopAttachment interface.\n\n@throws Exception", "Return primary key values of given Identity object.\n\n@param cld\n@param oid\n@return Object[]\n@throws PersistenceBrokerException", "Perform a module dependency graph of the target and return the graph as a JSON\n\n@param moduleName\n@param moduleVersion\n@param uriInfo\n@return Response", "Recursively scan the provided path and return a list of all Java packages contained therein.", "Extract calendar data.", "Returns the modules paths used on the command line.\n\n@return the paths separated by the {@link File#pathSeparator path separator}", "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.", "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." ]
public static String matchOrigin(HttpServerExchange exchange, Collection<String> allowedOrigins) throws Exception { HeaderMap headers = exchange.getRequestHeaders(); String[] origins = headers.get(Headers.ORIGIN).toArray(); if (allowedOrigins != null && !allowedOrigins.isEmpty()) { for (String allowedOrigin : allowedOrigins) { for (String origin : origins) { if (allowedOrigin.equalsIgnoreCase(sanitizeDefaultPort(origin))) { return allowedOrigin; } } } } String allowedOrigin = defaultOrigin(exchange); for (String origin : origins) { if (allowedOrigin.equalsIgnoreCase(sanitizeDefaultPort(origin))) { return allowedOrigin; } } ROOT_LOGGER.debug("Request rejected due to HOST/ORIGIN mis-match."); ResponseCodeHandler.HANDLE_403.handleRequest(exchange); return null; }
[ "Match the Origin header with the allowed origins.\nIf it doesn't match then a 403 response code is set on the response and it returns null.\n@param exchange the current HttpExchange.\n@param allowedOrigins list of sanitized allowed origins.\n@return the first matching origin, null otherwise.\n@throws Exception" ]
[ "Specify the class represented by this `ClassNode` extends\na class with the name specified\n@param name the name of the parent class\n@return this `ClassNode` instance", "Extracts the column from the matrix a.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column.", "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", "Creates a player wrapper for the Android MediaPlayer.", "Returns the optional query modifier.\n@return the optional query modifier.", "Returns the Organization that produce this artifact or null if there is none\n\n@param dbArtifact DbArtifact\n@return DbOrganization", "Gets value of this function at the current point, computed on the given batch of examples.\n@param batch A set of indices indicating the examples over which the gradient should be computed.\n@return The value of the function at the point.", "Use this API to fetch appfwprofile_denyurl_binding resources of given name .", "Adds a parameter that requires a string argument to the argument list.\nIf the given argument is null, then the argument list remains unchanged." ]
public void setOutRGB(IntRange outRGB) { this.outRed = outRGB; this.outGreen = outRGB; this.outBlue = outRGB; CalculateMap(inRed, outRGB, mapRed); CalculateMap(inGreen, outRGB, mapGreen); CalculateMap(inBlue, outRGB, mapBlue); }
[ "Set RGB output range.\n\n@param outRGB Range." ]
[ "This is a convenience method which reads the first project\nfrom the named MPD file using the JDBC-ODBC bridge driver.\n\n@param accessDatabaseFileName access database file name\n@return ProjectFile instance\n@throws MPXJException", "Append the html-code to finish a html mail message to the given buffer.\n\n@param buffer The StringBuffer to add the html code to.", "Use this API to fetch nstrafficdomain_bridgegroup_binding resources of given name .", "Use this API to fetch cmppolicylabel resource of given name .", "Adds a tag to a task. Returns an empty data block.\n\n@param task The task to add a tag to.\n@return Request object", "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", "Add new control at the end of control bar with specified touch listener.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param properties JSON control specific properties\n@param listener touch listener", "Returns the full record for a single attachment.\n\n@param attachment Globally unique identifier for the attachment.\n@return Request object", "Delete rows that match the prepared statement." ]