query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public static Predicate is(final String sql) { return new Predicate() { public String toSql() { return sql; } public void init(AbstractSqlCreator creator) { } }; }
[ "Returns a predicate that takes no parameters. The given SQL expression is\nused directly.\n\n@param sql\nSQL text of the expression" ]
[ "Use this API to expire cacheobject.", "Use this API to fetch nsacl6 resources of given names .", "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", "Extract the generic type from the given Class object.\n@param clazz the Class to check\n@param source the expected raw source type (can be {@code null})\n@param typeIndex the index of the actual type argument\n@param nestingLevel the nesting level of the target type\n@param currentLevel the current nested level\n@return the generic type as Class, or {@code null} if none", "Called whenever a rebalance task completes. This means one task is done\nand some number of partition stores have been migrated.\n\n@param taskId\n@param partitionStoresMigrated Number of partition stores moved by this\ncompleted task.", "Cancel all currently active operations.\n\n@return a list of cancelled operations", "Close the connection atomically.\n\n@return true if state changed to closed; false if nothing changed.", "Use this API to fetch authenticationradiusaction resource of given name .", "Clones a BufferedImage.\n@param image the image to clone\n@return the cloned image" ]
private synchronized HostServerGroupEffect getMappableDomainEffect(PathAddress address, String key, Map<String, Set<String>> map, Resource root) { if (requiresMapping) { map(root); requiresMapping = false; } Set<String> mapped = map.get(key); return mapped != null ? HostServerGroupEffect.forDomain(address, mapped) : HostServerGroupEffect.forUnassignedDomain(address); }
[ "Creates an appropriate HSGE for a domain-wide resource of a type that is mappable to server groups" ]
[ "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", "Get the property name from the expression.\n\n@param expression expression\n@return property name", "Create an error image.\n\n@param area The size of the image", "Add a given factory to the list of factories at the BEGINNING.\n\n@param factory The factory to be added.\n@return Cascade with amended factory list.", "In case we cannot delete a directory create a marker to recheck whether we can garbage collect some not\nreferenced directories and files.\n\n@param file the directory", "Computes the distance from a point p to the plane of this face.\n\n@param p\nthe point\n@return distance from the point to the plane", "Unpack report face to given directory.\n\n@param outputDirectory the output directory to unpack face.\n@throws IOException if any occurs.", "Specialized version of readValue just for reading map keys, because the StdDeserializer methods like\n_parseIntPrimitive blow up when the current JsonToken is FIELD_NAME", "Returns the list of nodes which match the expression xpathExpr in the String domStr.\n\n@return the list of nodes which match the query\n@throws XPathExpressionException\n@throws IOException" ]
private Double getDouble(Number number) { Double result = null; if (number != null) { result = Double.valueOf(number.doubleValue()); } return result; }
[ "Formats a double value.\n\n@param number numeric value\n@return Double instance" ]
[ "Adds a new task to this file. The task can have an optional message to include, and a due date.\n\n@param action the action the task assignee will be prompted to do.\n@param message an optional message to include with the task.\n@param dueAt the day at which this task is due.\n@return information about the newly added task.", "Sets the final transform of the bone during animation.\n\n@param finalTransform The transform matrix representing\nthe bone's pose after computing the skeleton.", "Retrieves state and metrics information for individual channel.\n\n@param name channel name\n@return channel information", "Sets the distance from the origin to the near clipping plane for the\nwhole camera rig.\n\n@param near\nDistance to the near clipping plane.", "Retrieves a field type from a location in a data block.\n\n@param data data block\n@param offset offset into data block\n@return field type", "Use this API to fetch dnszone_domain_binding resources of given name .", "Generate date patterns based on the project configuration.\n\n@param properties project properties\n@return date patterns", "Calls the httpHandler method.", "returns a collection of Reader LockEntries for object obj.\nIf now LockEntries could be found an empty Vector is returned." ]
public void setImage(final GVRImage imageData) { mImage = imageData; if (imageData != null) NativeTexture.setImage(getNative(), imageData, imageData.getNative()); else NativeTexture.setImage(getNative(), null, 0); }
[ "Changes the image data associated with a GVRTexture.\nThis can be a simple bitmap, a compressed bitmap,\na cubemap or a compressed cubemap.\n@param imageData data for the texture as a GVRImate" ]
[ "Count the statements and property uses of an item or property document.\n\n@param usageStatistics\nstatistics object to store counters in\n@param statementDocument\ndocument to count the statements of", "is there a faster algorithm out there? This one is a bit sluggish", "Creates a real valued diagonal matrix of the specified type", "Runs a method call with retries.\n@param pjp a {@link ProceedingJoinPoint} representing an annotated\nmethod call.\n@param retryableAnnotation the {@link org.fishwife.jrugged.aspects.Retryable}\nannotation that wrapped the method.\n@throws Throwable if the method invocation itself throws one during execution.\n@return The return value from the method call.", "Use this API to fetch all the dnspolicylabel resources that are configured on netscaler.", "Use this API to unlink sslcertkey resources.", "Concats two arrays.\n\n@param first the first array\n@param second the second array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after the first one", "Invokes a JavaScript function that takes no arguments.\n\n@param <T>\n@param function The function to invoke\n@param returnType The type of object to return\n@return The result of the function.", "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" ]
public static appfwwsdl get(nitro_service service) throws Exception{ appfwwsdl obj = new appfwwsdl(); appfwwsdl[] response = (appfwwsdl[])obj.get_resources(service); return response[0]; }
[ "Use this API to fetch all the appfwwsdl resources that are configured on netscaler." ]
[ "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", "Apply a filter to the list of all tasks, and show the results.\n\n@param project project file\n@param filter filter", "Import CountryList from RAW resource\n\n@param context Context\n@return CountryList", "Use this API to delete application.", "Adds the class descriptor to this model.\n\n@param classDef The class descriptor\n@return The class descriptor or <code>null</code> if there is no such class in this model", "Returns the supplied string with any trailing '\\n' removed.", "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", "We have identified that we have a SQLite file. This could be a Primavera Project database\nor an Asta database. Open the database and use the table names present to determine\nwhich type this is.\n\n@param stream schedule data\n@return ProjectFile instance", "Splits timephased work segments in line with cost rates. Note that this is\nan approximation - where a rate changes during a working day, the second\nrate is used for the whole day.\n\n@param table cost rate table\n@param calendar calendar used by this assignment\n@param work timephased work segment\n@param rateIndex rate applicable at the start of the timephased work segment\n@return list of segments which replace the one supplied by the caller" ]
private void writeTask(Task mpxjTask, List<net.sf.mpxj.planner.schema.Task> taskList) throws JAXBException { net.sf.mpxj.planner.schema.Task plannerTask = m_factory.createTask(); taskList.add(plannerTask); plannerTask.setEnd(getDateTimeString(mpxjTask.getFinish())); plannerTask.setId(getIntegerString(mpxjTask.getUniqueID())); plannerTask.setName(getString(mpxjTask.getName())); plannerTask.setNote(mpxjTask.getNotes()); plannerTask.setPercentComplete(getIntegerString(mpxjTask.getPercentageWorkComplete())); plannerTask.setPriority(mpxjTask.getPriority() == null ? null : getIntegerString(mpxjTask.getPriority().getValue() * 10)); plannerTask.setScheduling(getScheduling(mpxjTask.getType())); plannerTask.setStart(getDateTimeString(DateHelper.getDayStartDate(mpxjTask.getStart()))); if (mpxjTask.getMilestone()) { plannerTask.setType("milestone"); } else { plannerTask.setType("normal"); } plannerTask.setWork(getDurationString(mpxjTask.getWork())); plannerTask.setWorkStart(getDateTimeString(mpxjTask.getStart())); ConstraintType mpxjConstraintType = mpxjTask.getConstraintType(); if (mpxjConstraintType != ConstraintType.AS_SOON_AS_POSSIBLE) { Constraint plannerConstraint = m_factory.createConstraint(); plannerTask.setConstraint(plannerConstraint); if (mpxjConstraintType == ConstraintType.START_NO_EARLIER_THAN) { plannerConstraint.setType("start-no-earlier-than"); } else { if (mpxjConstraintType == ConstraintType.MUST_START_ON) { plannerConstraint.setType("must-start-on"); } } plannerConstraint.setTime(getDateTimeString(mpxjTask.getConstraintDate())); } // // Write predecessors // writePredecessors(mpxjTask, plannerTask); m_eventManager.fireTaskWrittenEvent(mpxjTask); // // Write child tasks // List<net.sf.mpxj.planner.schema.Task> childTaskList = plannerTask.getTask(); for (Task task : mpxjTask.getChildTasks()) { writeTask(task, childTaskList); } }
[ "This method writes data for a single task to a Planner file.\n\n@param mpxjTask MPXJ Task instance\n@param taskList list of child tasks for current parent" ]
[ "2-D Gaussian function.\n\n@param x value.\n@param y value.\n@return Function's value at point (x,y).", "add a join between two aliases\n\nTODO BRJ : This needs refactoring, it looks kind of weird\n\nno extents\nA1 -> A2\n\nextents on the right\nA1 -> A2\nA1 -> A2E0\n\nextents on the left : copy alias on right, extents point to copies\nA1 -> A2\nA1E0 -> A2C0\n\nextents on the left and right\nA1 -> A2\nA1 -> A2E0\nA1E0 -> A2C0\nA1E0 -> A2E0C0\n\n@param left\n@param leftKeys\n@param right\n@param rightKeys\n@param outer\n@param name", "Creates a new instance with the given key and value.\nMay be used instead of the constructor for convenience reasons.\n\n@param k\nthe key. May be <code>null</code>.\n@param v\nthe value. May be <code>null</code>.\n@return a newly created pair. Never <code>null</code>.\n@since 2.3", "Returns whether this address section represents a subnet block of addresses associated its prefix length.\n\nReturns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include\nthe entire subnet block for its prefix length.\n\nIf {@link AddressNetwork#getPrefixConfiguration} is set to consider all prefixes as subnets, this returns true for any grouping with prefix length.\n\n@return", "gets the first non annotation line number of a node, taking into account annotations.", "Checks the given model.\n\n@param modelDef The model\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "Updates the exceptions panel.", "Removes CRs but returns LFs", "generate random velocities in the given range\n@return" ]
private void logError(LifecycleListener listener, Exception e) { LOGGER.error("Error for listener " + listener.getClass(), e); }
[ "This method log given exception in specified listener" ]
[ "Gets a byte within this sequence of bytes\n\n@param i index into sequence\n@return byte\n@throws IllegalArgumentException if i is out of range", "Encodes the given URI path segment with the given encoding.\n@param segment the segment to be encoded\n@param encoding the character encoding to encode to\n@return the encoded segment\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "On host controller reload, remove a not running server registered in the process controller declared as down.", "This method retrieves the data at the given offset and returns\nit as a String, assuming the underlying data is composed of\nsingle byte characters.\n\n@param offset offset of required data\n@return string containing required data", "This method uses the configured git credentials and repo, to test its validity.\nIn addition, in case the user requested creation of a new tag, it checks that\nanother tag with the same name doesn't exist", "Used to apply or update the watermark for the item.\n@param itemUrl url template for the item.\n@param imprint the value must be \"default\", as custom watermarks is not yet supported.\n@return the watermark associated with the item.", "Get all field attributes in an unmodifiable Map, or null if no attributes have been added\n\n@return all field attributes, or <code>NULL</code> if none exist", "determinates if this triangle contains the point p.\n@param p the query point\n@return true iff p is not null and is inside this triangle (Note: on boundary is considered inside!!).", "Gets a document from the service.\n\n@param key\nunique key to reference the document\n@return the document or null if no such document" ]
private void applyAliases(Map<FieldType, String> aliases) { CustomFieldContainer fields = m_project.getCustomFields(); for (Map.Entry<FieldType, String> entry : aliases.entrySet()) { fields.getCustomField(entry.getKey()).setAlias(entry.getValue()); } }
[ "Apply aliases to task and resource fields.\n\n@param aliases map of aliases" ]
[ "Was this beat sent by the current tempo master?\n\n@return {@code true} if the device that sent this beat is the master\n@throws IllegalStateException if the {@link VirtualCdj} is not running", "Iterates through the given CharSequence line by line, splitting each line using\nthe given regex delimiter. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see #splitEachLine(CharSequence, java.util.regex.Pattern, groovy.lang.Closure)\n@since 1.8.2", "Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder", "If the HttpRequest is valid and handled it will be sent upstream, if it cannot be invoked\nthe response will be written back immediately.", "Populates a ProjectCalendarWeek instance from Asta work pattern data.\n\n@param week target ProjectCalendarWeek instance\n@param workPatternID target work pattern ID\n@param workPatternMap work pattern data\n@param timeEntryMap time entry map\n@param exceptionTypeMap exception type map", "Use this API to fetch policydataset_value_binding resources of given name .", "Gracefully stop the engine", "Validates the input parameters.", "Throws an IllegalArgumentException when the given value is not false.\n@param value the value to assert if false\n@param message the message to display if the value is false\n@return the value" ]
public String getTextForExpression(DJGroup group, DJGroup childGroup, String type) { return "new Double( $V{" + getReportName() + "_" + getGroupVariableName(childGroup) + "}.doubleValue() / $V{" + getReportName() + "_" + getGroupVariableName(type,group.getColumnToGroupBy().getColumnProperty().getProperty()) + "}.doubleValue())"; }
[ "Returns the formula for the percentage\n@param group\n@param type\n@return" ]
[ "Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs", "Determine whether the given method is a \"readString\" method.\n\n@see Object#toString()", "This method calls the index state. It should be called once per crawl in order to setup the\ncrawl.\n\n@return The initial state.", "Heuristic check if string might be an IPv6 address.\n\n@param input Any string or null\n@return true, if input string contains only hex digits and at least two colons, before '.' or '%' character.", "Checks that all the qualifiers in the set requiredQualifiers are in the set of qualifiers. Qualifier equality rules for\nannotation members are followed.\n\n@param requiredQualifiers The required qualifiers\n@param qualifiers The set of qualifiers to check\n@return True if all matches, false otherwise", "Creates a Span that covers an exact row. String parameters will be encoded as UTF-8", "Reloads the synchronization config. This wipes all in-memory synchronization settings.", "Adjust the visible columns.", "Converts the string representation of the days bit field into an integer.\n\n@param days string bit field\n@return integer bit field" ]
ValidationResult isRestrictedEventName(String name) { ValidationResult error = new ValidationResult(); if (name == null) { error.setErrorCode(510); error.setErrorDesc("Event Name is null"); return error; } for (String x : restrictedNames) if (name.equalsIgnoreCase(x)) { // The event name is restricted error.setErrorCode(513); error.setErrorDesc(name + " is a restricted event name. Last event aborted."); Logger.v(name + " is a restricted system event name. Last event aborted."); return error; } return error; }
[ "Checks whether the specified event name is restricted. If it is,\nthen create a pending error, and abort.\n\n@param name The event name\n@return Boolean indication whether the event name is restricted" ]
[ "Calculates the length of the next block of RTF data.\n\n@param text RTF data\n@param offset current offset into this data\n@return block length", "Gets a color formatted as an integer with ARGB ordering.\n\n@param json {@link JSONObject} to get the color from\n@param elementName Name of the color element\n@return An ARGB formatted integer\n@throws JSONException", "Check that each emitted notification is properly described by its source.", "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.", "Checks constraints on this model.\n\n@param checkLevel The amount of checks to perform\n@throws ConstraintException If a constraint has been violated", "Delete all enabled overrides for a client\n\n@param profileId profile ID of teh client\n@param client_uuid UUID of teh client", "Determines whether the specified permission is permitted.\n\n@param permission\n@return <tt>false<tt> if the specified permission is not permitted, based on the current security policy; <tt>true<tt> otherwise", "Returns the output directory for reporting.", "Use this API to fetch the statistics of all cmppolicylabel_stats resources that are configured on netscaler." ]
public static String formatConnectionEstablishmentMessage(final String connectionName, final String host, final String connectionReason) { return CON_ESTABLISHMENT_FORMAT.format(new Object[] { connectionName, host, connectionReason }); }
[ "Helper method for formatting connection establishment messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@return A formatted message in the format:\n\"[&lt;connectionName&gt;] remote host[&lt;host&gt;] &lt;connectionReason&gt;\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG." ]
[ "Merge msg bundles together, creating new MsgBundle with merges msg bundles passed in as a method argument", "Makes a CRFDatum by producing features and a label from input data at a\nspecific position, using the provided factory.\n\n@param info\nThe input data\n@param loc\nThe position to build a datum at\n@param featureFactory\nThe FeatureFactory to use to extract features\n@return The constructed CRFDatum", "Returns the deployment names with the specified runtime names at the specified deploymentRootAddress.\n\n@param deploymentRootResource\n@param runtimeNames\n@return the deployment names with the specified runtime names at the specified deploymentRootAddress.", "Retrieves the Material Shader ID associated with the\ngiven shader template class.\n\nA shader template is capable of generating multiple variants\nfrom a single shader source. The exact vertex and fragment\nshaders are generated by GearVRF based on the lights\nbeing used and the material attributes. you may subclass\nGVRShaderTemplate to create your own shader templates.\n\n@param shaderClass shader class to find (subclass of GVRShader)\n@return GVRShaderId associated with that shader template\n@see GVRShaderTemplate GVRShader", "Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException", "Stops the background data synchronization thread.", "Computes the cross product of v1 and v2 and places the result in this\nvector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector", "Load in a number of database configuration entries from a buffered reader.", "This method allows nested tasks to be added, with the WBS being\ncompleted automatically.\n\n@return new task" ]
private ClassNode getGenericsResolvedTypeOfFieldOrProperty(AnnotatedNode an, ClassNode type) { if (!type.isUsingGenerics()) return type; Map<String, GenericsType> connections = new HashMap(); //TODO: inner classes mean a different this-type. This is ignored here! extractGenericsConnections(connections, typeCheckingContext.getEnclosingClassNode(), an.getDeclaringClass()); type= applyGenericsContext(connections, type); return type; }
[ "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" ]
[ "Returns the timestamp for the time at which the suite finished executing.\nThis is determined by finding the latest end time for each of the individual\ntests in the suite.\n@param suite The suite to find the end time of.\n@return The end time (as a number of milliseconds since 00:00 1st January 1970 UTC).", "Parse a date value.\n\n@param value String representation\n@return Date instance", "Get file extension for script language.\n\n@param language the language name\n@return the file extension as string or null if the language is not in the set of languages supported by spin", "Ensures that the given collection descriptor has a valid element-class-ref property.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If element-class-ref could not be determined or is invalid", "Find the index of the specified name in field name array.", "Create the OJB_CLAZZ pseudo column based on CASE WHEN.\nThis column defines the Class to be instantiated.\n@param buf", "Vend a SessionVar with the function to create the default value", "Set the association in the entry state.\n\n@param collectionRole the role of the association\n@param association the association", "Registers all custom Externalizer implementations that Hibernate OGM needs into a running\nInfinispan CacheManager configuration.\nThis is only safe to do when Caches from this CacheManager haven't been started yet,\nor the ones already started do not contain any data needing these.\n\n@see ExternalizerIds\n@param globalCfg the Serialization section of a GlobalConfiguration builder" ]
protected void addEnumList(String key, List<? extends Enum> list) { optionsMap.put(key, list.stream().map(i -> i.toString()).collect(Collectors.toList())); }
[ "Add a list of enums to the options map\n@param key The key for the options map (ex: \"include[]\")\n@param list A list of enums" ]
[ "Get the original-image using the specified URL suffix.\n\n@deprecated\n@see PhotosInterface#getImage(Photo, int)\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException\n@throws FlickrException", "get the underlying wrapped connection\n@return OTMConnection raw connection to the OTM.", "Build a Count-Query based on aQuery\n@param aQuery\n@return The count query", "get the jdbcTypes from the Query or the ResultSet if not available from the Query\n@throws SQLException", "Checks attributes for rejection\n\n@param rejectedAttributes gathers information about failed attributes\n@param attributeValue the attribute value", "Get an ObjectReferenceDescriptor by name BRJ\n@param name\n@return ObjectReferenceDescriptor or null", "Method is called by spring and verifies that there is only one plugin per URI scheme.", "Expands the directories from the given list and and returns a list of subfiles.\nFiles from the original list are kept as is.", "Use this API to delete dnspolicylabel of given name." ]
public static final Number parseExtendedAttributeCurrency(String value) { Number result; if (value == null) { result = null; } else { result = NumberHelper.getDouble(Double.parseDouble(correctNumberFormat(value)) / 100); } return result; }
[ "Parse an extended attribute currency value.\n\n@param value string representation\n@return currency value" ]
[ "Use this API to fetch all the tmsessionparameter resources that are configured on netscaler.", "Get a property as a string or throw an exception.\n\n@param key the property name", "The conditional expectation is calculated using a Monte-Carlo regression technique.\n\n@param exerciseTime The exercise time\n@param model The valuation model\n@return The condition expectation estimator\n@throws CalculationException Thrown if underlying model failed to calculate stochastic process.", "Read a duration.\n\n@param units duration units\n@param duration duration value\n@return Duration instance", "Draw a rounded rectangular boundary.\n\n@param rect rectangle\n@param color colour\n@param linewidth line width\n@param r radius for rounded corners", "Permanently deletes a trashed file.\n@param fileID the ID of the trashed folder to permanently delete.", "Creates a new empty HTML document tree.\n@throws ParserConfigurationException", "Use this API to kill systemsession resources.", "blocks until there is a connection" ]
public synchronized void start() throws Exception { if (state == State.RUNNING) { LOG.debug("Ignore start() call on HTTP service {} since it has already been started.", serviceName); return; } if (state != State.NOT_STARTED) { if (state == State.STOPPED) { throw new IllegalStateException("Cannot start the HTTP service " + serviceName + " again since it has been stopped"); } throw new IllegalStateException("Cannot start the HTTP service " + serviceName + " because it was failed earlier"); } try { LOG.info("Starting HTTP Service {} at address {}", serviceName, bindAddress); channelGroup = new DefaultChannelGroup(ImmediateEventExecutor.INSTANCE); resourceHandler.init(handlerContext); eventExecutorGroup = createEventExecutorGroup(execThreadPoolSize); bootstrap = createBootstrap(channelGroup); Channel serverChannel = bootstrap.bind(bindAddress).sync().channel(); channelGroup.add(serverChannel); bindAddress = (InetSocketAddress) serverChannel.localAddress(); LOG.debug("Started HTTP Service {} at address {}", serviceName, bindAddress); state = State.RUNNING; } catch (Throwable t) { // Release resources if there is any failure channelGroup.close().awaitUninterruptibly(); try { if (bootstrap != null) { shutdownExecutorGroups(0, 5, TimeUnit.SECONDS, bootstrap.config().group(), bootstrap.config().childGroup(), eventExecutorGroup); } else { shutdownExecutorGroups(0, 5, TimeUnit.SECONDS, eventExecutorGroup); } } catch (Throwable t2) { t.addSuppressed(t2); } state = State.FAILED; throw t; } }
[ "Starts the HTTP service.\n\n@throws Exception if the service failed to started" ]
[ "Function to perform backward activation", "Called when remote end send a message to this connection\n@param receivedMessage the message received\n@return this context", "Control whether the Virtual CDJ sends status packets to the other players. Most uses of Beat Link will not\nrequire this level of activity. However, if you want to be able to take over the tempo master role, and control\nthe tempo and beat alignment of other players, you will need to turn on this feature, which also requires that\nyou are using one of the standard player numbers, 1-4.\n\n@param send if {@code true} we will send status packets, and can participate in (and control) tempo and beat sync\n\n@throws IllegalStateException if the virtual CDJ is not running, or if it is not using a device number in the\nrange 1 through 4\n@throws IOException if there is a problem starting the {@link BeatFinder}", "Logs a message for a case where the value of a property does not fit to\nits declared datatype.\n\n@param propertyIdValue\nthe property that was used\n@param datatype\nthe declared type of the property\n@param valueType\na string to denote the type of value", "Runs the record linkage process.", "Scans the jar file and returns the paths that match the includes and excludes.\n\n@return A List of paths\n@throws An IllegalStateException when an I/O error occurs in reading the jar file.", "It is required that T be Serializable", "Places a disabled marker file in the directory of the specified version.\n\n@param version to disable\n@throws PersistenceFailureException if the marker file could not be created (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).", "Add another store destination to an existing streaming session\n\n\n@param store the name of the store to stream to" ]
static boolean isOnClasspath(String className) { boolean isOnClassPath = true; try { Class.forName(className); } catch (ClassNotFoundException exception) { isOnClassPath = false; } return isOnClassPath; }
[ "Checks if class is on class path\n@param className of the class to check.\n@return true if class in on class path, false otherwise." ]
[ "Returns a new intern odmg-transaction for the current database.", "Retrieve the parent task based on its WBS.\n\n@param wbs parent WBS\n@return parent task", "Sets this matrix equal to the matrix encoded in the array.\n\n@param numRows The number of rows.\n@param numCols The number of columns.\n@param rowMajor If the array is encoded in a row-major or a column-major format.\n@param data The formatted 1D array. Not modified.", "Retrieve the date range at the specified index.\nThe index is zero based, and this method will return\nnull if the requested date range does not exist.\n\n@param index range index\n@return date range instance", "Creates a build\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param build the build information", "Print a a basic type t", "Replaces the proxy url with the correct url from the tileMap.\n\n@return correct url to TMS service", "This method is used to change the credentials of CleverTap account Id, token and region programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token\n@param region Clever Tap Account Region", "Parse a list of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token." ]
protected <T, A> ActiveOperation<T, A> getActiveOperation(final ManagementRequestHeader header) { return getActiveOperation(header.getBatchId()); }
[ "Get an active operation.\n\n@param header the request header\n@return the active operation, {@code null} if if there is no registered operation" ]
[ "Retrieves the task mode.\n\n@return task mode", "Returns the directory of the file.\n\n@param filePath Path of the file.\n@return The directory string or {@code null} if\nthere is no parent directory.\n@throws IllegalArgumentException if path is bad", "Post an artifact to the Grapes server\n\n@param artifact The artifact to post\n@param user The user posting the information\n@param password The user password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault", "Sets the location value as string.\n\n@param value the string representation of the location value (JSON)", "Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.", "Record the duration of a get_all operation, along with how many values\nwere requested, how may were actually returned and the size of the values\nreturned.", "This method allows a resource assignment workgroup fields record\nto be added to the current resource assignment. A maximum of\none of these records can be added to a resource assignment record.\n\n@return ResourceAssignmentWorkgroupFields object\n@throws MPXJException if MSP defined limit of 1 is exceeded", "Use this API to fetch aaapreauthenticationpolicy_binding resource of given name ." ]
private void addJoinInfo(JoinType type, String localColumnName, String joinedColumnName, QueryBuilder<?, ?> joinedQueryBuilder, JoinWhereOperation operation) throws SQLException { JoinInfo joinInfo = new JoinInfo(type, joinedQueryBuilder, operation); if (localColumnName == null) { matchJoinedFields(joinInfo, joinedQueryBuilder); } else { matchJoinedFieldsByName(joinInfo, localColumnName, joinedColumnName, joinedQueryBuilder); } if (joinList == null) { joinList = new ArrayList<JoinInfo>(); } joinList.add(joinInfo); }
[ "Add join info to the query. This can be called multiple times to join with more than one table." ]
[ "Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List", "Gets the appropriate cache dir\n\n@param ctx\n@return", "Gives an sequence of ByteBuffers of a specified range. Writing to these ByteBuffers modifies the contents of this LBuffer.\n@param offset\n@param size\n@return", "Binds a script bundle to a scene.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param scene\nThe scene to bind to.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if script processing error occurs.", "Performs the update to the persistent configuration model. This default implementation simply removes\nthe targeted resource.\n\n@param context the operation context\n@param operation the operation\n@throws OperationFailedException if there is a problem updating the model", "Checks the extents specifications and removes unnecessary entries.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "Handle a completed request producing an optional response", "Create an info object from an authscope object.\n\n@param authscope the authscope", "Get a property as a double or throw an exception.\n\n@param key the property name" ]
public E get(int i) { if (i < 0 || i >= objects.size()) throw new ArrayIndexOutOfBoundsException("Index " + i + " outside the bounds [0," + size() + ")"); return objects.get(i); }
[ "Gets the object whose index is the integer argument.\n\n@param i the integer index to be queried for the corresponding argument\n@return the object whose index is the integer argument." ]
[ "Use this API to update nsacl6.", "Stores the output from a Frontier into the queue, pausing and waiting if the given queue is too large\n\n@param resultsMap map of String and String representing the output of a Frontier's DFS", "append multi clickable SpecialUnit or String\n\n@param specialClickableUnit SpecialClickableUnit\n@param specialUnitOrStrings Unit Or String\n@return", "Accessor method used to retrieve a String object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Dump the contents of a row from an MPD file.\n\n@param row row data", "returns an Array with an Objects NON-PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values", "Check whether the patch can be applied to a given target.\n\n@param condition the conditions\n@param target the target\n@throws PatchingException", "Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return", "Randomly generates matrix with the specified number of non-zero elements filled with values from min to max.\n\n@param numRows Number of rows\n@param numCols Number of columns\n@param nz_total Total number of non-zero elements in the matrix\n@param min Minimum element value, inclusive\n@param max Maximum element value, inclusive\n@param rand Random number generator\n@return Randomly generated matrix" ]
public void setMonitoringService(org.talend.esb.sam.common.service.MonitoringService monitoringService) { this.monitoringService = monitoringService; }
[ "Sets the monitoring service.\n\n@param monitoringService the new monitoring service" ]
[ "Does the headset the device is docked into have a dedicated home key\n@return", "Filters all exceptions from the provided dates.\n@param dates the dates to filter.\n@return the provided dates, except the ones that match some exception.", "Only call with the read lock held", "Creates an element that represents a rectangle drawn at the specified coordinates in the page.\n@param x the X coordinate of the rectangle\n@param y the Y coordinate of the rectangle\n@param width the width of the rectangle\n@param height the height of the rectangle\n@param stroke should there be a stroke around?\n@param fill should the rectangle be filled?\n@return the resulting DOM element", "Remove contents from the deployment and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException", "Updates the information about the user status for this terms of service with any info fields that have\nbeen modified locally.\n@param info the updated info.", "Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD\n@param _jasperPrint\n@param _format\n@param _parameters\n@return", "For creating regular columns\n@return", "Uploads a new large file.\n@param boxApi the API connection to be used by the upload session.\n@param folderId the id of the folder in which the file will be uploaded.\n@param stream the input stream that feeds the content of the file.\n@param url the upload session URL.\n@param fileName the name of the file to be created.\n@param fileSize the total size of the file.\n@return the created file instance.\n@throws InterruptedException when a thread gets interupted.\n@throws IOException when reading a stream throws exception." ]
public static base_response add(nitro_service client, cachepolicylabel resource) throws Exception { cachepolicylabel addresource = new cachepolicylabel(); addresource.labelname = resource.labelname; addresource.evaluates = resource.evaluates; return addresource.add_resource(client); }
[ "Use this API to add cachepolicylabel." ]
[ "Parse currency.\n\n@param value currency value\n@return currency value", "Escape a value to be HTML friendly.\n@param value the Object value.\n@return the HTML-escaped String, or <null> if the value is null.", "An extension point so we can control how the query gets executed.\nThis exists for testing purposes, not because we believe it will\nactually be used for real.", "Use this API to add autoscaleprofile.", "This procedure is invoked to process the \"subst\" Tcl command.\nSee the user documentation for details on what it does.\n\n@param interp the current interpreter.\n@param argv command arguments.\n@exception TclException if wrong # of args or invalid argument(s).", "Retrieve a list of the available P3 project names from a directory.\n\n@param directory directory containing P3 files\n@return list of project names", "Parses an RgbaColor from a hexadecimal value.\n\n@return returns the parsed color", "Use this API to fetch all the responderparam resources that are configured on netscaler.", "Appends the query part for the facet to the query string.\n@param query The current query string.\n@param name The name of the facet parameter, e.g. \"limit\", \"order\", ....\n@param value The value to set for the parameter specified by name." ]
public void setDividerPadding(float padding, final Axis axis) { if (!equal(mDividerPadding.get(axis), padding)) { mDividerPadding.set(padding, axis); if (mContainer != null) { mContainer.onLayoutChanged(this); } } }
[ "Set the amount of padding between child objects.\n@param axis {@link Axis}\n@param padding" ]
[ "Sets the ssh priv key relative path wtih passphrase.\n\n@param privKeyRelativePath the priv key relative path\n@param passphrase the passphrase\n@return the parallel task builder", "Register opened database via the PBKey.", "Use this API to fetch all the responderpolicy resources that are configured on netscaler.", "Returns the ordered Map value of the field.\n\n@return the ordered Map value of the field. It returns a reference of the value.\n@throws IllegalArgumentException if the value cannot be converted to ordered Map.", "Add the deployment scanner service to a batch.\n\n@param context context for the operation that is adding this service\n@param resourceAddress the address of the resource that manages the service\n@param relativeTo the relative to\n@param path the path\n@param scanInterval the scan interval\n@param unit the unit of {@code scanInterval}\n@param autoDeployZip whether zipped content should be auto-deployed\n@param autoDeployExploded whether exploded content should be auto-deployed\n@param autoDeployXml whether xml content should be auto-deployed\n@param scanEnabled scan enabled\n@param deploymentTimeout the deployment timeout\n@param rollbackOnRuntimeFailure rollback on runtime failures\n@param bootTimeService the deployment scanner used in the boot time scan\n@param scheduledExecutorService executor to use for asynchronous tasks\n@return the controller for the deployment scanner service", "Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started.", "Sets top and bottom padding for all cells in the row.\n@param padding new padding for top and bottom, ignored if smaller than 0\n@return this to allow chaining", "This method extracts data for a single calendar from a Phoenix file.\n\n@param calendar calendar data", "Convenience method for retrieving a Map resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value" ]
public static String createFolderPath(String path) { String[] pathParts = path.split("\\."); String path2 = ""; for (String part : pathParts) { if (path2.equals("")) { path2 = part; } else { path2 = path2 + File.separator + changeFirstLetterToLowerCase(createClassName(part)); } } return path2; }
[ "This method changes package_path into folder's path\n\n@param path\n, as es.upm.gsi\n@return the new path, es/upm/gsi" ]
[ "A write through put to inner-store.\n\n@param keyBytes : keyName strings serialized as bytes eg. 'cluster.xml'\n@param valueBytes : versioned byte[] eg. UTF bytes for cluster xml\ndefinitions\n@throws VoldemortException", "Adds all items from the iterator to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed", "Returns the intersection of this range with the given range, a range which includes those addresses in both this and the given rqnge.\n@param other\n@return", "except for the ones that make the content appear under the system bars.", "Creates a new random symmetric matrix that will have the specified real eigenvalues.\n\n@param num Dimension of the resulting matrix.\n@param rand Random number generator.\n@param eigenvalues Set of real eigenvalues that the matrix will have.\n@return A random matrix with the specified eigenvalues.", "Overloads the left shift operator to provide syntactic sugar for appending to a StringBuilder.\n\n@param self a StringBuilder\n@param value an Object\n@return the original StringBuilder\n@since 1.8.2", "Returns all the version directories present in the root directory\nspecified\n\n@param rootDir The parent directory\n@param maxId The\n@return An array of version directories", "Create a Collection Proxy for a given query.\n\n@param brokerKey The key of the persistence broker\n@param query The query\n@param collectionClass The class to build the proxy for\n@return The collection proxy", "Send a get module request\n\n@param name\n@param version\n@return the targeted module\n@throws GrapesCommunicationException" ]
public void setPromoted(final boolean promoted) { this.promoted = promoted; for (final Artifact artifact : artifacts) { artifact.setPromoted(promoted); } for (final Module suModule : submodules) { suModule.setPromoted(promoted); } }
[ "Sets the promotion state.\n\n<P>INFO: This method updates automatically all the contained artifacts.\n\n@param promoted boolean" ]
[ "Gathers the pk fields from the hierarchy of the given class, and copies them into the class.\n\n@param classDef The root of the hierarchy\n@throws ConstraintException If there is a conflict between the pk fields", "Add a module to a module tree\n\n@param module\n@param tree", "Use this API to fetch all the sslciphersuite resources that are configured on netscaler.", "If the DefaultActionInvocation has been executed before and the Result is\nan instance of ActionChainResult, this method will walk down the chain of\nActionChainResults until it finds a non-chain result, which will be\nreturned. If the DefaultActionInvocation's result has not been executed\nbefore, the Result instance will be created and populated with the result\nparams.\n\n@return a Result instance\n@throws Exception", "Retrieve the FeatureSource object from the data store.\n\n@return An OpenGIS FeatureSource object;\n@throws LayerException\noops", "Writes back hints file.", "Returns all scripts\n\n@param model\n@param type - optional to specify type of script to return\n@return\n@throws Exception", "Use this API to fetch sslservice resource of given name .", "Append a Handler to every parent of the given class\n@param parent The class of the parents to add the child to\n@param child The Handler to add." ]
public static Node addPartitionToNode(final Node node, Integer donatedPartition) { return UpdateClusterUtils.addPartitionsToNode(node, Sets.newHashSet(donatedPartition)); }
[ "Add a partition to the node provided\n\n@param node The node to which we'll add the partition\n@param donatedPartition The partition to add\n@return The new node with the new partition" ]
[ "Sort and order steps to avoid unwanted generation", "Use this API to update Interface.", "persist decorator and than continue to children without touching the model", "Deserialize a directory of javascript design documents to a List of DesignDocument objects.\n\n@param directory the directory containing javascript files\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read", "Deletes a FilePath file.\n\n@param workspace The build workspace.\n@param path The path in the workspace.\n@throws IOException In case of missing file.", "Reset the combination generator.", "Update environment variables to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param config Key/Value pairs of environment variables.", "Send message to all connections of a certain user\n\n@param message the message to be sent\n@param username the username\n@return this context", "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" ]
public void updateInfo(BoxTermsOfServiceUserStatus.Info info) { URL url = TERMS_OF_SERVICE_USER_STATUSES_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID()); BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT"); request.setBody(info.getPendingChanges()); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject responseJSON = JsonObject.readFrom(response.getJSON()); info.update(responseJSON); }
[ "Updates the information about the user status for this terms of service with any info fields that have\nbeen modified locally.\n@param info the updated info." ]
[ "Add a '&lt;&gt;' clause so the column must be not-equal-to the value.", "Get a list of modules regarding filters\n\n@param filters Map<String,String>\n@return List<Module>\n@throws GrapesCommunicationException", "Append the WHERE part of the statement to the StringBuilder.", "Gets the site label for the entry.\n\n@param cms the current CMS context\n@param entry the entry\n@return the site label for the entry", "Make all elements of a String array upper case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements upper case", "Create the exception assignment map.\n\n@param rows calendar rows\n@return exception assignment map", "Build a Dataset from some data.\n\n@param oldData This {@link Dataset} represents data for which we which to\nsome features, specifically those features not in the {@link edu.stanford.nlp.util.Index}\ngoodFeatures.\n@param goodFeatures An {@link edu.stanford.nlp.util.Index} of features we wish to retain.\n@return A new {@link Dataset} wheres each datapoint contains only features\nwhich were in goodFeatures.", "Verify the given job types are all valid.\n\n@param jobTypes the given job types\n@throws IllegalArgumentException if any of the job types are invalid\n@see #checkJobType(String, Class)", "Move the animation frame counter forward.\n\n@return boolean specifying if animation should continue or if loopCount has been fulfilled." ]
public void evictCache(String key) { H.Session sess = session(); if (null != sess) { sess.evict(key); } else { app().cache().evict(key); } }
[ "Evict cached object\n\n@param key\nthe key indexed the cached object to be evicted" ]
[ "Copy a path recursively.\n@param source a Path pointing to a file or a directory that must exist\n@param target a Path pointing to a directory where the contents will be copied.\n@param overwrite overwrite existing files - if set to false fails if the target file already exists.\n@throws IOException", "This is the main entry point used to convert the internal representation\nof timephased cost into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range", "Performs DBSCAN cluster analysis.\n\n@param points the points to cluster\n@return the list of clusters\n@throws NullArgumentException if the data points are null", "Convert given value to given target\n\n@param fromValue\nthe value to convert\n@param toType\ntarget target\n@param <T>\ntarget of the result\n@return the value converted to given target\n@throws TypeCastException\nif conversion was not possible", "page breaks should be near the bottom of the band, this method used while adding subreports\nwhich has the \"start on new page\" option.\n@param band", "Use this API to fetch statistics of gslbdomain_stats resource of given name .", "Adds a filter definition to this project file.\n\n@param filter filter definition", "Build the operation transformers.\n\n@param registry the shared resource registry\n@return the operation transformers", "Processes the template for all indices of the current table.\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=\"unique\" optional=\"true\" description=\"Whether to process the unique indices or not\"\nvalues=\"true,false\"" ]
private void setSiteFilters(String filters) { this.filterSites = new HashSet<>(); if (!"-".equals(filters)) { Collections.addAll(this.filterSites, filters.split(",")); } }
[ "Sets the set of site filters based on the given string.\n\n@param filters\ncomma-separates list of site keys, or \"-\" to filter all site\nlinks" ]
[ "Adds an extent relation to the current class definition.\n\n@param attributes The attributes of the tag\n@return An empty string\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"name\" optional=\"false\" description=\"The fully qualified name of the extending\nclass\"", "Registers add operation\n\n@param registration resource on which to register\n@param handler operation handler to register\n@param flags with flags\n@deprecated use {@link #registerAddOperation(org.jboss.as.controller.registry.ManagementResourceRegistration, AbstractAddStepHandler, org.jboss.as.controller.registry.OperationEntry.Flag...)}", "Get the object responsible for printing to the correct output format.\n\n@param specJson the request json from the client", "Compute 1-dimensional Perlin noise.\n@param x the x value\n@return noise value at x in the range -1..1", "Extract definition records from the table and divide into groups.", "Deletes an individual alias\n\n@param alias\nthe alias to delete", "Extract a list of time entries.\n\n@param shiftData string representation of time entries\n@return list of time entry rows", "Paint a check pattern, used for a background to indicate image transparency.\n@param c the component to draw into\n@param g the Graphics objects\n@param x the x position\n@param y the y position\n@param width the width\n@param height the height", "Set the attributes of a feature.\n\n@param feature the feature\n@param attributes the attributes\n@throws LayerException oops" ]
public void _solveVectorInternal( double []vv ) { // Solve L*Y = B int ii = 0; for( int i = 0; i < n; i++ ) { int ip = indx[i]; double sum = vv[ip]; vv[ip] = vv[i]; if( ii != 0 ) { // for( int j = ii-1; j < i; j++ ) // sum -= dataLU[i* n +j]*vv[j]; int index = i*n + ii-1; for( int j = ii-1; j < i; j++ ) sum -= dataLU[index++]*vv[j]; } else if( sum != 0.0 ) { ii=i+1; } vv[i] = sum; } // Solve U*X = Y; TriangularSolver_DDRM.solveU(dataLU,vv,n); }
[ "a specialized version of solve that avoid additional checks that are not needed." ]
[ "Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail", "perform the actual matching", "Submit a operations. Throw a run time exception if the operations is\nalready submitted\n\n@param operation The asynchronous operations to submit\n@param requestId Id of the request", "Extent aware Delete by Query\n@param query\n@param cld\n@throws PersistenceBrokerException", "Sets name, status, start time and title to specified step\n\n@param step which will be changed", "Return the text content of the document. It does not containing trailing spaces and asterisks\nat the start of the line.", "Merge this ExecutionStatistics with all the statistics created within the child threads. All the child threads had to be created using Windup-specific\nThreadFactory in order to contain a reference to the parent thread.", "Get the FieldDescriptor for the PathInfo\n\n@param aTableAlias\n@param aPathInfo\n@return FieldDescriptor", "Use this API to add tmtrafficaction resources." ]
public void unlock() { for (Locale l : m_lockedBundleFiles.keySet()) { LockedFile f = m_lockedBundleFiles.get(l); f.tryUnlock(); } if (null != m_descFile) { m_descFile.tryUnlock(); } }
[ "Unlock all files opened for writing." ]
[ "Use this API to fetch authenticationradiusaction resource of given name .", "This takes into account scrolling and will be in absolute\ncoordinates where the top left corner of the page is 0,0 but\nthe viewport may be scrolled to something else.", "Use this API to fetch appfwsignatures resource of given name .", "Parses all child Shapes recursively and adds them to the correct JSON\nObject\n\n@param childShapes\n@throws org.json.JSONException", "Returns the accrued interest of the bond for a given time.\n\n@param time The time of interest as double.\n@param model The model under which the product is valued.\n@return The accrued interest.", "Uploads a new large file.\n@param boxApi the API connection to be used by the upload session.\n@param folderId the id of the folder in which the file will be uploaded.\n@param stream the input stream that feeds the content of the file.\n@param url the upload session URL.\n@param fileName the name of the file to be created.\n@param fileSize the total size of the file.\n@return the created file instance.\n@throws InterruptedException when a thread gets interupted.\n@throws IOException when reading a stream throws exception.", "Get a list of comments made for a particular entity\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@return list of comments", "Click no children of the specified parent element.\n\n@param tagName The tag name of which no children should be clicked.\n@return The builder to append more options.", "Write flow id to message.\n\n@param message the message\n@param flowId the flow id" ]
public Bundler put(String key, Serializable value) { delegate.putSerializable(key, value); return this; }
[ "Inserts a Serializable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Serializable object, or null\n@return this bundler instance to chain method calls" ]
[ "Invokes the method on the class of the passed instance, not the declaring\nclass. Useful with proxies\n\n@param instance The instance to invoke\n@param manager The Bean manager\n@return A reference to the instance", "refresh the most recent history entries\n\n@param limit number of entries to populate\n@param offset number of most recent entries to skip\n@return populated history entries\n@throws Exception exception", "Adds a value to the list if does not already exists.\n\n@param list the list\n@param value value to add if not exists in the list", "Log original response\n\n@param httpServletResponse\n@param history\n@throws URIException", "Returns the formula for the percentage\n@param group\n@param type\n@return", "Delete a file ignoring failures.\n\n@param file file to delete", "replace the counter for K1-index o by new counter c", "The Critical field indicates whether a task has any room in the schedule\nto slip, or if a task is on the critical path. The Critical field contains\nYes if the task is critical and No if the task is not critical.\n\n@return boolean", "Sets the target translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining" ]
public boolean existsElement(String predicate) throws org.odmg.QueryInvalidException { DList results = (DList) this.query(predicate); if (results == null || results.size() == 0) return false; else return true; }
[ "Determines whether there is an element of the collection that evaluates to true\nfor the predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tTrue if there is an element of the collection that evaluates to true\nfor the predicate, otherwise false.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid." ]
[ "Calculate the child size along the axis and measure the offset inside the\nlayout container\n@param dataIndex of child in Container\n@return true item fits the container, false - otherwise", "Given a list of store definitions return a list of store names\n\n@param storeDefList The list of store definitions\n@return Returns a list of store names", "Returns the index of the segment containing the first byte outside the network prefix.\nWhen networkPrefixLength is null, or it matches or exceeds the bit length, returns the segment count.\n\n@param networkPrefixLength\n@param byteLength\n@return", "Use this API to fetch all the route6 resources that are configured on netscaler.", "Reads a \"flags\" argument from the request.", "Do not call directly.\n@deprecated", "Chooses a single segment to be compressed, or null if no segment could be chosen.\n@param options\n@param createMixed\n@return", "Randomly generates matrix with the specified number of matrix elements filled with values from min to max.\n\n@param numRows Number of rows\n@param numCols Number of columns\n@param nz_total Total number of non-zero elements in the matrix\n@param min Minimum value\n@param max maximum value\n@param rand Random number generated\n@return Randomly generated matrix", "Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach." ]
public String buildRadio(String propName) throws CmsException { String propVal = readProperty(propName); StringBuffer result = new StringBuffer("<table border=\"0\"><tr>"); result.append("<td><input type=\"radio\" value=\"true\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(Boolean.valueOf(propVal).booleanValue() ? "checked=\"checked\"" : "").append( "/></td><td id=\"tablelabel\">").append(key(Messages.GUI_LABEL_TRUE_0)).append("</td>"); result.append("<td><input type=\"radio\" value=\"false\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(Boolean.valueOf(propVal).booleanValue() ? "" : "checked=\"checked\"").append( "/></td><td id=\"tablelabel\">").append(key(Messages.GUI_LABEL_FALSE_0)).append("</td>"); result.append("<td><input type=\"radio\" value=\"\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(CmsStringUtil.isEmpty(propVal) ? "checked=\"checked\"" : "").append( "/></td><td id=\"tablelabel\">").append(getPropertyInheritanceInfo(propName)).append( "</td></tr></table>"); return result.toString(); }
[ "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" ]
[ "Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges", "Checks if the InputStream have the text\n\n@param in InputStream to read\n@param text Text to check\n@return whether the inputstream has the text", "Retrieves an integer value from the extended data.\n\n@param type Type identifier\n@return integer value", "Determines whether or not a given feature matches this pattern.\n\n@param feature\nSpecified feature to examine.\n\n@return Flag confirming whether or not this feature is inside the filter.", "Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for", "Add an element assigned with its score\n@param member the member to add\n@param score the score to assign\n@return <code>true</code> if the set has been changed", "Sets the name of the base calendar associated with this task.\nNote that this attribute appears in MPP9 and MSPDI files.\n\n@param calendar calendar instance", "Use this API to unset the properties of lbsipparameters resource.\nProperties that need to be unset are specified in args array.", "Retrieves a timestamp from the property data.\n\n@param type Type identifier\n@return timestamp" ]
public void restoreSecurityContext(CacheContext context) { SavedAuthorization cached = context.get(CacheContext.SECURITY_CONTEXT_KEY, SavedAuthorization.class); if (cached != null) { log.debug("Restoring security context {}", cached); securityManager.restoreSecurityContext(cached); } else { securityManager.clearSecurityContext(); } }
[ "Puts the cached security context in the thread local.\n\n@param context the cache context" ]
[ "Send post request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws IOException the io exception", "Removes a design document from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@return {@link DesignDocument}", "Build data model for serialization.", "Walk through the object graph of the specified insert object. Was used for\nrecursive object graph walk.", "Load a test file, run the classifier on it, and then write a Viterbi search\ngraph for each sequence.\n\n@param testFile\nThe file to test on.", "Random string from string array\n\n@param s Array\n@return String", "Read an element which contains only a single boolean attribute.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@return the boolean value\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.", "Handles a failed SendData request. This can either be because of the stick actively reporting it\nor because of a time-out of the transaction in the send thread.\n@param originalMessage the original message that was sent", "Read holidays from the database and create calendar exceptions." ]
public static boolean isTemplatePath(String string) { int sz = string.length(); if (sz == 0) { return true; } for (int i = 0; i < sz; ++i) { char c = string.charAt(i); switch (c) { case ' ': case '\t': case '\b': case '<': case '>': case '(': case ')': case '[': case ']': case '{': case '}': case '!': case '@': case '#': case '*': case '?': case '%': case '|': case ',': case ':': case ';': case '^': case '&': return false; } } return true; }
[ "Check if a given string is a template path or template content\n\nIf the string contains anyone the following characters then we assume it\nis content, otherwise it is path:\n\n* space characters\n* non numeric-alphabetic characters except:\n** dot \".\"\n** dollar: \"$\"\n\n@param string\nthe string to be tested\n@return `true` if the string literal is template content or `false` otherwise" ]
[ "Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise.", "Generates timephased actual costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost", "This method changes package_path into folder's path\n\n@param path\n, as es.upm.gsi\n@return the new path, es/upm/gsi", "Creates a text box with the given parent and text node assigned.\n@param contblock The parent node (and the containing block in the same time)\n@param n The corresponding text node in the DOM tree.\n@return The new text box.", "Format the label text.\n\n@param scaleUnit The unit used for the scalebar.\n@param value The scale value.\n@param intervalUnit The scaled unit for the intervals.", "Use this API to add sslcipher resources.", "Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards.\n\n@param key\nname of the parameter to add\n@param value\nvalue of the parameter to create\n@return the newly created parameter", "Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed.", "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" ]
public List<String> subList(final long fromIndex, final long toIndex) { return doWithJedis(new JedisCallable<List<String>>() { @Override public List<String> call(Jedis jedis) { return jedis.lrange(getKey(), fromIndex, toIndex); } }); }
[ "Get a sub-list of this list\n@param fromIndex index of the first element in the sub-list (inclusive)\n@param toIndex index of the last element in the sub-list (inclusive)\n@return the sub-list" ]
[ "Register the given mbean with the server\n\n@param server The server to register with\n@param mbean The mbean to register\n@param name The name to register under", "Send a DEBUG log message with specified subsystem. If subsystem is not enabled the message\nwill not be logged\n@param subsystem logging subsystem\n@param tag Used to identify the source of a log message. It usually identifies the class or\nactivity where the log call occurs.\n@param pattern The message pattern\n@return", "Set virtual host so the server can direct the request. Value is the host header if it is set, otherwise\nuse the hostname from the original request.\n\n@param httpMethodProxyRequest\n@param httpServletRequest", "Propagate onEnter events to listeners\n@param hit collision object", "Returns an iterator over the items in this collection.\n@return an iterator over the items in this collection.", "Gets the value of the callout 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 callout property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetCallout().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link Callouts.Callout }", "Removes the duplicate node list.\n\n@param list\nthe list\n@return the int", "Sets the position of a UIObject", "Get the waveform details available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the details associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the WaveformFinder is not running or requesting waveform details" ]
private float newRandomIndividualParticleRadius(@NonNull final SceneConfiguration scene) { return scene.getParticleRadiusMin() == scene.getParticleRadiusMax() ? scene.getParticleRadiusMin() : scene.getParticleRadiusMin() + (random.nextInt( (int) ((scene.getParticleRadiusMax() - scene.getParticleRadiusMin()) * 100f))) / 100f; }
[ "Generates new individual particle radius based on min and max radius setting.\n\n@return new particle radius" ]
[ "Retrieves the project finish date. If an explicit finish date has not been\nset, this method calculates the finish date by looking for\nthe latest task finish date.\n\n@return Finish Date", "decodes the uriFragment\n\n@param res the resource that contains the feature holder\n@param uriFragment the fragment that should be decoded\n@return the decoded information\n@see LazyURIEncoder#encode(EObject, EReference, INode)", "Adds a tag to the resource.\n@param key the key for the tag\n@param value the value for the tag\n@return the next stage of the definition/update", "Main method of this class related to RecyclerView widget. This method is the responsible of\ncreate a new Renderer instance with all the needed information to implement the rendering.\nThis method will validate all the attributes passed in the builder constructor and will create\na RendererViewHolder instance.\n\nThis method is used with RecyclerView because the view recycling mechanism is implemented out\nof this class and we only have to return new RendererViewHolder instances.\n\n@return ready to use RendererViewHolder instance.", "This method calls the index state. It should be called once per crawl in order to setup the\ncrawl.\n\n@return The initial state.", "Delete rows that match the prepared statement.", "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command removes all elements in the sorted set between the lexicographical range specified.\n@param lexRange\n@return the number of elements removed.", "Set the attributes for this template.\n\n@param attributes the attribute map", "Retrieve and validate vector clock value from the REST request.\n\"X_VOLD_VECTOR_CLOCK\" is the vector clock header.\n\n@return true if present, false if missing" ]
public static <T extends Annotation> List<T> searchForAnnotation(Method method, Class<T> annotation) { if (method == null) { return Lists.newArrayList(); } return searchClasses(method, annotation, method.getDeclaringClass()); }
[ "Searches for all annotations of the given type on this method or on type level for all interfaces and superclasses\n\n@param method the method to scan\n@param annotation the annotation to search for\n@param <T> the type of the annotation\n@return the list of all method or type level annotations in the type hierarchy" ]
[ "Helper method for formatting connection establishment messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@return A formatted message in the format:\n\"[&lt;connectionName&gt;] remote host[&lt;host&gt;] &lt;connectionReason&gt;\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG.", "Evaluates the filter, returns true if the supplied Task or Resource\ninstance matches the filter criteria.\n\n@param container Task or Resource instance\n@param promptValues respose to prompts\n@return boolean flag", "Registers the transformers for JBoss EAP 7.0.0.\n\n@param subsystemRegistration contains data about the subsystem registration", "Set the diffuse light intensity.\n\nThis designates the color of the diffuse reflection.\nIt is multiplied by the material diffuse color to derive\nthe hue of the diffuse reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code diffuse_intensity} to control the intensity of diffuse 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)", "Retrieves a CodePage instance. Defaults to ANSI.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "sorts are a bit more awkward and need a helper...", "Append the bounding volume particle positions, times and velocities to the existing mesh\nbefore creating a new scene object with this mesh attached to it.\nAlso, append every created scene object and its creation time to corresponding array lists.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps", "Count the number of queued resource requests for a specific pool.\n\n@param key The key\n@return The count of queued resource requests. Returns 0 if no queue\nexists for given key.", "Put a spatial object in the cache and index it.\n\n@param key key for object\n@param object object itself\n@param envelope envelope for object" ]
private void writeNewLineIndent() throws IOException { if (m_pretty) { if (!m_indent.isEmpty()) { m_writer.write('\n'); m_writer.write(m_indent); } } }
[ "Write a new line and indent." ]
[ "Append the given char as a decimal HTML entity.\n\n@param out\nThe StringBuilder to write to.\n@param value\nThe character.", "Gets the message payload.\n\n@param message the message\n@return the payload", "delegate to each contained OJBIterator and release\nits resources.", "Checks if the given operator code is a valid one.\n\n@param operatorCode an operator code to evaluate\n@throws IllegalStateException if operatorCode is not a known operator code.", "Returns the decoded string, in case it contains non us-ascii characters.\nReturns the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.\n\n@param str string to be decoded\n@return the decoded string, in case it contains non us-ascii characters;\nor the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.", "Returns the field with the specified value properly formatted. Multiline\nvalues are automatically indented, and dots are added on the empty lines.\n\n<pre>\nField-Name: value\n</pre>", "Records the result of updating a server.\n\n@param server the id of the server. Cannot be <code>null</code>\n@param response the result of the updates", "This method returns the value it is passed, or null if the value\nmatches the nullValue argument.\n\n@param value value under test\n@param nullValue return null if value under test matches this value\n@return value or null", "Use this API to add dospolicy resources." ]
public ItemRequest<Task> addFollowers(String task) { String path = String.format("/tasks/%s/addFollowers", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "Adds each of the specified followers to the task, if they are not already\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to add followers to.\n@return Request object" ]
[ "symbol for filling padding position in output", "Adds the specified list of objects at the end of the array.\n\n@param collection The objects to add at the end of the array.", "Send a packet to the target player telling it to load the specified track from the specified source player.\n\n@param targetPlayer the device number of the player that you want to have load a track\n@param rekordboxId the identifier of a track within the source player's rekordbox database\n@param sourcePlayer the device number of the player from which the track should be loaded\n@param sourceSlot the media slot from which the track should be loaded\n@param sourceType the type of track to be loaded\n\n@throws IOException if there is a problem sending the command\n@throws IllegalStateException if the {@code VirtualCdj} is not active or the target device cannot be found", "In case parent thread spawn thread we need create a new queue\nfor child thread but use the only one root step. In the end all steps will be\nchildren of root step, all we need is sync adding steps\n@param parentValue value from parent thread\n@return local copy of queue in this thread with parent root as first element", "lookup current maximum value for a single field in\ntable the given class descriptor was associated.", "Answer the SQL-Clause for a FieldCriteria\n\n@param c FieldCriteria\n@param cld ClassDescriptor", "End a \"track;\" that is, return to logging at one level shallower.\n@param title A title that should match the beginning of this track.", "Get a unique reference to a media slot on the network from which tracks can be loaded.\n\n@param player the player in which the slot is found\n@param slot the specific type of the slot\n\n@return the instance that will always represent the specified slot\n\n@throws NullPointerException if {@code slot} is {@code null}", "Sets the protocol, hostname and port to connect to.\n\n@param protocol the protocol to use\n@param hostname the host name\n@param port the port\n\n@return the builder" ]
private List getColumns(List fields) { ArrayList columns = new ArrayList(); for (Iterator it = fields.iterator(); it.hasNext();) { FieldDescriptorDef fieldDef = (FieldDescriptorDef)it.next(); columns.add(fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_COLUMN)); } return columns; }
[ "Extracts the list of columns from the given field list.\n\n@param fields The fields\n@return The corresponding columns" ]
[ "Use this API to flush cacheobject.", "Ask the specified player for the specified waveform preview from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform preview\n\n@return the preview, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running", "Add a polygon symbolizer definition to the rule.\n\n@param styleJson The old style.", "Log a byte array.\n\n@param label label text\n@param data byte array", "Use this API to reset appfwlearningdata.", "Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for", "Convenience method for retrieving an Integer resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value", "Modify the meta-data for a photoset.\n\n@param photosetId\nThe photoset ID\n@param title\nA new title\n@param description\nA new description (can be null)\n@throws FlickrException", "Goes through the first buckets, picking out candidate records and\ntallying up their scores.\n@return the index of the first bucket we did not process" ]
private String parseMandatoryStringValue(final String path) throws Exception { final String value = parseOptionalStringValue(path); if (value == null) { throw new Exception(); } return value; }
[ "Helper to read a mandatory String value.\n@param path The XML path of the element to read.\n@return The String value stored in the XML.\n@throws Exception thrown if the value could not be read." ]
[ "Returns the plugins classpath elements.", "Sets the value to a default.", "Returns the default jdbc type for the given java type.\n\n@param javaType The qualified java type\n@return The default jdbc type", "Will spawn a thread for each type in rootEntities, they will all re-join\non endAllSignal when finished.\n\n@param backend\n\n@throws InterruptedException\nif interrupted while waiting for endAllSignal.", "Use this API to enable the feature on Netscaler.\n@param feature feature to be enabled.\n@return status of the operation performed.\n@throws Exception Nitro exception.", "Add contents to the deployment and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException", "Returns a compact representation of all of the subtasks of a task.\n\n@param task The task to get the subtasks of.\n@return Request object", "XER files can contain multiple projects when there are cross-project dependencies.\nAs the UniversalProjectReader is designed just to read a single project, we need\nto select one project from those available in the XER file.\nThe original project selected for export by the user will have its \"export flag\"\nset to true. We'll return the first project we find where the export flag is\nset to true, otherwise we'll just return the first project we find in the file.\n\n@param stream schedule data\n@return ProjectFile instance", "Returns an iterator over the items in this folder.\n\n@return an iterator over the items in this folder." ]
public ItemRequest<Workspace> addUser(String workspace) { String path = String.format("/workspaces/%s/addUser", workspace); return new ItemRequest<Workspace>(this, Workspace.class, path, "POST"); }
[ "The user can be referenced by their globally unique user ID or their email address.\nReturns the full user record for the invited user.\n\n@param workspace The workspace or organization to invite the user to.\n@return Request object" ]
[ "Gets a static resource from a plugin\n\n@param pluginName - Name of the plugin(defined in the plugin manifest)\n@param fileName - Filename to fetch\n@return byte array of the resource\n@throws Exception exception", "Reads OAuth 2.0 with JWT app configurations from the reader. The file should be in JSON format.\n\n@param reader a reader object which points to a JSON formatted configuration file\n@return a new Instance of BoxConfig\n@throws IOException when unable to access the mapping file's content of the reader", "Retrieve and validate the key from the REST request.\n\n@return true if present, false if missing", "Calculates the legend positions and which legend title should be displayed or not.\n\nImportant: the LegendBounds in the _Models should be set and correctly calculated before this\nfunction is called!\n@param _Models The graph data which should have the BaseModel class as parent class.\n@param _StartX Left starting point on the screen. Should be the absolute pixel value!\n@param _Paint The correctly set Paint which will be used for the text painting in the later process", "Checks that arguments and parameter types match.\n@param params method parameters\n@param args type arguments\n@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is\nnot of the exact type but still match", "xml -> object\n\n@param message\n@param childClass\n@return", "This method extracts resource data from a GanttProject file.\n\n@param ganttProject parent node for resources", "Encodes the given URI host with the given encoding.\n@param host the host to be encoded\n@param encoding the character encoding to encode to\n@return the encoded host\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "Set day.\n\n@param d day instance" ]
public void ojbAdd(Object anObject) { DSetEntry entry = prepareEntry(anObject); entry.setPosition(elements.size()); elements.add(entry); }
[ "add a single Object to the Collection. This method is used during reading Collection elements\nfrom the database. Thus it is is save to cast anObject to the underlying element type of the\ncollection." ]
[ "Convenience method for getting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field whose value to return.", "Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value", "Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.", "Convert a list of objects to a JSON array with the string representations of that objects.\n@param list the list of objects.\n@return the JSON array with the string representations.", "Shifts are performed based upon singular values computed previously. If it does not converge\nusing one of those singular values it uses a Wilkinson shift instead.", "Gets a list of AssignmentRows based on the current Assignments\n@return", "Whether or not points are within some threshold.\n@param point1 Point 1\n@param point2 Point 2\n@return True or false", "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", "Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source" ]
public SqlStatement getPreparedInsertStatement(ClassDescriptor cld) { SqlStatement sql; SqlForClass sfc = getSqlForClass(cld); sql = sfc.getInsertSql(); if(sql == null) { ProcedureDescriptor pd = cld.getInsertProcedure(); if(pd == null) { sql = new SqlInsertStatement(cld, logger); } else { sql = new SqlProcedureStatement(pd, logger); } // set the sql string sfc.setInsertSql(sql); if(logger.isDebugEnabled()) { logger.debug("SQL:" + sql.getStatement()); } } return sql; }
[ "generate a prepared INSERT-Statement for the Class\ndescribed by cld.\n\n@param cld the ClassDescriptor" ]
[ "Returns a vector from the PCA's basis.\n\n@param which Which component's vector is to be returned.\n@return Vector from the PCA basis.", "Determines the accessor method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name", "Hide multiple channels. All other channels will be unaffected.\n@param channels The channels to hide", "judge a->b is ordered clockwise\n\n@param center\n@param a\n@param b\n@return", "Extract name of the resource from a resource ID.\n@param id the resource ID\n@return the name of the resource", "Calls the provided metric getter on all the tracked environments and\nobtains their values\n\n@param metricGetterName\n@return", "Adds OPT_FORMAT option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Checks if a new version of the file can be uploaded with the specified name and size.\n@param name the new name for the file.\n@param fileSize the size of the new version content in bytes.\n@return whether or not the file version can be uploaded.", "Obtains a local date in Accounting calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Accounting era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Accounting local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code AccountingEra}" ]
private void validatePermissions(final File dirPath, final File file) { // Check execute and read permissions for parent dirPath if( !dirPath.canExecute() || !dirPath.canRead() ) { validFilePermissions = false; filePermissionsProblemPath = dirPath.getAbsolutePath(); return; } // Check read and write permissions for properties file if( !file.canRead() || !file.canWrite() ) { validFilePermissions = false; filePermissionsProblemPath = dirPath.getAbsolutePath(); } }
[ "This method performs a series of permissions checks given a directory and properties file path.\n\n1 - Check whether the parent directory dirPath has proper execute and read permissions\n2 - Check whether properties file path is readable and writable\n\nIf either of the permissions checks fail, update validFilePermissions and filePermissionsProblemPath\nappropriately." ]
[ "Parses a name into a Region object and creates a new Region instance if not found among the existing ones.\n\n@param name a region name\n@return the parsed or created region", "Returns the active logged in user.", "Searches the model for all variable assignments and makes a default map of those variables, setting them to \"\"\n\n@return the default variable assignment map", "Get a View that displays the data at the specified\nposition in the data set.\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", "Use this API to fetch all the gslbservice resources that are configured on netscaler.", "Use this API to add autoscaleaction.", "Validates specialization if this bean specializes another bean.", "Parses an adl source into a differential archetype.\n\n@param adl contents of an adl source file\n@return parsed archetype\n@throws org.openehr.adl.parser.AdlParserException if an error occurred while parsing", "Parses the field facet configurations.\n@param fieldFacetObject The JSON sub-node with the field facet configurations.\n@return The field facet configurations." ]
public void logError(String message, Object sender) { getEventManager().sendEvent(this, IErrorEvents.class, "onError", new Object[] { message, sender }); }
[ "Logs an error by sending an error event to all listeners.\n\nError events can be generated by any part of GearVRF,\nfrom any thread. They are always sent to the event receiver\nof the GVRContext.\n\n@param message error message\n@param sender object which had the error\n@see IErrorEvents" ]
[ "Record the checkout queue length\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param queueLength The number of entries in the \"synchronous\" checkout\nqueue.", "Add the operation at the end of Stage MODEL if this operation has not already been registered.\n\nThis operation should be added if any of the following occur: -\n- The authorization configuration is removed from a security realm.\n- The rbac provider is changed to rbac.\n- A role is removed.\n- An include is removed from a role.\n- A management interface is removed.\n\nNote: This list only includes actions that could invalidate the configuration, actions that would not invalidate the\nconfiguration do not need this operation registering. e.g. Adding a role, if the configuration was already valid this\ncould not invalidate it.\n\n@param context - The OperationContext to use to register the step.", "Set the HomeAsUpIndicator that is visible when user navigate to a fragment child\n@param indicator the resource drawable to use as indicator", "Retrieve the field location for a specific field.\n\n@param type field type\n@return field location", "Use this API to fetch all the appfwlearningdata resources that are configured on netscaler.\nThis uses appfwlearningdata_args which is a way to provide additional arguments while fetching the resources.", "Set the pattern scheme to either \"by weekday\" or \"by day of month\".\n@param isByWeekDay flag, indicating if the pattern \"by weekday\" should be set.\n@param fireChange flag, indicating if a value change event should be fired.", "Use this API to fetch the statistics of all cmppolicylabel_stats resources that are configured on netscaler.", "Read all resource assignments from a GanttProject project.\n\n@param gpProject GanttProject project", "Generate date patterns based on the project configuration.\n\n@param properties project properties\n@return date patterns" ]
public static String getPrettyMapOfContiguousPartitionRunLengths(final Cluster cluster, int zoneId) { Map<Integer, Integer> runLengthToCount = getMapOfContiguousPartitionRunLengths(cluster, zoneId); String prettyHistogram = "["; boolean first = true; Set<Integer> runLengths = new TreeSet<Integer>(runLengthToCount.keySet()); for(int runLength: runLengths) { if(first) { first = false; } else { prettyHistogram += ", "; } prettyHistogram += "{" + runLength + " : " + runLengthToCount.get(runLength) + "}"; } prettyHistogram += "]"; return prettyHistogram; }
[ "Pretty prints the output of getMapOfContiguousPartitionRunLengths\n\n@param cluster\n@param zoneId\n@return pretty string of contiguous run lengths" ]
[ "Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array.", "This method returns the value of the product using a Black-Scholes model for the swap rate with the Hunt-Kennedy convexity adjustment.\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve from which the swap rate is calculated. The discount curve, associated with this forward curve is used for discounting this option.\n@param swaprateVolatility The volatility of the log-swaprate.\n@return Value of this product", "Creates a Bytes object by copying the data of the given byte array", "Convert gallery name to title key.\n@param gallery gallery name for example \"downloadgallery\"\n@return key as string \"ERR_REASON_NO_DOWNLOADGALLERY_0\"", "Set the locking values\n@param cld\n@param obj\n@param oldLockingValues", "Exports json encoded content to CrashReport object\n\n@param json valid json body.\n@return new instance of CrashReport", "Set an enterprise cost value.\n\n@param index cost index (1-30)\n@param value cost value", "Run a query on the datastore.\n\n@return The entities returned by the query.\n@throws DatastoreException on error", "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" ]
public byte[] toArray() { if (size() > Integer.MAX_VALUE) throw new IllegalStateException("Cannot create byte array of more than 2GB"); int len = (int) size(); ByteBuffer bb = toDirectByteBuffer(0L, len); byte[] b = new byte[len]; // Copy data to the array bb.get(b, 0, len); return b; }
[ "Convert this buffer to a java array.\n@return" ]
[ "Returns a client object for a clientId\n\n@param clientId ID of client to return\n@return Client or null\n@throws Exception exception", "Assigns this retention policy to a metadata template, optionally with certain field values.\n@param templateID the ID of the metadata template to apply to.\n@param fieldFilters optional field value filters.\n@return info about the created assignment.", "Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above.", "Confirm that all nodes shared between clusters host exact same partition\nIDs and that nodes only in the super set cluster have no partition IDs.\n\n@param subsetCluster\n@param supersetCluster", "Returns a copy of this year-week with the new year and week, checking\nto see if a new object is in fact required.\n\n@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR\n@param newWeek the week to represent, validated from 1 to 53\n@return the year-week, not null", "Send a request for a menu that we will retrieve items from in subsequent requests, when the request must reflect\nthe actual type of track being asked about.\n\n@param requestType identifies what kind of menu request to send\n@param targetMenu the destination for the response to this query\n@param slot the media library of interest for this query\n@param trackType the type of track for which metadata is being requested, since this affects the request format\n@param arguments the additional arguments needed, if any, to complete the request\n\n@return the {@link Message.KnownType#MENU_AVAILABLE} response reporting how many items are available in the menu\n\n@throws IOException if there is a problem communicating, or if the requested menu is not available\n@throws IllegalStateException if {@link #tryLockingForMenuOperations(long, TimeUnit)} was not called successfully\nbefore attempting this call", "Return the number of rows affected.", "Count some stats on what occurs in a file.", "Apply the layout to the each page in the list\n@param itemLayout item layout in the page\n@return true if the new layout is applied successfully, otherwise - false" ]
public StateVertex crawlIndex() { LOG.debug("Setting up vertex of the index page"); if (basicAuthUrl != null) { browser.goToUrl(basicAuthUrl); } browser.goToUrl(url); // Run url first load plugin to clear the application state plugins.runOnUrlFirstLoadPlugins(context); plugins.runOnUrlLoadPlugins(context); StateVertex index = vertexFactory.createIndex(url.toString(), browser.getStrippedDom(), stateComparator.getStrippedDom(browser), browser); Preconditions.checkArgument(index.getId() == StateVertex.INDEX_ID, "It seems some the index state is crawled more than once."); LOG.debug("Parsing the index for candidate elements"); ImmutableList<CandidateElement> extract = candidateExtractor.extract(index); plugins.runPreStateCrawlingPlugins(context, extract, index); candidateActionCache.addActions(extract, index); return index; }
[ "This method calls the index state. It should be called once per crawl in order to setup the\ncrawl.\n\n@return The initial state." ]
[ "Cancels all the pending & running requests and releases all the dispatchers.", "Skips the stream over the specified number of bytes, adding the skipped\namount to the count.\n\n@param length the number of bytes to skip\n@return the actual number of bytes skipped\n@throws java.io.IOException if an I/O error occurs\n@see java.io.InputStream#skip(long)", "Size of a queue.\n\n@param jedis\n@param queueName\n@return", "Notifies that an existing header item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.", "Validate the Combination filter field in Multi configuration jobs", "Read a text stream into a single string.\n\n@param inputStream\nStream containing text. Will be closed on exit.\n@return The contents, or null on error.", "Executes the mojo.", "return the squared area of the triangle defined by the half edge hedge0\nand the point at the head of hedge1.\n\n@param hedge0\n@param hedge1\n@return", "Sets maintenance mode for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param enable true to enable; false to disable" ]
public <S extends AddressSegment> void getSplitSegments(S segs[], int index, AddressSegmentCreator<S> creator) { if(!isMultiple()) { int bitSizeSplit = IPv6Address.BITS_PER_SEGMENT >>> 1; Integer myPrefix = getSegmentPrefixLength(); Integer highPrefixBits = getSplitSegmentPrefix(bitSizeSplit, myPrefix, 0); Integer lowPrefixBits = getSplitSegmentPrefix(bitSizeSplit, myPrefix, 1); if(index >= 0 && index < segs.length) { segs[index] = creator.createSegment(highByte(), highPrefixBits); } if(++index >= 0 && index < segs.length) { segs[index] = creator.createSegment(lowByte(), lowPrefixBits); } } else { getSplitSegmentsMultiple(segs, index, creator); } }
[ "Converts this IPv6 address segment into smaller segments,\ncopying them into the given array starting at the given index.\n\nIf a segment does not fit into the array because the segment index in the array is out of bounds of the array,\nthen it is not copied.\n\n@param segs\n@param index" ]
[ "Use this API to link sslcertkey.", "Propagates node table of given DAG to all of it ancestors.", "Generate the next permutation and return an array containing\nthe elements in the appropriate order.\n@see #nextPermutationAsArray(Object[])\n@see #nextPermutationAsList()\n@return The next permutation as an array.", "Sanity checks the input or declares a new matrix. Return matrix is an identity matrix.", "Use this API to update csparameter.", "Use this API to add vlan resources.", "Convert the continuous values into discrete values by chopping up\nthe distribution into several equally-sized intervals.", "Use this API to fetch nstrafficdomain_binding resource of given name .", "This method extracts data for a normal working day from an MSPDI file.\n\n@param calendar Calendar data\n@param weekDay Day data" ]
public static base_response delete(nitro_service client, String domain) throws Exception { dnstxtrec deleteresource = new dnstxtrec(); deleteresource.domain = domain; return deleteresource.delete_resource(client); }
[ "Use this API to delete dnstxtrec of given name." ]
[ "Casts a ray into the scene graph, and returns the objects it intersects.\n\nThe ray is defined by its origin {@code [ox, oy, oz]} and its direction\n{@code [dx, dy, dz]}.\n\n<p>\nThe ray origin may be [0, 0, 0] and the direction components should be\nnormalized from -1 to 1: Note that the y direction runs from -1 at the\nbottom to 1 at the top. To construct a picking ray originating at the\nuser's head and pointing into the scene along the camera lookat vector,\npass in 0, 0, 0 for the origin and 0, 0, -1 for the direction.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is doing a ray cast into a particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n<p>\nDepending on the type of collider, that the hit location may not be exactly\nwhere the ray would intersect the scene object itself. Rather, it is\nwhere the ray intersects the collision geometry associated with the collider.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@param ox\nThe x coordinate of the ray origin.\n\n@param oy\nThe y coordinate of the ray origin.\n\n@param oz\nThe z coordinate of the ray origin.\n\n@param dx\nThe x vector of the ray direction.\n\n@param dy\nThe y vector of the ray direction.\n\n@param dz\nThe z vector of the ray direction.\n@return A list of {@link GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6", "Tells you if an expression is the expected constant.\n@param expression\nany expression\n@param expected\nthe expected int or String\n@return\nas described", "Use this API to fetch a vpnglobal_intranetip_binding resources.", "Return the path to the parent directory. Should return the root if\nfrom is root.\n\n@param from either a file or directory\n@return the parent directory", "Gets the global and adds it ot the BatchExecutionresults using the alternative outIdentifier.\n\n@param identifier\nThe identifier of the global\n@param outIdentifier\nThe identifier used in the ExecutionResults to store the global.\n@return", "Assign an ID value to this field.", "Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.", "Assign FK values and store entries in indirection table\nfor all objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation", "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." ]
public static void changeSign(DMatrixSparseCSC A , DMatrixSparseCSC B ) { if( A != B ) { B.copyStructure(A); } for (int i = 0; i < A.nz_length; i++) { B.nz_values[i] = -A.nz_values[i]; } }
[ "B = -A. Changes the sign of elements in A and stores it in B. A and B can be the same instance.\n\n@param A (Input) Matrix. Not modified.\n@param B (Output) Matrix. Modified." ]
[ "Add a custom query parameter to the _changes request. Useful for specifying extra parameters\nto a filter function for example.\n\n@param name the name of the query parameter\n@param value the value of the query parameter\n@return this Changes instance\n@since 2.5.0", "The nullity of the decomposed matrix.\n\n@see SingularOps_DDRM#nullity(SingularValueDecomposition_F64, double)\n\n@return The matrix's nullity", "touch event without ripple support", "Used to set the complex value of a matrix element.\n@param row The row of the element.\n@param col The column of the element.\n@param real Real component of assigned value\n@param imaginary Imaginary component of assigned value", "Returns the list of store defs as a map\n\n@param storeDefs\n@return", "Re-maps a provided collection.\n\n@param <T_Result>\ntype of result\n@param <T_Source>\ntype of source\n@param source\nfor mapping\n@param mapper\nelement mapper\n@return mapped source", "Takes a String and converts it to a Date\n\n@param dateString the date\n@return Date denoted by dateString", "Runs calls in a background thread so that the results will actually be asynchronous.\n\n@see com.google.appengine.tools.cloudstorage.RawGcsService#continueObjectCreationAsync(\ncom.google.appengine.tools.cloudstorage.RawGcsService.RawGcsCreationToken,\njava.nio.ByteBuffer, long)", "Creates a non-binary text media type with the given subtype and a specified encoding" ]
private File makeDestFile(URL src) { if (dest == null) { throw new IllegalArgumentException("Please provide a download destination"); } File destFile = dest; if (destFile.isDirectory()) { //guess name from URL String name = src.toString(); if (name.endsWith("/")) { name = name.substring(0, name.length() - 1); } name = name.substring(name.lastIndexOf('/') + 1); destFile = new File(dest, name); } else { //create destination directory File parent = destFile.getParentFile(); if (parent != null) { parent.mkdirs(); } } return destFile; }
[ "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" ]
[ "This method writes calendar data to an MSPDI file.\n\n@param project Root node of the MSPDI file", "Gets a legend graphic with the specified metadata parameters. All parameters are passed as request parameters.\n\n@param layerId\nthe layer id\n@param styleName\nthe style name\n@param ruleIndex\nthe rule index\n@param format\nthe image format ('png','jpg','gif')\n@param width\nthe graphic's width\n@param height\nthe graphic's height\n@param scale\nthe scale denominator (not supported yet)\n@param allRules\nif true the image will contain all rules stacked vertically\n@param request\nthe servlet request object\n@return the model and view\n@throws GeomajasException\nwhen a style or rule does not exist or is not renderable", "Return the value from the field in the object that is defined by this FieldType.", "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>", "Add contents to the deployment and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException", "Detects if the current device is a Nintendo game device.\n@return detection of Nintendo", "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.", "Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Random matrix", "Add network interceptor to httpClient to track download progress for\nasync requests." ]
public void bindBundleToSceneObject(GVRScriptBundle scriptBundle, GVRSceneObject rootSceneObject) throws IOException, GVRScriptException { bindHelper(scriptBundle, rootSceneObject, BIND_MASK_SCENE_OBJECTS); }
[ "Binds a script bundle to scene graph rooted at a scene object.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param rootSceneObject\nThe root of the scene object tree to which the scripts are bound.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if a script processing error occurs." ]
[ "A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged\n\nWhen using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.\n\nA custom field's `type` cannot be updated.\n\nAn enum custom field's `enum_options` cannot be updated with this endpoint. Instead see \"Work With Enum Options\" for information on how to update `enum_options`.\n\nReturns the complete updated custom field record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object", "provides a safe toString", "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", "Retrieves the index of a cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry index", "Use this API to disable snmpalarm of given name.", "Log warning for the resource at the provided address and single attribute, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param message custom error message to append\n@param attribute attribute we are warning about", "A slop is dead if the destination node or the store does not exist\nanymore on the cluster.\n\n@param slop\n@return", "Creates a converter function that converts value using a constructor that accepts a single String argument.\n\n@return A converter function or {@code null} if the given type doesn't have a public constructor that accepts\na single String argument.", "Sets the site root.\n\n@param siteRoot the site root" ]
public boolean runOnMainThreadNext(Runnable r) { assert handler != null; if (!sanityCheck("runOnMainThreadNext " + r)) { return false; } return handler.post(r); }
[ "Queues a Runnable to be run on the main thread on the next iteration of\nthe messaging loop. This is handy when code running on the main thread\nneeds to run something else on the main thread, but only after the\ncurrent code has finished executing.\n\n@param r\nThe {@link Runnable} to run on the main thread.\n@return Returns {@code true} if the Runnable was successfully placed in\nthe Looper's message queue." ]
[ "Add the set with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The set of all packages to add.", "Use this API to update aaaparameter.", "Use this API to fetch service_dospolicy_binding resources of given name .", "Removes the given row.\n\n@param row the row to remove", "Use this API to fetch hanode_routemonitor_binding resources of given name .", "Read predecessors from a Gantt Designer file.\n\n@param gantt Gantt Designer file", "Calculate the value of a digital caplet assuming the Black'76 model.\n\n@param forward The forward (spot).\n@param volatility The Black'76 volatility.\n@param periodLength The period length of the underlying forward rate.\n@param discountFactor The discount factor corresponding to the payment date (option maturity + period length).\n@param optionMaturity The option maturity\n@param optionStrike The option strike.\n@return Returns the price of a digital caplet under the Black'76 model", "Reads next frame image.", "Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException" ]
public static long getGcTimestamp(String zookeepers) { ZooKeeper zk = null; try { zk = new ZooKeeper(zookeepers, 30000, null); // wait until zookeeper is connected long start = System.currentTimeMillis(); while (!zk.getState().isConnected() && System.currentTimeMillis() - start < 30000) { Uninterruptibles.sleepUninterruptibly(10, TimeUnit.MILLISECONDS); } byte[] d = zk.getData(ZookeeperPath.ORACLE_GC_TIMESTAMP, false, null); return LongUtil.fromByteArray(d); } catch (KeeperException | InterruptedException | IOException e) { log.warn("Failed to get oldest timestamp of Oracle from Zookeeper", e); return OLDEST_POSSIBLE; } finally { if (zk != null) { try { zk.close(); } catch (InterruptedException e) { log.error("Failed to close zookeeper client", e); } } } }
[ "Retrieves the GC timestamp, set by the Oracle, from zookeeper\n\n@param zookeepers Zookeeper connection string\n@return Oldest active timestamp or oldest possible ts (-1) if not found" ]
[ "Over simplistic helper to compare two strings to check radio buttons.\n\n@param value1 the first value\n@param value2 the second value\n@return \"checked\" if both values are equal, the empty String \"\" otherwise", "Analyses the content of the general section of an ini configuration file\nand fills out the class arguments with this data.\n\n@param section\n{@link Section} with name \"general\"", "Get a message bundle of the given type.\n\n@param type the bundle type class\n\n@return the bundle", "Use this API to delete appfwjsoncontenttype of given name.", "First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe error\n@param errorMessage\nthe error message\n@param stackTrace\nthe stack trace\n@param statusCode\nthe status code\n@param statusCodeInt\nthe status code int", "Sets the specified float 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", "Generate a string with all selected checkboxes separated with ','.\n\n@return a string with all selected checkboxes", "Create a new Time, with no date component.", "The parameter 'project' is not used at the moment, but will be used once schema and plugin support lands." ]
public boolean load(GVRScene scene) { GVRAssetLoader loader = getGVRContext().getAssetLoader(); if (scene == null) { scene = getGVRContext().getMainScene(); } if (mReplaceScene) { loader.loadScene(getOwnerObject(), mVolume, mImportSettings, scene, null); } else { loader.loadModel(getOwnerObject(), mVolume, mImportSettings, scene); } return true; }
[ "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 scene will 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 event listener on the context.\n\n@param scene scene to add the model to, null is permissible\n@return always true" ]
[ "Helper function to bind script bundler to various targets", "Accessor method used to retrieve a Float object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Use this API to fetch a appfwglobal_auditnslogpolicy_binding resources.", "Process a beat packet, potentially updating the master tempo and sending our listeners a master\nbeat notification. Does nothing if we are not active.", "Removes a value from the list box. Nothing is done if the value isn't on\nthe list box.\n\n@param value the value to be removed from the list\n@param reload perform a 'material select' reload to update the DOM.", "Creates a new child folder inside this folder.\n\n@param name the new folder's name.\n@return the created folder's info.", "Returns an array of non null elements from the source array.\n\n@param tArray the source array\n@return the array", "Converts an image in RGB mode to BINARY mode\n\n@param img image\n@param threshold grays cale threshold\n@return new MarvinImage instance in BINARY mode", "Declares additional internal data structures." ]
public static base_response delete(nitro_service client, String ipv6prefix) throws Exception { onlinkipv6prefix deleteresource = new onlinkipv6prefix(); deleteresource.ipv6prefix = ipv6prefix; return deleteresource.delete_resource(client); }
[ "Use this API to delete onlinkipv6prefix of given name." ]
[ "Configures the player whose current track waveforms and status will automatically be reflected. Whenever a new\ntrack is loaded on that player, the waveform and metadata will be updated, and the current playback position and\nstate of the player will be reflected by the component.\n\n@param player the player number to monitor, or zero if monitoring should stop", "Updates the file metadata.\n\n@param metadata the new metadata values.\n@return the metadata returned from the server.", "Returns an integer array that contains the current values for all the\ntexture parameters.\n\n@return an integer array that contains the current values for all the\ntexture parameters.", "Processes graphical indicator definitions for each column.", "Sets the highlight strength for the InnerPaddingOutline.\n\n@param _highlightStrength The highlighting value for the outline.", "Use this API to fetch authenticationvserver_authenticationlocalpolicy_binding resources of given name .", "Pops the top of the stack of active elements if the current position in the call stack corresponds to the one\nthat pushed the active elements.\n\n<p>This method does not do any type checks, so take care to retrieve the elements with the same types used to push\nto them onto the stack.\n\n@param <T> the type of the elements\n\n@return the active elements or null if the current call stack did not push any active elements onto the stack", "Translate a path that has previously been unescaped and unquoted.\nThat is called at command execution when the calue is retrieved prior to be\nused as ModelNode value.\n@param path The unquoted, unescaped path.\n@return A path with ~ and default dir expanded.", "Gets the status text from given session.\n\n@param lastActivity miliseconds since last activity\n@return status string" ]
public Date getDate(String path) throws ParseException { return BoxDateFormat.parse(this.getValue(path).asString()); }
[ "Get a value from a date metadata field.\n@param path the key path in the metadata object. Must be prefixed with a \"/\".\n@return the metadata value as a Date.\n@throws ParseException when the value cannot be parsed as a valid date" ]
[ "Operations to do after all subthreads finished their work on index\n\n@param backend", "Creates the name of the .story file to be wrote with the testcase. The\nname of the scenario must be given with spaces.\n\n@param scenarioName\n- The scenario name, with spaces\n@return the .story file name.", "Modify a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@param isDirectory whether the file is a directory or not\n@return the builder", "We have a directory. Determine if this contains a multi-file database we understand, if so\nprocess it. If it does not contain a database, test each file within the directory\nstructure to determine if it contains a file whose format we understand.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null", "You can register styles object for later reference them directly. Parent\nstyles should be registered this way\n\n@param style\n@return\n@throws DJBuilderException", "Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder", "Skip to the next matching short value.\n\n@param buffer input data array\n@param offset start offset into the input array\n@param value value to match\n@return offset of matching pattern", "Use this API to add inat resources.", "Add the dependencies if the deployment contains a service activator loader entry.\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException" ]
public void setRGB(int red, int green, int blue) throws Exception { CmsColor color = new CmsColor(); color.setRGB(red, green, blue); m_red = red; m_green = green; m_blue = blue; m_hue = color.getHue(); m_saturation = color.getSaturation(); m_brightness = color.getValue(); m_tbRed.setText(Integer.toString(m_red)); m_tbGreen.setText(Integer.toString(m_green)); m_tbBlue.setText(Integer.toString(m_blue)); m_tbHue.setText(Integer.toString(m_hue)); m_tbSaturation.setText(Integer.toString(m_saturation)); m_tbBrightness.setText(Integer.toString(m_brightness)); m_tbHexColor.setText(color.getHex()); setPreview(color.getHex()); updateSliders(); }
[ "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." ]
[ "Detect what has changed in the store definition and rewire BDB\nenvironments accordingly.\n\n@param storeDef updated store definition", "Executes the sequence of operations", "Will start the HiveServer.\n\n@param testConfig Specific test case properties. Will be merged with the HiveConf of the context\n@param hiveVars HiveVars to pass on to the HiveServer for this session", "Computes the d and H parameters.\n\nd = J'*(f(x)-y) <--- that's also the gradient\nH = J'*J", "Gets the explorer file entry options.\n\n@return the explorer file entry options", "Tests if this partition has hit a threshold and signal to the pool watch thread to create new connections\n@param connectionPartition to test for.", "Read the metadata from a hadoop SequenceFile\n\n@param fs The filesystem to read from\n@param path The file to read from\n@return The metadata from this file", "Conditionally read a nested table based in the value of a boolean flag which precedes the table data.\n\n@param readerClass reader class\n@return table rows or empty list if table not present", "Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String" ]
private void addChildrenForGroupsNode(I_CmsOuTreeType type, String ouItem) { try { // Cut of type-specific prefix from ouItem with substring() List<CmsGroup> groups = m_app.readGroupsForOu(m_cms, ouItem.substring(1), type, false); for (CmsGroup group : groups) { Pair<String, CmsUUID> key = Pair.of(type.getId(), group.getId()); Item groupItem = m_treeContainer.addItem(key); if (groupItem == null) { groupItem = getItem(key); } groupItem.getItemProperty(PROP_SID).setValue(group.getId()); groupItem.getItemProperty(PROP_NAME).setValue(getIconCaptionHTML(group, CmsOuTreeType.GROUP)); groupItem.getItemProperty(PROP_TYPE).setValue(type); setChildrenAllowed(key, false); m_treeContainer.setParent(key, ouItem); } } catch (CmsException e) { LOG.error("Can not read group", e); } }
[ "Add groups for given group parent item.\n\n@param type the tree type\n@param ouItem group parent item" ]
[ "a simple contains helper method, checks if array contains a numToCheck\n\n@param array array of ints\n@param numToCheck value to find\n@return True if found, false otherwise", "Here the lambda in the implicit step is determined dynamically. At first\nit selects zeros to quickly reveal singular values that are zero or close to zero.\nThen it computes it using a Wilkinson shift.", "Prep for a new connection\n@return if stats are enabled, return the nanoTime when this connection was requested.\n@throws SQLException", "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", "Start the operation by instantiating the first job instance in a separate Thread.\n\n@param arguments {@inheritDoc}", "Starts advertising on Hyperbahn at a fixed interval.\n\n@return a future that resolves to the response of the first advertise request", "Internal utility to help JNI add hit objects to the pick list. Specifically for MeshColliders with picking\nfor UV, Barycentric, and normal coordinates enabled", "Return a set of all the Declaration matching the DeclarationFilter of the.\nLinker.\n\n@return a set of all the Declaration matching the DeclarationFilter of the\nLinker.", "Set a knot blend type.\n@param n the knot index\n@param type the knot blend type\n@see #getKnotBlend" ]
public final void notifyContentItemRemoved(int position) { if (position < 0 || position >= contentItemCount) { throw new IndexOutOfBoundsException("The given position " + position + " is not within the position bounds for content items [0 - " + (contentItemCount - 1) + "]."); } notifyItemRemoved(position + headerItemCount); }
[ "Notifies that a content item is removed.\n\n@param position the position." ]
[ "Added in Gerrit 2.11.", "Removes all items from the list box.", "Utility function that fetches system store definitions\n\n@return The map container that maps store names to store definitions", "Encode a path in a manner suitable for a GET request\n@param in The path to encode, eg \"a/document\"\n@return The encoded path eg \"a%2Fdocument\"", "Returns a reference definition of the given name if it exists.\n\n@param name The name of the reference\n@return The reference def or <code>null</code> if there is no such reference", "Execute our refresh query statement and then update all of the fields in data with the fields from the result.\n\n@return 1 if we found the object in the table by id or 0 if not.", "Convert a Java String instance into the equivalent array of single or\ndouble bytes.\n\n@param value Java String instance representing text\n@param unicode true if double byte characters are required\n@return byte array representing the supplied text", "helper extracts the cursor data from the db object", "This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments." ]
public Response getTemplate(String id) throws RequestException, LocalOperationException { Request request = new Request(this); return new Response(request.get("/templates/" + id)); }
[ "Returns a single template.\n\n@param id id of the template to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations." ]
[ "B = -A. Changes the sign of elements in A and stores it in B. A and B can be the same instance.\n\n@param A (Input) Matrix. Not modified.\n@param B (Output) Matrix. Modified.", "Merges this with the list of sections to produce the smallest array of sequential block subnets, going from smallest to largest\n\n@param sections the sections to merge with this\n@return", "Helper for parsing properties\n@param p The properties object\n@param key The key to retrieve\n@param defaultValue The default value if the key does not exist\n@param used The set of keys we have seen\n@return The value of the property at the key", "return a prepared Insert Statement fitting for the given ClassDescriptor", "Adds a new floating point variable. If one already has the same name it is written over.\n@param value Value of the number\n@param name Name in code", "below is testing code", "Gets id of a property and creates the new one if necessary.\n\n@param txn transaction\n@param propertyName name of the property.\n@param allowCreate if set to true and if there is no property named as propertyName,\ncreate the new id for the propertyName.\n@return < 0 if there is no such property and create=false, else id of the property", "Deletes an object from the database.\nIt must be executed in the context of an open transaction.\nIf the object is not persistent, then ObjectNotPersistent is thrown.\nIf the transaction in which this method is executed commits,\nthen the object is removed from the database.\nIf the transaction aborts,\nthen the deletePersistent operation is considered not to have been executed,\nand the target object is again in the database.\n@param\tobject\tThe object to delete.", "Retrieves the members of the type and of its super types.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the MembersInclSupertypes attribute\n@param paramValue The feature to be added to the MembersInclSupertypes attribute\n@throws XDocletException If an error occurs" ]
public static int cudnnActivationForward( cudnnHandle handle, cudnnActivationDescriptor activationDesc, Pointer alpha, cudnnTensorDescriptor xDesc, Pointer x, Pointer beta, cudnnTensorDescriptor yDesc, Pointer y) { return checkResult(cudnnActivationForwardNative(handle, activationDesc, alpha, xDesc, x, beta, yDesc, y)); }
[ "Function to perform forward activation" ]
[ "Do not call directly.\n@deprecated", "Deal with streams attached to an operation response from a proxied domain process.\n\n@param context the context of the operation\n@param responseNode the DMR response from the proxied process\n@param streams the streams associated with the response", "Join N sets.", "Are we running in Jetty with JMX enabled?", "Record a content loader for a given patch id.\n\n@param patchID the patch id\n@param contentLoader the content loader", "Writes data to delegate stream if it has been set.\n\n@param data the data to write", "Look for the closing parenthesis corresponding to the one at position\nrepresented by the opening index.\n\n@param text input expression\n@param opening opening parenthesis index\n@return closing parenthesis index", "Verifies if the new value is different from the field's old value. It's\nuseful, for example, in NoSQL databases that replicates data between\nservers. This verification prevents to mark a field as modified and to be\nreplicated needlessly.\n\n@param field\nthe field that we are checking before to be modified\n@param value\nthe new value\n@return true if the new and the old values are different and the value\nwas changed.", "Use this API to fetch csvserver_cspolicy_binding resources of given name ." ]
public void removeAt(int index) { synchronized (mLock) { if (mOriginalValues != null) { mOriginalValues.remove(index); } else { mObjects.remove(index); } } if (mNotifyOnChange) notifyDataSetChanged(); }
[ "Removes the specified object in index from the array.\n\n@param index The index to remove." ]
[ "Deletes a user from an enterprise account.\n@param notifyUser whether or not to send an email notification to the user that their account has been deleted.\n@param force whether or not this user should be deleted even if they still own files.", "Validations specific to GET and GET ALL", "Logic for timestamp\n@param time Epoch date of creation\n@return String timestamp", "Adds to this set all of the elements in the specified members array\n@param members the members to add\n@return the number of members actually added", "Dumps a single material property to stdout.\n\n@param property the property", "Parses a type annotation table to find the labels, and to visit the try\ncatch block annotations.\n\n@param u\nthe start offset of a type annotation table.\n@param mv\nthe method visitor to be used to visit the try catch block\nannotations.\n@param context\ninformation about the class being parsed.\n@param visible\nif the type annotation table to parse contains runtime visible\nannotations.\n@return the start offset of each type annotation in the parsed table.", "end AnchorImplementation class", "This method is used to change the credentials of CleverTap account Id and token programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token", "Register the given mbean with the server\n\n@param server The server to register with\n@param mbean The mbean to register\n@param name The name to register under" ]
public boolean matches(Property property) { return property.getName().equals(key) && (value == WILDCARD_VALUE || property.getValue().asString().equals(value)); }
[ "Determine whether the given property matches this element.\nA property matches this element when property name and this key are equal,\nvalues are equal or this element value is a wildcard.\n@param property the property to check\n@return {@code true} if the property matches" ]
[ "Sets the left padding for all cells in the row.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining", "Use this API to fetch cmppolicylabel_cmppolicy_binding resources of given name .", "Use this API to update rnatparam.", "Split an artifact gavc to get the groupId\n@param gavc\n@return String", "Legacy conversion.\n@param map\n@return Properties", "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", "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", "Returns a valid DisplayMetrics object\n\n@param context valid context\n@return DisplayMetrics object", "Returns the object pointed by the result-type parameter \"parameters\"\n@param _invocation\n@return" ]
public String getUniqueFilename(String baseFileName, String extension, boolean cleanBaseFileName, String... ancestorFolders) { if (cleanBaseFileName) { baseFileName = PathUtil.cleanFileName(baseFileName); } if (ancestorFolders != null) { Path pathToFile = Paths.get("", Stream.of(ancestorFolders).map(ancestor -> PathUtil.cleanFileName(ancestor)).toArray(String[]::new)).resolve(baseFileName); baseFileName = pathToFile.toString(); } String filename = baseFileName + "." + extension; // FIXME this looks nasty while (usedFilenames.contains(filename)) { filename = baseFileName + "." + index.getAndIncrement() + "." + extension; } usedFilenames.add(filename); return filename; }
[ "Returns a unique file name\n@param baseFileName the requested base name for the file\n@param extension the requested extension for the file\n@param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (i.e. 'jboss-web' should not be cleaned to avoid '-' to become '_')\n@param ancestorFolders specify the ancestor folders for the file (if there's no ancestor folder, just pass 'null' value)\n@return a String representing the unique file generated" ]
[ "Given the byte buffer containing album art, build an actual image from it for easy rendering.\n\n@return the newly-created image, ready to be drawn", "Remove the set of partitions from the node provided\n\n@param node The node from which we're removing the partitions\n@param donatedPartitions The list of partitions to remove\n@return The new node without the partitions", "Parses command line arguments.\n\n@param args\nArray of arguments, like the ones provided by\n{@code void main(String[] args)}\n@param objs\nOne or more objects with annotated public fields.\n@return A {@code List} containing all unparsed arguments (i.e. arguments\nthat are no switches)\n@throws IOException\nif a parsing error occurred.\n@see CmdArgument", "Given the initial and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@param filePrefix String to prepend to the initial & final cluster\nmetadata files\n@throws IOException", "Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs", "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", "Adds a new point.\n\n@param point a point\n@return this for chaining", "Gets the currency codes, or the regular expression to select codes.\n\n@return the query for chaining.", "Throws if the given file is null, is not a file or directory, or is an empty directory." ]
public static long makeReasonable(long expectedTimeoutMillis, long bufferMillis) { checkArgument(expectedTimeoutMillis > 0, "expectedTimeoutMillis: %s (expected: > 0)", expectedTimeoutMillis); checkArgument(bufferMillis >= 0, "bufferMillis: %s (expected: > 0)", bufferMillis); final long timeout = Math.min(expectedTimeoutMillis, MAX_MILLIS); if (bufferMillis == 0) { return timeout; } if (timeout > MAX_MILLIS - bufferMillis) { return MAX_MILLIS; } else { return bufferMillis + timeout; } }
[ "Returns a reasonable timeout duration for a watch request.\n\n@param expectedTimeoutMillis timeout duration that a user wants to use, in milliseconds\n@param bufferMillis buffer duration which needs to be added, in milliseconds\n@return timeout duration in milliseconds, between the specified {@code bufferMillis} and\nthe {@link #MAX_MILLIS}." ]
[ "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", "Use this API to flush cacheobject.", "Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}.", "Used to add working hours to the calendar. Note that the MPX file\ndefinition allows a maximum of 7 calendar hours records to be added to\na single calendar.\n\n@param day day number\n@return new ProjectCalendarHours instance", "This method extracts a portion of a byte array and writes it into\nanother byte array.\n\n@param data Source data\n@param offset Offset into source data\n@param size Required size to be extracted from the source data\n@param buffer Destination buffer\n@param bufferOffset Offset into destination buffer", "Convert an Integer value into a String.\n\n@param value Integer value\n@return String value", "Uploads bytes to an open upload session.\n@param data data\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.", "Reads non outline code custom field values and populates container.", "Check if the current version match the last release or the last snapshot one\n\n@param artifact\n@return boolean" ]
public int getCurrentMethodOrdinal(int overrideId, int pathId, String clientUUID, String[] filters) throws Exception { int currentOrdinal = 0; List<EnabledEndpoint> enabledEndpoints = getEnabledEndpoints(pathId, clientUUID, filters); for (EnabledEndpoint enabledEndpoint : enabledEndpoints) { if (enabledEndpoint.getOverrideId() == overrideId) { currentOrdinal++; } } return currentOrdinal; }
[ "Get the ordinal value for the last of a particular override on a path\n\n@param overrideId Id of the override to check\n@param pathId Path the override is on\n@param clientUUID UUID of the client\n@param filters If supplied, only endpoints ending with values in filters are returned\n@return The integer ordinal\n@throws Exception" ]
[ "We need to distinguish the case where we're newly available and the case\nwhere we're already available. So we check the node status before we\nupdate it and return it to the caller.\n\n@param isAvailable True to set to available, false to make unavailable\n\n@return Previous value of isAvailable", "In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config", "Restores a trashed folder back to its original location.\n@param folderID the ID of the trashed folder.\n@return info about the restored folder.", "Adds a handler for a mouse type event on the map.\n\n@param obj The object that the event should be registered on.\n@param type Type of the event to register against.\n@param h Handler that will be called when the event occurs.", "Processes the template for all column definitions of the current table.\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\"", "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", "Checks to see if all the provided matrices are the expected size for an SVD. If an error is encountered\nthen an exception is thrown. This automatically handles compact and non-compact formats", "Use this API to fetch rewritepolicylabel_rewritepolicy_binding resources of given name .", "Reads GIF image from stream.\n\n@param is containing GIF file.\n@return read status code (0 = no errors)." ]
public static Observable<Void> mapToVoid(Observable<?> fromObservable) { if (fromObservable != null) { return fromObservable.subscribeOn(Schedulers.io()) .map(new RXMapper<Void>()); } else { return Observable.empty(); } }
[ "Shortcut for mapping an arbitrary observable to void, using the IO scheduler.\n@param fromObservable the source observable\n@return a void-emitting observable" ]
[ "Start the timer.", "adds a FIELDDESCRIPTOR to this ClassDescriptor.\n@param fld", "Quits server by closing server socket and closing client socket handlers.", "Return a new File object based on the baseDir and the segments.\n\nThis method does not perform any operation on the file system.", "Gets all pending collaboration invites for the current user.\n\n@param api the API connection to use.\n@return a collection of pending collaboration infos.", "If status is in failed state then throw CloudException.", "The default field facets.\n\n@param categoryConjunction flag, indicating if category selections in the facet should be \"AND\" combined.\n@return the default field facets.", "Checks the preconditions for creating a new RequireSubStr processor with a List of Strings.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif requiredSubStrings or one of its elements is null\n@throws IllegalArgumentException\nif requiredSubStrings is empty", "Shows the given step.\n\n@param step the step" ]
public boolean verify(String signatureVersion, String signatureAlgorithm, String primarySignature, String secondarySignature, String webHookPayload, String deliveryTimestamp) { // enforce versions supported by this implementation if (!SUPPORTED_VERSIONS.contains(signatureVersion)) { return false; } // enforce algorithms supported by this implementation BoxSignatureAlgorithm algorithm = BoxSignatureAlgorithm.byName(signatureAlgorithm); if (!SUPPORTED_ALGORITHMS.contains(algorithm)) { return false; } // check primary key signature if primary key exists if (this.primarySignatureKey != null && this.verify(this.primarySignatureKey, algorithm, primarySignature, webHookPayload, deliveryTimestamp)) { return true; } // check secondary key signature if secondary key exists if (this.secondarySignatureKey != null && this.verify(this.secondarySignatureKey, algorithm, secondarySignature, webHookPayload, deliveryTimestamp)) { return true; } // default strategy is false, to minimize security issues return false; }
[ "Verifies given web-hook information.\n\n@param signatureVersion\nsignature version received from web-hook\n@param signatureAlgorithm\nsignature algorithm received from web-hook\n@param primarySignature\nprimary signature received from web-hook\n@param secondarySignature\nsecondary signature received from web-hook\n@param webHookPayload\npayload of web-hook\n@param deliveryTimestamp\ndevilery timestamp received from web-hook\n@return true, if given payload is successfully verified against primary and secondary signatures, false otherwise" ]
[ "Create a single node representing an embedded element.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}\n@return the corresponding node;", "Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern", "Use this API to enable nsacl6 of given name.", "Internal method used to retrieve a byte array from one\nor more embedded data blocks. Consecutive data blocks may\nneed to be concatenated by this method in order to retrieve\nthe complete set of data.\n\n@param blocks list of data blocks\n@param length expected length of the data\n@return byte array", "Use this API to delete ntpserver resources.", "Print out the configuration that the client needs to make a request.\n\n@param json the output writer.\n@throws JSONException", "Build the crosstab. Throws LayoutException if anything is wrong\n@return", "Returns the most likely class for the word at the given position.", "Restores a saved connection state into this BoxAPIConnection.\n\n@see #save\n@param state the saved state that was created with {@link #save}." ]
public Request option(String key, Object value) { this.options.put(key, value); return this; }
[ "Sets a client option per-request\n\n@param key Option name\n@param value Option value\n@return The request itself" ]
[ "Create the function. Be sure to handle all possible input types and combinations correctly and provide\nmeaningful error messages. The output matrix should be resized to fit the inputs.", "Remove all controllers but leave input manager running.\n@return number of controllers removed", "Load the available layers.\n\n@param image the installed image\n@param productConfig the product config to establish the identity\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the layers\n@throws IOException", "get the TypeArgSignature corresponding to given type\n\n@param type\n@return", "Get the current stack trace element, skipping anything from known logging classes.\n@return The current stack trace for this thread", "Use this API to delete dnsaaaarec.", "end AnchorImplementation class", "Harvest any values that may have been returned during the execution\nof a procedure.\n\n@param proc the procedure descriptor that provides info about the procedure\nthat was invoked.\n@param obj the object that was persisted\n@param stmt the statement that was used to persist the object.\n\n@throws PersistenceBrokerSQLException if a problem occurs.", "Show only the given channel.\n@param channels The channels to show" ]
public void validateOperations(final List<ModelNode> operations) { if (operations == null) { return; } for (ModelNode operation : operations) { try { validateOperation(operation); } catch (RuntimeException e) { if (exitOnError) { throw e; } else { System.out.println("---- Operation validation error:"); System.out.println(e.getMessage()); } } } }
[ "Validates operations against their description providers\n\n@param operations The operations to validate\n@throws IllegalArgumentException if any operation is not valid" ]
[ "Builds the resource.\n\n@return the cms resource", "Emit a string event with parameters.\n\nThis will invoke all {@link SimpleEventListener} bound to the specified\nstring value given the listeners has the matching argument list.\n\nFor example, suppose we have the following simple event listener methods:\n\n```java\n{@literal @}On(\"USER-LOGIN\")\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}On(\"USER-LOGIN\")\npublic void checkDuplicateLoginAttempts(User user, Object... args) {...}\n\n{@literal @}On(\"USER-LOGIN\")\npublic void foo(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` and `checkDuplicateLoginAttempts` methods:\n\n```java\nUser user = ...;\neventBus.emit(\"USER-LOGIN\", user, System.currentTimeMills());\n```\n\nThe `foo(User)` will not invoked because:\n\n* The parameter list `(User, long)` does not match the declared argument list `(User)`.\nHere the `String` in the parameter list is taken out because it is used to indicate\nthe event, instead of being passing through to the event handler method.\n* The method `checkDuplicateLoginAttempts(User, Object ...)` will be invoked because\nit declares a varargs typed arguments, meaning it matches any parameters passed in.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener", "Sets the set of site filters based on the given string.\n\n@param filters\ncomma-separates list of site keys, or \"-\" to filter all site\nlinks", "Use this API to unset the properties of gslbsite resources.\nProperties that need to be unset are specified in args array.", "Process task dependencies.", "Returns the configured extra parameters that should be given to Solr, or the empty string if no parameters are configured.\n@return The configured extra parameters that should be given to Solr, or the empty string if no parameters are configured.", "Changes to a new sub-view and stores a report to be displayed by that subview.<p<\n\n@param newState the new state\n@param thread the report thread which should be displayed in the sub view\n@param label the label to display for the report", "Change contrast of the image\n\n@param contrast default is 0, pos values increase contrast, neg. values decrease contrast", "Reads the bundle descriptor, sets m_desc and m_descContent.\n@throws CmsXmlException thrown when unmarshalling fails.\n@throws CmsException thrown when reading the resource fails or several bundle descriptors for the bundle exist." ]
public void register(Delta delta) { final IResourceDescription newDesc = delta.getNew(); if (newDesc == null) { removeDescription(delta.getUri()); } else { addDescription(delta.getUri(), newDesc); } }
[ "Put a new resource description into the index, or remove one if the delta has no new description. A delta for a\nparticular URI may be registered more than once; overwriting any earlier registration.\n\n@param delta\nThe resource change.\n@since 2.9" ]
[ "Generates a module regarding the parameters.\n\n@param name String\n@param version String\n@return Module", "Exchanges the initial fully-formed messages which establishes the transaction context for queries to\nthe dbserver.\n\n@throws IOException if there is a problem during the exchange", "Creates custom Http Client connection pool to be used by Http Client\n\n@return {@link PoolingHttpClientConnectionManager}", "Loads a classifier from the file specified by loadPath. If loadPath ends in\n.gz, uses a GZIPInputStream, else uses a regular FileInputStream.", "Visit an open package of the current module.\n\n@param packaze the qualified name of the opened package.\n@param access the access flag of the opened package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can use deep\nreflection to the classes of the open package or\n<tt>null</tt>.", "Stops the compressor.", "Configs created by this ConfigBuilder will use the given Redis sentinels.\n\n@param sentinels the Redis set of sentinels\n@return this ConfigBuilder", "Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder", "Return the index associated to the Renderer.\n\n@param renderer used to search in the prototypes collection.\n@return the prototype index associated to the renderer passed as argument." ]
private void processPredecessors(Gantt gantt) { for (Gantt.Tasks.Task ganttTask : gantt.getTasks().getTask()) { String predecessors = ganttTask.getP(); if (predecessors != null && !predecessors.isEmpty()) { String wbs = ganttTask.getID(); Task task = m_taskMap.get(wbs); for (String predecessor : predecessors.split(";")) { Task predecessorTask = m_projectFile.getTaskByID(Integer.valueOf(predecessor)); task.addPredecessor(predecessorTask, RelationType.FINISH_START, ganttTask.getL()); } } } }
[ "Read predecessors from a Gantt Designer file.\n\n@param gantt Gantt Designer file" ]
[ "Initialize elements of the panel displayed for the deactivated widget.", "Use this API to update autoscaleaction resources.", "This private method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions. It assumes\nthat the caller has already calculated the day of the week on which\nthe given day falls.\n\n@param date Date to be tested\n@param day Day of the week for the date under test\n@return boolean flag", "Creates a new ServerDetails object for resolver, this will take URL and name from the deployer ServerDetails as a default behaviour", "Serializes any char sequence and writes it into specified buffer.", "Counts the number of elements in A which are not zero.\n@param A A matrix\n@return number of non-zero elements", "required for rest assured base URI configuration.", "Detects if the current device is a Nintendo game device.\n@return detection of Nintendo", "Set up the services to create a channel listener and operation handler service.\n@param serviceTarget the service target to install the services into\n@param endpointName the endpoint name to install the services into\n@param channelName the name of the channel\n@param executorServiceName service name of the executor service to use in the operation handler service\n@param scheduledExecutorServiceName service name of the scheduled executor service to use in the operation handler service" ]
private void processRedirect(String stringStatusCode, HttpMethod httpMethodProxyRequest, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { // Check if the proxy response is a redirect // The following code is adapted from // org.tigris.noodle.filters.CheckForRedirect // Hooray for open source software String stringLocation = httpMethodProxyRequest.getResponseHeader(STRING_LOCATION_HEADER).getValue(); if (stringLocation == null) { throw new ServletException("Received status code: " + stringStatusCode + " but no " + STRING_LOCATION_HEADER + " header was found in the response"); } // Modify the redirect to go to this proxy servlet rather than the proxied host String stringMyHostName = httpServletRequest.getServerName(); if (httpServletRequest.getServerPort() != 80) { stringMyHostName += ":" + httpServletRequest.getServerPort(); } stringMyHostName += httpServletRequest.getContextPath(); httpServletResponse.sendRedirect(stringLocation.replace( getProxyHostAndPort() + this.getProxyPath(), stringMyHostName)); }
[ "Execute a redirected request\n\n@param stringStatusCode\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@throws Exception" ]
[ "Creates the server bootstrap.", "Check position type.\n\n@param type the type\n@return the boolean", "Use this API to reset Interface resources.", "Cancel on target hosts.\n\n@param targetHosts\nthe target hosts\n@return true, if successful", "Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record", "Build control archive of the deb\n\n@param packageControlFile the package control file\n@param controlFiles the other control information files (maintainer scripts, etc)\n@param dataSize the size of the installed package\n@param checksums the md5 checksums of the files in the data archive\n@param output\n@return\n@throws java.io.FileNotFoundException\n@throws java.io.IOException\n@throws java.text.ParseException", "Use this API to unset the properties of coparameter resource.\nProperties that need to be unset are specified in args array.", "Calculates the maximum text height which is possible based on the used Paint and its settings.\n\n@param _Paint Paint object which will be used to display a text.\n@param _Text The text which should be measured. If null, a default text is chosen, which\nhas a maximum possible height\n@return Maximum text height in px.", "Get transformer to use.\n\n@return transformation to apply" ]
public static Object parsePrimitive( final String fieldName, final PrimitiveAttribute<?> pAtt, final PObject requestData) { Class<?> valueClass = pAtt.getValueClass(); Object value; try { value = parseValue(false, new String[0], valueClass, fieldName, requestData); } catch (UnsupportedTypeException e) { String type = e.type.getName(); if (e.type.isArray()) { type = e.type.getComponentType().getName() + "[]"; } throw new RuntimeException( "The type '" + type + "' is not a supported type when parsing json. " + "See documentation for supported types.\n\nUnsupported type found in attribute " + fieldName + "\n\nTo support more types add the type to " + "parseValue and parseArrayValue in this class and add a test to the test class", e); } pAtt.validateValue(value); return value; }
[ "Get the value of a primitive type from the request data.\n\n@param fieldName the name of the attribute to get from the request data.\n@param pAtt the primitive attribute.\n@param requestData the data to retrieve the value from." ]
[ "Joins the individual WBS elements to make the formated value.\n\n@param length number of elements to join\n@return formatted WBS value", "Tests whether a Row name occurs more than once in the list of rows\n@param name\n@return", "Returns a new instance of the given class using the constructor with the specified parameter.\n\n@param target The class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance", "Checks that given directory if readable & writable and prints a warning if the check fails. Warning is only\nprinted once and is not repeated until the condition is fixed and broken again.\n\n@param directory deployment directory\n@return does given directory exist and is readable and writable?", "Use this API to delete ntpserver of given name.", "Used by TracedParallelBatch where its used to wrap a TraceContext and puts it in the\nregistry for the forked execution. This is marked deprecated as we prefer not to\nexpose details of the RatpackCurrentTraceContext implementation.\n\n@param traceContext a trace context.\n@return a holder for the trace context, which can be put into the registry.", "Invoked when an action occurs.", "Load the view port execution.\n\n@param then callback when the view port is detected.\n@param fallback fallback when no view port detected or failure to detect the given\n{@link Boundary} (using {@link #propagateFallback(boolean)})", "Use this API to update snmpalarm." ]
protected boolean executeOperation(final TransactionalProtocolClient.TransactionalOperationListener<ServerOperation> listener, TransactionalProtocolClient client, final ServerIdentity identity, final ModelNode operation, final OperationResultTransformer transformer) { if(client == null) { return false; } final OperationMessageHandler messageHandler = new DelegatingMessageHandler(context); final OperationAttachments operationAttachments = new DelegatingOperationAttachments(context); final ServerOperation serverOperation = new ServerOperation(identity, operation, messageHandler, operationAttachments, transformer); try { DomainControllerLogger.HOST_CONTROLLER_LOGGER.tracef("Sending %s to %s", operation, identity); final Future<OperationResponse> result = client.execute(listener, serverOperation); recordExecutedRequest(new ExecutedServerRequest(identity, result, transformer)); } catch (IOException e) { final TransactionalProtocolClient.PreparedOperation<ServerOperation> result = BlockingQueueOperationListener.FailedOperation.create(serverOperation, e); listener.operationPrepared(result); recordExecutedRequest(new ExecutedServerRequest(identity, result.getFinalResult(), transformer)); } return true; }
[ "Execute the operation.\n\n@param listener the transactional operation listener\n@param client the transactional protocol client\n@param identity the server identity\n@param operation the operation\n@param transformer the operation result transformer\n@return whether the operation was executed" ]
[ "Return a new instance of the BufferedImage\n\n@return BufferedImage", "Computes the decomposition of the provided matrix. If no errors are detected then true is returned,\nfalse otherwise.\n@param A The matrix that is being decomposed. Not modified.\n@return If it detects any errors or not.", "Returns an empty Promotion details in Json\n\n@return String\n@throws IOException", "Determine if a job name and job type are valid.\n@param jobName the name of the job\n@param jobType the class of the job\n@throws IllegalArgumentException if the name or type are invalid", "Adds a new metadata value of array type.\n@param path the path to the field.\n@param values the collection of values.\n@return the metadata object for chaining.", "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.", "Build the default transformation description.\n\n@param discardPolicy the discard policy to use\n@param inherited whether the definition is inherited\n@param registry the attribute transformation rules for the resource\n@param discardedOperations the discarded operations\n@return the transformation description", "Shifts are performed based upon singular values computed previously. If it does not converge\nusing one of those singular values it uses a Wilkinson shift instead.", "Set the maximum date limit." ]
public void setCastShadow(boolean enableFlag) { GVRSceneObject owner = getOwnerObject(); if (owner != null) { GVRShadowMap shadowMap = (GVRShadowMap) getComponent(GVRRenderTarget.getComponentType()); if (enableFlag) { if (shadowMap != null) { shadowMap.setEnable(true); } else { float angle = (float) Math.acos(getFloat("outer_cone_angle")) * 2.0f; GVRCamera shadowCam = GVRShadowMap.makePerspShadowCamera(getGVRContext().getMainScene().getMainCameraRig().getCenterCamera(), angle); shadowMap = new GVRShadowMap(getGVRContext(), shadowCam); owner.attachComponent(shadowMap); } mChanged.set(true); } else if (shadowMap != null) { shadowMap.setEnable(false); } } mCastShadow = enableFlag; }
[ "Enables or disabled shadow casting for a spot light.\nEnabling shadows attaches a GVRShadowMap component to the\nGVRSceneObject which owns the light and provides the\ncomponent with an perspective camera for shadow casting.\n@param enableFlag true to enable shadow casting, false to disable" ]
[ "Produce an iterator over the input values in sorted order. Sorting will\noccur in the fixed space configured in the constructor, data will be\ndumped to disk as necessary.\n\n@param input An iterator over the input values\n@return An iterator over the values", "Remove any protocol-level headers from the clients request that\ndo not apply to the new request we are sending to the remote server.\n\n@param request\n@param destination", "Constraint that ensures that the proxy-prefetching-limit has a valid value.\n\n@param def The descriptor (class, reference, collection)\n@param checkLevel The current check level (this constraint is checked in basic and strict)", "Writes this address as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix.", "Logic for timestamp\n@param time Epoch date of creation\n@return String timestamp", "Returns a date and time string which is formatted as ISO-8601.", "Removes the expiration flag.", "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.", "Compute singular values and U and V at the same time" ]
static void populateFileCreationRecord(Record record, ProjectProperties properties) { properties.setMpxProgramName(record.getString(0)); properties.setMpxFileVersion(FileVersion.getInstance(record.getString(1))); properties.setMpxCodePage(record.getCodePage(2)); }
[ "Populate a file creation record.\n\n@param record MPX record\n@param properties project properties" ]
[ "Changes to cluster OR store definition metadata results in routing\nstrategies changing. These changes need to be propagated to all the\nlisteners.\n\n@param cluster The updated cluster metadata\n@param storeDefs The updated list of store definition", "This method retrieves an int value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of an integer\n@return int value", "Configures the log context.\n\n@param configFile the configuration file\n@param classLoader the class loader to use for the configuration\n@param logContext the log context to configure\n\n@return {@code true} if the log context was successfully configured, otherwise {@code false}\n\n@throws DeploymentUnitProcessingException if the configuration fails", "Specify a specific index to run the query against\n\n@param designDocument set the design document to use\n@param indexName set the index name to use\n@return this to set additional options", "Checks whether the given field definition is used as the primary key of a class referenced by\na reference.\n\n@param modelDef The model\n@param fieldDef The current field descriptor def\n@return The reference that uses the field or <code>null</code> if the field is not used in this way", "Creates a random matrix where all elements are zero but diagonal elements. Diagonal elements\nrandomly drawn from a uniform distribution from min to max, inclusive.\n\n@param numRows Number of rows in the returned matrix..\n@param numCols Number of columns in the returned matrix.\n@param min Minimum value of a diagonal element.\n@param max Maximum value of a diagonal element.\n@param rand Random number generator.\n@return A random diagonal matrix.", "Returns a list of all templates under the user account\n\n@param options {@link Map} extra options to send along with the request.\n@return {@link ListResponse}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "Determine if a CharSequence can be parsed as a BigDecimal.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigDecimal(String)\n@since 1.8.2", "Analyzes the source code of an interface. The specified interface must not contain methods, that changes the\nstate of the corresponding object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@return analysis result" ]
public Authentication getAuthentication(String token) { if (null != token) { TokenContainer container = tokens.get(token); if (null != container) { if (container.isValid()) { return container.getAuthentication(); } else { logout(token); } } } return null; }
[ "Get the authentication for a specific token.\n\n@param token token\n@return authentication if any" ]
[ "Use this API to update dospolicy.", "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", "Initial random seed used for shuffling test suites and other sources\nof pseudo-randomness. If not set, any random value is set.\n\n<p>The seed's format is compatible with {@link RandomizedRunner} so that\nseed can be fixed for suites and methods alike.", "Should use as destroy method. Disconnects from a Service Locator server.\nAll endpoints that were registered before are removed from the server.\nSet property locatorClient to null.\n\n@throws InterruptedException\n@throws ServiceLocatorException", "Allocates a new next buffer and pending fetch.", "Returns the output directory for reporting.", "Attempts to retrieves ResourceReport until maxWaitMs time is reached. Set maxWaitMs to -1 to\nretry forever.", "Returns angle in degrees between two points\n\n@param ax x of the point 1\n@param ay y of the point 1\n@param bx x of the point 2\n@param by y of the point 2\n@return angle in degrees between two points", "Sets the real offset.\n\n@param start the start\n@param end the end" ]
protected void onEditTitleTextBox(TextBox box) { if (m_titleEditHandler != null) { m_titleEditHandler.handleEdit(m_title, box); return; } String text = box.getText(); box.removeFromParent(); m_title.setText(text); m_title.setVisible(true); }
[ "Internal method which is called when the user has finished editing the title.\n\n@param box the text box which has been edited" ]
[ "Generates required number of placeholders as string.\n\nExample: {@code numberOfPlaceholders == 1, result == \"?\"},\n{@code numberOfPlaceholders == 2, result == \"?,?\"}.\n\n@param numberOfPlaceholders required amount of placeholders, should be {@code > 0}.\n@return string with placeholders.", "Determine if the start of the buffer matches a fingerprint byte array.\n\n@param buffer bytes from file\n@param fingerprint fingerprint bytes\n@return true if the file matches the fingerprint", "If the burst mode is on, emit the particles only once.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps", "Make all elements of a String array lower case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements lower case", "Remove paths with no active overrides\n\n@throws Exception", "Create a random video.\n\n@return random video.", "Use this API to fetch the statistics of all audit_stats resources that are configured on netscaler.", "Convert an object to a set.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target set element type\n@return set", "Curries a function that takes one argument.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a function that takes no arguments. Never <code>null</code>." ]
private static void writeToLog(Logger logger, Level level, String pattern, Exception exception) { if (level == Level.ERROR) { logger.error(pattern, exception); } else if (level == Level.INFO) { logger.info(pattern); } else if (level == Level.DEBUG) { logger.debug(pattern); } }
[ "Write the given pattern to given log in given logging level\n@param logger\n@param level\n@param pattern\n@param exception" ]
[ "Concatenate the arrays.\n\n@param array First array.\n@param array2 Second array.\n@return Concatenate between first and second array.", "This method reads a four byte integer from the input stream.\n\n@param is the input stream\n@return byte value\n@throws IOException on file read error or EOF", "Renders in LI tags, Wraps with UL tags optionally.", "Use this API to add sslcipher.", "For creating expression columns\n@return", "Writes the data collected about properties to a file.", "Prints associations recovered from the fields of a class. An association is inferred only\nif another relation between the two classes is not already in the graph.\n@param classes", "Static method to convert a binary operator into a string.\n\n@param oper is the binary comparison operator to be converted", "Set the values using the specified Properties object\n\n@param properties Properties object containing specific property values\nfor the Coordinator config" ]
private GenericCriteriaPrompt getPromptValue(FieldType field, byte[] block) { int textOffset = getPromptOffset(block); String value = MPPUtility.getUnicodeString(m_criteriaData, m_criteriaTextStart + textOffset); GenericCriteriaPrompt prompt = new GenericCriteriaPrompt(field.getDataType(), value); if (m_prompts != null) { m_prompts.add(prompt); } return prompt; }
[ "Retrieves a prompt value.\n\n@param field field type\n@param block criteria data block\n@return prompt value" ]
[ "Removes CRs but returns LFs", "Reads each token from a single record and adds it to a list.\n\n@param tk tokenizer\n@param record list of tokens\n@throws IOException", "Unregister the mbean with the given name\n\n@param server The server to unregister from\n@param name The name of the mbean to unregister", "Stops the processing and prints the final time.", "Provides lookup of elements by non-namespaced name.\n\n@param name the name or shortcut key for nodes of interest\n@return the nodes of interest which match name", "Assigns a list of nodes in the cluster represented by this failure\ndetector configuration.\n\n@param nodes Collection of Node instances, usually determined from the\nCluster; must be non-null", "Prepare a parallel HTTP POST Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder", "Use this API to fetch a tmglobal_tmsessionpolicy_binding resources.", "Encode a path in a manner suitable for a GET request\n@param in The path to encode, eg \"a/document\"\n@return The encoded path eg \"a%2Fdocument\"" ]
public Boolean verifySubscriberRequestedSubscription(SubscriptionRequest sr) throws SubscriptionOriginVerificationException { LOG.info("(Hub) -> Subscriber, sending notification to verify the origin of the subscription {}.", sr.getCallback()); SubscriptionConfirmationRequest sc = new SubscriptionConfirmationRequest(sr.getMode(), sr.getTopic(), "challenge", "0"); URI uri; try { uri = new URIBuilder(sr.getCallback()).setParameters(sc.toRequestParameters()).build(); } catch (URISyntaxException e) { throw new SubscriptionOriginVerificationException("URISyntaxException while sending a confirmation of subscription", e); } HttpGet httpGet = new HttpGet(uri); CloseableHttpClient httpclient = HttpClients.createDefault(); CloseableHttpResponse response; try { response = httpclient.execute(httpGet); } catch (IOException e) { throw new SubscriptionOriginVerificationException("IOException while sending a confirmation of subscription", e); } LOG.info("Subscriber replied with the http code {}.", response.getStatusLine().getStatusCode()); Integer returnedCode = response.getStatusLine().getStatusCode(); // if code is a success code return true, else false return (199 < returnedCode) && (returnedCode < 300); }
[ "Output method that sends a subscription confirmation for the subscriber to avoid DoS attacks, or false subscription.\n\n@param sr\n@return True case the subscription was confirmed, or False otherwise\n@throws org.ow2.chameleon.fuchsia.push.base.hub.exception.SubscriptionOriginVerificationException" ]
[ "Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException", "Constructs the appropriate MenuDrawer based on the position.", "Add a new server mapping to current profile\n\n@param sourceHost source hostname\n@param destinationHost destination hostname\n@param hostHeader host header\n@return ServerRedirect", "symbol for filling padding position in output", "Return the knot at a given position.\n@param x the position\n@return the knot number, or 1 if no knot found", "Creates PollingState from the json string.\n\n@param serializedPollingState polling state as json string\n@param <ResultT> the result that the poll operation produces\n@return the polling state", "Adds a \"Post Run\" task to the collection.\n\n@param taskItem the \"Post Run\" task", "Answer the search class.\nThis is the class of the example object or\nthe class represented by Identity.\n@return Class", "Generates a toString method using concatenation or a StringBuilder." ]
public Group lookupGroup(String url) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_LOOKUP_GROUP); parameters.put("url", url); Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Group group = new Group(); Element payload = response.getPayload(); Element groupnameElement = (Element) payload.getElementsByTagName("groupname").item(0); group.setId(payload.getAttribute("id")); group.setName(((Text) groupnameElement.getFirstChild()).getData()); return group; }
[ "Lookup the group for the specified URL.\n\n@param url\nThe url\n@return The group\n@throws FlickrException" ]
[ "Populate a resource assignment.\n\n@param record MPX record\n@param assignment resource assignment\n@throws MPXJException", "A static method that provides an easy way to create a list of a\ncertain parametric type.\nThis static constructor works better with generics.\n\n@param list The list to pad\n@param padding The padding element (may be null)\n@return The padded list", "Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be JSON.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')", "This method is used to associate a child task with the current\ntask instance. It has package access, and has been designed to\nallow the hierarchical outline structure of tasks in an MPX\nfile to be constructed as the file is read in.\n\n@param child Child task.\n@param childOutlineLevel Outline level of the child task.", "Converts the string representation of the days bit field into an integer.\n\n@param days string bit field\n@return integer bit field", "Answer the FieldConversions for the PkFields\n@param cld\n@return the pk FieldConversions", "Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object", "Use this API to unset the properties of coparameter resource.\nProperties that need to be unset are specified in args array.", "Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault" ]
public Versioned<E> getVersionedById(int id) { Versioned<VListNode<E>> listNode = getListNode(id); if(listNode == null) throw new IndexOutOfBoundsException(); return new Versioned<E>(listNode.getValue().getValue(), listNode.getVersion()); }
[ "Get the ver\n\n@param id\n@return" ]
[ "Use this API to fetch filtered set of lbvserver resources.\nset the filter parameter values in filtervalue object.", "Emit status line for an aggregated event.", "Determines the offset code of a forward contract from the name of a forward curve.\nThis method will extract a group of one or more digits together with the first letter behind them, if any.\nIf there are multiple groups of digits in the name, this method will extract the last.\nIf there is no number in the string, this method will return null.\n\n@param curveName The name of the curve.\n@return The offset code as String", "Checks that arguments and parameter types match.\n@param params method parameters\n@param args type arguments\n@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is\nnot of the exact type but still match", "Returns the full record for a single team.\n\n@param team Globally unique identifier for the team.\n@return Request object", "Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content", "Remove the set of partitions from the node provided\n\n@param node The node from which we're removing the partitions\n@param donatedPartitions The list of partitions to remove\n@return The new node without the partitions", "Run a task periodically, for a set number of times.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@param repetitions\nRepeat count\n@return {@code null} if {@code repetitions < 1}; otherwise, an interface\nthat lets you query the status; cancel; or reschedule the event.", "Returns an iterable containing the items in this folder and specifies which child fields to retrieve from the\nAPI.\n\n@param fields the fields to retrieve.\n@return an iterable containing the items in this folder." ]
public static Integer getDurationValue(ProjectProperties properties, Duration duration) { Integer result; if (duration == null) { result = null; } else { if (duration.getUnits() != TimeUnit.MINUTES) { duration = duration.convertUnits(TimeUnit.MINUTES, properties); } result = Integer.valueOf((int) duration.getDuration()); } return (result); }
[ "Convert an MPXJ Duration instance into an integer duration in minutes\nready to be written to an MPX file.\n\n@param properties project properties, used for duration units conversion\n@param duration Duration instance\n@return integer duration in minutes" ]
[ "Read task data from a PEP file.", "Adds a single value to the data set and updates any\nstatistics that are calculated cumulatively.\n@param value The value to add.", "Convert a Java date into a Planner time.\n\n0800\n\n@param value Java Date instance\n@return Planner time value", "Set default value with\n\n@param iso ISO2 of country", "Deserialize a javascript design document file to a DesignDocument object.\n\n@param file the design document javascript file (UTF-8 encoded)\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read", "Execute push docker image on agent\n\n@param launcher\n@param log\n@param imageTag\n@param username\n@param password\n@param host @return\n@throws IOException\n@throws InterruptedException", "Hide multiple channels. All other channels will be shown.\n@param channels The channels to hide", "Return an instance of this class.\n\n@param container Solr CoreContainer container object in order to create a server object.\n\n@return instance of CmsSolrSpellchecker", "Animate de-selection of visible views and clear\nselected set." ]
public DockerContainerObjectBuilder<T> withContainerObjectClass(Class<T> containerObjectClass) { if (containerObjectClass == null) { throw new IllegalArgumentException("container object class cannot be null"); } this.containerObjectClass = containerObjectClass; //First we check if this ContainerObject is defining a @CubeDockerFile in static method final List<Method> methodsWithCubeDockerFile = ReflectionUtil.getMethodsWithAnnotation(containerObjectClass, CubeDockerFile.class); if (methodsWithCubeDockerFile.size() > 1) { throw new IllegalArgumentException( String.format( "More than one %s annotation found and only one was expected. Methods where annotation was found are: %s", CubeDockerFile.class.getSimpleName(), methodsWithCubeDockerFile)); } classHasMethodWithCubeDockerFile = !methodsWithCubeDockerFile.isEmpty(); classDefinesCubeDockerFile = containerObjectClass.isAnnotationPresent(CubeDockerFile.class); classDefinesImage = containerObjectClass.isAnnotationPresent(Image.class); if (classHasMethodWithCubeDockerFile) { methodWithCubeDockerFile = methodsWithCubeDockerFile.get(0); boolean isMethodStatic = Modifier.isStatic(methodWithCubeDockerFile.getModifiers()); boolean methodHasNoArguments = methodWithCubeDockerFile.getParameterCount() == 0; boolean methodReturnsAnArchive = Archive.class.isAssignableFrom(methodWithCubeDockerFile.getReturnType()); if (!isMethodStatic || !methodHasNoArguments || !methodReturnsAnArchive) { throw new IllegalArgumentException( String.format("Method %s annotated with %s is expected to be static, no args and return %s.", methodWithCubeDockerFile, CubeDockerFile.class.getSimpleName(), Archive.class.getSimpleName())); } } // User has defined @CubeDockerfile on the class and a method if (classHasMethodWithCubeDockerFile && classDefinesCubeDockerFile) { throw new IllegalArgumentException( String.format( "More than one %s annotation found and only one was expected. Both class and method %s has the annotation.", CubeDockerFile.class.getSimpleName(), methodWithCubeDockerFile)); } // User has defined @CubeDockerfile and @Image if ((classHasMethodWithCubeDockerFile || classDefinesCubeDockerFile) && classDefinesImage) { throw new IllegalArgumentException( String.format("Container Object %s has defined %s annotation and %s annotation together.", containerObjectClass.getSimpleName(), Image.class.getSimpleName(), CubeDockerFile.class.getSimpleName())); } // User has not defined either @CubeDockerfile or @Image if (!classDefinesCubeDockerFile && !classDefinesImage && !classHasMethodWithCubeDockerFile) { throw new IllegalArgumentException( String.format("Container Object %s is not annotated with either %s or %s annotations.", containerObjectClass.getName(), CubeDockerFile.class.getSimpleName(), Image.class.getSimpleName())); } return this; }
[ "Specifies the container object class to be instantiated\n\n@param containerObjectClass\ncontainer object class to be instantiated\n\n@return the current builder instance" ]
[ "Returns the current transaction for the calling thread.\n\n@throws org.odmg.TransactionNotInProgressException\n{@link org.odmg.TransactionNotInProgressException} if no transaction was found.", "Stops all streams.", "Encodes the given URI authority with the given encoding.\n@param authority the authority to be encoded\n@param encoding the character encoding to encode to\n@return the encoded authority\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "compute Sinh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "Saves the current translations from the container to the respective localization.", "Refactor the method into public CXF utility and reuse it from CXF instead copy&paste", "Return all URI schemes that are supported in the system.", "Use this API to fetch all the route6 resources that are configured on netscaler.\nThis uses route6_args which is a way to provide additional arguments while fetching the resources.", "Write the field to the specified channel.\n\n@param channel the channel to which it should be written\n\n@throws IOException if there is a problem writing to the channel" ]
private Query getFKQuery(Object obj, ClassDescriptor cld, CollectionDescriptor cds) { Query fkQuery; QueryByCriteria fkQueryCrit; if (cds.isMtoNRelation()) { fkQueryCrit = getFKQueryMtoN(obj, cld, cds); } else { fkQueryCrit = getFKQuery1toN(obj, cld, cds); } // check if collection must be ordered if (!cds.getOrderBy().isEmpty()) { Iterator iter = cds.getOrderBy().iterator(); while (iter.hasNext()) { fkQueryCrit.addOrderBy((FieldHelper)iter.next()); } } // BRJ: customize the query if (cds.getQueryCustomizer() != null) { fkQuery = cds.getQueryCustomizer().customizeQuery(obj, pb, cds, fkQueryCrit); } else { fkQuery = fkQueryCrit; } return fkQuery; }
[ "Answer the foreign key query to retrieve the collection\ndefined by CollectionDescriptor" ]
[ "I promise that this is always a collection of HazeltaskTasks", "Decide whether failure should trigger a rollback.\n\n@param cause\nthe cause of the failure, or {@code null} if failure is not\nthe result of catching a throwable\n@return the result action", "Converts an update description BSON document from a MongoDB Change Event into an\nUpdateDescription object.\n\n@param document the\n@return the converted UpdateDescription", "Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.", "Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but\nthat is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6.\nSince we are doing this anyway, we can also provide information about the nature of the cache, and\nhow many metadata entries it contains, which is useful for auto-attachment.\n\n@param trackListEntries the tracks contained in the cache, so we can record the number\n@param playlistId the playlist contained in the cache, or 0 if it is all tracks from the media\n@param zos the stream to which the ZipFile is being written\n\n@throws IOException if there is a problem creating the format entry", "Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error", "Write the patch.xml\n\n@param rollbackPatch the patch\n@param file the target file\n@throws IOException", "Seeks forward or backwards to a particular season based on the current date\n\n@param seasonString The season to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek", "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" ]
public static dnsnsecrec[] get(nitro_service service) throws Exception{ dnsnsecrec obj = new dnsnsecrec(); dnsnsecrec[] response = (dnsnsecrec[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the dnsnsecrec resources that are configured on netscaler." ]
[ "checks whether the specified Object obj is write-locked by Transaction tx.\n@param tx the transaction\n@param obj the Object to be checked\n@return true if lock exists, else false", "Record the duration of a put operation, along with the size of the values\nreturned.", "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", "Set the maximum date limit.", "Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.", "Factory method to do the setup and transformation of inputs\n\n@param matrix a {@link TestMatrixArtifact} loaded by ProctorLoader\n@param loadResult a {@link ProctorLoadResult} which contains result of validation of test definition\n@param functionMapper a given el {@link FunctionMapper}\n@return constructed Proctor object", "Removes CRs but returns LFs", "Default settings set type loader to ClasspathTypeLoader if not set before.", "Tries to return the single table to which all classes in the hierarchy with the given\nclass as the root map.\n\n@param classDef The root class of the hierarchy\n@return The table name or <code>null</code> if the classes map to more than one table\nor no class in the hierarchy maps to a table" ]
public static String getModuleName(final String moduleId) { final int splitter = moduleId.indexOf(':'); if(splitter == -1){ return moduleId; } return moduleId.substring(0, splitter); }
[ "Split a module Id to get the module name\n@param moduleId\n@return String" ]
[ "Creates PollingState from the json string.\n\n@param serializedPollingState polling state as json string\n@param <ResultT> the result that the poll operation produces\n@return the polling state", "Adds a word to the end of the token list\n@param word word which is to be added\n@return The new Token created around symbol", "Begin writing a named list attribute.\n\n@param name attribute name", "Get the context for the specified photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@return The PhotoContext\n@throws FlickrException", "Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events.", "Helper method to check if log4j is already configured", "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", "Command line method to walk the directories provided on the command line\nand print out their contents\n\n@param args Directory names", "Publish the bundle resources directly." ]
@Override public void process(Step context) { Iterator<Attachment> iterator = context.getAttachments().listIterator(); while (iterator.hasNext()) { Attachment attachment = iterator.next(); if (pattern.matcher(attachment.getSource()).matches()) { deleteAttachment(attachment); iterator.remove(); } } for (Step step : context.getSteps()) { process(step); } }
[ "Remove attachments matches pattern from step and all step substeps\n\n@param context from which attachments will be removed" ]
[ "Get the best guess we have for the current track position on the specified player.\n\n@param player the player number whose position is desired\n\n@return the milliseconds into the track that we believe playback has reached, or -1 if we don't know\n\n@throws IllegalStateException if the TimeFinder is not running", "Returns the site path for the edited bundle file.\n\n@return the site path for the edited bundle file.", "Hide multiple channels. All other channels will be shown.\n@param channels The channels to hide", "Returns timezone offset from a session instance. The offset is\nin minutes to UTC time\n\n@param session\nthe session instance\n@return the offset to UTC time in minutes", "Loads the configuration file, using CmsVfsMemoryObjectCache for caching.\n\n@param cms the CMS context\n@return the template mapper configuration", "Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException", "Prints a debug log message that details the time taken for the Http\nrequest to be parsed by the coordinator\n\n@param operationType\n@param receivedTimeInMs", "Update max.\n\n@param n the n\n@param c the c", "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" ]
private void readPage(byte[] buffer, Table table) { int magicNumber = getShort(buffer, 0); if (magicNumber == 0x4400) { //System.out.println(ByteArrayHelper.hexdump(buffer, 0, 6, true, 16, "")); int recordSize = m_definition.getRecordSize(); RowValidator rowValidator = m_definition.getRowValidator(); String primaryKeyColumnName = m_definition.getPrimaryKeyColumnName(); int index = 6; while (index + recordSize <= buffer.length) { //System.out.println(ByteArrayHelper.hexdump(buffer, index, recordSize, true, 16, "")); int btrieveValue = getShort(buffer, index); if (btrieveValue != 0) { Map<String, Object> row = new HashMap<String, Object>(); row.put("ROW_VERSION", Integer.valueOf(btrieveValue)); for (ColumnDefinition column : m_definition.getColumns()) { Object value = column.read(index, buffer); //System.out.println(column.getName() + ": " + value); row.put(column.getName(), value); } if (rowValidator == null || rowValidator.validRow(row)) { table.addRow(primaryKeyColumnName, row); } } index += recordSize; } } }
[ "Reads data from a single page of the database file.\n\n@param buffer page from the database file\n@param table Table instance" ]
[ "Use this API to fetch sslciphersuite resources of given names .", "Creates a curator built using the given zookeeper connection string and timeout", "Get a list of collaborators that are allowed access to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return list of collaborators", "Clear all overrides, reset repeat counts for a request path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception", "Called by the engine to trigger the cleanup at the end of a payload thread.", "Handle a simple ping request.\n\n@param channel the channel\n@param header the protocol header\n@throws IOException for any error", "Gets the current page\n@return", "Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master.", "Calls a method from editService to update the repeat number for a path\n\n@param model\n@param newNum\n@param path_id\n@param clientUUID\n@return\n@throws Exception" ]
public static BufferedImage resizeToWidth(BufferedImage originalImage, int widthOut) { int width = originalImage.getWidth(); int height = originalImage.getHeight(); int widthPercent = (widthOut * 100) / width; int newHeight = (height * widthPercent) / 100; BufferedImage resizedImage = new BufferedImage(widthOut, newHeight, BufferedImage.TYPE_INT_ARGB); Graphics2D g = resizedImage.createGraphics(); g.drawImage(originalImage, 0, 0, widthOut, newHeight, null); g.dispose(); return resizedImage; }
[ "Resizes an image to the specified width, changing width in the same proportion\n@param originalImage Image in memory\n@param widthOut The width to resize\n@return New Image in memory" ]
[ "Add assertions to tests execution.", "Write the summary file, if requested.", "Use this API to reset Interface.", "For a cert we have generated, return the private key.\n@param cert\n@return\n@throws CertificateEncodingException\n@throws KeyStoreException\n@throws UnrecoverableKeyException\n@throws NoSuchAlgorithmException", "Returns the port as configured by the system variables, fallback is the default port value\n\n@param portIdentifier - SYS_*_PORT defined in Constants\n@return", "Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth", "Kicks off an animation that will result in the pointer being centered in the\npie slice of the currently selected item.", "Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened", "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" ]
protected void notifyBufferChange(char[] newData, int numChars) { synchronized(bufferChangeLoggers) { Iterator<BufferChangeLogger> iterator = bufferChangeLoggers.iterator(); while (iterator.hasNext()) { iterator.next().bufferChanged(newData, numChars); } } }
[ "Notifies all registered BufferChangeLogger instances of a change.\n\n@param newData the buffer that contains the new data being added\n@param numChars the number of valid characters in the buffer" ]
[ "Adds an edge between the current and new state.\n\n@return true if the new state is not found in the state machine.", "Finds the next valid line of words in the stream and extracts them.\n\n@return List of valid words on the line. null if the end of the file has been reached.\n@throws java.io.IOException", "Convert an object to another object with given type\n\n@param <T>\n@param source\nobject to convert\n@param typeReference\nreference to {@link java.lang.reflect.Type}\n@return the converted object if conversion failed\n@throws ConverterException", "Run through the map and remove any references that have been null'd out by the GC.", "Checks whether two internet addresses are on the same subnet.\n\n@param prefixLength the number of bits within an address that identify the network\n@param address1 the first address to be compared\n@param address2 the second address to be compared\n\n@return true if both addresses share the same network bits", "Queries the running container and attempts to lookup the information from the running container.\n\n@param client the client used to execute the management operation\n\n@return the container description\n\n@throws IOException if an error occurs while executing the management operation\n@throws OperationExecutionException if the operation used to query the container fails", "Return the text box for the specified text and font.\n\n@param text text\n@param font font\n@return text box", "Retrieves the class object for the class with the given name.\n\n@param name The class name\n@return The class object\n@throws ClassNotFoundException If the class is not on the classpath (the exception message contains the class name)", "Use this API to fetch all the systemcore resources that are configured on netscaler." ]
public void seekToSeason(String seasonString, String direction, String seekAmount) { Season season = Season.valueOf(seasonString); assert(season!= null); seekToIcsEvent(SEASON_ICS_FILE, season.getSummary(), direction, seekAmount); }
[ "Seeks forward or backwards to a particular season based on the current date\n\n@param seasonString The season to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek" ]
[ "Make a string with the shader layout for a uniform block\nwith a given descriptor. The format of the descriptor is\nthe same as for a @{link GVRShaderData} - a string of\ntypes and names of each field.\n<p>\nThis function will return a Vulkan shader layout if the\nVulkan renderer is being used. Otherwise, it returns\nan OpenGL layout.\n@param descriptor string with types and names of each field\n@param blockName name of uniform block\n@param useUBO true to output uniform buffer layout, false for push constants\n@return string with shader declaration", "Returns iterable with all folder assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all folder assignments.", "lookup current maximum value for a single field in\ntable the given class descriptor was associated.", "Adds a corporate groupId to an organization\n\n@param organizationId String\n@param corporateGroupId String", "Set the parent from which this week is derived.\n\n@param parent parent week", "Transforms an input String into HTML using the given Configuration.\n\n@param input\nThe String to process.\n@param configuration\nThe Configuration.\n@return The processed String.\n@since 0.7\n@see Configuration", "Gets an iterable of all the groups in the enterprise that are starting with the given name string.\n@param api the API connection to be used when retrieving the groups.\n@param name the name prefix of the groups. If the groups need to searched by full name that has spaces,\nthen the parameter string should have been wrapped with \"\".\n@return an iterable containing info about all the groups.", "Returns the text value of all of the elements in the collection.\n\n@return the text value of all the elements in the collection or null", "Gets an enhanced protection domain for a proxy based on the given protection domain.\n@param domain the given protection domain\n@return protection domain enhanced with \"accessDeclaredMembers\" runtime permission" ]
public static boolean applyTo(ImageHolder imageHolder, ImageView imageView, String tag) { if (imageHolder != null && imageView != null) { return imageHolder.applyTo(imageView, tag); } return false; }
[ "a small static helper to set the image from the imageHolder nullSave to the imageView\n\n@param imageHolder\n@param imageView\n@param tag used to identify imageViews and define different placeholders\n@return true if an image was set" ]
[ "Returns the log conditional likelihood of the given dataset.\n\n@return The log conditional likelihood of the given dataset.", "Determine the color to use to draw a cue list entry. Hot cues are green, ordinary memory points are red,\nand loops are orange.\n\n@param entry the entry being drawn\n\n@return the color with which it should be represented.", "Compares two annotated parameters and returns true if they are equal", "Use this API to fetch all the rnatparam resources that are configured on netscaler.", "Get top deployment unit.\n\n@param unit the current deployment unit\n@return top deployment unit", "Read task data from a PEP file.", "Goes through all the RO Stores in the plan and swaps it\n\n@param swappedStoreNames Names of stores already swapped\n@param useSwappedStoreNames Swap only the previously swapped stores (\nHappens during error )", "Merge the two maps.\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<p>\nIf a key exists in the left and right operands, the value in the right operand is preferred.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@throws IllegalArgumentException - when a right operand key exists in the left operand.\n@since 2.15", "Get the output mapper from processor." ]
public static void extract( DMatrix src, int srcY0, int srcY1, int srcX0, int srcX1, DMatrix dst ) { ((ReshapeMatrix)dst).reshape(srcY1-srcY0,srcX1-srcX0); extract(src,srcY0,srcY1,srcX0,srcX1,dst,0,0); }
[ "Extract where the destination is reshaped to match the extracted region\n@param src The original matrix which is to be copied. Not modified.\n@param srcX0 Start column.\n@param srcX1 Stop column+1.\n@param srcY0 Start row.\n@param srcY1 Stop row+1.\n@param dst Where the submatrix are stored. Modified." ]
[ "Given a list of typedDependencies, returns true if the node \"node\" is the\ngovernor of a conj relation with a dependent which is not a preposition\n\n@param node\nA node in this GrammaticalStructure\n@param list\nA list of typedDependencies\n@return true If node is the governor of a conj relation in the list with\nthe dep not being a preposition", "Use this API to convert sslpkcs12.", "Allows direct access to the Undertow.Builder for custom configuration\n\n@param serverConfigurationFunction the serverConfigurationFunction", "Start and configure GreenMail using given properties.\n\n@param properties the properties such as System.getProperties()", "Should be called after all rows have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return", "Set the default styles. the case of the keys are not important. The retrieval will be case\ninsensitive.\n\n@param defaultStyle the mapping from geometry type name (point, polygon, etc...) to the style\nto use for that type.", "This implementation returns whether the underlying asset exists.", "Write an int attribute.\n\n@param name attribute name\n@param value attribute value", "Add additional source types" ]