query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
@Deprecated @SuppressWarnings("unchecked") private static <E extends LogRecordHandler> E getHandler(Class<E> clazz){ for(LogRecordHandler cand : handlers){ if(clazz == cand.getClass()){ return (E) cand; } } return null; }
[ "Get a handler based on its class\n@param clazz The class of the Handler to return.\nIf multiple Handlers exist, the first one is returned.\n@param <E> The class of the handler to return.\n@return The handler matching the class name." ]
[ "Creates a quad consisting of two triangles, with the specified width and\nheight.\n\n@param gvrContext current {@link GVRContext}\n\n@param width\nthe quad's width\n@param height\nthe quad's height\n@return A 2D, rectangular mesh with four vertices and two triangles", "if you have a default, it's automatically optional", "Filter out interceptors and decorators which are also enabled globally.\n\n@param enabledClasses\n@param globallyEnabledClasses\n@param logMessageCallback\n@param deployment\n@return the filtered list", "Builds the path for an open arc based on a PolylineOptions.\n\n@param center\n@param start\n@param end\n@return PolylineOptions with the paths element populated.", "Multiplies all positions with a factor v\n@param v Multiplication factor", "Non-zero counts of Householder vectors and computes a permutation\nmatrix that ensures diagonal entires are all structurally nonzero.\n\n@param parent elimination tree\n@param ll linked list for each row that specifies elements that are not zero", "Set the weeks of the month the events should occur.\n@param weeksOfMonth the weeks of month to set (first to fifth, where fifth means last).", "Use this API to add sslcipher resources.", "Remove a bean from the context, calling the destruction callback if any.\n\n@param name bean name\n@return previous value" ]
static void apply(final String patchId, final Collection<ContentModification> modifications, final PatchEntry patchEntry, final ContentItemFilter filter) { for (final ContentModification modification : modifications) { final ContentItem item = modification.getItem(); // Check if we accept the item if (!filter.accepts(item)) { continue; } final Location location = new Location(item); final ContentEntry contentEntry = new ContentEntry(patchId, modification); ContentTaskDefinition definition = patchEntry.get(location); if (definition == null) { definition = new ContentTaskDefinition(location, contentEntry, false); patchEntry.put(location, definition); } else { definition.setTarget(contentEntry); } } }
[ "Apply modifications to a content task definition.\n\n@param patchId the patch id\n@param modifications the modifications\n@param definitions the task definitions\n@param filter the content item filter" ]
[ "provides a safe toString", "Log a message line to the output.", "Return a string that ensures that no line is longer then 512 characters\nand lines are broken according to manifest specification.\n\n@param input The buffer containing the content that should be made safe\n@param newline The string to use to create newlines (usually \"\\n\" or\n\"\\r\\n\")\n@return The string with no longer lines then 512, ready to be read again\nby {@link MergeableManifest2}.", "Utility function that fetches node ids.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return Node ids in cluster", "Write back to hints file.", "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", "Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path", "Prints to a file. If the file does not exist, rewrites the file;\ndoes not append.", "Populate the UDF values for this entity.\n\n@param tableName parent table name\n@param type entity type\n@param container entity\n@param uniqueID entity Unique ID" ]
public void setCapacity(int capacity) { if (capacity <= 0) { throw new IllegalArgumentException("capacity must be greater than 0"); } synchronized (queue) { // If the capacity was reduced, we remove oldest elements until the // queue fits inside the specified capacity if (capacity < this.capacity) { while (queue.size() > capacity) { queue.removeFirst(); } } } this.capacity = capacity; }
[ "Specifies the maximum capacity of the counter.\n\n@param capacity\n<code>long</code>\n@throws IllegalArgumentException\nif windowMillis is less than 1." ]
[ "Start the timer.", "Retrieve the next available field.\n\n@return FieldType instance for the next available field", "Serialize an object with Json\n@param obj Object\n@return String\n@throws IOException", "Find out which method to call on the service bean.", "Writes all error responses to the client.\n\nTODO REST-Server 1. collect error stats\n\n@param messageEvent - for retrieving the channel details\n@param status - error code\n@param message - error message", "Removes a filter from this project file.\n\n@param filterName The name of the filter", "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", "Default implementation returns unmodified original Query\n\n@see org.apache.ojb.broker.accesslayer.QueryCustomizer#customizeQuery", "This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will not block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementation used to write the\nrequest and read the response\n@param operationName Simple string representing the type of request\n\n@return Data returned by the individual requests" ]
public DescriptorRepository readDescriptorRepository(String fileName) { try { RepositoryPersistor persistor = new RepositoryPersistor(); return persistor.readDescriptorRepository(fileName); } catch (Exception e) { throw new MetadataException("Can not read repository " + fileName, e); } }
[ "Read ClassDescriptors from the given repository file.\n@see #mergeDescriptorRepository" ]
[ "Return true if the processor of the node is currently being executed.\n\n@param processorGraphNode the node to test.", "Initializes module enablement.\n\n@see ModuleEnablement", "Label accessor provided for JSON serialization only.", "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)}", "Updates the styling and content of the internal text area based on the real value, the ghost value, and whether\nit has focus.", "Validates the binding types", "Counts the number of elements in A which are true\n@param A input matrix\n@return number of true elements", "Lookup the username for the specified User URL.\n\n@param url\nThe user profile URL\n@return The username\n@throws FlickrException", "Call the onQueryExecuteTimeLimitExceeded hook if necessary\n@param sql sql statement that took too long\n@param queryStartTime time when query was started." ]
@SuppressWarnings("unchecked") private void addPrivateFieldsAccessors(ClassNode node) { Set<ASTNode> accessedFields = (Set<ASTNode>) node.getNodeMetaData(StaticTypesMarker.PV_FIELDS_ACCESS); if (accessedFields==null) return; Map<String, MethodNode> privateConstantAccessors = (Map<String, MethodNode>) node.getNodeMetaData(PRIVATE_FIELDS_ACCESSORS); if (privateConstantAccessors!=null) { // already added return; } int acc = -1; privateConstantAccessors = new HashMap<String, MethodNode>(); final int access = Opcodes.ACC_STATIC | Opcodes.ACC_PUBLIC | Opcodes.ACC_SYNTHETIC; for (FieldNode fieldNode : node.getFields()) { if (accessedFields.contains(fieldNode)) { acc++; Parameter param = new Parameter(node.getPlainNodeReference(), "$that"); Expression receiver = fieldNode.isStatic()?new ClassExpression(node):new VariableExpression(param); Statement stmt = new ExpressionStatement(new PropertyExpression( receiver, fieldNode.getName() )); MethodNode accessor = node.addMethod("pfaccess$"+acc, access, fieldNode.getOriginType(), new Parameter[]{param}, ClassNode.EMPTY_ARRAY, stmt); privateConstantAccessors.put(fieldNode.getName(), accessor); } } node.setNodeMetaData(PRIVATE_FIELDS_ACCESSORS, privateConstantAccessors); }
[ "Adds special accessors for private constants so that inner classes can retrieve them." ]
[ "This method prints goal information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return goals the IGoal[] with all the information, so the tester can\nlook for information", "Tells you if the date part of a datetime is in a certain time range.", "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.", "Processes the template for the comma-separated value pairs in an attribute of the current object on the specified level.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"true\" description=\"The name of the attribute containg attributes (defaults to 'attributes')\"\[email protected] name=\"default-right\" optional=\"true\" description=\"The default right value if none is given (defaults to empty value)\"", "Returns the primary port of the server.\n\n@return the primary {@link ServerPort} if the server is started. {@link Optional#empty()} otherwise.", "Sets the value of the setting with the specified key.\n\n@param key name of the setting\n@param value the setting value\n@return this {@code EnvironmentConfig} instance", "Returns all program element docs that have a visibility greater or\nequal than the specified level", "This method is called to alert project listeners to the fact that\na calendar has been read from a project file.\n\n@param calendar calendar instance", "Cut the message content to the configured length.\n\n@param event the event" ]
final void begin() { if (this.properties.isDateRollEnforced()) { final Thread thread = new Thread(this, "Log4J Time-based File-roll Enforcer"); thread.setDaemon(true); thread.start(); this.threadRef = thread; } }
[ "Starts the enforcer." ]
[ "Removes the given object from the cache\n\n@param oid oid of the object to remove", "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", "Returns the organization of a given module\n\n@return Organization", "This method allows a predecessor relationship to be removed from this\ntask instance. It will only delete relationships that exactly match the\ngiven targetTask, type and lag time.\n\n@param targetTask the predecessor task\n@param type relation type\n@param lag relation lag\n@return returns true if the relation is found and removed", "Use this API to fetch sslcipher resource of given name .", "Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened", "Internally undo recorded changes we did so far.\n\n@return whether the state required undo actions", "Handles the response of the SerialApiGetInitData request.\n@param incomingMlivessage the response message to process.", "Helper method to send message on outputStream and account for network\ntime stats.\n\n@param outputStream\n@param message\n@throws IOException" ]
public List<Group> findAllGroups() { ArrayList<Group> allGroups = new ArrayList<Group>(); PreparedStatement queryStatement = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { queryStatement = sqlConnection.prepareStatement("SELECT * FROM " + Constants.DB_TABLE_GROUPS + " ORDER BY " + Constants.GROUPS_GROUP_NAME); results = queryStatement.executeQuery(); while (results.next()) { Group group = new Group(); group.setId(results.getInt(Constants.GENERIC_ID)); group.setName(results.getString(Constants.GROUPS_GROUP_NAME)); allGroups.add(group); } } catch (SQLException e) { e.printStackTrace(); } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (queryStatement != null) { queryStatement.close(); } } catch (Exception e) { } } return allGroups; }
[ "Obtain all groups\n\n@return All Groups" ]
[ "Sets the name of the designated bone.\n\n@param boneindex zero based index of bone to rotate.\n@param bonename string with name of bone.\n. * @see #getBoneName", "Checks if this has the passed suffix\n\n@param suffix is a Bytes object to compare to this\n@return true or false\n@since 1.1.0", "Generates a JSON patch for transforming the source node into the target node.\n\n@param source the node to be patched\n@param target the expected result after applying the patch\n@param replaceMode the replace mode to be used\n@return the patch as a {@link JsonPatch}", "Generate debug dump of the tree from the scene object.\nIt should include a newline character at the end.\n\n@param sb the {@code StringBuffer} to dump the object.\n@param indent indentation level as number of spaces.", "Unpack report face to given directory.\n\n@param outputDirectory the output directory to unpack face.\n@throws IOException if any occurs.", "sets the initialization method for this descriptor", "Attempts to checkout a resource so that one queued request can be\nserviced.\n\n@param key The key for which to process the requestQueue\n@return true iff an item was processed from the Queue.", "Save current hostname and reuse it.\n\n@return hostname as String", "Process calendar hours and exception data from the database.\n\n@param calendars all calendars for the project" ]
public long findPosition(long nOccurrence) { updateCount(); if (nOccurrence <= 0) { return RankedBitVector.NOT_FOUND; } int findPos = (int) (nOccurrence / this.blockSize); if (findPos < this.positionArray.length) { long pos0 = this.positionArray[findPos]; long leftOccurrences = nOccurrence - (findPos * this.blockSize); if (leftOccurrences == 0) { return pos0; } for (long index = pos0 + 1; index < this.bitVector.size(); index++) { if (this.bitVector.getBit(index) == this.bit) { leftOccurrences--; } if (leftOccurrences == 0) { return index; } } } return RankedBitVector.NOT_FOUND; }
[ "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" ]
[ "Verify that the given channels are all valid.\n\n@param channels\nthe given channels", "Convert an Image into a TYPE_INT_ARGB BufferedImage. If the image is already of this type, the original image is returned unchanged.\n@param image the image to convert\n@return the converted image", "Use this API to renumber nspbr6.", "Use this API to fetch cmppolicylabel_policybinding_binding resources of given name .", "Awaits at most 5 minutes until all pods meets the given predicate.\n\n@param filter used to wait to detect that a pod is up and running.", "Prints out the interceptor chain in a format that is easy to read. It\nalso filters out instances of the DemoInterceptor so you can see what the\nchain would look like in a normal invokation.\n\n@param chain", "Performs a transpose across block sub-matrices. Reduces\nthe number of cache misses on larger matrices.\n\n*NOTE* If this is beneficial is highly dependent on the computer it is run on. e.g:\n- Q6600 Almost twice as fast as standard.\n- Pentium-M Same speed and some times a bit slower than standard.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.\n@param blockLength Length of a block.", "Get the SPIProviderResolver instance using the provided classloader for lookup\n\n@param cl classloader to use for lookup\n@return instance of this class", "Triggers collapse of the parent." ]
public Set<DeviceAnnouncement> findUnreachablePlayers() { ensureRunning(); Set<DeviceAnnouncement> result = new HashSet<DeviceAnnouncement>(); for (DeviceAnnouncement candidate: DeviceFinder.getInstance().getCurrentDevices()) { if (!Util.sameNetwork(matchedAddress.getNetworkPrefixLength(), matchedAddress.getAddress(), candidate.getAddress())) { result.add(candidate); } } return Collections.unmodifiableSet(result); }
[ "Checks if we can see any players that are on a different network than the one we chose for the Virtual CDJ.\nIf so, we are not going to be able to communicate with them, and they should all be moved onto a single\nnetwork.\n\n@return the device announcements of any players which are on unreachable networks, or hopefully an empty list\n@throws IllegalStateException if we are not running" ]
[ "Appends the given string to the given StringBuilder, replacing '&amp;',\n'&lt;' and '&gt;' by their respective HTML entities.\n\n@param out\nThe StringBuilder to append to.\n@param value\nThe string to append.\n@param offset\nThe character offset into value from where to start", "Send a channels on-air update to all registered listeners.\n\n@param audibleChannels holds the device numbers of all channels that can currently be heard in the mixer output", "Visit the implicit first frame of this method.", "Get a property as a json array or throw exception.\n\n@param key the property name", "Get all parameter keys.\n@return a set of parameter keys", "Find all methods on classes under scanBase that are annotated with annotationClass.\n\n@param scanBase Package to scan recursively, in dot notation (ie: org.jrugged...)\n@param annotationClass Class of the annotation to search for\n@return Set&lt;Method&gt; The set of all @{java.lang.reflect.Method}s having the annotation", "Set new front facing rotation\n@param rotation", "Add UDFType objects to a PM XML file.\n\n@author kmahan\n@date 2014-09-24\n@author lsong\n@date 2015-7-24", "Gets the value of the task property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the task property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetTask().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link GanttDesignerRemark.Task }" ]
private void initBeanNameDefaulted(EnhancedAnnotation<T> annotatedAnnotation) { if (annotatedAnnotation.isAnnotationPresent(Named.class)) { if (!"".equals(annotatedAnnotation.getAnnotation(Named.class).value())) { throw MetadataLogger.LOG.valueOnNamedStereotype(annotatedAnnotation); } beanNameDefaulted = true; } }
[ "Initializes the bean name defaulted" ]
[ "Indicates that contextual session bean instance has been constructed.", "Show only the following channels.\n@param channels The names of the channels to show.\n@return this", "The primary run loop of the event processor.", "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", "Checks the given class descriptor for correct row-reader setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "Sets the Red, Green, and Blue color variables. This will automatically populate the Hue, Saturation and Brightness and Hexadecimal fields, too.\n\nThe RGB color model is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three additive primary colors, red, green, and blue.\n@param red strength - valid range is 0-255\n@param green strength - valid range is 0-255\n@param blue strength - valid range is 0-255\n@throws java.lang.Exception Exception if the Red, Green or Blue variables are out of range.", "Create a RemoteWebDriver backed EmbeddedBrowser.\n\n@param hubUrl Url of the server.\n@param filterAttributes the attributes to be filtered from DOM.\n@param crawlWaitReload the period to wait after a reload.\n@param crawlWaitEvent the period to wait after an event is fired.\n@return The EmbeddedBrowser.", "Creates a curator built using Application's zookeeper connection string. Root path will start\nat Fluo application chroot.", "Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position." ]
static void createMessage(String textMessage, JobInstance jobInstance, DbConn cnx) { cnx.runUpdate("message_insert", jobInstance.getId(), textMessage); }
[ "Create a text message that will be stored in the database. Must be called inside a transaction." ]
[ "Retrieve table data, return an empty result set if no table data is present.\n\n@param name table name\n@return table data", "Use this API to fetch gslbsite resource of given name .", "Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource", "Decomposes the input matrix 'a' and makes sure it isn't modified.", "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", "Delete a file ignoring failures.\n\n@param file file to delete", "Load the given class using the default constructor\n\n@param className The name of the class\n@return The class object", "Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.", "Stops all transitions." ]
public RedwoodConfiguration showOnlyChannels(final Object[] channels){ tasks.add(new Runnable() { public void run() { Redwood.showOnlyChannels(channels); } }); return this; }
[ "Show only the following channels.\n@param channels The names of the channels to show.\n@return this" ]
[ "Whether the given column is part of this key family or not.\n\n@return {@code true} if the given column is part of this key, {@code false} otherwise.", "Set HTTP headers to allow caching for the given number of seconds.\n\n@param response where to set the caching settings\n@param seconds number of seconds into the future that the response should be cacheable for", "Lookup a PortComponentMetaData by wsdl-port local part\n\n@param name - the wsdl-port local part\n@return PortComponentMetaData if found, null otherwise", "set the textColor of the ColorHolder to an drawable\n\n@param ctx\n@param drawable", "Removes the given value to the set.\n\n@return true if the value was actually removed", "Closes off this connection pool.", "Returns iterable containing assignments for this single legal hold policy.\nParameters can be used to filter retrieved assignments.\n@param type filter assignments of this type only.\nCan be \"file_version\", \"file\", \"folder\", \"user\" or null if no type filter is necessary.\n@param id filter assignments to this ID only. Can be null if no id filter is necessary.\n@param limit the limit of entries per page. Default limit is 100.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy.", "This method returns the mapped certificate for a hostname, or generates a \"standard\"\nSSL server certificate issued by the CA to the supplied subject if no mapping has been\ncreated. This is not a true duplication, just a shortcut method\nthat is adequate for web browsers.\n\n@param hostname\n@return\n@throws CertificateParsingException\n@throws InvalidKeyException\n@throws CertificateExpiredException\n@throws CertificateNotYetValidException\n@throws SignatureException\n@throws CertificateException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws KeyStoreException\n@throws UnrecoverableKeyException", "Returns the JRDesignGroup for the DJGroup passed\n@param jd\n@param layoutManager\n@param group\n@return" ]
private List<Variable> parseAssignRange(Sequence sequence, TokenList tokens, TokenList.Token t0) { // find assignment symbol TokenList.Token tokenAssign = t0.next; while( tokenAssign != null && tokenAssign.symbol != Symbol.ASSIGN ) { tokenAssign = tokenAssign.next; } if( tokenAssign == null ) throw new ParseError("Can't find assignment operator"); // see if it is a sub matrix before if( tokenAssign.previous.symbol == Symbol.PAREN_RIGHT ) { TokenList.Token start = t0.next; if( start.symbol != Symbol.PAREN_LEFT ) throw new ParseError(("Expected left param for assignment")); TokenList.Token end = tokenAssign.previous; TokenList subTokens = tokens.extractSubList(start,end); subTokens.remove(subTokens.getFirst()); subTokens.remove(subTokens.getLast()); handleParentheses(subTokens,sequence); List<TokenList.Token> inputs = parseParameterCommaBlock(subTokens, sequence); if (inputs.isEmpty()) throw new ParseError("Empty function input parameters"); List<Variable> range = new ArrayList<>(); addSubMatrixVariables(inputs, range); if( range.size() != 1 && range.size() != 2 ) { throw new ParseError("Unexpected number of range variables. 1 or 2 expected"); } return range; } return null; }
[ "See if a range for assignment is specified. If so return the range, otherwise return null\n\nExample of assign range:\na(0:3,4:5) = blah\na((0+2):3,4:5) = blah" ]
[ "Start transaction on the underlying connection.", "Decides and returns the preferred deployment credentials to use from this builder settings and selected server\n\n@param deployerOverrider Deploy-overriding capable builder\n@param server Selected Artifactory server\n@return Preferred deployment credentials", "Returns true if the class node represents a the class node for the Class class\nand if the parametrized type is a neither a placeholder or a wildcard. For example,\nthe class node Class&lt;Foo&gt; where Foo is a class would return true, but the class\nnode for Class&lt;?&gt; would return false.\n@param classNode a class node to be tested\n@return true if it is the class node for Class and its generic type is a real class", "Use this API to add route6.", "Get the next available ordinal for a method ID\n\n@param methodId ID of method\n@return value of next ordinal\n@throws Exception exception", "A variant of the gamma function.\n@param a the number to apply gain to\n@param b the gain parameter. 0.5 means no change, smaller values reduce gain, larger values increase gain.\n@return the output value", "Part of the endOfRun process that needs the database. May be deferred if the database is not available.", "Use this API to fetch statistics of cmppolicylabel_stats resource of given name .", "Make a timestamp value given a date." ]
@Pure public static <K, V> Map<K, V> operator_minus(Map<K, V> map, final Iterable<?> keys) { return Maps.filterKeys(map, new Predicate<K>() { @Override public boolean apply(K input) { return !Iterables.contains(keys, input); } }); }
[ "Replies the elements of the given map except the pairs with the given keys.\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 keys the keys of the pairs to remove.\n@return the map with the content of the map except the pairs.\n@since 2.15" ]
[ "Consumes the version field from the given input and raises an exception if the record is in a newer version,\nwritten by a newer version of Hibernate OGM.\n\n@param input the input to read from\n@param supportedVersion the type version supported by this version of OGM\n@param externalizedType the type to be unmarshalled\n\n@throws IOException if an error occurs while reading the input", "Converts from a bitmap to individual day flags for a weekly recurrence,\nusing the array of masks.\n\n@param days bitmap\n@param masks array of mask values", "Terminates with a help message if the parse is not successful\n\n@param args command line arguments to\n@return the format in a correct state", "Prepare a parallel PING Task.\n\n@return the parallel task builder", "Computes the eigenvalue of the provided tridiagonal matrix. Note that only the upper portion\nneeds to be tridiagonal. The bottom diagonal is assumed to be the same as the top.\n\n@param sideLength Number of rows and columns in the input matrix.\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@return true if it succeeds and false if it fails.", "Use this API to update autoscaleprofile.", "Get a state handler for a given patching artifact.\n\n@param artifact the patching artifact\n@param <P>\n@param <S>\n@return the state handler, {@code null} if there is no handler registered for the given artifact", "Classify the tokens in a String. Each sentence becomes a separate document.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap}).", "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" ]
public void setFileFormat(String fileFormat) { if (fileFormat.toUpperCase().equals(FileFormat.JSON.toString())) { m_fileFormat = FileFormat.JSON; } }
[ "Setter for the file format.\n@param fileFormat File format the configuration file is in." ]
[ "Provisions a new app user in an enterprise using Box Developer Edition.\n@param api the API connection to be used by the created user.\n@param name the name of the user.\n@return the created user's info.", "Add image in the document.\n\n@param context\nPDF context\n@param imageResult\nimage\n@throws BadElementException\nPDF construction problem\n@throws IOException\nPDF construction problem", "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", "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", "Encrypts data.\n\n@param plainData {@code initVector || payload || zeros:4}\n@return {@code initVector || E(payload) || I(signature)}", "Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code\nbottom} or {@code right} are less than one or less than {@code top} or {@code left},\nrespectively.", "Create a host target.\n\n@param hostName the host name\n@param client the connected controller client to the master host.\n@return the remote target", "Adds a module to the modules that should be exported.\nIf called at least once, the explicitly added modules will be exported\ninstead of the default modules.\n\n@param moduleName the name of the module to export.", "Add a shutdown listener, which gets called when all requests completed on shutdown.\n\n@param listener the shutdown listener" ]
private Date readOptionalDate(JSONValue val) { JSONString str = null == val ? null : val.isString(); if (str != null) { try { return new Date(Long.parseLong(str.stringValue())); } catch (@SuppressWarnings("unused") NumberFormatException e) { // do nothing - return the default value } } return null; }
[ "Read an optional Date value form a JSON value.\n@param val the JSON value that should represent the Date as long value in a string.\n@return the Date from the JSON or null if reading the date fails." ]
[ "Use this API to add cachecontentgroup.", "Populates date time settings.\n\n@param record MPX record\n@param properties project properties", "Puts a new document in the service. The generate key is globally unique.\n\n@param document document\n@return key unique key to reference the document", "Returns a SimpleConfiguration clientConfig with properties set from this configuration\n\n@return SimpleConfiguration", "1-D Integer array to double array.\n\n@param array Integer array.\n@return Double array.", "Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj", "Get points after extract boundary.\n\n@param fastBitmap Image to be processed.\n@return List of points.", "This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file", "Copy bytes from an input stream to a file and log progress\n@param is the input stream to read\n@param destFile the file to write to\n@throws IOException if an I/O error occurs" ]
public static void hideOnlyChannels(Object... channels){ for(LogRecordHandler handler : handlers){ if(handler instanceof VisibilityHandler){ VisibilityHandler visHandler = (VisibilityHandler) handler; visHandler.showAll(); for (Object channel : channels) { visHandler.alsoHide(channel); } } } }
[ "Hide multiple channels. All other channels will be shown.\n@param channels The channels to hide" ]
[ "Returns a File object whose path is the expected user directory.\nDoes not create or check for existence.\n@param prefix\n@param suffix\n@param parent\n@return", "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 a HttpComponents HttpUriRequest object for the given HTTP method and URI specification.\n\n@param httpMethod the HTTP method\n@param uri the URI\n@return the HttpComponents HttpUriRequest object", "Log modified request\n\n@param httpMethodProxyRequest\n@param httpServletResponse\n@param history", "Build a compact representation of the ModelNode.\n@param node The model\n@return A single line containing the multi lines ModelNode.toString() content.", "Determine if the buffer, when expressed as text, matches a fingerprint regular expression.\n\n@param buffer bytes from file\n@param fingerprint fingerprint regular expression\n@return true if the file matches the fingerprint", "Use this API to fetch ipset resource of given name .", "Deletes the first element from the receiver that matches the specified element.\nDoes nothing, if no such matching element is contained.\n\nTests elements for equality or identity as specified by <tt>testForEquality</tt>.\nWhen testing for equality, two elements <tt>e1</tt> and\n<tt>e2</tt> are <i>equal</i> if <tt>(e1==null ? e2==null :\ne1.equals(e2))</tt>.)\n\n@param testForEquality if true -> tests for equality, otherwise for identity.\n@param element the element to be deleted.", "Transforms an input file into HTML.\n\n@param file\nThe File to process.\n@param safeMode\nSet to <code>true</code> to escape unsafe HTML tags.\n@return The processed String.\n@throws IOException\nif an IO error occurs\n@see Configuration#DEFAULT" ]
public Float getFloat(String fieldName) { try { return hasValue(fieldName) ? Float.valueOf(String.valueOf(resultMap.get(fieldName))) : null; } catch (NumberFormatException e) { throw new FqlException("Field '" + fieldName +"' is not a number.", e); } }
[ "Returns the value of the identified field as a Float.\n@param fieldName the name of the field\n@return the value of the field as a Float\n@throws FqlException if the field cannot be expressed as an Float" ]
[ "Gets whether this registration has an alternative wildcard registration", "Print the common class node's properties", "Tests an observer method to see if it is transactional.\n\n@param observer The observer method\n@return true if the observer method is annotated as transactional", "Load entries from the storage.\nOverriding methods should first delegate to super before adding their own entries.", "Inserts 'token' after 'where'. if where is null then it is inserted to the beginning of the list.\n@param where Where 'token' should be inserted after. if null the put at it at the beginning\n@param token The token that is to be inserted", "Attribute name and value are not escaped or modified in any way.\n\n@param name\n@param value\n@return self", "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.", "Returns the real key object.", "Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x and y." ]
public static String getStatusText(int nHttpStatusCode) { Integer intKey = new Integer(nHttpStatusCode); if (!mapStatusCodes.containsKey(intKey)) { return ""; } else { return mapStatusCodes.get(intKey); } }
[ "Returns the HTTP status text for the HTTP or WebDav status code\nspecified by looking it up in the static mapping. This is a\nstatic function.\n\n@param nHttpStatusCode [IN] HTTP or WebDAV status code\n@return A string with a short descriptive phrase for the\nHTTP status code (e.g., \"OK\")." ]
[ "Populate a sorted list of custom fields to ensure that these fields\nare written to the file in a consistent order.", "Convert moneyness given as difference to par swap rate to moneyness in bp.\nUses the fixing times of the fix schedule to determine fractions.\n\n@param moneyness as offset.\n@return Moneyness in bp.", "Converts the given list of a type to paged list of a different type.\n\n@param list the list to convert to paged list\n@param mapper the mapper to map type in input list to output list\n@param <OutT> the type of items in output paged list\n@param <InT> the type of items in input paged list\n@return the paged list", "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", "Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.", "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.", "Retrieve and validate the zone id value from the REST request.\n\"X-VOLD-Zone-Id\" is the zone id header.\n\n@return valid zone id or -1 if there is no/invalid zone id", "Initializes context size.\n\n@param rectangle rectangle", "Creates a ServiceCall from an observable object and a callback.\n\n@param observable the observable to create from\n@param callback the callback to call when events happen\n@param <T> the type of the response\n@return the created ServiceCall" ]
public void setInvalidValues(final Set<String> invalidValues, final boolean isCaseSensitive, final String invalidValueErrorMessage) { if (isCaseSensitive) { this.invalidValues = invalidValues; } else { this.invalidValues = new HashSet<String>(); for (String value : invalidValues) { this.invalidValues.add(value.toLowerCase()); } } this.isCaseSensitive = isCaseSensitive; this.invalidValueErrorMessage = invalidValueErrorMessage; }
[ "Sets the invalid values for the TextBox\n@param invalidValues\n@param isCaseSensitive\n@param invalidValueErrorMessage" ]
[ "Returns a client model from a ResultSet\n\n@param result resultset containing client information\n@return Client or null\n@throws Exception exception", "Create an info object from an authscope object.\n\n@param authscope the authscope", "Calculates the smallest value between the three inputs.\n@param first value\n@param second value\n@param third value\n@return the smallest value between the three inputs", "Updates the story and returns the full record for the updated story.\nOnly comment stories can have their text updated, and only comment stories and\nattachment stories can be pinned. Only one of `text` and `html_text` can be specified.\n\n@param story Globally unique identifier for the story.\n@return Request object", "Function to add a new Store to the Metadata store. This involves\n\n1. Create a new entry in the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeDef defines the new store to be created", "Use this API to fetch a dnsglobal_binding resource .", "The context returned by this method may be later reused for other interception types.\n\n@param interceptionModel\n@param ctx\n@param manager\n@param type\n@return the interception context to be used for the AroundConstruct chain", "add a foreign key field", "Log a warning message with a throwable." ]
public void fill(long offset, long length, byte value) { unsafe.setMemory(address() + offset, length, value); }
[ "Fill the buffer of the specified range with a given value\n@param offset\n@param length\n@param value" ]
[ "Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed.", "Returns true if this Bytes object equals another. This method doesn't check it's arguments.\n\n@since 1.2.0", "List the addons already added to an app.\n@param appName new of the app\n@return a list of add-ons", "Updates the R matrix to take in account the removed row.", "Sets the current reference definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"true\" description=\"The fully qualified name of the class\nowning the referenced field\"\[email protected] name=\"database-foreignkey\" optional=\"true\" description=\"Whether a database foreignkey shall be created\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\"", "Use this API to fetch server_service_binding resources of given name .", "Cancels all the pending & running requests and releases all the dispatchers.", "Returns an array of all the singular values in A sorted in ascending order\n\n@param A Matrix. Not modified.\n@return singular values", "Add a '&gt;' clause so the column must be greater-than the value." ]
public DiffNode getChild(final NodePath nodePath) { if (parentNode != null) { return parentNode.getChild(nodePath.getElementSelectors()); } else { return getChild(nodePath.getElementSelectors()); } }
[ "Retrieve a child that matches the given absolute path, starting from the current node.\n\n@param nodePath The path from the object root to the requested child node.\n@return The requested child node or <code>null</code>." ]
[ "Builder method for specifying the name of an app.\n@param name The name to give an app.\n@return A copy of the {@link App}", "Prints the help on the command line\n\n@param options Options object from commons-cli", "Extracts baseline work from the MPP file for a specific baseline.\nReturns null if no baseline work is present, otherwise returns\na list of timephased work items.\n\n@param assignment parent assignment\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", "Install the installation manager service.\n\n@param serviceTarget\n@return the service controller for the installed installation manager", "Get the Upper triangular factor.\n\n@return U.", "Returns an input stream that applies the required decompression to the\ngiven input stream.\n\n@param inputStream\nthe input stream with the (possibly compressed) data\n@param compressionType\nthe kind of compression\n@return an input stream with decompressed data\n@throws IOException\nif there was a problem creating the decompression streams", "Remove all controllers but leave input manager running.\n@return number of controllers removed", "Computes the MD5 value of the input stream\n\n@param input\n@return\n@throws IOException\n@throws IllegalStateException", "used for encoding url path segment" ]
public BsonDocument toBsonDocument() { final BsonDocument updateDescDoc = new BsonDocument(); updateDescDoc.put( Fields.UPDATED_FIELDS_FIELD, this.getUpdatedFields()); final BsonArray removedFields = new BsonArray(); for (final String field : this.getRemovedFields()) { removedFields.add(new BsonString(field)); } updateDescDoc.put( Fields.REMOVED_FIELDS_FIELD, removedFields); return updateDescDoc; }
[ "Converts this update description to its document representation as it would appear in a\nMongoDB Change Event.\n\n@return the update description document as it would appear in a change event" ]
[ "Use this API to fetch lbvserver_scpolicy_binding resources of given name .", "Retrieve and validate store name from the REST request.\n\n@return true if valid, false otherwise", "A convenience method for creating an immutable sorted map.\n\n@param self a SortedMap\n@return an immutable SortedMap\n@see java.util.Collections#unmodifiableSortedMap(java.util.SortedMap)\n@since 1.0", "Obtains a local date in Discordian calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Discordian local date, not null\n@throws DateTimeException if unable to create the date", "Plots the rotated trajectory, spline and support points.", "Read a text file resource into a single string\n\n@param context\nA non-null Android Context\n@param resourceId\nAn Android resource id\n@return The contents, or null on error.", "Returns the ARGB components for the pixel at the given coordinates\n\n@param x the x coordinate of the pixel component to grab\n@param y the y coordinate of the pixel component to grab\n@return an array containing ARGB components in that order.", "Mbeans for FETCH_KEYS", "orientation state factory method" ]
public SelectIterator<T, ID> buildIterator(BaseDaoImpl<T, ID> classDao, ConnectionSource connectionSource, int resultFlags, ObjectCache objectCache) throws SQLException { prepareQueryForAll(); return buildIterator(classDao, connectionSource, preparedQueryForAll, objectCache, resultFlags); }
[ "Create and return a SelectIterator for the class using the default mapped query for all statement." ]
[ "Gets a SerialMessage with the MULTI CHANNEL CAPABILITY GET command.\nGets the capabilities for a specific endpoint.\n@param the number of the endpoint to get the\n@return the serial message.", "Transforms an input file into HTML.\n\n@param file\nThe File to process.\n@param safeMode\nSet to <code>true</code> to escape unsafe HTML tags.\n@return The processed String.\n@throws IOException\nif an IO error occurs\n@see Configuration#DEFAULT", "Returns the remote collection representing the given namespace.\n\n@param namespace the namespace referring to the remote collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the remote collection representing the given namespace.", "Converts the results to CSV data.\n\n@return the CSV data", "Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@param value\n@return ISO 8601 value (String)", "to avoid creation of unmaterializable proxies", "Merge two ExecutionStatistics into one. This method is private in order not to be synchronized (merging.\n@param otherStatistics", "Compute the offset for the item in the layout cache\n@return true if the item fits the container, false otherwise", "Gets an array of of all registered ConstantMetaClassListener instances." ]
public static void main(String[] args) { try { new StartMain(args).go(); } catch(Throwable t) { WeldSELogger.LOG.error("Application exited with an exception", t); System.exit(1); } }
[ "The main method called from the command line.\n\n@param args the command line arguments" ]
[ "Parse an extended attribute value.\n\n@param file parent file\n@param mpx parent entity\n@param value string value\n@param mpxFieldID field ID\n@param durationFormat duration format associated with the extended attribute", "Sends a normal HTTP response containing the serialization information in\na XML format", "Whether the given column is part of this key family or not.\n\n@return {@code true} if the given column is part of this key, {@code false} otherwise.", "Computes execution time\n@param extra", "Find the animation associated with this avatar with the given name.\n@param name name of animation to look for\n@return {@link GVRAnimator} animation found or null if none with that name", "Create content assist proposals and pass them to the given acceptor.", "Sets the target implementation type required. This can be used to explicitly acquire a specific\nimplementation\ntype and use a query to configure the instance or factory to be returned.\n\n@param type the target implementation type, not null.\n@return this query builder for chaining.", "Use this API to expire cacheobject.", "Internal method used to test for the existence of a relationship\nwith a task.\n\n@param task target task\n@param list list of relationships\n@return boolean flag" ]
@Override public String getInputToParse(String completeInput, int offset, int completionOffset) { int fixedOffset = getOffsetIncludingWhitespace(completeInput, offset, Math.min(completeInput.length(), completionOffset)); return super.getInputToParse(completeInput, fixedOffset, completionOffset); }
[ "Returns the input to parse including the whitespace left to the cursor position since\nit may be relevant to the list of proposals for whitespace sensitive languages." ]
[ "Get a patch entry for either a layer or add-on.\n\n@param name the layer name\n@param addOn whether the target is an add-on\n@return the patch entry, {@code null} if it there is no such layer", "Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows", "Retrieve an instance of the ResourceField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return instance of this class", "Hides the original Java-style method name using an attribute\nwhich should be respected by Visual Studio, the creates a new\nwrapper method using a .Net style method name.\n\nNote that this does not work for VB as it is case insensitive. Even\nthough Visual Studio won't show you the Java-style method name,\nthe VB compiler sees both and thinks they are the same... which\ncauses it to fail.\n\n@param writer output stream\n@param aClass class being processed\n@param methodSet set of methods which have been processed.\n@throws XMLStreamException", "Reads timephased assignment data.\n\n@param calendar current calendar\n@param assignment assignment data\n@param type flag indicating if this is planned or complete work\n@return list of timephased resource assignment instances", "Performs a HTTP GET request.\n\n@return Class type of object T (i.e. {@link Response}", "compute Exp using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "Return the number of entries in the cue list that represent hot cues.\n\n@return the number of cue list entries that are hot cues", "Turn given source String array into sorted array.\n\n@param array the source array\n@return the sorted array (never <code>null</code>)" ]
private static MonetaryFormatsSingletonSpi loadMonetaryFormatsSingletonSpi() { try { return Optional.ofNullable(Bootstrap.getService(MonetaryFormatsSingletonSpi.class)) .orElseGet(DefaultMonetaryFormatsSingletonSpi::new); } catch (Exception e) { Logger.getLogger(MonetaryFormats.class.getName()) .log(Level.WARNING, "Failed to load MonetaryFormatsSingletonSpi, using default.", e); return new DefaultMonetaryFormatsSingletonSpi(); } }
[ "Loads the SPI backing bean.\n\n@return the instance of MonetaryFormatsSingletonSpi to be used by this singleton." ]
[ "Use this API to fetch dnstxtrec resource of given name .", "Create the grid feature type.\n\n@param mapContext the map context containing the information about the map the grid will be\nadded to.\n@param geomClass the geometry type", "Check invariant.\n\n@param browser The browser.\n@return Whether the condition is satisfied or <code>false</code> when it it isn't or a\n{@link CrawljaxException} occurs.", "Use this API to delete ntpserver resources of given names.", "Update the central directory signature of a .jar.\n\n@param file the file to process\n@param searchPattern the search patter to use\n@param badSkipBytes the bad bytes skip table\n@param newSig the new signature\n@param endSig the expected signature\n@throws IOException", "Check if values in the column \"property\" are written to the bundle files.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle files.", "Parse a map of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.", "Adds an additional site link to the constructed document.\n\n@param title\nthe title of the linked page\n@param siteKey\nidentifier of the site, e.g., \"enwiki\"\n@param badges\none or more badges", "Override for customizing XmlMapper and ObjectMapper" ]
private synchronized Response doAuthenticatedRequest( final StitchAuthRequest stitchReq, final AuthInfo authInfo ) { try { return requestClient.doRequest(prepareAuthRequest(stitchReq, authInfo)); } catch (final StitchServiceException ex) { return handleAuthFailure(ex, stitchReq); } }
[ "Internal method which performs the authenticated request by preparing the auth request with\nthe provided auth info and request." ]
[ "Creates a random Hermitian matrix with elements from min to max value.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.", "Send a media details response to all registered listeners.\n\n@param details the response that has just arrived", "Return a string that ensures that no line is longer then 512 characters\nand lines are broken according to manifest specification.\n\n@param input The buffer containing the content that should be made safe\n@param newline The string to use to create newlines (usually \"\\n\" or\n\"\\r\\n\")\n@return The string with no longer lines then 512, ready to be read again\nby {@link MergeableManifest2}.", "Transits a float property from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self", "Cache a parse failure for this document.", "We have received notification that a device is no longer on the network, so clear out all its waveforms.\n\n@param announcement the packet which reported the device’s disappearance", "Adds a Statement to a given collection of statement groups.\nIf the statement id is not null and matches that of an existing statement,\nthis statement will be replaced.\n\n@param statement\n@param claims\n@return", "This method is called to alert project listeners to the fact that\na calendar has been written to a project file.\n\n@param calendar calendar instance", "Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException" ]
public static <T> void addAll(Collection<T> collection, Iterable<? extends T> items) { for (T item : items) { collection.add(item); } }
[ "Add all the items from an iterable to a collection.\n\n@param <T>\nThe type of items in the iterable and the collection\n@param collection\nThe collection to which the items should be added.\n@param items\nThe items to add to the collection." ]
[ "Browse groups for the given category ID. If a null value is passed for the category then the root category is used.\n\n@param catId\nThe optional category id. Null value will be ignored.\n@return The Collection of Photo objects\n@throws FlickrException\n@deprecated Flickr returns just empty results", "Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid", "Parses chroot section of Zookeeper connection string\n\n@param zookeepers Zookeeper connection string\n@return Returns root path or \"/\" if none found", "Runs through the log removing segments until the size of the log is at least\nlogRetentionSize bytes in size\n\n@throws IOException", "Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values.", "Generate an opaque pagination token from the supplied PageMetadata.\n\n@param pageMetadata page metadata of the page for which the token should be generated\n@return opaque pagination token", "Sets the max.\n\n@param n the new max", "Validate the Combination filter field in Multi configuration jobs", "Used by the slave host when creating the host info dmr sent across to the DC during the registration process\n\n@param ignoreUnaffectedServerGroups whether the slave host is set up to ignore config for server groups it does not have servers for\n@param hostModel the resource containing the host model\n@param model the dmr sent across to theDC\n@return the modified dmr" ]
public void setT(int t) { this.t = Math.min((radius * 2 + 1) * (radius * 2 + 1) / 2, Math.max(0, t)); }
[ "Set trimmed value.\n\n@param t Trimmed value." ]
[ "Sets the scale value in pixel per map unit.\n\n@param pixelPerUnit\nthe scale value (pix/map unit)", "Generating the input vertices is quite complex. Therefore there are multiple methods that handles the input vertices\nbased on the attribute specified in specific order. This method generates all the vertices if there is no other way how to handle\nthe input.", "Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file", "Sends a dummy statement to the server to keep the connection alive\n@param connection Connection handle to perform activity on\n@return true if test query worked, false otherwise", "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", "Use this API to fetch a vpnglobal_vpntrafficpolicy_binding resources.", "Adds any listeners attached to this reader to the reader created internally.\n\n@param reader internal project reader", "Pauses the playback of a sound.", "Given a particular id, return the correct contextual. For contextuals\nwhich aren't passivation capable, the contextual can't be found in another\ncontainer, and null will be returned.\n\n@param id An identifier for the contextual\n@return the contextual" ]
public void addModuleToExport(final String moduleName) { if (m_modulesToExport == null) { m_modulesToExport = new HashSet<String>(); } m_modulesToExport.add(moduleName); }
[ "Adds a module to the modules that should be exported.\nIf called at least once, the explicitly added modules will be exported\ninstead of the default modules.\n\n@param moduleName the name of the module to export." ]
[ "Updates the existing cluster such that we remove partitions mentioned\nfrom the stealer node and add them to the donor node\n\n@param currentCluster Existing cluster metadata. Both stealer and donor\nnode should already exist in this metadata\n@param stealerNodeId Id of node for which we are stealing the partitions\n@param donatedPartitions List of partitions we are moving\n@return Updated cluster metadata", "Test whether the operation has a defined criteria attribute.\n\n@param operation the operation\n@return", "Adds JAXB WSDL extensions to allow work with custom\nWSDL elements such as \\\"partner-link\\\"\n\n@param bus CXF bus", "Gets the Json Array representation of the given list of strings.\n@param keys List of strings\n@return the JsonArray represents the list of keys", "Initialize dates panel elements.", "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.", "Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list", "directive dynamic xxx,yy\n@param node\n@return", "This method is used to automatically generate a value\nfor the Outline Number field of this task.\n\n@param parent Parent Task" ]
public static vridparam get(nitro_service service) throws Exception{ vridparam obj = new vridparam(); vridparam[] response = (vridparam[])obj.get_resources(service); return response[0]; }
[ "Use this API to fetch all the vridparam resources that are configured on netscaler." ]
[ "Set an enterprise number value.\n\n@param index number index (1-40)\n@param value number value", "flush all messages to disk\n\n@param force flush anyway(ignore flush interval)", "Handle the given response, return the deserialized object when the response is successful.\n\n@param <T> Type\n@param response Response\n@param returnType Return type\n@throws ApiException If the response has a unsuccessful status code or\nfail to deserialize the response body\n@return Type", "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", "Does the headset the device is docked into have a dedicated home key\n@return", "Returns the query string currently in the text field.\n\n@return the query string", "Explicitly set the end time of the event.\n\nIf the provided date is <code>null</code> or a date before the start date, the end date defaults to the start date.\n\n@param endDate the end time of the event.", "Return collection of path Ids in priority order\n\n@param profileId ID of profile\n@return collection of path Ids in priority order", "Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors" ]
public void addDataSource(int groupno, DataSource datasource) { // the loader takes care of validation if (groupno == 0) datasources.add(datasource); else if (groupno == 1) group1.add(datasource); else if (groupno == 2) group2.add(datasource); }
[ "Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs." ]
[ "Pops resource requests off the queue until queue is empty or an unexpired\nresource request is found. Invokes .handleTimeout on all expired resource\nrequests popped off the queue.\n\n@return null or a valid ResourceRequest", "Obtain plugin information\n\n@return", "Gets a property from system, environment or an external map.\nThe lookup order is system > env > map > defaultValue.\n\n@param name\nThe name of the property.\n@param map\nThe external map.\n@param defaultValue\nThe value that should be used if property is not found.", "Use this API to update snmpmanager.", "Creates an element that represents a single page.\n@return the resulting DOM element", "A specific, existing task can be updated by making a PUT request on the\nURL for that task. 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 task record.\n\n@param task The task to update.\n@return Request object", "Call the no-arg constructor for the given class\n\n@param <T> The type of the thing to construct\n@param klass The class\n@return The constructed thing", "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", "Process any StepEvent. You can change last added to stepStorage\nstep using this method.\n\n@param event to process" ]
public static bridgegroup_vlan_binding[] get(nitro_service service, Long id) throws Exception{ bridgegroup_vlan_binding obj = new bridgegroup_vlan_binding(); obj.set_id(id); bridgegroup_vlan_binding response[] = (bridgegroup_vlan_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch bridgegroup_vlan_binding resources of given name ." ]
[ "Creates an immutable singleton instance.\n\n@param key\n@param value\n@return", "returns the total count of objects in the GeneralizedCounter.", "Ensures that no more than maxContiguousPartitionsPerZone partitions are\ncontiguous within a single zone.\n\nMoves the necessary partitions to break up contiguous runs from each zone\nto some other random zone/node. There is some chance that such random\nmoves could result in contiguous partitions in other zones.\n\n@param nextCandidateCluster cluster metadata\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return Return updated cluster metadata.", "Sets the SyncFrequency on this collection.\n\n@param syncFrequency the SyncFrequency that contains all the desired options\n\n@return A Task that completes when the SyncFrequency has been updated", "Use this API to fetch all the nsrpcnode resources that are configured on netscaler.", "Creates a MetaMatcher based on the filter content.\n\n@param filterAsString the String representation of the filter\n@param metaMatchers the Map of custom MetaMatchers\n@return A MetaMatcher used to match the filter content", "Find the channel in the animation that animates the named bone.\n@param boneName name of bone to animate.", "Harvest a single value that was returned by a callable statement.\n\n@param obj the object that will receive the value that is harvested.\n@param callable the CallableStatement that contains the value to harvest\n@param fmd the FieldDescriptor that identifies the field where the\nharvested value will be stord.\n@param index the parameter index.\n\n@throws PersistenceBrokerSQLException if a problem occurs.", "Set the view frustum to pick against from the field of view, aspect\nratio and near, far clip planes. The viewpoint of the frustum\nis the center of the scene object the picker is attached to.\nThe view direction is the forward direction of that scene object.\nThe frustum will pick what a camera attached to the scene object\nwith that view frustum would see. If the frustum is not attached\nto a scene object, it defaults to the view frustum of the main camera of the scene.\n\n@param fovy vertical field of view in degrees\n@param aspect aspect ratio (width / height)" ]
public void setReadTimeout(int millis) { // Hack to get round Spring's dynamic loading of http client stuff ClientHttpRequestFactory f = getRequestFactory(); if (f instanceof SimpleClientHttpRequestFactory) { ((SimpleClientHttpRequestFactory) f).setReadTimeout(millis); } else { ((HttpComponentsClientHttpRequestFactory) f).setReadTimeout(millis); } }
[ "The read timeout for the underlying URLConnection to the twitter stream." ]
[ "Formats a connection string for CLI to use as it's controller connection.\n\n@return the controller string to connect CLI", "Returns all the persistent id generators which potentially require the creation of an object in the schema.", "Add the steal information to the rebalancer state\n\n@param stealInfo The steal information to add", "Use this API to fetch all the route6 resources that are configured on netscaler.", "Get the metadata of all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the track information reported by all current players, including any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the MetadataFinder is not running", "Use this API to Import sslfipskey.", "Use this API to fetch all the protocolhttpband resources that are configured on netscaler.\nThis uses protocolhttpband_args which is a way to provide additional arguments while fetching the resources.", "Add the given entries of the input map into the output map.\n\n<p>\nIf a key in the inputMap already exists in the outputMap, its value is\nreplaced in the outputMap by the value from the inputMap.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param outputMap the map to update.\n@param inputMap the entries to add.\n@since 2.15", "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." ]
public static GraphTraversal<Vertex, Vertex> addPipeFor(GraphTraversal<Vertex, Vertex> pipeline, Class<? extends WindupVertexFrame> clazz) { pipeline.has(WindupVertexFrame.TYPE_PROP, GraphTypeManager.getTypeValue(clazz)); return pipeline; }
[ "Adds a criterion to given pipeline which filters out vertices representing given WindupVertexFrame." ]
[ "Get the signatures that have been computed for all tracks currently loaded in any player for which we have\nbeen able to obtain all necessary metadata.\n\n@return the signatures that uniquely identify the tracks loaded in each player\n\n@throws IllegalStateException if the SignatureFinder is not running", "Build a standard-format UDP packet for sending to port 50001 or 50002 in the protocol.\n\n@param type the type of packet to create.\n@param deviceName the 0x14 (twenty) bytes of the device name to send in the packet.\n@param payload the remaining bytes which come after the device name.\n@return the packet to send.", "Gets the parameter names of a method node.\n@param node\nthe node to search parameter names on\n@return\nargument names, never null", "returns whether masking with the given mask results in a valid contiguous range for this segment,\nand if it does, if it matches the range obtained when masking the given values with the same mask.\n\n@param lowerValue\n@param upperValue\n@param mask\n@return", "Set a knot blend type.\n@param n the knot index\n@param type the knot blend type\n@see #getKnotBlend", "Returns the index of the median of the three indexed chars.", "Creates an association row representing the given entry and adds it to the association managed by the given\npersister.", "Initialize. create the httpClientStore, tcpClientStore", "Use this API to add inat resources." ]
public List<TimephasedWork> getTimephasedOvertimeWork() { if (m_timephasedOvertimeWork == null && m_timephasedWork != null && getOvertimeWork() != null) { double perDayFactor = getRemainingOvertimeWork().getDuration() / (getRemainingWork().getDuration() - getRemainingOvertimeWork().getDuration()); double totalFactor = getRemainingOvertimeWork().getDuration() / getRemainingWork().getDuration(); perDayFactor = Double.isNaN(perDayFactor) ? 0 : perDayFactor; totalFactor = Double.isNaN(totalFactor) ? 0 : totalFactor; m_timephasedOvertimeWork = new DefaultTimephasedWorkContainer(m_timephasedWork, perDayFactor, totalFactor); } return m_timephasedOvertimeWork == null ? null : m_timephasedOvertimeWork.getData(); }
[ "Retrieves the timephased breakdown of the planned overtime work for this\nresource assignment.\n\n@return timephased planned work" ]
[ "Computes the p=1 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.", "1-D Forward Discrete Hartley Transform.\n\n@param data Data.", "Queries taking longer than this limit to execute are logged.\n@param queryExecuteTimeLimit the limit to set in milliseconds.\n@param timeUnit", "Sets the initial MoificationState of the wrapped object myObj. The initial state will be StateNewDirty if myObj\nis not persisten already. The state will be set to StateOldClean if the object is already persistent.", "Create a new path\n\n@param pathName friendly name of path\n@param pathValue path value or regex\n@param requestType path request type. \"GET\", \"POST\", etc", "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", "Retrieve a FieldType instance based on an ID value from\nan MPP9 or MPP12 file.\n\n@param fieldID field ID\n@return FieldType instance", "Handles the response of the SerialApiGetInitData request.\n@param incomingMlivessage the response message to process.", "Read an optional month value form a JSON value.\n@param val the JSON value that should represent the month.\n@return the month from the JSON or null if reading the month fails." ]
public Point2D.Double minDistancePointSpline(Point2D.Double p, int nPointsPerSegment){ double minDistance = Double.MAX_VALUE; Point2D.Double minDistancePoint = null; int numberOfSplines = spline.getN(); double[] knots = spline.getKnots(); for(int i = 0; i < numberOfSplines; i++){ double x = knots[i]; double stopx = knots[i+1]; double dx = (stopx-x)/nPointsPerSegment; for(int j = 0; j < nPointsPerSegment; j++){ Point2D.Double candidate = new Point2D.Double(x, spline.value(x)); double d = p.distance(candidate); if(d<minDistance){ minDistance = d; minDistancePoint = candidate; } x += dx; } } return minDistancePoint; }
[ "Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p" ]
[ "Append the given String to the given String array, returning a new array\nconsisting of the input array contents plus the given String.\n\n@param array the array to append to (can be <code>null</code>)\n@param str the String to append\n@return the new array (never <code>null</code>)", "Adds a listener to this collection.\n\n@param listener The listener to add", "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", "Clear the connection that was previously saved.\n\n@return True if the connection argument had been saved.", "Find out which method to call on the service bean.", "Use this API to unset the properties of responderparam resource.\nProperties that need to be unset are specified in args array.", "Parse a comma-delimited list of method names into a List of strings.\nWhitespace is ignored.\n\n@param methods the comma delimited list of methods from the spring configuration\n\n@return List&lt;String&gt;", "Use this API to fetch all the sslocspresponder resources that are configured on netscaler.", "Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space." ]
private List<TimephasedCost> getTimephasedCostFixedAmount() { List<TimephasedCost> result = new LinkedList<TimephasedCost>(); ProjectCalendar cal = getCalendar(); double remainingCost = getRemainingCost().doubleValue(); if (remainingCost > 0) { AccrueType accrueAt = getResource().getAccrueAt(); if (accrueAt == AccrueType.START) { result.add(splitCostStart(cal, remainingCost, getStart())); } else if (accrueAt == AccrueType.END) { result.add(splitCostEnd(cal, remainingCost, getFinish())); } else { //for prorated, we have to deal with it differently depending on whether or not //any actual has been entered, since we want to mimic the other timephased data //where planned and actual values do not overlap double numWorkingDays = cal.getWork(getStart(), getFinish(), TimeUnit.DAYS).getDuration(); double standardAmountPerDay = getCost().doubleValue() / numWorkingDays; if (getActualCost().intValue() > 0) { //need to get three possible blocks of data: one for the possible partial amount //overlap with timephased actual cost; one with all the standard amount days //that happen after the actual cost stops; and one with any remaining //partial day cost amount int numActualDaysUsed = (int) Math.ceil(getActualCost().doubleValue() / standardAmountPerDay); Date actualWorkFinish = cal.getDate(getStart(), Duration.getInstance(numActualDaysUsed, TimeUnit.DAYS), false); double partialDayActualAmount = getActualCost().doubleValue() % standardAmountPerDay; if (partialDayActualAmount > 0) { double dayAmount = standardAmountPerDay < remainingCost ? standardAmountPerDay - partialDayActualAmount : remainingCost; result.add(splitCostEnd(cal, dayAmount, actualWorkFinish)); remainingCost -= dayAmount; } //see if there's anything left to work with if (remainingCost > 0) { //have to split up the amount into standard prorated amount days and whatever is left result.addAll(splitCostProrated(cal, remainingCost, standardAmountPerDay, cal.getNextWorkStart(actualWorkFinish))); } } else { //no actual cost to worry about, so just a standard split from the beginning of the assignment result.addAll(splitCostProrated(cal, remainingCost, standardAmountPerDay, getStart())); } } } return result; }
[ "Generates timephased costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost" ]
[ "Random string from string array\n\n@param s Array\n@return String", "Get a bean from the application context. Returns null if the bean does not exist.\n@param name name of bean\n@param requiredType type of bean\n@return the bean or null", "Returns the value associated with the given key, if any.\n\n@return the value associated with the given key, or <Code>null</Code>\nif the key maps to no value", "Creates a field map for assignments.\n\n@param props props data", "Use this API to Import sslfipskey resources.", "Writes this IIMFile to writer.\n\n@param writer\nwriter to write to\n@throws IOException\nif file can't be written to", "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", "This will set the last nestingLevel elements in the dotPositions to the values present in the dollarPositions.\nThe rest will be set to -1.\n\n<p>In another words the dotPositions array will contain the rightmost dollar positions.\n\n@param dollarPositions the positions of the $ in the binary class name\n@param dotPositions the positions of the dots to initialize from the dollarPositions\n@param nestingLevel the number of dots (i.e. how deep is the nesting of the classes)", "This method retrieves ONLY the ROOT actions" ]
protected synchronized void registerOpenDatabase(DatabaseImpl newDB) { DatabaseImpl old_db = getCurrentDatabase(); if (old_db != null) { try { if (old_db.isOpen()) { log.warn("## There is still an opened database, close old one ##"); old_db.close(); } } catch (Throwable t) { //ignore } } if (log.isDebugEnabled()) log.debug("Set current database " + newDB + " PBKey was " + newDB.getPBKey()); setCurrentDatabase(newDB); // usedDatabases.add(newDB.getPBKey()); }
[ "Register opened database via the PBKey." ]
[ "Resolves the base directory. If the system property is set that value will be used. Otherwise the path is\nresolved from the home directory.\n\n@param name the system property name\n@param dirName the directory name relative to the base directory\n\n@return the resolved base directory", "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.", "Returns iban's country code and check digit.\n\n@param iban String\n@return countryCodeAndCheckDigit String", "Get the number of views, comments and favorites on a collection for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n(Required) The id (from the URL!) of the collection to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionStats.htm\"", "Returns the count of all inbox messages for the user\n@return int - count of all inbox messages", "If the not a bitmap itself, this will read the file's meta data.\n\n@param resources {@link android.content.Context#getResources()}\n@return Point where x = width and y = height", "Used to retrieve all metadata associated with the item.\n@param item item to get metadata for.\n@param fields the optional fields to retrieve.\n@return An iterable of metadata instances associated with the item.", "Adds the newState and the edge between the currentState and the newState on the SFG.\n\n@param newState the new state.\n@param eventable the clickable causing the new state.\n@return the clone state iff newState is a clone, else returns null", "Cancels all the pending & running requests and releases all the dispatchers." ]
public static Span prefix(Bytes rowPrefix) { Objects.requireNonNull(rowPrefix); Bytes fp = followingPrefix(rowPrefix); return new Span(rowPrefix, true, fp == null ? Bytes.EMPTY : fp, false); }
[ "Returns a Span that covers all rows beginning with a prefix." ]
[ "Gets the health memory.\n\n@return the health memory", "Copy the data from an InputStream to a temp file.\n\n@param inputStream data source\n@param tempFileSuffix suffix to use for temp file\n@return File instance", "Use this API to delete linkset of given name.", "Use this API to fetch dnspolicy_dnsglobal_binding resources of given name .", "Obtains a Ethiopic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Function to perform forward pooling", "True if deleted, false if not found.", "Use this API to fetch tmtrafficpolicy_lbvserver_binding resources of given name .", "Str map to str.\n\n@param map\nthe map\n@return the string" ]
public static sslservicegroup_sslcertkey_binding[] get(nitro_service service, String servicegroupname) throws Exception{ sslservicegroup_sslcertkey_binding obj = new sslservicegroup_sslcertkey_binding(); obj.set_servicegroupname(servicegroupname); sslservicegroup_sslcertkey_binding response[] = (sslservicegroup_sslcertkey_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch sslservicegroup_sslcertkey_binding resources of given name ." ]
[ "Sets the right padding character for all cells in the table.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining", "Add a Comparator to the end of the chain using the provided sort order.\n@param comparator the Comparator to add to the end of the chain\n@param ascending the sort order: ascending (true) or descending (false)", "Save an HTTP response to a file\n@param response the response to save\n@param destFile the destination file\n@throws IOException if the response could not be downloaded", "Create a request for elevations for samples along a path.\n\n@param req\n@param callback", "Get the text value for the specified element. If the element is null, or the element's body is empty then this method will return null.\n\n@param element\nThe Element\n@return The value String or null", "Get the known locations where the secure keyring can be located.\nLooks through known locations of the GNU PG secure keyring.\n\n@return The location of the PGP secure keyring if it was found,\nnull otherwise", "Set the custom projection matrix with individual matrix elements.", "Provides a consistent ordering over lists. First compares by the first\nelement. If that element is equal, the next element is considered, and so\non.", "Use this API to update autoscaleprofile resources." ]
public static String workDays(ProjectCalendar input) { StringBuilder result = new StringBuilder(); DayType[] test = input.getDays(); // get the array from MPXJ ProjectCalendar for (DayType i : test) { // go through every day in the given array if (i == DayType.NON_WORKING) { result.append("N"); // only put N for non-working day of the week } else { result.append("Y"); // Assume WORKING day unless NON_WORKING } } return result.toString(); // According to USACE specs., exceptions will be specified in HOLI records }
[ "This method takes a calendar of MPXJ library type, then returns a String of the\ngeneral working days USACE format. For example, the regular 5-day work week is\nNYYYYYN\n\nIf you get Fridays off work, then the String becomes NYYYYNN\n\n@param input ProjectCalendar instance\n@return work days string" ]
[ "Use this API to fetch all the sslocspresponder resources that are configured on netscaler.", "Resolves the package type from the maven project.\n\n@param project the maven project\n\n@return the package type", "Callback when each frame in the indicator animation should be drawn.", "Gets the flags associated with this attribute.\n@return the flags. Will not return {@code null}", "Specify the class represented by this `ClassNode` implements\nan interface specified by the given name\n\n@param name the name of the interface class\n@return this `ClassNode` instance", "Get a property as a float or throw an exception.\n\n@param key the property name", "Sets the upper limits for the \"moving\" body translation relative to joint point.\n\n@param limitX the X upper lower translation limit\n@param limitY the Y upper lower translation limit\n@param limitZ the Z upper lower translation limit", "Convert a URL Encoded name back to the original form.\n@param name the name to URL urlDecode.\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the name in original form.\n@throws UnsupportedEncodingException if the encoding is not supported.", "Creates a file\n\n@param folder File\n@param fileName String\n@throws IOException" ]
private String getNotes(List<MapRow> rows) { String result = null; if (rows != null && !rows.isEmpty()) { StringBuilder sb = new StringBuilder(); for (MapRow row : rows) { sb.append(row.getString("TITLE")); sb.append('\n'); sb.append(row.getString("TEXT")); sb.append("\n\n"); } result = sb.toString(); } return result; }
[ "Common mechanism to convert Synchro commentary recorss into notes.\n\n@param rows commentary table rows\n@return note text" ]
[ "Tests that the area is valid geojson, the style ref is valid or null and the display is non-null.", "Matrix inverse for symmetric positive definite matrices. For small matrices an unrolled\ncholesky is used. Otherwise a standard decomposition.\n\n@see UnrolledCholesky_DDRM\n@see LinearSolverFactory_DDRM#chol(int)\n\n@param mat (Input) SPD matrix\n@param result (Output) Inverted matrix.\n@return true if it could invert the matrix false if it could not.", "Reads the NTriples file from the reader, pushing statements into\nthe handler.", "Registers the resource to the parent deployment resource. The model returned is that of the resource parameter.\n\n@param subsystemName the subsystem name\n@param resource the resource to be used for the subsystem on the deployment\n\n@return the model\n\n@throws java.lang.IllegalStateException if the subsystem resource already exists", "Calculate the value of a CMS option using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS option", "Get the authorization uri, where the user logs in.\n\n@param redirectUri\nUri the user is redirected to, after successful authorization.\nThis must be the same as specified at the Eve Online developer\npage.\n@param scopes\nScopes of the Eve Online SSO.\n@param state\nThis should be some secret to prevent XRSF, please read:\nhttp://www.thread-safe.com/2014/05/the-correct-use-of-state-\nparameter-in.html\n@return", "Returns the index of a key in the set.\n\n@param key The key to search for.\n@return Returns the index of the key if it exists, else a negative integer.", "Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to process.", "Creates a Bytes object by copying the data of the given byte array" ]
public static URL classFileUrl(Class<?> clazz) throws IOException { ClassLoader cl = clazz.getClassLoader(); if (cl == null) { cl = ClassLoader.getSystemClassLoader(); } URL res = cl.getResource(clazz.getName().replace('.', '/') + ".class"); if (res == null) { throw new IllegalArgumentException("Unable to locate class file for " + clazz); } return res; }
[ "Returns the URL of the class file where the given class has been loaded from.\n\n@throws IllegalArgumentException\nif failed to determine.\n@since 2.24" ]
[ "Get the first child element with the given name.\n\n@param element\nThe parent element\n@param name\nThe child element name\n@return The child element or null", "returns all methods not in the group\n\n@param groupId Id of group\n@return List of Methods for a group\n@throws Exception exception", "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", "return null if the operation has no params to validate", "Generates a diagonal matrix with the input vector on its diagonal\n\n@param vector The given matrix A.\n@return diagonalMatrix The matrix with the vectors entries on its diagonal", "2-D Gaussian function.\n\n@param x value.\n@param y value.\n@return Function's value at point (x,y).", "Creates a rectangular matrix which is zero except along the diagonals.\n\n@param numRows Number of rows in the matrix.\n@param numCols NUmber of columns in the matrix.\n@return A matrix with diagonal elements equal to one.", "Check the document field's type\nand object\n@param lhs The field to check\n@param rhs The type\n@return Expression: lhs $type rhs", "Add query part for the facet, without filters.\n@param query The query part that is extended for the facet" ]
protected void cacheCollection() { this.clear(); for (FluentModelTImpl childResource : this.listChildResources()) { this.childCollection.put(childResource.childResourceKey(), childResource); } }
[ "Initializes the external child resource collection." ]
[ "Bessel function of the second kind, of order 1.\n\n@param x Value.\n@return Y value.", "Use this API to fetch dbdbprofile resource of given name .", "Returns the Map value of the field.\n\n@return the Map value of the field. It returns a reference of the value both for <code>MAP</code> and\n<code>LIST_MAP</code>.\n@throws IllegalArgumentException if the value cannot be converted to Map.", "Scales the brightness of a pixel.", "Builds a configuration object based on given properties.\n\n@param properties the properties.\n@return a configuration and never null.", "Create a structured Record instance from the flat text data.\nNull is returned if errors are encountered during parse.\n\n@param text flat text data\n@return Record instance", "Use this API to fetch appfwlearningsettings resource of given name .", "Changes the message of this comment.\n@param newMessage the new message for this comment.\n@return updated info about this comment.", "Set the view frustum to pick against from the given projection matrix.\n\nIf the projection matrix is null, the picker will revert to picking\nobjects that are visible from the viewpoint of the scene's current camera.\nIf a matrix is given, the picker will pick objects that are visible\nfrom the viewpoint of it's owner the given projection matrix.\n\n@param projMatrix 4x4 projection matrix or null\n@see GVRScene#setPickVisible(boolean)" ]
public void setKnots(int[] x, int[] rgb, byte[] types) { numKnots = rgb.length+2; xKnots = new int[numKnots]; yKnots = new int[numKnots]; knotTypes = new byte[numKnots]; if (x != null) System.arraycopy(x, 0, xKnots, 1, numKnots-2); else for (int i = 1; i > numKnots-1; i++) xKnots[i] = 255*i/(numKnots-2); System.arraycopy(rgb, 0, yKnots, 1, numKnots-2); if (types != null) System.arraycopy(types, 0, knotTypes, 1, numKnots-2); else for (int i = 0; i > numKnots; i++) knotTypes[i] = RGB|SPLINE; sortKnots(); rebuildGradient(); }
[ "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" ]
[ "Builds the Join for columns if they are not found among the existingColumns.\n@param columns the list of columns represented by Criteria.Field to ensure\n@param existingColumns the list of column names (String) that are already appended", "Produces an IPv4 address from any sequence of 4 bytes in this IPv6 address.\n\n@param byteIndex the byte index to start\n@throws IndexOutOfBoundsException if the index is less than zero or bigger than 7\n@return", "Use this API to unset the properties of systemcollectionparam resource.\nProperties that need to be unset are specified in args array.", "See if there is an auto-attach cache file that seems to match the media in the specified slot, and if so,\nattach it.\n\n@param slot the player slot that is under consideration for automatic cache attachment", "1-D Forward Discrete Cosine Transform.\n\n@param data Data.", "Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process", "Resolve the single type argument of the given generic interface against\nthe given target class which is assumed to implement the generic interface\nand possibly declare a concrete type for its type variable.\n@param clazz the target class to check against\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved type of the argument, or {@code null} if not resolvable", "Return a Halton number, sequence starting at index = 0, base &gt; 1.\n\n@param index The index of the sequence.\n@param base The base of the sequence. Has to be greater than one (this is not checked).\n@return The Halton number.", "Calculate a threshold.\n\n@param x first string.\n@param y second string.\n@param p the threshold coefficient.\n@return 2 maxLength(x, y) (1-p)" ]
public int size(final K1 firstKey, final K2 secondKey) { // existence check on inner map final HashMap<K2, HashMap<K3, V>> innerMap1 = map.get(firstKey); if( innerMap1 == null ) { return 0; } // existence check on inner map1 final HashMap<K3, V> innerMap2 = innerMap1.get(secondKey); if( innerMap2 == null ) { return 0; } return innerMap2.size(); }
[ "Returns the number of key-value mappings in this map for the third key.\n\n@param firstKey\nthe first key\n@param secondKey\nthe second key\n@return Returns the number of key-value mappings in this map for the third key." ]
[ "Return the value from the field in the object that is defined by this FieldType. If the field is a foreign object\nthen the ID of the field is returned instead.", "Remove any device announcements that are so old that the device seems to have gone away.", "Returns tag formatted as an HTTP tag string.\n\n@return The formatted HTTP tag string.\n\n@see <a\nhref=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11\">HTTP\nEntity Tags</a>", "Sets the specified short 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", "Check the given resource back into the pool\n\n@param key The key for the resource\n@param resource The resource", "Loaders call this method to register themselves. This method can be called by\nloaders provided by the application.\n\n@param textureClass\nThe class the loader is responsible for loading.\n\n@param asyncLoaderFactory\nThe factory object.", "Get the inactive overlay directories.\n\n@return the inactive overlay directories", "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", "Use this API to apply nspbr6." ]
public boolean hasProperties(Set<PropertyKey> keys) { for (PropertyKey key : keys) { if (null == getProperty(key.m_key)) { return false; } } return true; }
[ "Checks whether the given set of properties is available.\n\n@param keys the keys to check\n@return true if all properties are available, false otherwise" ]
[ "try to delegate the master to handle the response\n\n@param response\n@return true if the master accepted the response; false if the master\ndidn't accept", "Function to perform backward pooling", "Writes the value key to the serialized characteristic\n\n@param builder The JSON builder to add the value to\n@param value The value to add", "ten less than Cube Q", "May have to be changed to let multiple touch", "Gets the publisher wrapped by the specofoed FlexiblePublisher.\n@param publisher The FlexiblePublisher wrapping the publisher.\n@param type The type of the publisher wrapped by the FlexiblePublisher.\n@return The publisher object wrapped by the FlexiblePublisher.\nNull is returned if the FlexiblePublisher does not wrap a publisher of the specified type.\n@throws IllegalArgumentException In case publisher is not of type\n{@link org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher}", "Put the core auto-code algorithm here so an external class can call it", "Use this API to rename a cmppolicylabel resource.", "Use this API to fetch vpnvserver_rewritepolicy_binding resources of given name ." ]
public <T> List<T> query(String query, Class<T> classOfT) { InputStream instream = null; List<T> result = new ArrayList<T>(); try { Reader reader = new InputStreamReader(instream = queryForStream(query), "UTF-8"); JsonObject json = new JsonParser().parse(reader).getAsJsonObject(); if (json.has("rows")) { if (!includeDocs) { log.warning("includeDocs set to false and attempting to retrieve doc. " + "null object will be returned"); } for (JsonElement e : json.getAsJsonArray("rows")) { result.add(jsonToObject(client.getGson(), e, "doc", classOfT)); } } else { log.warning("No ungrouped result available. Use queryGroups() if grouping set"); } return result; } catch (UnsupportedEncodingException e1) { // This should never happen as every implementation of the java platform is required // to support UTF-8. throw new RuntimeException(e1); } finally { close(instream); } }
[ "Queries a Search Index and returns ungrouped results. In case the query\nused grouping, an empty list is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the search query as a {@code List<T> }" ]
[ "A disposer method is bound to a producer if the producer is assignable to the disposed parameter.\n\n@param enhancedDisposedParameter\n@return the set of required qualifiers for the given disposed parameter", "Returns a list of files in given addon passing given filter.", "Get the GroupDiscussInterface.\n\n@return The GroupDiscussInterface", "Helper to read a line from the config file.\n@param propValue the property value\n@return the value of the variable set at this line.", "Returns the finish date for this resource assignment.\n\n@return finish date", "Return the command line argument\n\n@return \" --server-groups=\" plus a comma-separated list\nof selected server groups. Return empty String if none selected.", "Use this API to disable snmpalarm of given name.", "Returns the plugins classpath elements.", "Remove the report directory." ]
public static void validate(final Module module) { if (null == module) { throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST) .entity("Module cannot be null!") .build()); } if(module.getName() == null || module.getName().isEmpty()){ throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST) .entity("Module name cannot be null or empty!") .build()); } if(module.getVersion()== null || module.getVersion().isEmpty()){ throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST) .entity("Module version cannot be null or empty!") .build()); } // Check artifacts for(final Artifact artifact: DataUtils.getAllArtifacts(module)){ validate(artifact); } // Check dependencies for(final Dependency dependency: DataUtils.getAllDependencies(module)){ validate(dependency.getTarget()); } }
[ "Checks if the provided module is valid and could be stored into the database\n\n@param module the module to test\n@throws WebApplicationException if the data is corrupted" ]
[ "Loads a classifier from the file specified by loadPath. If loadPath ends in\n.gz, uses a GZIPInputStream, else uses a regular FileInputStream.", "Sets the values of this input field. Only Applicable check-boxes and a radio buttons.\n\n@param values Values to set.", "Starts listening for shakes on devices with appropriate hardware.\n\n@return true if the device supports shake detection.", "Creates a field map for relations.\n\n@param props props data", "Triggers a replication request.", "Starts the scavenger.", "Creates a ServiceCall from an observable object and a callback.\n\n@param observable the observable to create from\n@param callback the callback to call when events happen\n@param <T> the type of the response\n@return the created ServiceCall", "Find and validate manifest.json file in Artifactory for the current image.\nSince provided imageTag differs between reverse-proxy and proxy-less configuration, try to build the correct manifest path.\n@param server\n@param dependenciesClient\n@param listener\n@return\n@throws IOException", "Send a tempo changed announcement to all registered master listeners.\n\n@param tempo the new master tempo" ]
private String jsonifyData(Map<String, ? extends Object> data) { JSONObject jsonData = new JSONObject(data); return jsonData.toString(); }
[ "converts Map of data to json string\n\n@param data map data to converted to json\n@return {@link String}" ]
[ "Read all configuration files.\n@return the list with all available configurations", "Notifies that a footer item is changed.\n\n@param position the position.", "Set a knot type.\n@param n the knot index\n@param type the type\n@see #getKnotType", "Gets the task from in progress map.\n\n@param jobId\nthe job id\n@return the task from in progress map", "Use this API to add authenticationradiusaction.", "Does a query for the object's Id and copies in each of the field values from the database to refresh the data\nparameter.", "Helper method to create a Dao object without having to define a class. Dao classes are supposed to be convenient\nbut if you have a lot of classes, they can seem to be a pain.\n\n<p>\n<b>NOTE:</b> You should use {@link DaoManager#createDao(ConnectionSource, DatabaseTableConfig)} instead of this\nmethod so you won't have to create the DAO multiple times.\n</p>", "Generate a uniform random number in the range [lo, hi)\n\n@param lo lower limit of range\n@param hi upper limit of range\n@return a uniform random real in the range [lo, hi)", "Answer the SQL-Clause for a SelectionCriteria\nIf the Criteria references a class with extents an OR-Clause is\nadded for each extent\n@param c SelectionCriteria" ]
protected String addPostRunDependent(TaskGroup.HasTaskGroup dependent) { Objects.requireNonNull(dependent); this.taskGroup.addPostRunDependentTaskGroup(dependent.taskGroup()); return dependent.taskGroup().key(); }
[ "Add a \"post-run\" dependent for this model.\n\n@param dependent the \"post-run\" dependent.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group" ]
[ "Use this API to save cacheobject.", "Get the currently selected opacity.\n\n@return The int value of the currently selected opacity.", "Serialize the Document object.\n\n@param dom the document to serialize\n@return the serialized dom String", "Retrieves an object that has been attached to this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.", "Remove all children that have been added to the owner object of this camera rig; except the\ncamera objects.", "required for rest assured base URI configuration.", "Utils for making collections out of arrays of primitive types.", "Reads characters until the 'end' character is encountered.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found.", "Add a console pipeline to the Redwood handler tree,\nprinting to stdout.\nCalling this multiple times will result in messages being printed\nmultiple times.\n@return this" ]
public Map<String, String> resolve(Map<String, String> config) { config = resolveSystemEnvironmentVariables(config); config = resolveSystemDefaultSetup(config); config = resolveDockerInsideDocker(config); config = resolveDownloadDockerMachine(config); config = resolveAutoStartDockerMachine(config); config = resolveDefaultDockerMachine(config); config = resolveServerUriByOperativeSystem(config); config = resolveServerIp(config); config = resolveTlsVerification(config); return config; }
[ "Resolves the configuration.\n\n@param config The specified configuration.\n@return The resolved configuration." ]
[ "Switch to a new DataSource using the given configuration.\n@param newConfig BoneCP DataSource to use.\n@throws SQLException", "Adds all fields declared directly in the object's class to the output\n@return this", "Post a module to the server\n\n@param module\n@param user\n@param password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Creates a new deployment for the URL. The target server will require access to the URL.\n\n@param url the URL representing the content\n\n@return the deployment", "Generate a uniform random number in the range [lo, hi)\n\n@param lo lower limit of range\n@param hi upper limit of range\n@return a uniform random real in the range [lo, hi)", "Given a cluster and a node id checks if the node exists\n\n@param nodeId The node id to search for\n@return True if cluster contains the node id, else false", "Verifies that the TestMatrix is correct and sane without using a specification.\nThe Proctor API doesn't use a test specification so that it can serve all tests in the matrix\nwithout restriction.\nDoes a limited set of sanity checks that are applicable when there is no specification,\nand thus no required tests or provided context.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test.", "a small static helper to set the color to a GradientDrawable null save\n\n@param colorHolder\n@param ctx\n@param gradientDrawable", "The users element defines users within the domain model, it is a simple authentication for some out of the box users." ]
public List<ChannelInfo> getChannels() { final URI uri = uriWithPath("./channels/"); return Arrays.asList(this.rt.getForObject(uri, ChannelInfo[].class)); }
[ "Retrieves state and metrics information for all channels across the cluster.\n\n@return list of channels across the cluster" ]
[ "Get a View that displays the data at the specified\nposition in the data set. In this case, if we are at\nthe end of the list and we are still in append mode, we\nask for a pending view and return it, plus kick off the\nbackground task to append more data to the wrapped\nadapter.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View", "the transaction id are generated as unique timestamps\n\n@param timeMs in milliseconds\n@return a unique transactionId", "Performs a Bulk Documents insert request.\n\n@param objects The {@link List} of objects.\n@param allOrNothing Indicates whether the request has <tt>all-or-nothing</tt> semantics.\n@return {@code List<Response>} Containing the resulted entries.", "Use this API to fetch clusterinstance resource of given name .", "Extracts the column of A and copies it into u while computing the magnitude of the\nlargest element and returning it.\n\n<pre>\nu[ (offsetU+row0+i)*2 ] = A.getReal(row0+i,col)\nu[ (offsetU+row0+i)*2 + 1] = A.getImag(row0+i,col)\n</pre>\n\n@param A Complex matrix\n@param row0 First row in A to be copied\n@param row1 Last row in A + 1 to be copied\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U\n@return magnitude of largest element", "Wrap an operation's parameters in a simple encapsulating object\n@param operation the operation\n@param messageHandler the message handler\n@param attachments the attachments\n@return the encapsulating object", "Hardcode a copy method as being valid. This should be used to tell Mutability Detector about\na method which copies a collection, and when the copy can be wrapped in an immutable wrapper\nwe can consider the assignment immutable. Useful for allowing Mutability Detector to correctly\nwork with other collections frameworks such as Google Guava. Reflection is used to obtain the\nmethod's descriptor and to verify the method's existence.\n\n@param fieldType - the type of the field to which the result of the copy is assigned\n@param fullyQualifiedMethodName - the fully qualified method name\n@param argType - the type of the argument passed to the copy method\n\n@throws MutabilityAnalysisException - if the specified class or method does not exist\n@throws IllegalArgumentException - if any of the arguments are null", "Sets the initial MoificationState of the wrapped object myObj. The initial state will be StateNewDirty if myObj\nis not persisten already. The state will be set to StateOldClean if the object is already persistent.", "This method is called to alert project listeners to the fact that\na calendar has been read from a project file.\n\n@param calendar calendar instance" ]
@Override public List<String> contentTypes() { List<String> contentTypes = null; final HttpServletRequest request = getHttpRequest(); if (favorParameterOverAcceptHeader) { contentTypes = getFavoredParameterValueAsList(request); } else { contentTypes = getAcceptHeaderValues(request); } if (isEmpty(contentTypes)) { logger.debug("Setting content types to default: {}.", DEFAULT_SUPPORTED_CONTENT_TYPES); contentTypes = DEFAULT_SUPPORTED_CONTENT_TYPES; } return unmodifiableList(contentTypes); }
[ "Returns requested content types or default content type if none found.\n\n@return Requested content types or default content type if none found." ]
[ "Requests Change notifications of feed type normal.\n\n@return {@link ChangesResult} encapsulating the normal feed changes", "Check if a column is part of the row key columns.\n\n@param column the name of the column to check\n@return true if the column is one of the row key columns, false otherwise", "Adds the given reference to the list of references that should still be\nserialized, and returns the RDF resource that will be used as a subject.\n\n@param reference\nthe reference to be serialized\n@return RDF resource that represents this reference", "Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array.", "Do some magic to turn request parameters into a context object", "Called when a ParentViewHolder has triggered a collapse for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be collapsed", "Sets a parameter for the creator.", "Build filter for the request.\n\n@param layerFilter layer filter\n@param featureIds features to include in report (null for all)\n@return filter\n@throws GeomajasException filter could not be parsed/created", "add various getAt and setAt methods for primitive arrays\n@param receiver the receiver class\n@param name the name of the method\n@param args the argument classes" ]
protected float getStartingOffset(final float totalSize) { final float axisSize = getViewPortSize(getOrientationAxis()); float startingOffset = 0; switch (getGravityInternal()) { case LEFT: case FILL: case TOP: case FRONT: startingOffset = -axisSize / 2; break; case RIGHT: case BOTTOM: case BACK: startingOffset = (axisSize / 2 - totalSize); break; case CENTER: startingOffset = -totalSize / 2; break; default: Log.w(TAG, "Cannot calculate starting offset: " + "gravity %s is not supported!", mGravity); break; } Log.d(LAYOUT, TAG, "getStartingOffset(): totalSize: %5.4f, dimension: %5.4f, startingOffset: %5.4f", totalSize, axisSize, startingOffset); return startingOffset; }
[ "Calculate the starting content offset based on the layout orientation and Gravity\n@param totalSize total size occupied by the content" ]
[ "Upload a photo from a byte-array.\n\n@param data\nThe photo data as a byte array\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException", "Prepare a model JSON for analyze, resolves the hierarchical structure\ncreates a HashMap which contains all resourceIds as keys and for each key\nthe JSONObject, all id are keys of this map\n@param object\n@return a HashMap keys: all ressourceIds values: all child JSONObjects\n@throws org.json.JSONException", "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", "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", "Generate a results file for each test in each suite.\n@param outputDirectory The target directory for the generated file(s).", "Declares additional internal data structures.", "Marks the start of a query identified by the provided correlationId\n\n@param query - Query data\n@param correlationId - Identifier\n@return Start event to pass to the Events systems EventBus", "Use this API to fetch csvserver_copolicy_binding resources of given name .", "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" ]
public ApnsServiceBuilder withAuthProxy(Proxy proxy, String proxyUsername, String proxyPassword) { this.proxy = proxy; this.proxyUsername = proxyUsername; this.proxyPassword = proxyPassword; return this; }
[ "Specify the proxy and the authentication parameters to be used\nto establish the connections to Apple Servers.\n\n<p>Read the <a href=\"http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html\">\nJava Networking and Proxies</a> guide to understand the\nproxies complexity.\n\n@param proxy the proxy object to be used to create connections\n@param proxyUsername a String object representing the username of the proxy server\n@param proxyPassword a String object representing the password of the proxy server\n@return this" ]
[ "Use this API to fetch wisite_accessmethod_binding resources of given name .", "Removes old entries in the history table for the given profile and client UUID\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param limit Maximum number of history entries to remove\n@throws Exception exception", "Determine if a CharSequence can be parsed as a Long.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isLong(String)\n@since 1.8.2", "Prepare a parallel UDP Task.\n\n@param command\nthe command\n@return the parallel task builder", "Write a string attribute.\n\n@param name attribute name\n@param value attribute value", "Gets the property and casts to the appropriate type\n\n@param <T>\n@param key The property name\n@param type The property type\n@return The value of the property", "Log a message with a throwable at the provided level.", "Sets the frame pointer to a specific frame\n\n@return boolean true if the move was successful", "Helper method that encapsulates the logic to acquire a lock.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param lockName\nall calls to this method will contend for a unique lock with\nthe name of lockName\n@param timeout\nseconds until the lock will expire\n@param lockHolder\na unique string used to tell if you are the current holder of\na lock for both acquisition, and extension\n@return Whether or not the lock was acquired." ]
public void addHandlerFactory(ManagementRequestHandlerFactory factory) { for (;;) { final ManagementRequestHandlerFactory[] snapshot = updater.get(this); final int length = snapshot.length; final ManagementRequestHandlerFactory[] newVal = new ManagementRequestHandlerFactory[length + 1]; System.arraycopy(snapshot, 0, newVal, 0, length); newVal[length] = factory; if (updater.compareAndSet(this, snapshot, newVal)) { return; } } }
[ "Add a management request handler factory to this context.\n\n@param factory the request handler to add" ]
[ "Find the current active layout.\n\n@param phoenixProject phoenix project data\n@return current active layout", "Create a standalone target.\n\n@param controllerClient the connected controller client to a standalone instance.\n@return the remote target", "of the unbound provider (", "Return the key if there is one else return -1", "Is the given resource type id free?\n@param id to be checked\n@return boolean", "Runs a query that returns a single int.", "Create a new path address by appending more elements to the end of this address.\n\n@param additionalElements the elements to append\n@return the new path address", "Initializes an annotation class\n\n@param name The name of the annotation class\n@return The instance of the annotation. Returns a dummy if the class was\nnot found", "Generate a new check box with the provided date and check state.\n@param date date for the check box.\n@param checkState the initial check state.\n@return the created check box" ]
protected void generateMopCalls(LinkedList<MethodNode> mopCalls, boolean useThis) { for (MethodNode method : mopCalls) { String name = getMopMethodName(method, useThis); Parameter[] parameters = method.getParameters(); String methodDescriptor = BytecodeHelper.getMethodDescriptor(method.getReturnType(), method.getParameters()); MethodVisitor mv = controller.getClassVisitor().visitMethod(ACC_PUBLIC | ACC_SYNTHETIC, name, methodDescriptor, null, null); controller.setMethodVisitor(mv); mv.visitVarInsn(ALOAD, 0); int newRegister = 1; OperandStack operandStack = controller.getOperandStack(); for (Parameter parameter : parameters) { ClassNode type = parameter.getType(); operandStack.load(parameter.getType(), newRegister); // increment to next register, double/long are using two places newRegister++; if (type == ClassHelper.double_TYPE || type == ClassHelper.long_TYPE) newRegister++; } operandStack.remove(parameters.length); ClassNode declaringClass = method.getDeclaringClass(); // JDK 8 support for default methods in interfaces // this should probably be strenghtened when we support the A.super.foo() syntax int opcode = declaringClass.isInterface()?INVOKEINTERFACE:INVOKESPECIAL; mv.visitMethodInsn(opcode, BytecodeHelper.getClassInternalName(declaringClass), method.getName(), methodDescriptor, opcode == INVOKEINTERFACE); BytecodeHelper.doReturn(mv, method.getReturnType()); mv.visitMaxs(0, 0); mv.visitEnd(); controller.getClassNode().addMethod(name, ACC_PUBLIC | ACC_SYNTHETIC, method.getReturnType(), parameters, null, null); } }
[ "generates a Meta Object Protocol method, that is used to call a non public\nmethod, or to make a call to super.\n\n@param mopCalls list of methods a mop call method should be generated for\n@param useThis true if \"this\" should be used for the naming" ]
[ "This method retrieves a byte array containing the data at the\ngiven offset in the block. If no data is found at the given offset\nthis method returns null.\n\n@param offset offset of required data\n@return byte array containing required data", "Use this API to fetch statistics of appfwpolicylabel_stats resource of given name .", "Checks String to see if the parameter is null.\n@param paramValue Object that will be checked if null.\n@return this.true if the parameter that is being checked is not null", "Obtains a local date in Coptic calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Coptic era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Coptic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code CopticEra}", "Find the next match of the pattern on the tree\n\n@return whether there is a match somewhere in the tree", "This loads plugin file information into a hash for lazy loading later on\n\n@param pluginDirectory path of plugin\n@throws Exception exception", "Converts from a Fluo RowColumn to a Accumulo Key\n\n@param rc RowColumn\n@return Key", "Verify that all OGM custom externalizers are present.\nN.B. even if some Externalizer is only needed in specific configuration,\nit is not safe to start a CacheManager without one as the same CacheManager\nmight be used, or have been used in the past, to store data using a different\nconfiguration.\n\n@see ExternalizerIds\n@see AdvancedExternalizer\n@param externalCacheManager the provided CacheManager to validate", "Set the featureModel.\n\n@param featureModel\nfeature model\n@throws LayerException\nproblem setting the feature model\n@since 1.8.0" ]
public static String changeFirstLetterToLowerCase(String word) { char[] letras = word.toCharArray(); char a = letras[0]; letras[0] = Character.toLowerCase(a); return new String(letras); }
[ "Method used to write the name of the scenarios methods\n\n@param word\n@return the same word starting with lower case" ]
[ "Returns any events for the given resource ID since the last sync token\n\n@param resource Globally unique identifier for the resource.\n@param sync Sync token provided by a previous call to the events API\n@return Request object", "returns the values of the orientation tag", "Creates typed parser\n@param contentType class of parsed object\n@param <T> type of parsed object\n@return parser of objects of given type", "seeks to a particular month\n\n@param direction the direction to seek: two possibilities\n'<' go backward\n'>' go forward\n\n@param seekAmount the amount to seek. Must be guaranteed to parse as an integer\n\n@param month the month to seek to. Must be guaranteed to parse as an integer\nbetween 1 and 12", "Creates the stats items.\n\n@param statsType\nthe stats type\n@return the sorted set\n@throws IOException\nSignals that an I/O exception has occurred.", "This method is a sync parse to the JSON stream of atlas information.\n\n@return List of atlas information.", "Record a prepare operation.\n\n@param preparedOperation the prepared operation", "Determine whether all references are available locally.\n\n@param domain the domain model\n@param hostElement the host path element\n@return whether to a sync with the master is required", "Create a FreeMarkerOperation with the provided furnace instance template path, and varNames.\n\nThe variables in varNames will be provided to the template, and a new ReportModel will be created with these variables attached." ]
public static String toJson(Date date) { if (date == null) { return NULL_VALUE; } CharBuf buffer = CharBuf.create(26); writeDate(date, buffer); return buffer.toString(); }
[ "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" ]
[ "Generate Allure report data from directories with allure report results.\n\n@param args a list of directory paths. First (args.length - 1) arguments -\nresults directories, last argument - the folder to generated data", "Returns an text table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.", "Extract WOEID after XML loads", "Given a block of data representing completed work, this method will\nretrieve a set of TimephasedWork instances which represent\nthe day by day work carried out for a specific resource assignment.\n\n@param calendar calendar on which date calculations are based\n@param resourceAssignment resource assignment\n@param data completed work data block\n@return list of TimephasedWork instances", "Start pushing the element off to the right.", "alias of setColorUnpressed", "Attempts to substitute all the found expressions in the input\nwith their corresponding resolved values.\nIf any of the found expressions failed to resolve or\nif the input does not contain any expression, the input is returned as is.\n\n@param input the input string\n@return the input with resolved expressions or the original input in case\nthe input didn't contain any expressions or at least one of the\nexpressions could not be resolved", "Launch Application Setting to grant permission.", "Update database schema\n\n@param migrationPath path to migrations" ]
public String getPendingChanges() { JsonObject jsonObject = this.getPendingJSONObject(); if (jsonObject == null) { return null; } return jsonObject.toString(); }
[ "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." ]
[ "Use this API to update autoscaleprofile resources.", "Gets the filename from a path or URL.\n@param path or url.\n@return the file name.", "Create the index file that sets up the frameset.\n@param outputDirectory The target directory for the generated file(s).", "Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nunless we have a metadata cache available for the specified media slot, in which case that will be used instead.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n\n@return the metadata, if any", "This method retrieves the calendar hours for the specified day.\nNote that if this is a derived calendar, then this method\nwill refer to the base calendar where no hours are specified\nin the derived calendar.\n\n@param day Day instance\n@return calendar hours", "Returns the integer value o the given belief", "Sets the scale vector of the keyframe.", "Push docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host", "Reports a dependency of this node has been faulted.\n\n@param dependencyKey the id of the dependency node\n@param throwable the reason for unsuccessful resolution" ]
public static boolean isResourceTypeIdFree(int id) { try { OpenCms.getResourceManager().getResourceType(id); } catch (CmsLoaderException e) { return true; } return false; }
[ "Is the given resource type id free?\n@param id to be checked\n@return boolean" ]
[ "Creates a new Message from the specified text.", "Record a prepare operation timeout.\n\n@param failedOperation the prepared operation", "Find all the values of the requested type.\n\n@param valueTypeToFind the type of the value to return.\n@param <T> the type of the value to find.\n@return the key, value pairs found.", "If this represents an ip address, returns that address.\nIf this represents a host, returns the resolved ip address of that host.\nOtherwise, returns null, but only for strings that are considered valid address strings but cannot be converted to address objects.\n\nThis method will throw exceptions for invalid formats and failures to resolve the address. The equivalent method {@link #getAddress()} will simply return null rather than throw those exceptions.\n\nIf you wish to get the represented address and avoid DNS resolution, use {@link #asAddress()} or {@link #asAddressString()}\n\n@return", "The parameter must never be null\n\n@param queryParameters", "This method writes assignment data to a JSON file.", "Checks if the last argument matches the vararg type.\n@param params\n@param args\n@return -1 if no match, 0 if the last argument is exactly the vararg type and 1 if of an assignable type", "Build a String representation of given arguments.", "Initializes the set of report implementation." ]
public boolean isDeleted(Identity id) { ObjectEnvelope envelope = buffer.getByIdentity(id); return (envelope != null && envelope.needsDelete()); }
[ "Checks if the object with the given identity has been deleted\nwithin the transaction.\n@param id The identity\n@return true if the object has been deleted\n@throws PersistenceBrokerException" ]
[ "A convenience method for creating an immutable list\n\n@param self a List\n@return an immutable List\n@see java.util.Collections#unmodifiableList(java.util.List)\n@since 1.0", "Returns a list of objects for each line in the spreadsheet, of the specified type.\n\n<p>\nIf the class is a view model then the objects will be properly instantiated (that is, using\n{@link DomainObjectContainer#newViewModelInstance(Class, String)}, with the correct\nview model memento); otherwise the objects will be simple transient objects (that is, using\n{@link DomainObjectContainer#newTransientInstance(Class)}).\n</p>", "Adds the content info for the collected resources used in the \"This page\" publish dialog.", "Use this API to fetch filtered set of dbdbprofile resources.\nset the filter parameter values in filtervalue object.", "Validate JUnit4 presence in a concrete version.", "Adds listeners and reads from a file.\n\n@param reader reader for file type\n@param file schedule data\n@return ProjectFile instance", "The main method. See the class documentation.", "Set some initial values.", "Use this API to fetch responderhtmlpage resource of given name ." ]
public List<DesignDocument> list() throws IOException { return db.getAllDocsRequestBuilder() .startKey("_design/") .endKey("_design0") .inclusiveEnd(false) .includeDocs(true) .build() .getResponse().getDocsAs(DesignDocument.class); }
[ "Performs a query to retrieve all the design documents defined in the database.\n\n@return a list of the design documents from the database\n@throws IOException if there was an error communicating with the server\n@since 2.5.0" ]
[ "Process the host info and determine which configuration elements are required on the slave host.\n\n@param hostInfo the host info\n@param root the model root\n@param extensionRegistry the extension registry\n@return", "Makes http GET request.\n@param url url to makes request to\n@param params data to add to params field\n@return {@link okhttp3.Response}\n@throws RequestException\n@throws LocalOperationException", "LV morphology helper functions", "Remove attachments matches pattern from step and all step substeps\n\n@param context from which attachments will be removed", "retrieve a single reference- or collection attribute\nof a persistent instance.\n@param pInstance the persistent instance\n@param pAttributeName the name of the Attribute to load", "Pick arbitrary wrapping method. No generics should be set.\n@param builder", "Retrieves the avatar of a user as an InputStream.\n\n@return InputStream representing the user avater.", "Returns list of files matches filters in specified directories\n\n@param directories which will using to find files\n@param fileFilter file filter\n@param dirFilter directory filter\n@return list of files matches filters in specified directories", "Add tasks to the tree.\n\n@param parentNode parent tree node\n@param parent parent task container" ]
private MavenProjectModel getMavenStubProject(MavenProjectService mavenProjectService, String groupId, String artifactId, String version) { Iterable<MavenProjectModel> mavenProjectModels = mavenProjectService.findByGroupArtifactVersion(groupId, artifactId, version); if (!mavenProjectModels.iterator().hasNext()) { return null; } for (MavenProjectModel mavenProjectModel : mavenProjectModels) { if (mavenProjectModel.getRootFileModel() == null) { // this is a stub... we can fill it in with details return mavenProjectModel; } } return null; }
[ "A Maven stub is a Maven Project for which we have found information, but the project has not yet been located\nwithin the input application. If we have found an application of the same GAV within the input app, we should\nfill out this stub instead of creating a new one." ]
[ "Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>", "Figures out the correct class loader to use for a proxy for a given bean", "Set the serial end date.\n@param date the serial end date.", "Concatenates of list of Bytes objects to create a byte array\n\n@param listOfBytes Bytes objects to concatenate\n@return Bytes", "Use this API to fetch appfwprofile_crosssitescripting_binding resources of given name .", "Curries a procedure that takes two arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes one argument. Never <code>null</code>.", "radi otsu da dobije spojena crna slova i ra\n\n@param input\n@return the processed image", "Create a BoxStoragePolicyAssignment for a BoxStoragePolicy.\n@param api the API connection to be used by the resource.\n@param policyID the policy ID of the BoxStoragePolicy.\n@param userID the user ID of the to assign the BoxStoragePolicy to.\n@return the information about the BoxStoragePolicyAssignment created.", "Set new front facing rotation\n@param rotation" ]
private List<AssignmentField> getAllAssignmentExtendedAttributes() { ArrayList<AssignmentField> result = new ArrayList<AssignmentField>(); result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_COST)); result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_DATE)); result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_DURATION)); result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_COST)); result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_DATE)); result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_DURATION)); result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_FLAG)); result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_NUMBER)); result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_RESOURCE_MULTI_VALUE)); result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_RESOURCE_OUTLINE_CODE)); result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_TEXT)); result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_FINISH)); result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_FLAG)); result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_NUMBER)); result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_START)); result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_TEXT)); return result; }
[ "Retrieve list of assignment extended attributes.\n\n@return list of extended attributes" ]
[ "Read an element which contains only a single list attribute of a given\ntype, returning it as an array.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@param type the value type class\n@param <T> the value type\n@return the value list as an array\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.", "Returns the JSON String representation of the payload\naccording to Apple APNS specification\n\n@return the String representation as expected by Apple", "judge a->b is ordered clockwise\n\n@param center\n@param a\n@param b\n@return", "Adds an edge between the current and new state.\n\n@return true if the new state is not found in the state machine.", "Await the completion of all currently active operations.\n\n@param timeout the timeout\n@param unit the time unit\n@return {@code } false if the timeout was reached and there were still active operations\n@throws InterruptedException", "Returns the default safety level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_MODERATE\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_RESTRICTED\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_SAFE\n@return The current users safety-level\n@throws FlickrException", "Use this API to fetch all the authenticationradiusaction resources that are configured on netscaler.", "Sets the character translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator", "Create a JsonParser for a given json node.\n@param jsonNode the json node\n@return the json parser\n@throws IOException" ]
public void disableAllOverrides(int pathID, String clientUUID) { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement( "DELETE FROM " + Constants.DB_TABLE_ENABLED_OVERRIDE + " WHERE " + Constants.ENABLED_OVERRIDES_PATH_ID + " = ? " + " AND " + Constants.GENERIC_CLIENT_UUID + " = ? " ); statement.setInt(1, pathID); statement.setString(2, clientUUID); statement.execute(); statement.close(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (statement != null) { statement.close(); } } catch (Exception e) { } } }
[ "Disable all overrides for a specified path\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client" ]
[ "Sets the underlying connect timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#connectTimeout(long, TimeUnit)", "Sets the replace var map to single target single var.\n\n@param variable\nthe variable\n@param replaceList\n: the list of strings that will replace the variable\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder", "Update the selection state of the item\n@param dataIndex data set index\n@param select if it is true the item is marked as selected, otherwise - unselected\n@return true if the selection state has been changed successfully, otherwise - false", "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", "Pop the record number from the front of the list, and parse it to ensure that\nit is a valid integer.\n\n@param list MPX record", "Emits a sentence fragment combining all the merge actions.", "Set the ambient light intensity.\n\nThis designates the color of the ambient reflection.\nIt is multiplied by the material ambient color to derive\nthe hue of the ambient reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code ambient_intensity} to control the intensity of ambient light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)", "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", "Add filters to the tree.\n\n@param parentNode parent tree node\n@param filters list of filters" ]
protected void registerValueFormatter(DJGroupVariable djVariable, String variableName) { if ( djVariable.getValueFormatter() == null){ return; } JRDesignParameter dparam = new JRDesignParameter(); dparam.setName(variableName + "_vf"); //value formater suffix dparam.setValueClassName(DJValueFormatter.class.getName()); log.debug("Registering value formatter parameter for property " + dparam.getName() ); try { getDjd().addParameter(dparam); } catch (JRException e) { throw new EntitiesRegistrationException(e.getMessage(),e); } getDjd().getParametersWithValues().put(dparam.getName(), djVariable.getValueFormatter()); }
[ "Registers the parameter for the value formatter for the given variable and puts\nit's implementation in the parameters map.\n@param djVariable\n@param variableName" ]
[ "Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception", "Serialize a parameterized object to an OutputStream.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType&lt;MyModel&lt;OtherModel&gt;&gt;() { }, os);\n@param os The OutputStream being written to.", "Do the search, called as a \"page action\"", "Enable or disable the default blank validator.", "Create a request for elevations for multiple locations.\n\n@param req\n@param callback", "Create and get actor system.\n\n@return the actor system", "Generate a string with all selected checkboxes separated with ','.\n\n@return a string with all selected checkboxes", "Return a list of unique namespaces, optionally limited by a given predicate, in alphabetical order.\n\nThis method does not require authentication.\n\n@param predicate\n@param perPage\n@param page\n@return NamespacesList\n@throws FlickrException", "This method lists all resource assignments defined in the file.\n\n@param file MPX file" ]
private void wrongUsage() { String usage = "Usage: java -cp $PATH_TO_OPENCMS_JAR org.opencms.rmi.CmsRemoteShellClient\n" + " -script=[path to script] (optional) \n" + " -registryPort=[port of RMI registry] (optional, default is " + CmsRemoteShellConstants.DEFAULT_PORT + ")\n" + " -additional=[additional commands class name] (optional)"; System.out.println(usage); System.exit(1); }
[ "Displays text which shows the valid command line parameters, and then exits." ]
[ "Construct a new uri by replacing query parameters in initialUri with the query parameters provided.\n\n@param initialUri the initial/template URI\n@param queryParams the new query parameters.", "Creates a new Box Developer Edition connection with enterprise token leveraging BoxConfig.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection.", "Gets the filename from a path or URL.\n@param path or url.\n@return the file name.", "2-D Complex Gabor function.\n\n@param x X axis coordinate.\n@param y Y axis coordinate.\n@param wavelength Wavelength.\n@param orientation Orientation.\n@param phaseOffset Phase offset.\n@param gaussVariance Gaussian variance.\n@param aspectRatio Aspect ratio.\n@return Gabor response.", "Retrieve the index of the table entry valid for the supplied date.\n\n@param date required date\n@return cost rate table entry index", "Tell a device to turn sync on or off.\n\n@param deviceNumber the device whose sync state is to be set\n@param synced {@code} true if sync should be turned on, else it will be turned off\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network", "Add several jvm metrics.", "Copies just the upper or lower triangular portion of a matrix.\n\n@param src Matrix being copied. Not modified.\n@param dst Where just a triangle from src is copied. If null a new one will be created. Modified.\n@param upper If the upper or lower triangle should be copied.\n@return The copied matrix.", "Retrieves a specific range of child items in this folder.\n\n@param offset the index of the first child item to retrieve.\n@param limit the maximum number of children to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of child items." ]
private void computeGradientAndHessian(DMatrixRMaj param ) { // residuals = f(x) - y function.compute(param, residuals); computeNumericalJacobian(param,jacobian); CommonOps_DDRM.multTransA(jacobian, residuals, g); CommonOps_DDRM.multTransA(jacobian, jacobian, H); CommonOps_DDRM.extractDiag(H,Hdiag); }
[ "Computes the d and H parameters.\n\nd = J'*(f(x)-y) <--- that's also the gradient\nH = J'*J" ]
[ "Helper method to track storage operations & time via StreamingStats.\n\n@param startNs", "read broker info for watching topics\n\n@param zkClient the zookeeper client\n@param topics topic names\n@return topic-&gt;(brokerid-0,brokerid-1...brokerid2-0,brokerid2-1...)", "Replaces current Collection mapped to key with the specified Collection.\nUse carefully!", "Clear the connection that was previously saved.\n\n@return True if the connection argument had been saved.", "Helper method to split a string by a given character, with empty parts omitted.", "Get the log if exists or return null\n\n@param topic topic name\n@param partition partition index\n@return a log for the topic or null if not exist", "Register custom filter types especially for serializer of specification json file", "Create a new entry in the database from an object.", "Read all child tasks for a given parent.\n\n@param parentTask parent task" ]
public static final long getLong(InputStream is) throws IOException { byte[] data = new byte[8]; is.read(data); return getLong(data, 0); }
[ "Read a long int from an input stream.\n\n@param is input stream\n@return long value" ]
[ "Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.\n\n@param flatParent Flat parent archetype\n@param specialized Specialized archetype", "Add a shutdown listener, which gets called when all requests completed on shutdown.\n\n@param listener the shutdown listener", "Checks the preconditions for creating a new ParseDateTimeAbstract processor with date format and locale.\n\n@param dateFormat\nthe date format to use\n@param locale\nthe Locale used to parse the date\n@throws NullPointerException\nif dateFormat or locale is null", "Returns a color for a given absolute number that is to be shown on the\nmap.\n\n@param value\n@return", "Returns the Java command to use.\n\n@param javaHome the Java Home, if {@code null} an attempt to determine the command will be done\n\n@return the Java executable command", "Retrieve the default number of minutes per year.\n\n@return minutes per year", "Handles a faulted task.\n\n@param faultedEntry the entry holding faulted task\n@param throwable the reason for fault\n@param context the context object shared across all the task entries in this group during execution\n\n@return an observable represents asynchronous operation in the next stage", "This method is called to try to catch any invalid tasks that may have sneaked past all our other checks.\nThis is done by validating the tasks by task ID.", "Get info about the shard a document belongs to.\n\n@param docId document ID\n@return Shard info\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-database-_shards-\"\ntarget=\"_blank\">_shards</a>" ]
private Object tryConvert( final MfClientHttpRequestFactory clientHttpRequestFactory, final Object rowValue) throws URISyntaxException, IOException { if (this.converters.isEmpty()) { return rowValue; } String value = String.valueOf(rowValue); for (TableColumnConverter<?> converter: this.converters) { if (converter.canConvert(value)) { return converter.resolve(clientHttpRequestFactory, value); } } return rowValue; }
[ "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." ]
[ "Creates the adapter for the target database.", "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", "Queries a Search Index and returns grouped results in a map where key\nof the map is the groupName. In case the query didnt use grouping,\nan empty map is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the grouped search query as a ordered {@code Map<String,T> }", "Convert a key-version-nodeSet information to string\n\n@param key The key\n@param versionMap mapping versions to set of PrefixNodes\n@param storeName store's name\n@param partitionId partition scanned\n@return a string that describe the information passed in", "Converts the http entity to string. If entity is null, returns empty string.\n@param entity\n@return\n@throws IOException", "Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids", "Use this API to fetch the statistics of all ipseccounters_stats resources that are configured on netscaler.", "Checks to see if a WORD matches the name of a macro. if it does it applies the macro at that location", "Get the available sizes of a Photo.\n\nThe boolean toggle allows to (api-)sign the call.\n\nThis way the calling user can retrieve sizes for <b>his own</b> private photos.\n\n@param photoId\nThe photo ID\n@param sign\ntoggle to allow optionally signing the call (Authenticate)\n@return A collection of {@link Size}\n@throws FlickrException" ]
public void setFrustum(float fovy, float aspect, float znear, float zfar) { Matrix4f projMatrix = new Matrix4f(); projMatrix.perspective((float) Math.toRadians(fovy), aspect, znear, zfar); setFrustum(projMatrix); }
[ "Set the view frustum to pick against from the field of view, aspect\nratio and near, far clip planes. The viewpoint of the frustum\nis the center of the scene object the picker is attached to.\nThe view direction is the forward direction of that scene object.\nThe frustum will pick what a camera attached to the scene object\nwith that view frustum would see. If the frustum is not attached\nto a scene object, it defaults to the view frustum of the main camera of the scene.\n\n@param fovy vertical field of view in degrees\n@param aspect aspect ratio (width / height)" ]
[ "Return a set of all DeclarationBinder matching the DeclarationBinderFilter of the Linker.\n\n@return a Set of all DeclarationBinder matching the DeclarationBinderFilter of the Linker.", "Join the Collection of Strings using the specified delimter and optionally quoting each\n\n@param s\nThe String collection\n@param delimiter\nthe delimiter String\n@param doQuote\nwhether or not to quote the Strings\n@return The joined String", "Read resource assignment baseline values.\n\n@param row result set row", "Append the data of another lattice to this lattice. If the other lattice follows a different quoting convention, it is automatically converted.\nHowever, this method does not check, whether the two lattices are aligned in terms of reference date, curve names and meta schedules.\nIf the two lattices have shared data points, the data from this lattice will be overwritten.\n\n@param other The lattice containing the data to be appended.\n@param model The model to use for context, in case the other lattice follows a different convention.\n\n@return The lattice with the combined swaption entries.", "Use this API to fetch appflowpolicy_appflowpolicylabel_binding resources of given name .", "Inserts the result of the migration into the migration table\n\n@param migration the migration that was executed\n@param wasSuccessful indicates if the migration was successful or not", "Use this API to fetch auditnslogpolicy_systemglobal_binding resources of given name .", "Returns the WDTK datatype IRI for the property datatype as represented by\nthe given JSON datatype string.\n\n@param jsonDatatype\nthe JSON datatype string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known", "Add a dependency task group for this model.\n\n@param dependency the dependency.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependency task group" ]
public static JMXServiceURL getLocalConnectorAddress(Process p, boolean startAgent) { return getLocalConnectorAddress(Integer.toString(getPid(p)), startAgent); }
[ "Returns the JMX connector address of a child process.\n\n@param p the process to which to connect\n@param startAgent whether to installed the JMX agent in the target process if not already in place\n@return a {@link JMXServiceURL} to the process's MBean server" ]
[ "Converts the given dislect to a human-readable datasource type.", "Computes the eigenvalue of the 2 by 2 matrix.", "Writes all auxiliary triples that have been buffered recently. This\nincludes OWL property restrictions but it also includes any auxiliary\ntriples required by complex values that were used in snaks.\n\n@throws RDFHandlerException\nif there was a problem writing the RDF triples", "Read a Synchro date from an input stream.\n\n@param is input stream\n@return Date instance", "Fetch the given image from the web.\n\n@param request The request\n@param transformer The transformer\n@return The image", "Create the OJB_CLAZZ pseudo column based on CASE WHEN.\nThis column defines the Class to be instantiated.\n@param buf", "Set an outline code value.\n\n@param index outline code index (1-10)\n@param value outline code value", "Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level", "Get the minutes difference" ]
public final void setWeeksOfMonth(SortedSet<WeekOfMonth> weeksOfMonth) { m_weeksOfMonth.clear(); if (null != weeksOfMonth) { m_weeksOfMonth.addAll(weeksOfMonth); } }
[ "Set the weeks of the month the events should occur.\n@param weeksOfMonth the weeks of month to set (first to fifth, where fifth means last)." ]
[ "Remove all controllers but leave input manager running.\n@return number of controllers removed", "Returns an array of the enabled endpoints as Integer IDs\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@param filters If supplied, only endpoints ending with values in filters are returned\n@return Collection of endpoints\n@throws Exception exception", "Writes the given configuration to the given file.", "Helper to generate the common configuration part for client-side and server-side widget.\n@return the common configuration options as map", "Based on the current request represented by the HttpExchange construct a complete URL for the supplied path.\n\n@param exchange - The current HttpExchange\n@param path - The path to include in the constructed URL\n@return The constructed URL", "This method lists all resource assignments defined in the file.\n\n@param file MPX file", "Use this API to fetch appfwhtmlerrorpage resource of given name .", "Use this API to update dospolicy resources.", "Closes off this connection\n@param connection to close" ]
public void load(IAssetEvents handler) { GVRAssetLoader loader = getGVRContext().getAssetLoader(); if (mReplaceScene) { loader.loadScene(getOwnerObject(), mVolume, mImportSettings, getGVRContext().getMainScene(), handler); } else { loader.loadModel(mVolume, getOwnerObject(), mImportSettings, true, handler); } }
[ "Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the main scene of the current context\nwill contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's owner.\n\nLoading the asset is performed in a separate thread.\nThis function returns before the asset has finished loading.\nIAssetEvents are emitted to the input event handler and\nto any event listener on the context.\n\n@param handler\nIAssetEvents handler to process asset loading events" ]
[ "Returns the remote collection representing the given namespace.\n\n@param namespace the namespace referring to the remote collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the remote collection representing the given namespace.", "Used to create a new retention policy.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param type the type of the retention policy. Can be \"finite\" or \"indefinite\".\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@return the created retention policy's info.", "Process the set of activities from the Phoenix file.\n\n@param phoenixProject project data", "Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference.", "Compare the supplied plaintext password to a hashed password.\n\n@param passwd Plaintext password.\n@param hashed scrypt hashed password.\n\n@return true if passwd matches hashed value.", "Switches to the next tab.", "Get the SuggestionsInterface.\n\n@return The SuggestionsInterface", "Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag.", "Get the response headers for URL\n\n@param stringUrl URL to use\n@return headers HTTP Headers\n@throws IOException I/O error happened" ]
public MapBounds getRotatedBounds(final Rectangle2D.Double paintAreaPrecise, final Rectangle paintArea) { final MapBounds rotatedBounds = this.getRotatedBounds(); if (rotatedBounds instanceof CenterScaleMapBounds) { return rotatedBounds; } final ReferencedEnvelope envelope = ((BBoxMapBounds) rotatedBounds).toReferencedEnvelope(null); // the paint area size and the map bounds are rotated independently. because // the paint area size is rounded to integers, the map bounds have to be adjusted // to these rounding changes. final double widthRatio = paintArea.getWidth() / paintAreaPrecise.getWidth(); final double heightRatio = paintArea.getHeight() / paintAreaPrecise.getHeight(); final double adaptedWidth = envelope.getWidth() * widthRatio; final double adaptedHeight = envelope.getHeight() * heightRatio; final double widthDiff = adaptedWidth - envelope.getWidth(); final double heigthDiff = adaptedHeight - envelope.getHeight(); envelope.expandBy(widthDiff / 2.0, heigthDiff / 2.0); return new BBoxMapBounds(envelope); }
[ "Return the map bounds rotated with the set rotation. The bounds are adapted to rounding changes of the\nsize of the paint area.\n\n@param paintAreaPrecise The exact size of the paint area.\n@param paintArea The rounded size of the paint area.\n@return Rotated bounds." ]
[ "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", "Pretty-print the object.", "Returns the value stored for the given key at the point of call.\n@param key a non null key\n@return the value stored in the map for the given key", "Deletes a path from the filesystem\n\nIf the path is a directory its contents\nwill be recursively deleted before it itself\nis deleted.\n\nNote that removal of a directory is not an atomic-operation\nand so if an error occurs during removal, some of the directories\ndescendants may have already been removed\n\n@throws IOException if an error occurs whilst removing a file or directory", "Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null", "Send message to all connections labeled with tag specified.\n\n@param message the message to be sent\n@param tag the string that tag the connections to be sent\n@param excludeSelf specify whether the connection of this context should be send\n@return this context", "This method writes task data to a JSON file.\nNote that we write the task hierarchy in order to make rebuilding the hierarchy easier.", "associate the batched Children with their owner object loop over children", "This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file" ]
private void registerNonExists( final org.hibernate.engine.spi.EntityKey[] keys, final Loadable[] persisters, final SharedSessionContractImplementor session) { final int[] owners = getOwners(); if ( owners != null ) { EntityType[] ownerAssociationTypes = getOwnerAssociationTypes(); for ( int i = 0; i < keys.length; i++ ) { int owner = owners[i]; if ( owner > -1 ) { org.hibernate.engine.spi.EntityKey ownerKey = keys[owner]; if ( keys[i] == null && ownerKey != null ) { final PersistenceContext persistenceContext = session.getPersistenceContext(); /*final boolean isPrimaryKey; final boolean isSpecialOneToOne; if ( ownerAssociationTypes == null || ownerAssociationTypes[i] == null ) { isPrimaryKey = true; isSpecialOneToOne = false; } else { isPrimaryKey = ownerAssociationTypes[i].getRHSUniqueKeyPropertyName()==null; isSpecialOneToOne = ownerAssociationTypes[i].getLHSPropertyName()!=null; }*/ //TODO: can we *always* use the "null property" approach for everything? /*if ( isPrimaryKey && !isSpecialOneToOne ) { persistenceContext.addNonExistantEntityKey( new EntityKey( ownerKey.getIdentifier(), persisters[i], session.getEntityMode() ) ); } else if ( isSpecialOneToOne ) {*/ boolean isOneToOneAssociation = ownerAssociationTypes != null && ownerAssociationTypes[i] != null && ownerAssociationTypes[i].isOneToOne(); if ( isOneToOneAssociation ) { persistenceContext.addNullProperty( ownerKey, ownerAssociationTypes[i].getPropertyName() ); } /*} else { persistenceContext.addNonExistantEntityUniqueKey( new EntityUniqueKey( persisters[i].getEntityName(), ownerAssociationTypes[i].getRHSUniqueKeyPropertyName(), ownerKey.getIdentifier(), persisters[owner].getIdentifierType(), session.getEntityMode() ) ); }*/ } } } } }
[ "For missing objects associated by one-to-one with another object in the\nresult set, register the fact that the object is missing with the\nsession.\n\ncopied form Loader#registerNonExists" ]
[ "Write the management protocol header.\n\n@param header the mgmt protocol header\n@param os the output stream\n@throws IOException", "Register the DAO with the cache. This will allow folks to build a DAO externally and then register so it can be\nused internally as necessary.\n\n<p>\n<b>NOTE:</b> By default this registers the DAO to be associated with the class that it uses. If you need to\nregister multiple dao's that use different {@link DatabaseTableConfig}s then you should use\n{@link #registerDaoWithTableConfig(ConnectionSource, Dao)}.\n</p>\n\n<p>\n<b>NOTE:</b> You should maybe use the {@link DatabaseTable#daoClass()} and have the DaoManager construct the DAO\nif possible.\n</p>", "Checks if the child is currently in ViewPort\n@param dataIndex child index\n@return true if the child is in viewport, false - otherwise", "Adds a type to collection with inheriting base type properties.\n\n@param type the type definition to add\n\n@return true if the type definition was added", "Specifies the angle of the effect.\n\n@param angle the angle of the effect.\n@angle", "Gets a string attribute from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attribute as a {@link String}, or null if it was not found.", "Bounds are calculated locally, can use any filter, but slower than native.\n\n@param filter\nfilter which needs to be applied\n@return the bounds of the specified features\n@throws LayerException\noops", "Reports a given exception as a RuntimeException, since the interface does\nnot allow us to throw checked exceptions directly.\n\n@param e\nthe exception to report\n@throws RuntimeException\nin all cases", "Shut down the input manager.\n\nAfter this call, GearVRf will not be able to access IO devices." ]
private long interpolateTimeFromUpdate(TrackPositionUpdate lastTrackUpdate, CdjStatus newDeviceUpdate, BeatGrid beatGrid) { final int beatNumber = newDeviceUpdate.getBeatNumber(); final boolean noLongerPlaying = !newDeviceUpdate.isPlaying(); // If we have just stopped, see if we are near a cue (assuming that information is available), and if so, // the best assumption is that the DJ jumped to that cue. if (lastTrackUpdate.playing && noLongerPlaying) { final CueList.Entry jumpedTo = findAdjacentCue(newDeviceUpdate, beatGrid); if (jumpedTo != null) return jumpedTo.cueTime; } // Handle the special case where we were not playing either in the previous or current update, but the DJ // might have jumped to a different place in the track. if (!lastTrackUpdate.playing) { if (lastTrackUpdate.beatNumber == beatNumber && noLongerPlaying) { // Haven't moved return lastTrackUpdate.milliseconds; } else { if (noLongerPlaying) { // Have jumped without playing. if (beatNumber < 0) { return -1; // We don't know the position any more; weird to get into this state and still have a grid? } // As a heuristic, assume we are right before the beat? return timeOfBeat(beatGrid, beatNumber, newDeviceUpdate); } } } // One way or another, we are now playing. long elapsedMillis = (newDeviceUpdate.getTimestamp() - lastTrackUpdate.timestamp) / 1000000; long moved = Math.round(lastTrackUpdate.pitch * elapsedMillis); long interpolated = (lastTrackUpdate.reverse)? (lastTrackUpdate.milliseconds - moved) : lastTrackUpdate.milliseconds + moved; if (Math.abs(beatGrid.findBeatAtTime(interpolated) - beatNumber) < 2) { return interpolated; // Our calculations still look plausible } // The player has jumped or drifted somewhere unexpected, correct. if (newDeviceUpdate.isPlayingForwards()) { return timeOfBeat(beatGrid, beatNumber, newDeviceUpdate); } else { return beatGrid.getTimeWithinTrack(Math.min(beatNumber + 1, beatGrid.beatCount)); } }
[ "Sanity-check a new non-beat update, make sure we are still interpolating a sensible position, and correct\nas needed.\n\n@param lastTrackUpdate the most recent digested update received from a player\n@param newDeviceUpdate a new status update from the player\n@param beatGrid the beat grid for the track that is playing, in case we have jumped\n\n@return the playback position we believe that player has reached at that point in time" ]
[ "Create a counter if one is not defined already, otherwise return the existing one.\n\n@param counterName unique name for the counter\n@param initialValue initial value for the counter\n@return a {@link StrongCounter}", "Splits data into blocks, adds error correction and then interleaves the blocks and error correction data.", "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", "Get DPI suggestions.\n\n@return DPI suggestions", "Use this API to unset the properties of tmsessionparameter resource.\nProperties that need to be unset are specified in args array.", "Generates the path to an output file for a given source URL. Creates\nall necessary parent directories for the destination file.\n@param src the source\n@return the path to the output file", "Import CountryList from RAW resource\n\n@param context Context\n@return CountryList", "Recursively inspects the given objects and returns a node representing their differences. Both objects\nhave be have the same type.\n\n@param working This object will be treated as the successor of the `base` object.\n@param base This object will be treated as the predecessor of the <code>working</code> object.\n@return A node representing the differences between the given objects.", "Issue the database statements to drop the table associated with a table configuration.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so." ]
public static String flatten(String left, String right) { return left == null || left.isEmpty() ? right : left + "." + right; }
[ "Links the two field names into a single left.right field name.\nIf the left field is empty, right is returned\n\n@param left one field name\n@param right the other field name\n\n@return left.right or right if left is an empty string" ]
[ "Delivers the correct JSON Object for outgoings\n\n@param outgoings\n@throws org.json.JSONException", "Reverses a sequence of elements.\n@param array Array containing the sequence\n@param first Beginning of the range\n@param last One past the end of the range\n@exception ArrayIndexOutOfBoundsException If the range\nis invalid.", "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}", "Adds a materialization listener.\n\n@param listener\nThe listener to add", "Use this API to flush nssimpleacl.", "Returns true if all pixels in the array have the same color", "Use this API to fetch authenticationradiuspolicy_authenticationvserver_binding resources of given name .", "Ensures that the primary keys required by the given reference are present in the referenced class.\n\n@param modelDef The model\n@param refDef The reference\n@throws ConstraintException If there is a conflict between the primary keys", "Maps this iterable from the source document type to the target document type.\n\n@param mapper a function that maps from the source to the target document type\n@param <U> the target document type\n@return an iterable which maps T to U" ]
private static int getTrimmedWidth(BufferedImage img) { int height = img.getHeight(); int width = img.getWidth(); int trimmedWidth = 0; for (int i = 0; i < height; i++) { for (int j = width - 1; j >= 0; j--) { if (img.getRGB(j, i) != Color.WHITE.getRGB() && j > trimmedWidth) { trimmedWidth = j; break; } } } return trimmedWidth; }
[ "Get the last non-white X point\n@param img Image in memory\n@return the trimmed width" ]
[ "Get a list of referring domains for a photoset.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param photosetId\n(Optional) The id of the photoset to get stats for. If not provided, stats for all photos will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotosetDomains.html\"", "Creates the container for a bundle without descriptor.\n@return the container for a bundle without descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails.", "Facade method facilitating the creation of subshell.\nSubshell is created and run inside Command method and shares the same IO and naming strategy.\n\nRun the obtained Shell with commandLoop().\n\n@param pathElement sub-prompt\n@param parent Shell to be subshell'd\n@param appName The app name string\n@param mainHandler Command handler\n@param auxHandlers Aux handlers to be passed to all subshells.\n@return subshell", "If task completed success or failure from response.\n\n@param myResponse\nthe my response\n@return true, if successful", "Creates new row in table\n@param broker\n@param field\n@param sequenceName\n@param maxKey\n@throws Exception", "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 an object which represents the data to be transferred. The class\nof the object returned is defined by the representation class of the flavor.\n\n@param flavor the requested flavor for the data\n@see DataFlavor#getRepresentationClass\n@exception IOException if the data is no longer available\nin the requested flavor.\n@exception UnsupportedFlavorException if the requested data flavor is\nnot supported.", "Get the Operation metadata for a single operation on an MBean by name.\n@param operationName the Operation name (can be URL-encoded).\n@return the {@link MBeanOperationInfo} for the operation.\n@throws OperationNotFoundException Method was not found\n@throws UnsupportedEncodingException if the encoding is not supported.", "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" ]
public static void normalizeF( DMatrixRMaj A ) { double val = normF(A); if( val == 0 ) return; int size = A.getNumElements(); for( int i = 0; i < size; i++) { A.div(i , val); } }
[ "Normalizes the matrix such that the Frobenius norm is equal to one.\n\n@param A The matrix that is to be normalized." ]
[ "Checks the preconditions for creating a new ForbidSubStr processor with a List of forbidden substrings.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif forbiddenSubStrings is null\n@throws IllegalArgumentException\nif forbiddenSubStrings is empty", "Creates an immutable list that consists of the elements in the given collection. If the given collection is already an immutable list,\nit is returned directly.\n\n@param source the given collection\n@return an immutable list", "1.5 and on, 2.0 and on, 3.0 and on.", "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.", "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", "Tests the string edit distance function.", "Writes an activity to a PM XML file.\n\n@param mpxj MPXJ Task instance", "Gets the time warp.\n\n@return the time warp", "returns true if the primary key fields are valid for delete, else false.\nPK fields are valid if each of them contains a valid non-null value\n@param cld the ClassDescriptor\n@param obj the object\n@return boolean" ]
public void clearSources() { synchronized (mAudioSources) { for (GVRAudioSource source : mAudioSources) { source.setListener(null); } mAudioSources.clear(); } }
[ "Remove all of the audio sources from the audio manager.\nThis will stop all sound from playing." ]
[ "Read file content to string.\n\n@param filePath\nthe file path\n@return the string\n@throws IOException\nSignals that an I/O exception has occurred.", "Create users for the given array of addresses. The passwords will be set to the email addresses.\n\n@param greenMail Greenmail instance to create users for\n@param addresses Addresses", "Calculate delta with another vector\n@param v another vector\n@return delta vector", "Checks the constraints on this class.\n\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "Initialize dates panel elements.", "Sets the CircularImageView's border width in pixels.\n@param borderWidth Width in pixels for the border.", "On complete.\nSave response headers when needed.\n\n@param response\nthe response\n@return the response on single request", "Use this API to add nsacl6 resources.", "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>" ]
static PatchingResult executeTasks(final IdentityPatchContext context, final IdentityPatchContext.FinalizeCallback callback) throws Exception { final List<PreparedTask> tasks = new ArrayList<PreparedTask>(); final List<ContentItem> conflicts = new ArrayList<ContentItem>(); // Identity prepareTasks(context.getIdentityEntry(), context, tasks, conflicts); // Layers for (final IdentityPatchContext.PatchEntry layer : context.getLayers()) { prepareTasks(layer, context, tasks, conflicts); } // AddOns for (final IdentityPatchContext.PatchEntry addOn : context.getAddOns()) { prepareTasks(addOn, context, tasks, conflicts); } // If there were problems report them if (!conflicts.isEmpty()) { throw PatchLogger.ROOT_LOGGER.conflictsDetected(conflicts); } // Execute the tasks for (final PreparedTask task : tasks) { // Unless it's excluded by the user final ContentItem item = task.getContentItem(); if (item != null && context.isExcluded(item)) { continue; } // Run the task task.execute(); } return context.finalize(callback); }
[ "Execute all recorded tasks.\n\n@param context the patch context\n@param callback the finalization callback\n@throws Exception" ]
[ "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.", "Use this API to delete sslcertkey.", "Reads a markdown link.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link.", "See if a range for assignment is specified. If so return the range, otherwise return null\n\nExample of assign range:\na(0:3,4:5) = blah\na((0+2):3,4:5) = blah", "Create a new GP entry in the database. No commit performed.", "Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set", "This function is responsible for starting the actual async rebalance\noperation. This is run if this node is the stealer node\n\n<br>\n\nWe also assume that the check that this server is in rebalancing state\nhas been done at a higher level\n\n@param stealInfo Partition info to steal\n@return Returns a id identifying the async operation", "Obtain the annotation associated with this type descriptor of the specified type.\n@param annotationType the annotation type\n@return the annotation, or {@code null} if no such annotation exists on this type descriptor", "Populate data for analytics." ]
private void readAssignments(Project plannerProject) { Allocations allocations = plannerProject.getAllocations(); List<Allocation> allocationList = allocations.getAllocation(); Set<Task> tasksWithAssignments = new HashSet<Task>(); for (Allocation allocation : allocationList) { Integer taskID = getInteger(allocation.getTaskId()); Integer resourceID = getInteger(allocation.getResourceId()); Integer units = getInteger(allocation.getUnits()); Task task = m_projectFile.getTaskByUniqueID(taskID); Resource resource = m_projectFile.getResourceByUniqueID(resourceID); if (task != null && resource != null) { Duration work = task.getWork(); int percentComplete = NumberHelper.getInt(task.getPercentageComplete()); ResourceAssignment assignment = task.addResourceAssignment(resource); assignment.setUnits(units); assignment.setWork(work); if (percentComplete != 0) { Duration actualWork = Duration.getInstance((work.getDuration() * percentComplete) / 100, work.getUnits()); assignment.setActualWork(actualWork); assignment.setRemainingWork(Duration.getInstance(work.getDuration() - actualWork.getDuration(), work.getUnits())); } else { assignment.setRemainingWork(work); } assignment.setStart(task.getStart()); assignment.setFinish(task.getFinish()); tasksWithAssignments.add(task); m_eventManager.fireAssignmentReadEvent(assignment); } } // // Adjust work per assignment for tasks with multiple assignments // for (Task task : tasksWithAssignments) { List<ResourceAssignment> assignments = task.getResourceAssignments(); if (assignments.size() > 1) { double maxUnits = 0; for (ResourceAssignment assignment : assignments) { maxUnits += assignment.getUnits().doubleValue(); } for (ResourceAssignment assignment : assignments) { Duration work = assignment.getWork(); double factor = assignment.getUnits().doubleValue() / maxUnits; work = Duration.getInstance(work.getDuration() * factor, work.getUnits()); assignment.setWork(work); Duration actualWork = assignment.getActualWork(); if (actualWork != null) { actualWork = Duration.getInstance(actualWork.getDuration() * factor, actualWork.getUnits()); assignment.setActualWork(actualWork); } Duration remainingWork = assignment.getRemainingWork(); if (remainingWork != null) { remainingWork = Duration.getInstance(remainingWork.getDuration() * factor, remainingWork.getUnits()); assignment.setRemainingWork(remainingWork); } } } } }
[ "This method extracts assignment data from a Planner file.\n\n@param plannerProject Root node of the Planner file" ]
[ "Sets the bit at the specified index.\n@param index The index of the bit to set (0 is the least-significant bit).\n@param set A boolean indicating whether the bit should be set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string.", "Remove any protocol-level headers from the remote server's response that\ndo not apply to the new response we are sending.\n\n@param response", "Creates a span that covers an exact row", "Returns the current transaction for the calling thread.\n\n@throws org.odmg.TransactionNotInProgressException\n{@link org.odmg.TransactionNotInProgressException} if no transaction was found.", "Reset the crawler to its initial state.", "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", "resolves a Field or Property node generics by using the current class and\nthe declaring class to extract the right meaning of the generics symbols\n@param an a FieldNode or PropertyNode\n@param type the origin type\n@return the new ClassNode with corrected generics", "Given a resource field name, this method returns the resource field number.\n\n@param field resource field name\n@return resource field number", "Converts this address to a prefix length\n\n@return the prefix of the indicated IP type represented by this address or null if this address is valid but cannot be represented by a network prefix length\n@throws AddressStringException if the address is invalid" ]
private static boolean syncWithMaster(final Resource domain, final PathElement hostElement) { final Resource host = domain.getChild(hostElement); assert host != null; final Set<String> profiles = new HashSet<>(); final Set<String> serverGroups = new HashSet<>(); final Set<String> socketBindings = new HashSet<>(); for (final Resource.ResourceEntry serverConfig : host.getChildren(SERVER_CONFIG)) { final ModelNode model = serverConfig.getModel(); final String group = model.require(GROUP).asString(); if (!serverGroups.contains(group)) { serverGroups.add(group); } if (model.hasDefined(SOCKET_BINDING_GROUP)) { processSocketBindingGroup(domain, model.require(SOCKET_BINDING_GROUP).asString(), socketBindings); } } // process referenced server-groups for (final Resource.ResourceEntry serverGroup : domain.getChildren(SERVER_GROUP)) { // If we have an unreferenced server-group if (!serverGroups.remove(serverGroup.getName())) { return true; } final ModelNode model = serverGroup.getModel(); final String profile = model.require(PROFILE).asString(); // Process the profile processProfile(domain, profile, profiles); // Process the socket-binding-group processSocketBindingGroup(domain, model.require(SOCKET_BINDING_GROUP).asString(), socketBindings); } // If we are missing a server group if (!serverGroups.isEmpty()) { return true; } // Process profiles for (final Resource.ResourceEntry profile : domain.getChildren(PROFILE)) { // We have an unreferenced profile if (!profiles.remove(profile.getName())) { return true; } } // We are missing a profile if (!profiles.isEmpty()) { return true; } // Process socket-binding groups for (final Resource.ResourceEntry socketBindingGroup : domain.getChildren(SOCKET_BINDING_GROUP)) { // We have an unreferenced socket-binding group if (!socketBindings.remove(socketBindingGroup.getName())) { return true; } } // We are missing a socket-binding group if (!socketBindings.isEmpty()) { return true; } // Looks good! return false; }
[ "Determine whether all references are available locally.\n\n@param domain the domain model\n@param hostElement the host path element\n@return whether to a sync with the master is required" ]
[ "Converts the given CharSequence into a List of Strings of one character.\n\n@param self a CharSequence\n@return a List of characters (a 1-character String)\n@see #toSet(String)\n@since 1.8.2", "Derives the OJB platform to use for a database that is connected via a url using the specified\nsubprotocol, and where the specified jdbc driver is used.\n\n@param jdbcSubProtocol The JDBC subprotocol used to connect to the database\n@param jdbcDriver The JDBC driver used to connect to the database\n@return The platform identifier or <code>null</code> if no platform could be found", "To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!", "Abort an active extern transaction associated with the given PB.", "Function to perform forward softmax", "Initialize VIDEO_INFO data.", "Searches the type and its sub types for the nearest ojb-persistent type and returns its name.\n\n@param type The type to search\n@return The qualified name of the found type or <code>null</code> if no type has been found", "Fetch the next event from a given stream\n@return the next event\n@throws IOException any io exception that could occur", "Adds JAXB WSDL extensions to allow work with custom\nWSDL elements such as \\\"partner-link\\\"\n\n@param bus CXF bus" ]
public String getAuthorizationUri(final String redirectUri, final Set<String> scopes, final String state) { if (account == null) throw new IllegalArgumentException("Auth is not set"); if (account.getClientId() == null) throw new IllegalArgumentException("client_id is not set"); StringBuilder builder = new StringBuilder(); builder.append(URI_AUTHENTICATION); builder.append("?"); builder.append("response_type="); builder.append(encode("code")); builder.append("&redirect_uri="); builder.append(encode(redirectUri)); builder.append("&client_id="); builder.append(encode(account.getClientId())); builder.append("&scope="); builder.append(encode(getScopesString(scopes))); builder.append("&state="); builder.append(encode(state)); builder.append("&code_challenge"); builder.append(getCodeChallenge()); // Already url encoded builder.append("&code_challenge_method="); builder.append(encode("S256")); return builder.toString(); }
[ "Get the authorization uri, where the user logs in.\n\n@param redirectUri\nUri the user is redirected to, after successful authorization.\nThis must be the same as specified at the Eve Online developer\npage.\n@param scopes\nScopes of the Eve Online SSO.\n@param state\nThis should be some secret to prevent XRSF, please read:\nhttp://www.thread-safe.com/2014/05/the-correct-use-of-state-\nparameter-in.html\n@return" ]
[ "Returns the index of the eigenvalue which has the largest magnitude.\n\n@return index of the largest magnitude eigen value.", "Start the drag of the pivot object.\n\n@param dragMe Scene object with a rigid body.\n@param relX rel position in x-axis.\n@param relY rel position in y-axis.\n@param relZ rel position in z-axis.\n\n@return Pivot instance if success, otherwise returns null.", "Get a property as a array or throw exception.\n\n@param key the property name", "Use this API to delete route6 resources.", "Deselects all child items of the provided item.\n@param item the item for which all childs should be deselected.d", "Only call with the read lock held", "Update an existing feature. Made package private for testing purposes.\n\n@param feature feature to update\n@throws LayerException oops", "Split string content into list, ignoring matches of the pattern\n@param content String content\n@param ignorePattern Pattern to ignore\n@return list", "Retrieve the parent task based on its WBS.\n\n@param wbs parent WBS\n@return parent task" ]
public void setDateMin(Date dateMin) { this.dateMin = dateMin; if (isAttached() && dateMin != null) { getPicker().set("min", JsDate.create((double) dateMin.getTime())); } }
[ "Set the minimum date limit." ]
[ "Use this API to fetch csvserver_cachepolicy_binding resources of given name .", "Deletes the given directory.\n\n@param directory The directory to delete.", "Get interfaces implemented by clazz\n\n@param clazz\n@return", "Delivers the correct JSON Object for the Stencilset\n\n@param stencilSet\n@throws org.json.JSONException", "Reset a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked", "Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key", "Adds mappings for each declared field in the mapped class. Any fields\nalready mapped by addColumn are skipped.", "Get the parameters of determining this parametric\ncovariance model. The parameters are usually free parameters\nwhich may be used in calibration.\n\n@return Parameter vector.", "Add precedence -10 because we need that ContainerRegistry is available in the Arquillian scope." ]
public ImmutableList<CandidateElement> extract(StateVertex currentState) throws CrawljaxException { LinkedList<CandidateElement> results = new LinkedList<>(); if (!checkedElements.checkCrawlCondition(browser)) { LOG.info("State {} did not satisfy the CrawlConditions.", currentState.getName()); return ImmutableList.of(); } LOG.debug("Looking in state: {} for candidate elements", currentState.getName()); try { Document dom = DomUtils.asDocument(browser.getStrippedDomWithoutIframeContent()); extractElements(dom, results, ""); } catch (IOException e) { LOG.error(e.getMessage(), e); throw new CrawljaxException(e); } if (randomizeElementsOrder) { Collections.shuffle(results); } currentState.setElementsFound(results); LOG.debug("Found {} new candidate elements to analyze!", results.size()); return ImmutableList.copyOf(results); }
[ "This method extracts candidate elements from the current DOM tree in the browser, based on\nthe crawl tags defined by the user.\n\n@param currentState the state in which this extract method is requested.\n@return a list of candidate elements that are not excluded.\n@throws CrawljaxException if the method fails." ]
[ "Get a property as a double or defaultValue.\n\n@param key the property name\n@param defaultValue the default value", "This method processes a single deferred relationship list.\n\n@param dr deferred relationship list data\n@throws MPXJException", "Iterate through a set of bit field flags and set the value for each one\nin the supplied container.\n\n@param flags bit field flags\n@param container field container\n@param data source data", "Returns status help message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String", "This method calculates the absolute number of days between two dates.\nNote that where two date objects are provided that fall on the same\nday, this method will return one not zero. Note also that this method\nassumes that the dates are passed in the correct order, i.e.\nstartDate < endDate.\n\n@param startDate Start date\n@param endDate End date\n@return number of days in the date range", "Publish the changes to main registry", "Convert a URL Encoded name back to the original form.\n@param name the name to URL urlDecode.\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the name in original form.\n@throws UnsupportedEncodingException if the encoding is not supported.", "close the AdminPool, if no long required.\nAfter closed, all public methods will throw IllegalStateException", "Locates the services in the context classloader of the current thread.\n\n@param serviceType the type of the services to locate\n@param <X> the type of the service\n@return the service type loader" ]
public void startAnimation() { Date time = new Date(); this.beginAnimation = time.getTime(); this.endAnimation = beginAnimation + (long) (animationTime * 1000); this.animate = true; }
[ "once animation is setup, start the animation record the beginning and\nending time for the animation" ]
[ "Initialise an extension module's extensions in the extension registry\n\n@param extensionRegistry the extension registry\n@param module the name of the module containing the extensions\n@param rootRegistration The parent registration of the extensions. For a server or domain.xml extension, this will be the root resource registration. For a host.xml extension, this will be the host resource registration\n@param extensionRegistryType The type of the registry", "Put a value if and only if the map has not changed since the given snapshot was taken. If the put fails,\nit is the caller's responsibility to retry.\n\n@param instance the instance with the map field\n@param key the key\n@param value the value\n@param snapshot the map snapshot\n@return {@code false} if the snapshot is out of date and we could not update, {@code true} if the put succeeded", "Assembles the exception message when the value received by a CellProcessor isn't of the correct type.\n\n@param expectedType\nthe expected type\n@param actualValue\nthe value received by the CellProcessor\n@return the message\n@throws NullPointerException\nif expectedType is null", "Creates the operation to add a resource.\n\n@param address the address of the operation to add.\n@param properties the properties to set for the resource.\n\n@return the operation.", "Get an CollectionDescriptor by name BRJ\n@param name\n@return CollectionDescriptor or null", "Assigns an element a value based on its index in the internal array..\n\n@param index The matrix element that is being assigned a value.\n@param value The element's new value.", "Use this API to fetch nsrpcnode resource of given name .", "Updates the exceptions panel.", "Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to process." ]
private ModelNode buildAddOperation(final ModelNode address, final Map<String, String> properties) { final ModelNode op = ServerOperations.createAddOperation(address); for (Map.Entry<String, String> prop : properties.entrySet()) { final String[] props = prop.getKey().split(","); if (props.length == 0) { throw new RuntimeException("Invalid property " + prop); } ModelNode node = op; for (int i = 0; i < props.length - 1; ++i) { node = node.get(props[i]); } final String value = prop.getValue() == null ? "" : prop.getValue(); if (value.startsWith("!!")) { handleDmrString(node, props[props.length - 1], value); } else { node.get(props[props.length - 1]).set(value); } } return op; }
[ "Creates the operation to add a resource.\n\n@param address the address of the operation to add.\n@param properties the properties to set for the resource.\n\n@return the operation." ]
[ "helper method to set the TranslucentStatusFlag\n\n@param on", "Use this API to fetch all the linkset resources that are configured on netscaler.", "Returns the Map value of the field.\n\n@return the Map value of the field. It returns a reference of the value both for <code>MAP</code> and\n<code>LIST_MAP</code>.\n@throws IllegalArgumentException if the value cannot be converted to Map.", "Gets a SerialMessage with the WAKE_UP_NO_MORE_INFORMATION command.\n@return the serial message", "URL-Decodes a given string using ISO-8859-1. No UnsupportedEncodingException to handle as it is dealt with in\nthis method.", "Closes the HTTP client and recycles the resources associated. The threads will\nbe recycled after 60 seconds of inactivity.", "Register a data type with the manager.", "Use this API to fetch all the dnstxtrec resources that are configured on netscaler.", "Shuts down the server. Active connections are not affected." ]
public void setFullscreen(boolean fullscreen) { if (mBuilder.mScrimInsetsLayout != null) { mBuilder.mScrimInsetsLayout.setTintStatusBar(!fullscreen); mBuilder.mScrimInsetsLayout.setTintNavigationBar(!fullscreen); } }
[ "set the insetsFrameLayout to display the content in fullscreen\nunder the statusBar and navigationBar\n\n@param fullscreen" ]
[ "Figure out the starting waveform segment that corresponds to the specified coordinate in the window.\n\n@param x the column being drawn\n\n@return the offset into the waveform at the current scale and playback time that should be drawn there", "Gets the time warp.\n\n@return the time warp", "Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops", "Apply an XMLDSig onto the passed document.\n\n@param aPrivateKey\nThe private key used for signing. May not be <code>null</code>.\n@param aCertificate\nThe certificate to be used. May not be <code>null</code>.\n@param aDocument\nThe document to be signed. The signature will always be the first\nchild element of the document element. The document may not contains\nany disg:Signature element. This element is inserted manually.\n@throws Exception\nIn case something goes wrong\n@see #createXMLSignature(X509Certificate)", "It is required that T be Serializable", "2-D Complex Gabor function.\n\n@param x X axis coordinate.\n@param y Y axis coordinate.\n@param wavelength Wavelength.\n@param orientation Orientation.\n@param phaseOffset Phase offset.\n@param gaussVariance Gaussian variance.\n@param aspectRatio Aspect ratio.\n@return Gabor response.", "Use this API to fetch dnstxtrec resources of given names .", "Creates the .story file necessary for every Beast Test Case.\n\n@param scenarioName\n- The name of the scenario, with spaces\n@param srcTestRootFolder\n- The test root folder\n@param packagePath\n- The package of the BeastTestCase\n@param scenarioDescription\n- the scenario name\n@param givenDescription\n- The given description\n@param whenDescription\n- The when description\n@param thenDescription\n- The then description\n@throws BeastException", "Updates the story and returns the full record for the updated story.\nOnly comment stories can have their text updated, and only comment stories and\nattachment stories can be pinned. Only one of `text` and `html_text` can be specified.\n\n@param story Globally unique identifier for the story.\n@return Request object" ]
public static Type[] getActualTypeArguments(Class<?> clazz) { Type type = Types.getCanonicalType(clazz); if (type instanceof ParameterizedType) { return ((ParameterizedType) type).getActualTypeArguments(); } else { return EMPTY_TYPES; } }
[ "Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments" ]
[ "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", "Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string", "Add a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param newHash the new hash of the added content\n@return the builder", "Each string item rendering requires the border and a space on both sides.\n\n12 3 12 3 12 34\n+----- +-------- +------+\nabc venkat last\n\n@param colCount\n@param colMaxLenList\n@param data\n@return", "Stops this progress bar.", "adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported", "Inserts the information about the dateStamp of a dump and the project\nname into a pattern.\n\n@param pattern\nString with wildcards\n@param dateStamp\n@param project\n@return String with injected information.", "Populate a Command instance with the values parsed from a command line\nIf any parser errors are detected it will throw an exception\n@param processedCommand command line\n@param mode do validation or not\n@throws CommandLineParserException any incorrectness in the parser will abort the populate", "Gets the '.disabled' file for a given version of this store. That file may or may not\nexist.\n\n@param version of the store for which to get the '.disabled' file.\n@return an instance of {@link File} pointing to the '.disabled' file.\n@throws PersistenceFailureException if the requested version cannot be found." ]
private boolean computeEigenValues() { // make a copy of the internal tridiagonal matrix data for later use diagSaved = helper.copyDiag(diagSaved); offSaved = helper.copyOff(offSaved); vector.setQ(null); vector.setFastEigenvalues(true); // extract the eigenvalues if( !vector.process(-1,null,null) ) return false; // save a copy of them since this data structure will be recycled next values = helper.copyEigenvalues(values); return true; }
[ "Computes eigenvalues only\n\n@return" ]
[ "Get random stub matching this user type\n@param userType User type\n@return Random stub", "A final cluster ought to be a super set of current cluster. I.e.,\nexisting node IDs ought to map to same server, but partition layout can\nhave changed and there may exist new nodes.\n\n@param currentCluster\n@param finalCluster", "Returns the JSON String representation of the payload\naccording to Apple APNS specification\n\n@return the String representation as expected by Apple", "Creates a new instance of this class.\n\n@param variableName\nname of the instance variable to search aliases for. Must\nneither be {@code null} nor empty.\n@param controlFlowBlockToExamine\na {@link ControlFlowBlock} which possibly contains the setup\nof an alias for a lazy variable. This method thereby examines\npredecessors of {@code block}, too. This parameter must not be\n{@code null}.\n@return a new instance of this class.", "Set an enterprise date value.\n\n@param index date index (1-30)\n@param value date value", "gets the bytes, sharing the cached array and does not clone it", "Internal utility to dump relationship lists in a structured format\nthat can easily be compared with the tabular data in MS Project.\n\n@param relations relation list", "Registers Jersey HeaderDelegateProviders for the specified TinyTypes.\n\n@param head a TinyType\n@param tail other TinyTypes\n@throws IllegalArgumentException when a non-TinyType is given", "Creates a Bytes object by copying the data of the CharSequence and encoding it using UTF-8." ]
public void clearTmpData() { for (Enumeration<?> e = breadthFirstEnumeration(); e.hasMoreElements(); ) { ((LblTree) e.nextElement()).setTmpData(null); } }
[ "Clear tmpData in subtree rooted in this node." ]
[ "Method to send Request messages to a specific df_service\n\n@param df_service\nThe name of the df_service\n@param msgContent\nThe content of the message to be sent\n@return Message sent to + the name of the df_service", "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", "All address strings are comparable. If two address strings are invalid, their strings are compared.\nOtherwise, address strings are compared according to which type or version of string, and then within each type or version\nthey are compared using the comparison rules for addresses.\n\n@param other\n@return", "Delivers the correct JSON Object for the dockers\n\n@param dockers\n@throws org.json.JSONException", "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", "Helper function to return the minimum size of the workspace to be passed to the reduction given the input and output\ntensors", "Sets a custom response on an endpoint\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@param customData custom response data\n@return true if success, false otherwise", "Set the amount of offset between child objects and parent.\n@param axis {@link Axis}\n@param offset", "This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type" ]
public void reset() { CrawlSession session = context.getSession(); if (crawlpath != null) { session.addCrawlPath(crawlpath); } List<StateVertex> onURLSetTemp = new ArrayList<>(); if (stateMachine != null) onURLSetTemp = stateMachine.getOnURLSet(); stateMachine = new StateMachine(graphProvider.get(), crawlRules.getInvariants(), plugins, stateComparator, onURLSetTemp); context.setStateMachine(stateMachine); crawlpath = new CrawlPath(); context.setCrawlPath(crawlpath); browser.handlePopups(); browser.goToUrl(url); // Checks the landing page for URL and sets the current page accordingly checkOnURLState(); plugins.runOnUrlLoadPlugins(context); crawlDepth.set(0); }
[ "Reset the crawler to its initial state." ]
[ "Copy a single named resource from the classpath to the output directory.\n@param outputDirectory The destination directory for the copied resource.\n@param resourceName The filename of the resource.\n@param targetFileName The name of the file created in {@literal outputDirectory}.\n@throws IOException If the resource cannot be copied.", "Set value for given object field.\n\n@param object object to be updated\n@param field field name\n@param value field value\n\n@throws NoSuchMethodException if property writer is not available\n@throws InvocationTargetException if property writer throws an exception\n@throws IllegalAccessException if property writer is inaccessible", "Given a GanttProject priority value, turn this into an MPXJ Priority instance.\n\n@param gpPriority GanttProject priority\n@return Priority instance", "Set the current playback position. This method can only be used in situations where the component is\ntied to a single player, and therefore always has a single playback position.\n\nWill cause part of the component to be redrawn if the position has\nchanged. This will be quickly overruled if a player is being monitored, but\ncan be used in other contexts.\n\n@param milliseconds how far into the track has been played\n\n@see #setPlaybackState", "Set the serial pattern type.\n@param patternType the pattern type to set.", "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", "Notifies that multiple content items are removed.\n\n@param positionStart the position.\n@param itemCount the item count.", "if you want to parse an argument, you need a converter from String to Object\n\n@param commandLineOption specification of the command line options\n@param converter how to convert your String value to a castable Object", "Sets the ssh password.\n\n@param password\nthe password\n@return the parallel task builder" ]
static void setSingleParam(String key, String value, DbConn cnx) { QueryResult r = cnx.runUpdate("globalprm_update_value_by_key", value, key); if (r.nbUpdated == 0) { cnx.runUpdate("globalprm_insert", key, value); } cnx.commit(); }
[ "Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is\nunique. Will create a transaction on the given entity manager." ]
[ "Used to get the current repository key\n@return keyFromText or keyFromSelect reflected by the dynamicMode flag", "Send a channels on-air update to all registered listeners.\n\n@param audibleChannels holds the device numbers of all channels that can currently be heard in the mixer output", "Collect the URIs of resources, that are referenced by the given description.\n@return the list of referenced URIs. Never <code>null</code>.", "Get the list of active tasks from the server.\n\n@return List of tasks\n@see <a href=\"https://console.bluemix.net/docs/services/Cloudant/api/active_tasks.html\">\nActive tasks</a>", "Get the real Object for already materialized Handler\n\n@param objectOrProxy\n@return Object or null if the Handel is not materialized", "Set the start time.\n@param date the start time to set.", "Sets the right padding for all cells in the table.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining", "Generates and writes the sql for inserting the currently contained data objects.\n\n@param model The database model\n@param platform The platform\n@param writer The output stream", "Allows to access the names of the current defined roundings.\n\n@param providers the providers and ordering to be used. By default providers and ordering as defined in\n#getDefaultProviders is used.\n@return the set of custom rounding ids, never {@code null}." ]
static String findNonProgressingOp(Resource resource, boolean forServer, long timeout) throws OperationFailedException { Resource.ResourceEntry nonProgressing = null; for (Resource.ResourceEntry child : resource.getChildren(ACTIVE_OPERATION)) { ModelNode model = child.getModel(); if (model.get(EXCLUSIVE_RUNNING_TIME).asLong() > timeout) { nonProgressing = child; ControllerLogger.MGMT_OP_LOGGER.tracef("non-progressing op: %s", nonProgressing.getModel()); break; } } if (nonProgressing != null && !forServer) { // WFCORE-263 // See if the op is non-progressing because it's the HC op waiting for commit // from the DC while other ops (i.e. ops proxied to our servers) associated // with the same domain-uuid are not completing ModelNode model = nonProgressing.getModel(); if (model.get(DOMAIN_ROLLOUT).asBoolean() && OperationContext.ExecutionStatus.COMPLETING.toString().equals(model.get(EXECUTION_STATUS).asString()) && model.hasDefined(DOMAIN_UUID)) { ControllerLogger.MGMT_OP_LOGGER.trace("Potential domain rollout issue"); String domainUUID = model.get(DOMAIN_UUID).asString(); Set<String> relatedIds = null; List<Resource.ResourceEntry> relatedExecutingOps = null; for (Resource.ResourceEntry activeOp : resource.getChildren(ACTIVE_OPERATION)) { if (nonProgressing.getName().equals(activeOp.getName())) { continue; // ignore self } ModelNode opModel = activeOp.getModel(); if (opModel.hasDefined(DOMAIN_UUID) && domainUUID.equals(opModel.get(DOMAIN_UUID).asString()) && opModel.get(RUNNING_TIME).asLong() > timeout) { if (relatedIds == null) { relatedIds = new TreeSet<String>(); // order these as an aid to unit testing } relatedIds.add(activeOp.getName()); // If the op is ExecutionStatus.EXECUTING that means it's still EXECUTING on the // server or a prepare message got lost. It would be COMPLETING if the server // had sent a prepare message, as that would result in ProxyStepHandler calling completeStep if (OperationContext.ExecutionStatus.EXECUTING.toString().equals(opModel.get(EXECUTION_STATUS).asString())) { if (relatedExecutingOps == null) { relatedExecutingOps = new ArrayList<Resource.ResourceEntry>(); } relatedExecutingOps.add(activeOp); ControllerLogger.MGMT_OP_LOGGER.tracef("Related executing: %s", opModel); } else ControllerLogger.MGMT_OP_LOGGER.tracef("Related non-executing: %s", opModel); } else ControllerLogger.MGMT_OP_LOGGER.tracef("unrelated: %s", opModel); } if (relatedIds != null) { // There are other ops associated with this domain-uuid that are also not completing // in the desired time, so we can't treat the one holding the lock as the problem. if (relatedExecutingOps != null && relatedExecutingOps.size() == 1) { // There's a single related op that's executing for too long. So we can report that one. // Note that it's possible that the same problem exists on other hosts as well // and that this cancellation will not resolve the overall problem. But, we only // get here on a slave HC and if the user is invoking this on a slave and not the // master, we'll assume they have a reason for doing that and want us to treat this // as a problem on this particular host. nonProgressing = relatedExecutingOps.get(0); } else { // Fail and provide a useful failure message. throw DomainManagementLogger.ROOT_LOGGER.domainRolloutNotProgressing(nonProgressing.getName(), timeout, domainUUID, relatedIds); } } } } return nonProgressing == null ? null : nonProgressing.getName(); }
[ "Separate from other findNonProgressingOp variant to allow unit testing without needing a mock OperationContext" ]
[ "Is portlet env supported.\n\n@return true if portlet env is supported, false otherwise", "Process the host info and determine which configuration elements are required on the slave host.\n\n@param hostInfo the host info\n@param root the model root\n@param extensionRegistry the extension registry\n@return", "Get a list of referrers from a given domain to a photo.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html\"", "Edit which photos are in the photoset.\n\n@param photosetId\nThe photoset ID\n@param primaryPhotoId\nThe primary photo Id\n@param photoIds\nThe photo IDs for the photos in the set\n@throws FlickrException", "Emit information about all of suite's tests.", "Unzip a file to a target directory.\n@param zip the path to the zip file.\n@param target the path to the target directory into which the zip file will be unzipped.\n@throws IOException", "Finds the maximum abs in each column of A and stores it into values\n@param A (Input) Matrix\n@param values (Output) storage for column max abs", "Deletes the disabled marker file in the directory of the specified version.\n\n@param version to enable\n@throws PersistenceFailureException if the marker file could not be deleted (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).", "Clear JobContext of current thread" ]