query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public <X> Set<DisposalMethod<X, ?>> resolveDisposalBeans(Set<Type> types, Set<Annotation> qualifiers, AbstractClassBean<X> declaringBean) { // We can always cache as this is only ever called by Weld where we avoid non-static inner classes for annotation literals Set<DisposalMethod<X, ?>> beans = cast(disposalMethodResolver.resolve(new ResolvableBuilder(manager).addTypes(types).addQualifiers(qualifiers).setDeclaringBean(declaringBean).create(), true)); resolvedDisposalBeans.addAll(beans); return Collections.unmodifiableSet(beans); }
[ "Resolve the disposal method for the given producer method. Any resolved\nbeans will be marked as such for the purpose of validating that all\ndisposal methods are used. For internal use.\n\n@param types the types\n@param qualifiers The binding types to match\n@param declaringBean declaring bean\n@return The set of matching disposal methods" ]
[ "Returns the list of atlas information necessary to map\nthe texture atlas to each scene object.\n\n@return List of atlas information.", "Starts off a new thread to monitor this connection attempt.\n@param connectionHandle to monitor", "Redirect standard streams so that the output can be passed to listeners.", "Finds the last entry of the address list and returns it as a property.\n\n@param address the address to get the last part of\n\n@return the last part of the address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty", "Get unique values form the array.\n\n@param values Array of values.\n@return Unique values.", "Given the lambda value perform an implicit QR step on the matrix.\n\nB^T*B-lambda*I\n\n@param lambda Stepping factor.", "Performs the BFS and gives the results to a distributor to distribute\n\n@param distributor the distributor", "Prints the results of the equation to standard out. Useful for debugging", "Creates a decorator bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return a Bean" ]
private Server setUpServer() { Server server = new Server(port); ResourceHandler handler = new ResourceHandler(); handler.setDirectoriesListed(true); handler.setWelcomeFiles(new String[]{"index.html"}); handler.setResourceBase(getReportDirectoryPath().toAbsolutePath().toString()); HandlerList handlers = new HandlerList(); handlers.setHandlers(new Handler[]{handler, new DefaultHandler()}); server.setStopAtShutdown(true); server.setHandler(handlers); return server; }
[ "Set up server for report directory." ]
[ "Sets the value of a UDF.\n\n@param udf user defined field\n@param dataType MPXJ data type\n@param value field value", "Method used to write the name of the scenarios\n\n@param word\n@return the same word starting with capital letter", "Retrieve a work field.\n\n@param type field type\n@return Duration instance", "Obtains a Julian zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Convenience extension, to generate traced code.", "Expands all tabs into spaces. Assumes the CharSequence represents a single line of text.\n\n@param self A line to expand\n@param tabStop The number of spaces a tab represents\n@return The expanded toString() of this CharSequence\n@see #expandLine(String, int)\n@since 1.8.2", "get specific property value of job.\n\n@param id the id\n@param property the property name/path\n@return the property value", "Set an enterprise duration value.\n\n@param index duration index (1-30)\n@param value duration value", "Asynchronous call that begins execution of the task\nand returns immediately." ]
private double u_neg_inf(double x, double tau) { return f(boundaryCondition.getValueAtLowerBoundary(model, f_t(tau), f_s(x)), x, tau); }
[ "Heat Equation Boundary Conditions" ]
[ "Use this API to fetch all the cacheobject resources that are configured on netscaler.", "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", "Moves the cursor to the given row number in the iterator. If the row\nnumber is positive, the cursor moves to the given row number with\nrespect to the beginning of the iterator. The first row is row 1, the\nsecond is row 2, and so on.\n\n@param row the row to move to in this iterator, by absolute number", "Convert a date to the String representation we use in the JSON.\n@param d the date to convert\n@return the String representation we use in the JSON.", "Retrieves and validates the content length from the REST request.\n\n@return true if has content length", "Update database schema\n\n@param migrationPath path to migrations", "Update the id field of the object in the database.", "Generates timephased costs from timephased work where multiple cost rates\napply to the assignment.\n\n@param standardWorkList timephased work\n@param overtimeWorkList timephased work\n@return timephased cost", "Create a KnowledgeBuilderConfiguration on which properties can be set. Use\nthe given properties file and ClassLoader - either of which can be null.\n@return\nThe KnowledgeBuilderConfiguration." ]
public void addRequiredBundles(Set<String> bundles) { // TODO manage transitive dependencies // don't require self Set<String> bundlesToMerge; String bundleName = (String) getMainAttributes().get(BUNDLE_SYMBOLIC_NAME); if (bundleName != null) { int idx = bundleName.indexOf(';'); if (idx >= 0) { bundleName = bundleName.substring(0, idx); } } if (bundleName != null && bundles.contains(bundleName) || projectName != null && bundles.contains(projectName)) { bundlesToMerge = new LinkedHashSet<String>(bundles); bundlesToMerge.remove(bundleName); bundlesToMerge.remove(projectName); } else { bundlesToMerge = bundles; } String s = (String) getMainAttributes().get(REQUIRE_BUNDLE); Wrapper<Boolean> modified = Wrapper.wrap(this.modified); String result = mergeIntoCommaSeparatedList(s, bundlesToMerge, modified, lineDelimiter); this.modified = modified.get(); getMainAttributes().put(REQUIRE_BUNDLE, result); }
[ "adds the qualified names to the require-bundle attribute, if not already\npresent.\n\n@param bundles - passing parameterized bundled (e.g. versions, etc.) is\nnot supported" ]
[ "Checks if the provided artifactQuery is valid\n\n@param artifactQuery ArtifactQuery\n@throws WebApplicationException if the data is corrupted", "Initialize the key set for an xml bundle.", "Checks if the artifact is dependency of an dependent idl artifact\n@returns true if the artifact was a dependency of idl artifact", "Roll the java.util.Time forward or backward.\n\n@param startDate - The start date\n@param period Calendar.YEAR etc\n@param amount - Negative to rollbackwards.", "Gets the thread dump.\n\n@return the thread dump", "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", "Removes columns from the matrix.\n\n@param A Matrix. Modified\n@param col0 First column\n@param col1 Last column, inclusive.", "Read the optional row header and UUID.\n\n@param stream input stream\n@param map row map", "Write the classifications of the Sequence classifier out to a writer in a\nformat determined by the DocumentReaderAndWriter used.\n\n@param doc Documents to write out\n@param printWriter Writer to use for output\n@throws IOException If an IO problem" ]
public LogSegment getLastView() { List<LogSegment> views = getView(); return views.get(views.size() - 1); }
[ "get the last segment at the moment\n\n@return the last segment" ]
[ "Delete with retry.\n\n@param file\n@return <tt>true</tt> if the file was successfully deleted.", "Performs a null edit on an entity. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param currentDocument\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection", "Obtain a connection asynchronously by queueing a request to obtain a connection in a separate thread.\n\nUse as follows:<p>\nFuture&lt;Connection&gt; result = pool.getAsyncConnection();<p>\n... do something else in your application here ...<p>\nConnection connection = result.get(); // get the connection<p>\n\n@return A Future task returning a connection.", "Implements getAll by delegating to get.", "Returns the x-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the x coordinate", "Examins the structure of A for QR decomposition\n@param A matrix which is to be decomposed\n@return true if the solution is valid or false if the decomposition can't be performed (i.e. requires column pivots)", "This method returns the length of overlapping time between two time\nranges.\n\n@param start1 start of first range\n@param end1 end of first range\n@param start2 start start of second range\n@param end2 end of second range\n@return overlapping time in milliseconds", "Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater than\n1/3 the length of <code>coords</code>, or the points appear\nto be coincident, colinear, or coplanar.", "Performs any needed operation on subreports after they are built like ensuring proper subreport with\nif \"fitToParentPrintableArea\" flag is set to true\n\n@param dr\n@param _parameters\n@throws JRException" ]
public static void shutdownDomain(final ModelControllerClient client, final int timeout) throws IOException, OperationExecutionException { // Note the following two operations used to shutdown a domain don't seem to work well in a composite operation. // The operation occasionally sees a java.util.concurrent.CancellationException because the operation client // is likely closed before the AsyncFuture.get() is complete. Using a non-composite operation doesn't seem to // have this issue. // First shutdown the servers final ModelNode stopServersOp = Operations.createOperation("stop-servers"); stopServersOp.get("blocking").set(true); stopServersOp.get("timeout").set(timeout); ModelNode response = client.execute(stopServersOp); if (!Operations.isSuccessfulOutcome(response)) { throw new OperationExecutionException("Failed to stop servers.", stopServersOp, response); } // Now shutdown the host final ModelNode address = determineHostAddress(client); final ModelNode shutdownOp = Operations.createOperation("shutdown", address); response = client.execute(shutdownOp); if (Operations.isSuccessfulOutcome(response)) { // Wait until the process has died while (true) { if (isDomainRunning(client, true)) { try { TimeUnit.MILLISECONDS.sleep(20L); } catch (InterruptedException e) { LOGGER.trace("Interrupted during sleep", e); } } else { break; } } } else { throw new OperationExecutionException("Failed to shutdown host.", shutdownOp, response); } }
[ "Shuts down a managed domain container. The servers are first stopped, then the host controller is shutdown.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to shutdown the managed domain failed" ]
[ "if |a11-a22| >> |a12+a21| there might be a better way. see pg371", "Start the StatsD reporter, if configured.\n\n@throws URISyntaxException", "Configs created by this ConfigBuilder will use the given Redis sentinels.\n\n@param sentinels the Redis set of sentinels\n@return this ConfigBuilder", "Process hours in a working day.\n\n@param calendar project calendar\n@param dayRecord working day data", "Adds a basic LHS OPERATOR RHS block.\n\n@param list parent criteria list\n@param block current block", "Save Job Record.\n\n@param entry the entry", "Copy a patch element\n\n@param entry the patch entry\n@param patchId the patch id for the element\n@param modifications the element modifications\n@return the new patch element", "Use this API to fetch responderpolicy resource of given name .", "Draws the specified image with the first rectangle's bounds, clipping with the second one and adding\ntransparency.\n\n@param img image\n@param rect rectangle\n@param clipRect clipping bounds" ]
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) { Util.log("In OTMJCAManagedConnectionFactory.createManagedConnection"); try { Kit kit = getKit(); PBKey key = ((OTMConnectionRequestInfo) info).getPbKey(); OTMConnection connection = kit.acquireConnection(key); return new OTMJCAManagedConnection(this, connection, key); } catch (ResourceException e) { throw new OTMConnectionRuntimeException(e.getMessage()); } }
[ "return a new managed connection. This connection is wrapped around the real connection and delegates to it\nto get work done.\n@param subject\n@param info\n@return" ]
[ "Clean obsolete contents from the content repository. It will first mark contents as obsolete then after some time\nif these contents are still obsolete they will be removed.\n\n@return a map containing the list of marked contents and the list of deleted contents.", "Shuffle an array.\n\n@param array Array.\n@param seed Random seed.", "Handle content length.\n\n@param event\nthe event", "Begin building a url for this host with the specified image.", "Set whether the player holding the waveform is playing, which changes the indicator color to white from red.\nThis method can only be used in situations where the component is tied to a single player, and therefore has\na single playback position.\n\n@param playing if {@code true}, draw the position marker in white, otherwise red\n\n@see #setPlaybackState", "This method is called to format a date. It will return the null text\nif a null value is supplied.\n\n@param value date value\n@return formatted date value", "Sets the top padding for all cells in the row.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining", "Verifies that the given query can be properly scattered.\n\n@param query the query to verify\n@throws IllegalArgumentException if the query is invalid.", "Propagate onTouchStart events to listeners\n@param hit collision object" ]
public void addIn(Object attribute, Query subQuery) { // PAW // addSelectionCriteria(ValueCriteria.buildInCriteria(attribute, subQuery, getAlias())); addSelectionCriteria(ValueCriteria.buildInCriteria(attribute, subQuery, getUserAlias(attribute))); }
[ "IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery" ]
[ "Returns a list ordered from the highest priority to the lowest.", "Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors", "Convert an Object to a Timestamp.", "Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs.", "Searches for a sequence of integers\n\nexample:\n1 2 3 4 6 7 -3", "Adds the given service provider factory to the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>", "Evaluates an EL.\n\n@param vars the variables to be available for the evaluation.\n@param el the EL string to evaluate.\n@param returnType the class the EL evaluates to.\n@return the evaluated EL as an instance of the specified return type.\n@throws ELEvalException if the EL could not be evaluated.", "Calculates the bearing, in degrees, of the end LatLong point from this\nLatLong point.\n\n@param end The point that the bearing is calculated for.\n@return The bearing, in degrees, of the supplied point from this point.", "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" ]
public void printRelations(ClassDoc c) { Options opt = optionProvider.getOptionsFor(c); if (hidden(c) || c.name().equals("")) // avoid phantom classes, they may pop up when the source uses annotations return; // Print generalization (through the Java superclass) Type s = c.superclassType(); ClassDoc sc = s != null && !s.qualifiedTypeName().equals(Object.class.getName()) ? s.asClassDoc() : null; if (sc != null && !c.isEnum() && !hidden(sc)) relation(opt, RelationType.EXTENDS, c, sc, null, null, null); // Print generalizations (through @extends tags) for (Tag tag : c.tags("extends")) if (!hidden(tag.text())) relation(opt, RelationType.EXTENDS, c, c.findClass(tag.text()), null, null, null); // Print realizations (Java interfaces) for (Type iface : c.interfaceTypes()) { ClassDoc ic = iface.asClassDoc(); if (!hidden(ic)) relation(opt, RelationType.IMPLEMENTS, c, ic, null, null, null); } // Print other associations allRelation(opt, RelationType.COMPOSED, c); allRelation(opt, RelationType.NAVCOMPOSED, c); allRelation(opt, RelationType.HAS, c); allRelation(opt, RelationType.NAVHAS, c); allRelation(opt, RelationType.ASSOC, c); allRelation(opt, RelationType.NAVASSOC, c); allRelation(opt, RelationType.DEPEND, c); }
[ "Print a class's relations" ]
[ "Lift a Java Func1 to a Scala Function1\n\n@param f the function to lift\n\n@returns the Scala function", "Returns information for a specific client\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return\n@throws Exception", "Controls whether we report that we are playing. This will only have an impact when we are sending status and\nbeat packets.\n\n@param playing {@code true} if we should seem to be playing", "Set the value for a floating point 4x4 matrix.\n@param key name of uniform to set.\n@see #getFloatVec(String)", "Load a list of entities using the information in the context\n\n@param session The session\n@param lockOptions The locking details\n@param ogmContext The context with the information to load the entities\n@return the list of entities corresponding to the given context", "Scale the mesh at x, y and z axis.\n\n@param mesh Mesh to be scaled.\n@param x Scale to be applied on x-axis.\n@param y Scale to be applied on y-axis.\n@param z Scale to be applied on z-axis.", "Use this API to fetch nssimpleacl resource of given name .", "Parse the given file to obtains a Properties object.\n\n@param file\n@return a properties object containing all the properties present in the file.\n@throws InvalidDeclarationFileException", "Called just before the thread finishes, regardless of status, to take any necessary action on\nthe downloaded file with mDownloadedCacheSize file.\n\n@param forceClean - It will delete downloaded cache, Even streaming is enabled, If user intentionally cancelled." ]
protected boolean check(String id, List<String> includes) { if (null != includes) { for (String check : includes) { if (check(id, check)) { return true; } } } return false; }
[ "Check whether the given is is matched by one of the include expressions.\n\n@param id id to check\n@param includes list of include regular expressions\n@return true when id is included" ]
[ "Detect what has changed in the store definition and rewire BDB\nenvironments accordingly.\n\n@param storeDef updated store definition", "Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids", "Waits the given amount of time in seconds for a standalone server to start.\n\n@param client the client used to communicate with the server\n@param startupTimeout the time, in seconds, to wait for the server start\n\n@throws InterruptedException if interrupted while waiting for the server to start\n@throws RuntimeException if the process has died\n@throws TimeoutException if the timeout has been reached and the server is still not started", "This method is called by the ++ operator for the class CharSequence.\nIt increments the last character in the given CharSequence. If the last\ncharacter in the CharSequence is Character.MAX_VALUE a Character.MIN_VALUE\nwill be appended. The empty CharSequence is incremented to a string\nconsisting of the character Character.MIN_VALUE.\n\n@param self a CharSequence\n@return a value obtained by incrementing the toString() of the CharSequence\n@since 1.8.2", "Set the position of the pick ray.\nThis function is used internally to update the\npick ray with the new controller position.\n@param x the x value of the position.\n@param y the y value of the position.\n@param z the z value of the position.", "Construct a new instance.\n\n@return the new instance", "Return true if the expression is a constructor call on a class that matches the supplied.\n@param expression - the expression\n@param classNamePattern - the possible List of class names\n@return as described", "Combines weighted crf with this crf\n\n@param crf\n@param weight", "Creates the event for endpoint with specific type.\n\n@param endpoint the endpoint\n@param type the type\n@return the event" ]
public static base_response link(nitro_service client, sslcertkey resource) throws Exception { sslcertkey linkresource = new sslcertkey(); linkresource.certkey = resource.certkey; linkresource.linkcertkeyname = resource.linkcertkeyname; return linkresource.perform_operation(client,"link"); }
[ "Use this API to link sslcertkey." ]
[ "Determines whether the given type is an array type.\n\n@param type the given type\n@return true if the given type is a subclass of java.lang.Class or implements GenericArrayType", "Indicate whether the given URI matches this template.\n@param uri the URI to match to\n@return {@code true} if it matches; {@code false} otherwise", "If requested, adjust the bounds to the nearest scale and the map size.\n\n@param mapValues Map parameters.\n@param paintArea The size of the painting area.\n@param bounds The map bounds.\n@param dpi the DPI.", "return the workspace size needed for ctc", "Reads a \"message set\" argument, and parses into an IdSet.\nCurrently only supports a single range of values.", "Download a file asynchronously.\n@param url the URL pointing to the file\n@param retrofit the retrofit client\n@return an Observable pointing to the content of the file", "Sets the RDF serialization tasks based on the given string value.\n\n@param tasks\na space-free, comma-separated list of task names", "Override this method to supply a custom splash screen image.\n\n@param gvrContext\nThe new {@link GVRContext}\n@return Texture to display\n\n@since 1.6.4", "Returns the complete task record for a single task.\n\n@param task The task to get.\n@return Request object" ]
protected Object getFieldData(Integer id, FieldType type, byte[][] fixedData, Var2Data varData) { Object result = null; FieldItem item = m_map.get(type); if (item != null) { result = item.read(id, fixedData, varData); } return result; }
[ "Retrieve a single field value.\n\n@param id parent entity ID\n@param type field type\n@param fixedData fixed data block\n@param varData var data block\n@return field value" ]
[ "Checks if the date is a holiday\n\n@param dateString the date\n@return true if it is a holiday, false otherwise", "Get logs for an app by specifying additional parameters.\n@param logRequest See {LogRequestBuilder}\n@return log stream response", "Create a transformation which takes the alignment settings into account.", "Adds a new assignment to this task.\n@param assignTo the user to assign the assignment to.\n@return information about the newly added task assignment.", "Check that the scope type is allowed by the stereotypes on the bean and\nthe bean type", "Heat Equation Boundary Conditions", "Get a collection of tags used by the specified user.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param userId\nThe User ID\n@return The User object\n@throws FlickrException", "Validates the wrapped value and returns a localized error message in case of invalid values.\n@return <code>null</code> if the value is valid, a suitable localized error message otherwise.", "Helper method to create a string template source for a given formatter and content.\n\n@param formatter the formatter\n@param contentSupplier the content supplier\n\n@return the string template provider" ]
public static base_response delete(nitro_service client, String ipv6address) throws Exception { nsip6 deleteresource = new nsip6(); deleteresource.ipv6address = ipv6address; return deleteresource.delete_resource(client); }
[ "Use this API to delete nsip6 of given name." ]
[ "Retrieve a flag value.\n\n@param index flag index (1-20)\n@return flag value", "Pause component timer for current instance\n@param type - of component", "Checks if this has the passed suffix\n\n@param suffix is a Bytes object to compare to this\n@return true or false\n@since 1.1.0", "Gets fully-qualified name of a table or sequence.\n\n@param localName local table name.\n@param params params.\n@return fully-qualified table name.", "Returns all keys of all rows contained within this association.\n\n@return all keys of all rows contained within this association", "Special-purpose version for hashing a single int value. Value is treated as little-endian", "Add a raw SQL \"GROUP BY\" clause to the SQL query statement. This should not include the \"GROUP BY\".", "Use this API to update vlan.", "Retrieve table data, return an empty result set if no table data is present.\n\n@param name table name\n@return table data" ]
@Override public ArtifactoryResponse restCall(ArtifactoryRequest artifactoryRequest) throws IOException { HttpRequestBase httpRequest; String requestPath = "/" + artifactoryRequest.getApiUrl(); ContentType contentType = Util.getContentType(artifactoryRequest.getRequestType()); String queryPath = ""; if (!artifactoryRequest.getQueryParams().isEmpty()) { queryPath = Util.getQueryPath("?", artifactoryRequest.getQueryParams()); } switch (artifactoryRequest.getMethod()) { case GET: httpRequest = new HttpGet(); break; case POST: httpRequest = new HttpPost(); setEntity((HttpPost)httpRequest, artifactoryRequest.getBody(), contentType); break; case PUT: httpRequest = new HttpPut(); setEntity((HttpPut)httpRequest, artifactoryRequest.getBody(), contentType); break; case DELETE: httpRequest = new HttpDelete(); break; case PATCH: httpRequest = new HttpPatch(); setEntity((HttpPatch)httpRequest, artifactoryRequest.getBody(), contentType); break; case OPTIONS: httpRequest = new HttpOptions(); break; default: throw new IllegalArgumentException("Unsupported request method."); } httpRequest.setURI(URI.create(url + requestPath + queryPath)); addAccessTokenHeaderIfNeeded(httpRequest); if (contentType != null) { httpRequest.setHeader("Content-type", contentType.getMimeType()); } Map<String, String> headers = artifactoryRequest.getHeaders(); for (String key : headers.keySet()) { httpRequest.setHeader(key, headers.get(key)); } HttpResponse httpResponse = httpClient.execute(httpRequest); return new ArtifactoryResponseImpl(httpResponse); }
[ "Create a REST call to artifactory with a generic request\n\n@param artifactoryRequest that should be sent to artifactory\n@return {@link ArtifactoryResponse} artifactory response as per to the request sent" ]
[ "Waits for a job V3 to complete\n\n@param cloudFoundryClient the client to use to request job status\n@param completionTimeout the amount of time to wait for the job to complete.\n@param jobId the id of the job\n@return {@code onComplete} once job has completed", "return either the first space or the first nbsp", "Creates image stream request and returns it in JSON formatted string.\n\n@param name Name of the image stream\n@param insecure If the registry where the image is stored is insecure\n@param image Image name, includes registry information and tag\n@param version Image stream version.\n@return JSON formatted string", "Creates a converter function that converts value into primitive type.\n\n@return A converter function or {@code null} if the given type is not primitive type or boxed type", "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", "not start with another option name", "Asynchronous call that begins execution of the task\nand returns immediately.", "Mark root of this task task group depends on the given task group's root.\nThis ensure this task group's root get picked for execution only after the completion\nof all tasks in the given group.\n\n@param dependencyTaskGroup the task group that this task group depends on", "Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null" ]
private RelationType getRelationType(int type) { RelationType result; if (type > 0 && type < RELATION_TYPES.length) { result = RELATION_TYPES[type]; } else { result = RelationType.FINISH_START; } return result; }
[ "Convert an integer to a RelationType instance.\n\n@param type integer value\n@return RelationType instance" ]
[ "Take screenshot of the current window.\n\n@param target The target type/format of the Screenshot\n@return Screenshot of current window, in the requested format", "Use this API to add gslbsite.", "Removes any configured observers.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}", "Set the menu's width in pixels.", "Get a property as a boolean or null.\n\n@param key the property name", "Creates a copy of a matrix but swaps the rows as specified by the order array.\n\n@param order Specifies which row in the dest corresponds to a row in the src. Not modified.\n@param src The original matrix. Not modified.\n@param dst A Matrix that is a row swapped copy of src. Modified.", "Records the list of backedup files into a text file\n\n@param filesInEnv\n@param backupDir", "Authenticates the API connection by obtaining access and refresh tokens using the auth code that was obtained\nfrom the first half of OAuth.\n@param authCode the auth code obtained from the first half of the OAuth process.", "Assign FK value to all n-side objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation" ]
public Object selectElement(String predicate) throws org.odmg.QueryInvalidException { return ((DList) this.query(predicate)).get(0); }
[ "Selects the single element of the collection for which the provided OQL query\npredicate is true.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return The element that evaluates to true for the predicate. If no element\nevaluates to true, null is returned.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid." ]
[ "Gets the currency codes, or the regular expression to select codes.\n\n@return the query for chaining.", "Parse init parameter for integer value, returning default if not found or invalid", "Add columns to be returned by the SELECT query. If no columns are selected then all columns are returned by\ndefault. For classes with id columns, the id column is added to the select list automagically. This can be called\nmultiple times to add more columns to select.\n\n<p>\n<b>WARNING:</b> If you specify any columns to return, then any foreign-collection fields will be returned as null\n<i>unless</i> their {@link ForeignCollectionField#columnName()} is also in the list.\n</p>", "Creates a tar file entry with defaults parameters.\n@param fileName the entry name\n@return file entry with reasonable defaults", "Send an event to other applications\n\n@param context context in which to send the broadcast\n@param event event to send", "Configures a worker pool for the converter.\n\n@param corePoolSize The core pool size of the worker pool.\n@param maximumPoolSize The maximum pool size of the worker pool.\n@param keepAliveTime The keep alive time of the worker pool.\n@param unit The time unit of the specified keep alive time.\n@return This builder instance.", "Use this API to update responderparam.", "Look up the playback state that has reached furthest in the track, but give playing players priority over stopped players.\nThis is used to choose the scroll center when auto-scrolling is active.\n\n@return the playback state, if any, with the highest playing {@link PlaybackState#position} value", "Get the currently selected opacity.\n\n@return The int value of the currently selected opacity." ]
private void ensureCollectionClass(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException { if (CHECKLEVEL_NONE.equals(checkLevel)) { return; } if (collDef.hasProperty(PropertyHelper.OJB_PROPERTY_ARRAY_ELEMENT_CLASS_REF)) { // an array cannot have a collection-class specified if (collDef.hasProperty(PropertyHelper.OJB_PROPERTY_COLLECTION_CLASS)) { throw new ConstraintException("Collection "+collDef.getName()+" in class "+collDef.getOwner().getName()+" is an array but does specify collection-class"); } else { // no further processing necessary as its an array return; } } if (CHECKLEVEL_STRICT.equals(checkLevel)) { InheritanceHelper helper = new InheritanceHelper(); ModelDef model = (ModelDef)collDef.getOwner().getOwner(); String specifiedClass = collDef.getProperty(PropertyHelper.OJB_PROPERTY_COLLECTION_CLASS); String variableType = collDef.getProperty(PropertyHelper.OJB_PROPERTY_VARIABLE_TYPE); try { if (specifiedClass != null) { // if we have a specified class then it has to implement the manageable collection and be a sub type of the variable type if (!helper.isSameOrSubTypeOf(specifiedClass, variableType)) { throw new ConstraintException("The type "+specifiedClass+" specified as collection-class of the collection "+collDef.getName()+" in class "+collDef.getOwner().getName()+" is not a sub type of the variable type "+variableType); } if (!helper.isSameOrSubTypeOf(specifiedClass, MANAGEABLE_COLLECTION_INTERFACE)) { throw new ConstraintException("The type "+specifiedClass+" specified as collection-class of the collection "+collDef.getName()+" in class "+collDef.getOwner().getName()+" does not implement "+MANAGEABLE_COLLECTION_INTERFACE); } } else { // no collection class specified so the variable type has to be a collection type if (helper.isSameOrSubTypeOf(variableType, MANAGEABLE_COLLECTION_INTERFACE)) { // we can specify it as a collection-class as it is an manageable collection collDef.setProperty(PropertyHelper.OJB_PROPERTY_COLLECTION_CLASS, variableType); } else if (!helper.isSameOrSubTypeOf(variableType, JAVA_COLLECTION_INTERFACE)) { throw new ConstraintException("The collection "+collDef.getName()+" in class "+collDef.getOwner().getName()+" needs the collection-class attribute as its variable type does not implement "+JAVA_COLLECTION_INTERFACE); } } } catch (ClassNotFoundException ex) { throw new ConstraintException("Could not find the class "+ex.getMessage()+" on the classpath while checking the collection "+collDef.getName()+" in class "+collDef.getOwner().getName()); } } }
[ "Ensures that the given collection descriptor has the collection-class property if necessary.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If collection-class is given for an array or if no collection-class is given but required" ]
[ "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.", "Create the OJB_CLAZZ pseudo column based on CASE WHEN.\nThis column defines the Class to be instantiated.\n@param buf", "remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.\n\nThe operation is performed in two steps - first all the files are moved to a backup folder, and afterwards backup folder is removed.\nIf an error occurs in the first step of the operation, all files are restored and the operation ends with status {@code false}.\nIf an error occurs in the second step, the operation ends with status {@code false}, but the files are not rolled back.\n\n@throws IOException if an error occurred", "Release the connection back to the pool.\n\n@throws SQLException Never really thrown", "Use this API to update vpnclientlessaccesspolicy.", "Configs created by this ConfigBuilder will have the given Redis hostname.\n\n@param host the Redis hostname\n@return this ConfigBuilder", "Get list of asynchronous operations on this node. By default, only the\npending operations are returned.\n\n@param showCompleted Show completed operations\n@return A list of operation ids.", "Uncompresses the textual contents in the given map and and writes them to the files\ndenoted by the keys of the map.\n\n@param dir The base directory into which the files will be written\n@param contents The map containing the contents indexed by the filename\n@throws IOException If an error occurred", "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" ]
private Object initializeLazyPropertiesFromCache( final String fieldName, final Object entity, final SharedSessionContractImplementor session, final EntityEntry entry, final CacheEntry cacheEntry ) { throw new NotSupportedException( "OGM-9", "Lazy properties not supported in OGM" ); }
[ "Make superclasses method protected??" ]
[ "Return true if the class name is associated to an hidden class or matches a hide expression", "If the resource has ordered child types, those child types will be stored in the attachment. If there are no\nordered child types, this method is a no-op.\n\n@param resourceAddress the address of the resource\n@param resource the resource which may or may not have ordered children.", "Returns the docker version.\n\n@param serverUrl\nThe serverUrl to use.", "Recursively builds the VFS entry bean for the quick filtering function in the folder tab.<p<\n\n@param resource the resource\n@param childMap map from parent to child resources\n@param filterMatches the resources matching the filter\n@param parentPaths root paths of resources which are not leaves\n@param isRoot true if this the root node\n\n@return the VFS entry bean for the client\n\n@throws CmsException if something goes wrong", "Flushes this output stream and forces any buffered output bytes to be written out to the stream. If propagate is\ntrue, the wrapped stream will also be flushed.\n\n@param propagate\nboolean flag to indicate whether the wrapped OutputStream should also be flushed.\n@throws IOException\nif an I/O error occurs.", "Check the variable name and if not set, set it with the singleton variable name being on the top of the stack.", "Executes the mojo.", "Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects", "Use this API to update systemuser resources." ]
public static boolean isFolderExist(String directoryPath) { if (StringUtils.isEmpty(directoryPath)) { return false; } File dire = new File(directoryPath); return (dire.exists() && dire.isDirectory()); }
[ "Indicates if this file represents a directory on the underlying file system.\n\n@param directoryPath\n@return" ]
[ "Used to determine if a particular day of the week is normally\na working day.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day Day instance\n@return boolean flag", "Use this API to fetch all the protocolhttpband resources that are configured on netscaler.\nThis uses protocolhttpband_args which is a way to provide additional arguments while fetching the resources.", "Adds is Null criteria,\ncustomer_id is Null\nThe attribute will NOT be translated into column name\n\n@param column The column name to be used without translation", "Establish a new master tempo, and if it is a change from the existing one, report it to the listeners.\n\n@param newTempo the newly reported master tempo.", "This constructs and returns the request object for the producer pool\n\n@param topic the topic to which the data should be published\n@param bidPid the broker id and partition id\n@param data the data to be published\n@return producer data of builder", "This method is called to alert project listeners to the fact that\na resource has been written to a project file.\n\n@param resource resource instance", "Gets the Hamming distance between two strings.\n\n@param first First string.\n@param second Second string.\n@return The Hamming distance between p and q.", "Creates a file\n\n@param folder File\n@param fileName String\n@throws IOException", "Retrieves the constructor that is used by OJB to create instances of the given collection proxy\nclass.\n\n@param proxyClass The proxy class\n@param baseType The required base type of the proxy class\n@param typeDesc The type of collection proxy\n@return The constructor" ]
public void close() { if (transac_open) { try { this._cnx.rollback(); } catch (Exception e) { // Ignore. } } for (Statement s : toClose) { closeQuietly(s); } toClose.clear(); closeQuietly(_cnx); _cnx = null; }
[ "Close all JDBC objects related to this connection." ]
[ "Register a new SingleServiceWrapperInterceptor for the bean being\nwrapped, associate it with the PerformanceMonitor and tell it which methods\nto intercept.\n\n@param source An Attribute node from the spring configuration\n@param beanName The name of the bean that this performance monitor is wrapped around\n@param registry The registry where all the spring beans are registered", "Print the parameters of the parameterized type t", "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", "Calculate standart deviation.\n@param values Values.\n@param mean Mean.\n@return Standart deviation.", "Retrieve the jdbc type for the field descriptor that is related\nto this argument.", "Add a BETWEEN clause so the column must be between the low and high parameters.", "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 declarationBinderRef to the ImportersManager, create the corresponding.\nBinderDescriptor.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder\n@throws InvalidFilterException", "We add typeRefs without Nodes on the fly, so we should remove them before relinking." ]
public synchronized void tick() { long currentTime = GVRTime.getMilliTime(); long cutoffTime = currentTime - BUFFER_SECONDS * 1000; ListIterator<Long> it = mTimestamps.listIterator(); while (it.hasNext()) { Long timestamp = it.next(); if (timestamp < cutoffTime) { it.remove(); } else { break; } } mTimestamps.add(currentTime); mStatColumn.addValue(((float)mTimestamps.size()) / BUFFER_SECONDS); }
[ "Should be called each frame." ]
[ "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.", "Gets the path used for the results of XSLT Transforms.", "Checks if the name of the file follows the version-n format\n\n@param versionDir The directory\n@return Returns true if the name is correct, else false", "seeks to a specified day of the week in the past or future.\n\n@param direction the direction to seek: two possibilities\n'<' go backward\n'>' go forward\n\n@param seekType the type of seek to perform (by_day or by_week)\nby_day means we seek to the very next occurrence of the given day\nby_week means we seek to the first occurrence of the given day week in the\nnext (or previous,) week (or multiple of next or previous week depending\non the seek amount.)\n\n@param seekAmount the amount to seek. Must be guaranteed to parse as an integer\n\n@param dayOfWeek the day of the week to seek to, represented as an integer from\n1 to 7 (1 being Sunday, 7 being Saturday.) Must be guaranteed to parse as an Integer", "Remove custom overrides\n\n@param path_id ID of path containing custom override\n@param client_uuid UUID of the client\n@throws Exception exception", "Process the next event in a given stream.\n@return the fully processed event\n@throws IOException if a stream is in the wrong state, IO errors can be thrown", "Given the current cluster and a zone id that needs to be dropped, this\nmethod will remove all partitions from the zone that is being dropped and\nmove it to the existing zones. The partitions are moved intelligently so\nas not to avoid any data movement in the existing zones.\n\nThis is achieved by moving the partitions to nodes in the surviving zones\nthat is zone-nry to that partition in the surviving zone.\n\n@param currentCluster Current cluster metadata\n@return Returns an interim cluster with empty partition lists on the\nnodes from the zone being dropped", "Add columns to the tree.\n\n@param parentNode parent tree node\n@param table columns container", "Finds the first mesh in the given model.\n@param model root of a model loaded by the asset loader.\n@return GVRMesh found or null if model does not contain meshes\n@see #loadMesh(GVRAndroidResource.MeshCallback, GVRAndroidResource, int)" ]
public Long getOldestTaskCreatedTime(){ Timer.Context ctx = getOldestTaskTimeTimer.time(); try { long oldest = Long.MAX_VALUE; /* * I am asking this question first, because if I ask it after I could * miss the oldest time if the oldest is polled and worked on */ Long oldestQueueTime = this.taskQueue.getOldestQueueTime(); if(oldestQueueTime != null) oldest = oldestQueueTime; //there is a tiny race condition here... but we just want to make our best attempt long inProgressOldestTime = tasksInProgressTracker.getOldestTime(); if(inProgressOldestTime < oldest) oldest = inProgressOldestTime; return oldest; } finally { ctx.stop(); } }
[ "We want to get the best result possible as this value\nis used to determine what work needs to be recovered.\n\n@return" ]
[ "Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response", "Retrieves the real subject from the underlying RDBMS. Override this\nmethod if the object is to be materialized in a specific way.\n\n@return The real subject of the proxy", "Gets external resource for an HTML page in the setup-resources folder.\n\n@param context the context\n@param name the file name\n\n@return the resource for the HTML page", "Map Synchro constraints to MPXJ constraints.\n\n@param task task\n@param row Synchro constraint data", "Get the underlying channel. This may block until the channel is set.\n\n@return the channel\n@throws IOException for any error", "The list of device types on which this application can run.", "Returns an empty Search object in Json\n@return String\n@throws IOException", "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", "Adds folders to perform the search in.\n@param folders Folders to search in." ]
private void visitImplicitFirstFrame() { // There can be at most descriptor.length() + 1 locals int frameIndex = startFrame(0, descriptor.length() + 1, 0); if ((access & Opcodes.ACC_STATIC) == 0) { if ((access & ACC_CONSTRUCTOR) == 0) { frame[frameIndex++] = Frame.OBJECT | cw.addType(cw.thisName); } else { frame[frameIndex++] = Frame.UNINITIALIZED_THIS; } } int i = 1; loop: while (true) { int j = i; switch (descriptor.charAt(i++)) { case 'Z': case 'C': case 'B': case 'S': case 'I': frame[frameIndex++] = Frame.INTEGER; break; case 'F': frame[frameIndex++] = Frame.FLOAT; break; case 'J': frame[frameIndex++] = Frame.LONG; break; case 'D': frame[frameIndex++] = Frame.DOUBLE; break; case '[': while (descriptor.charAt(i) == '[') { ++i; } if (descriptor.charAt(i) == 'L') { ++i; while (descriptor.charAt(i) != ';') { ++i; } } frame[frameIndex++] = Frame.type(cw, descriptor.substring(j, ++i)); break; case 'L': while (descriptor.charAt(i) != ';') { ++i; } frame[frameIndex++] = Frame.OBJECT | cw.addType(descriptor.substring(j + 1, i++)); break; default: break loop; } } frame[1] = frameIndex - 3; endFrame(); }
[ "Visit the implicit first frame of this method." ]
[ "Cancel a particular download in progress. Returns 1 if the download Id is found else returns 0.\n\n@param downloadId\n@return int", "This method extracts resource data from a Planner file.\n\n@param plannerProject Root node of the Planner file", "Check exactly the week check-boxes representing the given weeks.\n@param weeksToCheck the weeks selected.", "Scans the scene graph to collect picked items\nand generates appropriate pick and touch events.\nThis function is called by the cursor controller\ninternally but can also be used to funnel a\nstream of Android motion events into the picker.\n@see #pickObjects(GVRScene, float, float, float, float, float, float)\n@param touched true if the \"touched\" button is pressed.\nWhich button indicates touch is controller dependent.\n@param event Android MotionEvent which caused the pick\n@see IPickEvents\n@see ITouchEvents", "Store the data of a print job in the registry.\n\n@param printJobStatus the print job status", "Detailed request to track additional data about PUT, GET and GET_ALL\n\n@param timeNS The time in nanoseconds that the operation took to complete\n@param numEmptyResponses For GET and GET_ALL, how many keys were no values found\n@param valueBytes Total number of bytes across all versions of values' bytes\n@param keyBytes Total number of bytes in the keys\n@param getAllAggregatedCount Total number of keys returned for getAll calls", "we only use the registrationList map if the object is not a proxy. During the\nreference locking, we will materialize objects and they will enter the registered for\nlock map.", "Returns the getter method for field on an object.\n\n@param object\nthe object\n@param fieldName\nthe field name\n@return the getter associated with the field on the object\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible", "Whether the given column is part of this key family or not.\n\n@return {@code true} if the given column is part of this key, {@code false} otherwise." ]
public List<URL> scan(Predicate<String> filter) { List<URL> discoveredURLs = new ArrayList<>(128); // For each Forge addon... for (Addon addon : furnace.getAddonRegistry().getAddons(AddonFilters.allStarted())) { List<String> filteredResourcePaths = filterAddonResources(addon, filter); for (String filePath : filteredResourcePaths) { URL ruleFile = addon.getClassLoader().getResource(filePath); if (ruleFile != null) discoveredURLs.add(ruleFile); } } return discoveredURLs; }
[ "Scans all Forge addons for files accepted by given filter." ]
[ "Extracts a house holder vector from the column of A and stores it in u\n@param A Complex matrix with householder vectors stored in the lower left triangle\n@param row0 first row in A (implicitly assumed to be r + i0)\n@param row1 last row + 1 in A\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U", "Retrieve and validate the timeout value from the REST request.\n\"X_VOLD_REQUEST_TIMEOUT_MS\" is the timeout header.\n\n@return true if present, false if missing", "Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string", "Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup the SMTP setup.", "Method to read our client's plain text\n\n@param file_name\n@return the filereader to translate client's plain text into our files\n@throws BeastException\nif any problem is found whit the file", "Remove a variable in the top variables layer.", "Restore backup data\n\n@param fileData - json file with restore data\n@return\n@throws Exception", "Checks all data sets in a given record for constraint violations.\n\n@param record\nIIM record (1,2,3, ...) to check\n\n@return list of constraint violations, empty set if IIM file is valid", "Checks if a given number is in the range of an integer.\n\n@param number\na number which should be in the range of an integer (positive or negative)\n\n@see java.lang.Integer#MIN_VALUE\n@see java.lang.Integer#MAX_VALUE\n\n@return number as an integer (rounding might occur)" ]
public static void pushImage(String imageTag, String username, String password, String host) throws IOException { final AuthConfig authConfig = new AuthConfig(); authConfig.withUsername(username); authConfig.withPassword(password); DockerClient dockerClient = null; try { dockerClient = getDockerClient(host); dockerClient.pushImageCmd(imageTag).withAuthConfig(authConfig).exec(new PushImageResultCallback()).awaitSuccess(); } finally { closeQuietly(dockerClient); } }
[ "Push docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host" ]
[ "Use this API to fetch dospolicy resource of given name .", "Visits an annotation on a local variable type.\n\n@param typeRef\na reference to the annotated type. The sort of this type\nreference must be {@link TypeReference#LOCAL_VARIABLE\nLOCAL_VARIABLE} or {@link TypeReference#RESOURCE_VARIABLE\nRESOURCE_VARIABLE}. See {@link TypeReference}.\n@param typePath\nthe path to the annotated type argument, wildcard bound, array\nelement type, or static inner type within 'typeRef'. May be\n<tt>null</tt> if the annotation targets 'typeRef' as a whole.\n@param start\nthe fist instructions corresponding to the continuous ranges\nthat make the scope of this local variable (inclusive).\n@param end\nthe last instructions corresponding to the continuous ranges\nthat make the scope of this local variable (exclusive). This\narray must have the same size as the 'start' array.\n@param index\nthe local variable's index in each range. This array must have\nthe same size as the 'start' array.\n@param desc\nthe class descriptor of the annotation class.\n@param visible\n<tt>true</tt> if the annotation is visible at runtime.\n@return a visitor to visit the annotation values, or <tt>null</tt> if\nthis visitor is not interested in visiting this annotation.", "See if there is an auto-attach cache file that seems to match the media in the specified slot, and if so,\nattach it.\n\n@param slot the player slot that is under consideration for automatic cache attachment", "Serializes any char sequence and writes it into specified buffer.", "Converts a boolean array containing the pixel data in BINARY mode to an\ninteger array with the pixel data in RGB mode.\n\n@param binaryArray pixel binary data\n@return pixel integer data in RGB mode.", "Converts the provided javascript object to JSON string.\n\n<p>If the object is a Map instance, it is stringified as key-value pairs, if it is a list, it is stringified as\na list, otherwise the object is merely converted to string using the {@code toString()} method.\n\n@param object the object to stringify.\n\n@return the object as a JSON string", "Returns the value of the identified field as an Integer.\n@param fieldName the name of the field\n@return the value of the field as an Integer\n@throws FqlException if the field cannot be expressed as an Integer", "Use this API to fetch nstrafficdomain_binding resources of given names .", "Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads\nhave actually been paused if possible.\n\n@throws LocalOperationException if the method is called while no upload is going on." ]
private void writeCustomInfo(Event event) { // insert customInfo (key/value) into DB for (Map.Entry<String, String> customInfo : event.getCustomInfo().entrySet()) { long cust_id = dbDialect.getIncrementer().nextLongValue(); getJdbcTemplate() .update("insert into EVENTS_CUSTOMINFO (ID, EVENT_ID, CUST_KEY, CUST_VALUE)" + " values (?,?,?,?)", cust_id, event.getPersistedId(), customInfo.getKey(), customInfo.getValue()); } }
[ "write CustomInfo list into table.\n\n@param event the event" ]
[ "Parses a single query item for the query facet.\n@param item JSON object of the query item.\n@return the parsed query item, or <code>null</code> if parsing failed.", "Wraps the specified object pool for connections as a DataSource.\n\n@param jcd the OJB connection descriptor for the pool to be wrapped\n@param connectionPool the connection pool to be wrapped\n@return a DataSource attached to the connection pool.\nConnections will be wrapped using DBCP PoolGuard, that will not allow\nunwrapping unless the \"accessToUnderlyingConnectionAllowed=true\" configuration\nis specified.", "Get random geographical location\n@return 2-Tuple of ints (latitude, longitude)", "Saves the project file displayed in this panel.\n\n@param file target file\n@param type file type", "Update the descriptor content with values from the editor.\n@throws CmsXmlException thrown if update fails due to a wrong XML structure (should never happen)", "Counts each property for which there is a statement in the given item\ndocument, ignoring the property thisPropertyIdValue to avoid properties\ncounting themselves.\n\n@param statementDocument\n@param usageRecord\n@param thisPropertyIdValue", "Returns the current revision.", "Return the number of days between startDate and endDate given the\nspecific daycount convention.\n\n@param startDate The start date given as a {@link org.threeten.bp.LocalDate}.\n@param endDate The end date given as a {@link org.threeten.bp.LocalDate}.\n@param convention A convention string.\n@return The number of days within the given period.", "Returns information about all clients for a profile\n\n@param model\n@param profileIdentifier\n@return\n@throws Exception" ]
public void start() { if (this.started) { throw new IllegalStateException("Cannot start the EventStream because it isn't stopped."); } final long initialPosition; if (this.startingPosition == STREAM_POSITION_NOW) { BoxAPIRequest request = new BoxAPIRequest(this.api, EVENT_URL.build(this.api.getBaseURL(), "now"), "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject jsonObject = JsonObject.readFrom(response.getJSON()); initialPosition = jsonObject.get("next_stream_position").asLong(); } else { assert this.startingPosition >= 0 : "Starting position must be non-negative"; initialPosition = this.startingPosition; } this.poller = new Poller(initialPosition); this.pollerThread = new Thread(this.poller); this.pollerThread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { public void uncaughtException(Thread t, Throwable e) { EventStream.this.notifyException(e); } }); this.pollerThread.start(); this.started = true; }
[ "Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started." ]
[ "Assigns an element a value based on its index in the internal array..\n\n@param index The matrix element that is being assigned a value.\n@param value The element's new value.", "Called when the end type is changed.", "Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.", "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", "Whether the address is IPv4-mapped\n\n::ffff:x:x/96 indicates IPv6 address mapped to IPv4", "Constraint that ensures that the field has a column property. If none is specified, then\nthe name of the field is used.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)", "Perform construction.\n\n@param callbackHandler", "Map Synchro constraints to MPXJ constraints.\n\n@param task task\n@param row Synchro constraint data", "Returns a specific profile\n\n@param profileId ID of profile\n@return Selected profile if found, null if not found\n@throws Exception exception" ]
public boolean isWellKnownIPv4Translatable() { //rfc 6052 rfc 6144 //64:ff9b::/96 prefix for auto ipv4/ipv6 translation if(getSegment(0).matches(0x64) && getSegment(1).matches(0xff9b)) { for(int i=2; i<=5; i++) { if(!getSegment(i).isZero()) { return false; } } return true; } return false; }
[ "Whether the address has the well-known prefix for IPv4 translatable addresses as in rfc 6052 and 6144\n@return" ]
[ "This method is used to finalize the configuration\nafter the configuration items have been set.", "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.", "Evalutes AND and OR operators.\n\n@param container data context\n@param promptValues responses to prompts\n@return operator result", "Handles the response of the SerialAPIGetCapabilities request.\n@param incomingMessage the response message to process.", "Turn map into string\n\n@param propMap Map to be converted\n@return", "Get a list of referrers from a given domain to a collection.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionReferrers.html\"", "Read the file header data.\n\n@param is input stream", "Create a Map composed of the entries of the first map minus the\nentries of the given map.\n\n@param self a map object\n@param removeMe the entries to remove from the map\n@return the resulting map\n@since 1.7.4", "Use this API to delete dnssuffix of given name." ]
private boolean hasReceivedHeartbeat() { long currentTimeMillis = System.currentTimeMillis(); boolean result = lastTimeMessageReceived + heartbeatTimeoutMs >= currentTimeMillis; if (!result) Jvm.warn().on(getClass(), Integer.toHexString(hashCode()) + " missed heartbeat, lastTimeMessageReceived=" + lastTimeMessageReceived + ", currentTimeMillis=" + currentTimeMillis); return result; }
[ "called periodically to check that the heartbeat has been received\n\n@return {@code true} if we have received a heartbeat recently" ]
[ "Perform a security check against OpenCms.\n\n@param cms The OpenCms object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user", "This method maps the currency symbol position from the\nrepresentation used in the MPP file to the representation\nused by MPX.\n\n@param value MPP symbol position\n@return MPX symbol position", "Creates a ServiceCall from an observable object and a callback.\n\n@param observable the observable to create from\n@param callback the callback to call when events happen\n@param <T> the type of the response\n@return the created ServiceCall", "read data from channel to buffer\n\n@param channel readable channel\n@param buffer bytebuffer\n@return read size\n@throws IOException any io exception", "This function interprets the arguments of the main function. By doing\nthis it will set flags for the dump generation. See in the help text for\nmore specific information about the options.\n\n@param args\narray of arguments from the main function.\n@return list of {@link DumpProcessingOutputAction}", "Extracts a set of interceptor bindings from a collection of annotations.\n@param beanManager\n@param annotations\n@return", "Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus", "Gets a SerialMessage with the SENSOR_ALARM_SUPPORTED_GET command\n@return the serial message, or null if the supported command is not supported.", "Returns the response error stream, handling the case when it contains gzipped data.\n@return gzip decoded (if needed) error stream or null" ]
@SuppressWarnings("WeakerAccess") public Map<DeckReference, WaveformPreview> getLoadedPreviews() { ensureRunning(); // Make a copy so callers get an immutable snapshot of the current state. return Collections.unmodifiableMap(new HashMap<DeckReference, WaveformPreview>(previewHotCache)); }
[ "Get the waveform previews available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the previews 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" ]
[ "Release all memory addresses taken by this allocator.\nBe careful in using this method, since all of the memory addresses become invalid.", "Applies the mask to this address and then compares values with the given address\n\n@param mask\n@param other\n@return", "Pretty prints the given source code.\n\n@param code\nsource code to format\n@param options\nformatter options\n@param lineEnding\ndesired line ending\n@return formatted source code", "Use this API to update autoscaleaction.", "todo remove, here only for binary compatibility of elytron subsystem, drop once it is in.", "Use this API to flush nssimpleacl.", "Creates an object instance according to clb, and fills its fileds width data provided by row.\n@param row A {@link Map} contain the Object/Row mapping for the object.\n@param targetClassDescriptor If the \"ojbConcreteClass\" feature was used, the target\n{@link org.apache.ojb.broker.metadata.ClassDescriptor} could differ from the descriptor\nthis class was associated - see {@link #selectClassDescriptor}.\n@param targetObject If 'null' a new object instance is build, else fields of object will\nbe refreshed.\n@throws PersistenceBrokerException if there ewas an error creating the new object", "Constructs a triangule Face from vertices v0, v1, and v2.\n\n@param v0\nfirst vertex\n@param v1\nsecond vertex\n@param v2\nthird vertex", "Called when the end type is changed." ]
public static ObjectName registerMbean(String typeName, Object obj) { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); ObjectName name = JmxUtils.createObjectName(JmxUtils.getPackageName(obj.getClass()), typeName); registerMbean(server, JmxUtils.createModelMBean(obj), name); return name; }
[ "Register the given object under the package name of the object's class\nwith the given type name.\n\nthis method using the platform mbean server as returned by\nManagementFactory.getPlatformMBeanServer()\n\n@param typeName The name of the type to register\n@param obj The object to register as an mbean" ]
[ "Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException", "Mark the given TaskItem depends on this taskGroup.\n\n@param dependentTaskItem the task item that depends on this task group\n@return key to be used as parameter to taskResult(string) method to retrieve result of\ninvocation of given task item.", "Helper method to track storage operations & time via StreamingStats.\n\n@param startNs", "Adds OPT_N | OPT_NODE 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", "Iterate and insert each of the elements of the Collection.\n\n@param objects\nThe objects to insert\n@param outIdentifier\nIdentifier to lookup the returned objects\n@param returnObject\nboolean to specify whether the inserted Collection is part of the ExecutionResults\n@param entryPoint\nOptional EntryPoint for the insertions\n@return", "Creates SLD rules for each old style.", "Sets the value for the API's \"languages\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters", "Get a subset of the attributes of the provided class. An attribute is each public field in the class\nor super class.\n\n@param classToInspect the class to inspect\n@param filter a predicate that returns true when a attribute should be kept in resulting\ncollection.", "Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix." ]
public static int getChunkId(String fileName) { Pattern pattern = Pattern.compile("_[\\d]+\\."); Matcher matcher = pattern.matcher(fileName); if(matcher.find()) { return new Integer(fileName.substring(matcher.start() + 1, matcher.end() - 1)); } else { throw new VoldemortException("Could not extract out chunk id from " + fileName); } }
[ "Returns the chunk id for the file name\n\n@param fileName The file name\n@return Chunk id" ]
[ "map a property id. Property id can only be an Integer or String", "Determine the enum value corresponding to the third play state found in the packet.\n\n@return the proper value", "Restores a trashed folder to a new location with a new name.\n@param folderID the ID of the trashed folder.\n@param newName an optional new name to give the folder. This can be null to use the folder's original name.\n@param newParentID an optional new parent ID for the folder. This can be null to use the folder's original\nparent.\n@return info about the restored folder.", "Retrieves an object that has been attached to this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.", "Checks if the provided license is valid and could be stored into the database\n\n@param license the license to test\n@throws WebApplicationException if the data is corrupted", "Convert an Object to a Timestamp, without an Exception", "Return the current handedness of the Gear Controller.\n\n@return returns whether the user is using the controller left or right handed. This function\nreturns <code>null</code> if the controller is unavailable or the data is stale.", "Gets the index of a ExpandableWrapper within the helper item list based on\nthe index of the ExpandableWrapper.\n\n@param parentPosition The index of the parent in the list of parents\n@return The index of the parent in the merged list of children and parents", "Term value.\n\n@param term\nthe term\n@return the string" ]
private ProjectFile handleByteOrderMark(InputStream stream, int length, Charset charset) throws Exception { UniversalProjectReader reader = new UniversalProjectReader(); reader.setSkipBytes(length); reader.setCharset(charset); return reader.read(stream); }
[ "The file we are working with has a byte order mark. Skip this and try again to read the file.\n\n@param stream schedule data\n@param length length of the byte order mark\n@param charset charset indicated by byte order mark\n@return ProjectFile instance" ]
[ "Sets the path to the script file to load and loads the script.\n\n@param filePath path to script file\n@throws IOException if the script cannot be read.\n@throws GVRScriptException if a script processing error occurs.", "Remove a part of a CharSequence. This replaces the first occurrence\nof the pattern within self with '' and returns the result.\n\n@param self a String\n@param pattern a Pattern representing the part to remove\n@return a String minus the part to be removed\n@since 2.2.0", "Returns the parsed story from the given path\n\n@param configuration the Configuration used to run story\n@param storyPath the story path\n@return The parsed Story", "We have more input since wait started", "Installs a remoting stream server for a domain instance\n@param serviceTarget the service target to install the services into\n@param endpointName the name of the endpoint to install the stream server into\n@param networkInterfaceBinding the network interface binding\n@param port the port\n@param securityRealm the security real name\n@param options the remoting options", "This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset to position 0 before\ncalling this method and the caller must reset it after the call\nreturns\n@return True if the buffer holds a complete request, false otherwise", "Patch provided by Avril Kotzen ([email protected])\nDB2 handles TINYINT (for mapping a byte).", "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", "Gets the automaton by id.\n\n@param id the id\n@return the automaton by id\n@throws IOException Signals that an I/O exception has occurred." ]
public ThumborUrlBuilder crop(int top, int left, int bottom, int right) { if (top < 0) { throw new IllegalArgumentException("Top must be greater or equal to zero."); } if (left < 0) { throw new IllegalArgumentException("Left must be greater or equal to zero."); } if (bottom < 1 || bottom <= top) { throw new IllegalArgumentException("Bottom must be greater than zero and top."); } if (right < 1 || right <= left) { throw new IllegalArgumentException("Right must be greater than zero and left."); } hasCrop = true; cropTop = top; cropLeft = left; cropBottom = bottom; cropRight = right; return this; }
[ "Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code\nbottom} or {@code right} are less than one or less than {@code top} or {@code left},\nrespectively." ]
[ "Set new point coordinates somewhere on screen and apply new direction\n\n@param position the point position to apply new values to", "Generates timephased costs from timephased work where multiple cost rates\napply to the assignment.\n\n@param standardWorkList timephased work\n@param overtimeWorkList timephased work\n@return timephased cost", "Checks the foreignkeys of all references in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid", "Returns the orthogonal V matrix.\n\n@param V If not null then the results will be stored here. Otherwise a new matrix will be created.\n@return The extracted Q matrix.", "Find the path to use .\nUses java annotations first and if not found, uses kubernetes annotations on the service object.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved path of '/' as a fallback.", "This method lists all resources defined in the file.\n\n@param file MPX file", "Prints some basic documentation about this program.", "Transits a float propertyId from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self", "read the prefetchInLimit from Config based on OJB.properties" ]
public Point2D.Double minDistancePointSpline(Point2D.Double p, int nPointsPerSegment){ double minDistance = Double.MAX_VALUE; Point2D.Double minDistancePoint = null; int numberOfSplines = spline.getN(); double[] knots = spline.getKnots(); for(int i = 0; i < numberOfSplines; i++){ double x = knots[i]; double stopx = knots[i+1]; double dx = (stopx-x)/nPointsPerSegment; for(int j = 0; j < nPointsPerSegment; j++){ Point2D.Double candidate = new Point2D.Double(x, spline.value(x)); double d = p.distance(candidate); if(d<minDistance){ minDistance = d; minDistancePoint = candidate; } x += dx; } } return minDistancePoint; }
[ "Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p" ]
[ "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.", "This method retrieves a byte array containing the data at the\ngiven index in the block. If no data is found at the given index\nthis method returns null.\n\n@param index index of the data item to be retrieved\n@return byte array containing the requested data", "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", "Map a single ResultSet row to a T instance.\n\n@throws SQLException", "Returns the configured request parameter for the current query string, or the default parameter if the core is not specified.\n@return The configured request parameter for the current query string, or the default parameter if the core is not specified.", "This method allows a pre-existing resource calendar to be attached to a\nresource.\n\n@param calendar resource calendar", "read all objects of this iterator. objects will be placed in cache", "rollback the transaction", "Given an AVRO serializer definition, validates if all the avro schemas\nare valid i.e parseable.\n\n@param avroSerDef" ]
private synchronized static Cluster getCluster(URI baseUrl, String[] personalities) throws IOException { final Entry<URI, Set<String>> key = Maps.immutableEntry(baseUrl, (Set<String>)ImmutableSet.copyOf(personalities)); Cluster result = CLUSTERS.get(key); if (result != null) { return result; } result = new Cluster(EmbeddedPostgreSQL.start()); final DBI dbi = new DBI(result.getPg().getTemplateDatabase()); final Migratory migratory = new Migratory(new MigratoryConfig() {}, dbi, dbi); migratory.addLocator(new DatabasePreparerLocator(migratory, baseUrl)); final MigrationPlan plan = new MigrationPlan(); int priority = 100; for (final String personality : personalities) { plan.addMigration(personality, Integer.MAX_VALUE, priority--); } migratory.dbMigrate(plan); result.start(); CLUSTERS.put(key, result); return result; }
[ "Each schema set has its own database cluster. The template1 database has the schema preloaded so that\neach test case need only create a new database and not re-invoke Migratory." ]
[ "Try to kill a given process.\n\n@param processName the process name\n@param id the process integer id, or {@code -1} if this is not relevant\n@return {@code true} if the command succeeded, {@code false} otherwise", "Returns the rank of the decomposed matrix.\n\n@see SingularOps_DDRM#rank(SingularValueDecomposition_F64, double)\n\n@return The matrix's rank", "remove the user profile with id from the db.", "Wraps a linear solver of any type with a safe solver the ensures inputs are not modified", "Write to a context. Uses NullWritable for key so that only value of output string is ultimately written\n\n@param cr the DataPipe to write to", "Clears the proxy. A cleared proxy is defined as loaded\n\n@see Collection#clear()", "adds a TTL index to the given collection. The TTL must be a positive integer.\n\n@param collection the collection to use for the TTL index\n@param field the field to use for the TTL index\n@param ttl the TTL to set on the given field\n@throws IllegalArgumentException if the TTL is less or equal 0", "Calculate the value of a swaption assuming the Black'76 model.\n\n@param forwardSwaprate The forward (spot)\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity.\n@param optionStrike The option strike.\n@param swapAnnuity The swap annuity corresponding to the underlying swap.\n@return Returns the value of a Swaption under the Black'76 model", "Get the MonetaryAmount implementation class.\n\n@return the implementation class of the containing amount instance, never null.\n@see MonetaryAmount#getContext()" ]
@UiHandler("m_everyDay") void onEveryDayChange(ValueChangeEvent<String> event) { if (handleChange()) { m_controller.setInterval(m_everyDay.getFormValueAsString()); } }
[ "Handle interval change.\n@param event the change event." ]
[ "Appends a formatted line of code to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>", "Gets the URL of the service with the given name that has been created during the current session.\n\n@param name to return its URL\n@return URL of the service.", "Use this API to fetch lbvserver_servicegroup_binding resources of given name .", "Gets the i-th half-edge associated with the face.\n\n@param i\nthe half-edge index, in the range 0-2.\n@return the half-edge", "Sleeps if necessary to slow down the caller.\n\n@param eventsSeen Number of events seen since last invocation. Basis for\ndetermining whether its necessary to sleep.", "Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory", "Use this API to disable nsacl6 resources of given names.", "Set the host running the Odo instance to configure\n\n@param hostName name of host", "Use this API to update autoscaleprofile." ]
@SuppressWarnings("unchecked") public static Map<String, List<Path>> findJavaHomes() { try { return (Map<String, List<Path>>) accessible(Class.forName(CAPSULE_CLASS_NAME).getDeclaredMethod("getJavaHomes")).invoke(null); } catch (ReflectiveOperationException e) { throw new AssertionError(e); } }
[ "Returns all known Java installations\n\n@return a map from the version strings to their respective paths of the Java installations." ]
[ "Sets the max.\n\n@param n the new max", "Reads non outline code custom field values and populates container.", "Parser for actual conditions\n\n@param feed\n@return", "Log a info message with a throwable.", "Read arguments from a file. Newline delimited, UTF-8 encoded. No fanciness to\navoid dependencies.", "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.", "Gets the declared bean type\n\n@return The bean type", "do 'Distinct' operation\n\n@param queryDescriptor descriptor of MongoDB query\n@param collection collection for execute the operation\n@return result iterator\n@see <a href =\"https://docs.mongodb.com/manual/reference/method/db.collection.distinct/\">distinct</a>", "Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream" ]
private static List<Segment> parseSegments(String origPathStr) { String pathStr = origPathStr; if (!pathStr.startsWith("/")) { pathStr = pathStr + "/"; } List<Segment> result = new ArrayList<>(); for (String segmentStr : PATH_SPLITTER.split(pathStr)) { Matcher m = SEGMENT_PATTERN.matcher(segmentStr); if (!m.matches()) { throw new IllegalArgumentException("Bad aql path: " + origPathStr); } Segment segment = new Segment(); segment.attribute = m.group(1); segment.nodeId = m.groupCount() >= 3 ? m.group(3) : null; result.add(segment); } return result; }
[ "currently does not support paths with name constrains" ]
[ "Checks that locking and update-lock are only used for fields of TIMESTAMP or INTEGER type.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "Returns the AirMapView implementation as requested by the mapType argument. Use this method if\nyou need to request a specific AirMapView implementation that is not necessarily the preferred\ntype. For example, you can use it to explicit request a web-based map implementation.\n\n@param mapType Map type for the requested AirMapView implementation.\n@return An {@link AirMapViewBuilder} for the requested {@link AirMapViewTypes} mapType.", "Get a project according to its full name.\n\n@param fullName The full name of the project.\n@return The project which answers the full name.", "Returns the ports of the server.\n\n@return the {@link Map} which contains the pairs of local {@link InetSocketAddress} and\n{@link ServerPort} is the server is started. {@link Optional#empty()} otherwise.", "close the AdminPool, if no long required.\nAfter closed, all public methods will throw IllegalStateException", "Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.", "Look for the specified album art in both the hot cache of loaded tracks and the longer-lived LRU cache.\n\n@param artReference uniquely identifies the desired album art\n\n@return the art, if it was found in one of our caches, or {@code null}", "Answer the SQL-Clause for a FieldCriteria\n\n@param c FieldCriteria\n@param cld ClassDescriptor", "Writes one or more String columns as a line to the CsvWriter.\n\n@param columns\nthe columns to write\n@throws IllegalArgumentException\nif columns.length == 0\n@throws IOException\nIf an I/O error occurs\n@throws NullPointerException\nif columns is null" ]
public Quaternionf ConvertDirectionalVectorToQuaternion(Vector3f d) { d.negate(); Quaternionf q = new Quaternionf(); // check for exception condition if ((d.x == 0) && (d.z == 0)) { // exception condition if direction is (0,y,0): // straight up, straight down or all zero's. if (d.y > 0) { // direction straight up AxisAngle4f angleAxis = new AxisAngle4f(-(float) Math.PI / 2, 1, 0, 0); q.set(angleAxis); } else if (d.y < 0) { // direction straight down AxisAngle4f angleAxis = new AxisAngle4f((float) Math.PI / 2, 1, 0, 0); q.set(angleAxis); } else { // All zero's. Just set to identity quaternion q.identity(); } } else { d.normalize(); Vector3f up = new Vector3f(0, 1, 0); Vector3f s = new Vector3f(); d.cross(up, s); s.normalize(); Vector3f u = new Vector3f(); d.cross(s, u); u.normalize(); Matrix4f matrix = new Matrix4f(s.x, s.y, s.z, 0, u.x, u.y, u.z, 0, d.x, d.y, d.z, 0, 0, 0, 0, 1); q.setFromNormalized(matrix); } return q; }
[ "Converts a vector into a quaternion.\nUsed for the direction of spot and directional lights\nCalled upon initialization and updates to those vectors\n\n@param d" ]
[ "Given a list of store definitions return a set of store names\n\n@param storeDefList The list of store definitions\n@return Returns a set of store names", "Get DPI suggestions.\n\n@return DPI suggestions", "Helper to format term updates as expected by the Wikibase API\n@param updates\nplanned updates for the type of term\n@return map ready to be serialized as JSON by Jackson", "Returns the absolute directory on the Web site where dumpfiles of the\ngiven type can be found.\n\n@param dumpContentType\nthe type of dump\n@return relative web directory for the current dumpfiles\n@throws IllegalArgumentException\nif the given dump file type is not known", "Get a list of referrers from a given domain to a photo.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html\"", "Flatten a list of test suite results into a collection of results grouped by test class.\nThis method basically strips away the TestNG way of organising tests and arranges\nthe results by test class.", "Returns the next object in the table.\n\n@throws IllegalStateException\nIf there was a problem extracting the object from SQL.", "Write the domain controller data to a byte buffer.\n\n@param data the domain controller data\n@return the byte buffer\n@throws Exception", "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." ]
public static void log(final String templateName, final Template template, final Values values) { new ValuesLogger().doLog(templateName, template, values); }
[ "Log the values for the provided template.\n\n@param templateName the name of the template the values came from\n@param template the template object\n@param values the resultant values" ]
[ "Called when a drawer has settled in a completely open state.", "Retrieves the value of the given accessible field of the given receiver.\n\n@param receiver the container of the field, not <code>null</code>\n@param fieldName the field's name, not <code>null</code>\n@return the value of the field\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#get(Object)}\n@throws IllegalArgumentException see {@link Field#get(Object)}", "Set the individual dates where the event should take place.\n@param dates the dates to set.", "Returns a flag indicating if the query given by the parameters should be ignored.\n@return A flag indicating if the query given by the parameters should be ignored.", "Evalutes AND and OR operators.\n\n@param container data context\n@param promptValues responses to prompts\n@return operator result", "Returns the given dialect, narrowed down to the given dialect facet in case it is implemented by the dialect.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return the given dialect, narrowed down to the given dialect facet or {@code null} in case the given dialect\ndoes not implement the given facet", "Obtain the class of a given className\n\n@param className\n@return\n@throws Exception", "Write attributes for an individual custom field.\nNote that at present we are only writing a subset of the\navailable data... in this instance the field alias.\nIf the field does not have an alias we won't write an\nentry.\n\n@param field custom field to write\n@throws IOException", "Edit the text of a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to edit.\n@param commentText\nUpdate the comment to this text.\n@throws FlickrException" ]
public static base_response unset(nitro_service client, nsacl6 resource, String[] args) throws Exception{ nsacl6 unsetresource = new nsacl6(); unsetresource.acl6name = resource.acl6name; return unsetresource.unset_resource(client,args); }
[ "Use this API to unset the properties of nsacl6 resource.\nProperties that need to be unset are specified in args array." ]
[ "Add an extension to the set of extensions.\n\n@param extension an extension", "Use this API to add nspbr6.", "Update a note.\n\n@param note\nThe Note to update\n@throws FlickrException", "Launch Sample Activity residing in the same module", "Creates a new form session to edit the file with the given name using the given form configuration.\n\n@param configPath the site path of the form configuration\n@param fileName the name (not path) of the XML content to edit\n@return the id of the newly created form session\n\n@throws CmsUgcException if something goes wrong", "Puts value at given column\n\n@param value Will be encoded using UTF-8", "Returns the Map value of the field.\n\n@return the Map value of the field. It returns a reference of the value both for <code>MAP</code> and\n<code>LIST_MAP</code>.\n@throws IllegalArgumentException if the value cannot be converted to Map.", "Writes this address as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix.", "Finds the beat in which the specified track position falls.\n\n@param milliseconds how long the track has been playing\n\n@return the beat number represented by that time, or -1 if the time is before the first beat" ]
@Override public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error) { //listener.getLogger().println("[MavenDependenciesRecorder] mojo: " + mojo.getClass() + ":" + mojo.getGoal()); //listener.getLogger().println("[MavenDependenciesRecorder] dependencies: " + pom.getArtifacts()); recordMavenDependencies(pom.getArtifacts()); return true; }
[ "Mojos perform different dependency resolution, so we add dependencies for each mojo." ]
[ "Extracts the service name from a Server.\n@param server\n@return", "Remove any overrides for an endpoint on the default profile, client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise", "Use this API to fetch authenticationnegotiatepolicy_binding resource of given name .", "Reads a stringtemplate group from a stream.\n\nThis will always return a group (empty if necessary), even if reading it from the stream fails.\n\n@param stream the stream to read from\n@return the string template group", "Add the dependencies if the deployment contains a service activator loader entry.\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException", "Use this API to Import responderhtmlpage.", "Main method of the class, which handles the process of creating the tests\n\n@param requirementsFolder\n, it is the folder where the plain text given by the client is\nstored\n@param platformName\n, to choose the MAS platform (JADE, JADEX, etc.)\n@param src_test_dir\n, the folder where our classes are created\n@param tests_package\n, the name of the package where the stories are created\n@param casemanager_package\n, the path where casemanager must be created\n@param loggingPropFile\n, properties file\n@throws Exception\n, if any error is found in the configuration", "Remove all the existing links of the Declaration.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration", "Create an executable jar to generate the report. Created jar contains only\nallure configuration file." ]
public static base_responses add(nitro_service client, cachepolicylabel resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { cachepolicylabel addresources[] = new cachepolicylabel[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new cachepolicylabel(); addresources[i].labelname = resources[i].labelname; addresources[i].evaluates = resources[i].evaluates; } result = add_bulk_request(client, addresources); } return result; }
[ "Use this API to add cachepolicylabel resources." ]
[ "Extract task data.", "Returns a new macro resolver that loads message keys from the workplace bundle in the user setting's language.\n@param cms the CmsObject.\n@return a new macro resolver with messages from the workplace bundle in the current users locale.", "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", "Drives the unit test.", "Read a short int from an input stream.\n\n@param is input stream\n@return int value", "Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid.", "Set the value as provided.\n@param value the serial date value as JSON string.", "Initializes the information on an available master mode.\n@throws CmsException thrown if the write permission check on the bundle descriptor fails.", "Answer the TableAlias for aPath or aUserAlias\n@param aPath\n@param aUserAlias\n@param hintClasses\n@return TableAlias, null if none" ]
public void saveFile(File file, String type) { if (file != null) { m_treeController.saveFile(file, type); } }
[ "Saves the project file displayed in this panel.\n\n@param file target file\n@param type file type" ]
[ "Set the time and value of the key at the given index\n@param keyIndex 0 based index of key\n@param time key time in seconds\n@param values key values", "Removes a corporate groupId from an Organisation\n\n@param organizationId String\n@param corporateGroupId String", "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", "This method writes resource data to a JSON file.", "The normalized string returned by this method is consistent with java.net.Inet6address.\nIPs are not compressed nor mixed in this representation.", "Set an unknown field.\n@param name the unknown property name\n@param value the unknown property value", "Set the permission for who may view the geo data associated with a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe id of the photo to set permissions for.\n@param perms\nPermissions, who can see the geo data of this photo\n@throws FlickrException", "Processes the most recent dump of the given type using the given dump\nprocessor.\n\n@see DumpProcessingController#processMostRecentMainDump()\n@see DumpProcessingController#processAllRecentRevisionDumps()\n\n@param dumpContentType\nthe type of dump to process\n@param dumpFileProcessor\nthe processor to use\n@deprecated Use {@link #getMostRecentDump(DumpContentType)} and\n{@link #processDump(MwDumpFile)} instead; method will vanish\nin WDTK 0.5", "Wait for the template resources to come up after the test container has\nbeen started. This allows the test container and the template resources\nto come up in parallel." ]
static void backupDirectory(final File source, final File target) throws IOException { if (!target.exists()) { if (!target.mkdirs()) { throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(target.getAbsolutePath()); } } final File[] files = source.listFiles(CONFIG_FILTER); for (final File file : files) { final File t = new File(target, file.getName()); IoUtils.copyFile(file, t); } }
[ "Backup all xml files in a given directory.\n\n@param source the source directory\n@param target the target directory\n@throws IOException for any error" ]
[ "Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@param value\n@return ISO 8601 value (String)", "Convert event type.\n\n@param eventType the event type\n@return the event enum type", "Use this API to enable snmpalarm resources of given names.", "Converts any path into something that can be placed in an Android directory.\n\nTraverses any subdirectories and flattens it all into a single filename. Also\ngets rid of commonly seen illegal characters in tz identifiers, and lower cases\nthe entire thing.\n\n@param path the path to convert\n@return a flat path with no directories (and lower-cased)", "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", "Stop finding signatures for all active players.", "Parse the JSON string and return the object. The string is expected to be the JSON print data from the\nclient.\n\n@param spec the JSON formatted string.\n@return The encapsulated JSON object", "Convert any number class to array of integer.\n\n@param <T> Type.\n@param array Array.\n@return Integer array.", "Returns a new iterator filtering any null references.\n\n@param unfiltered\nthe unfiltered iterator. May not be <code>null</code>.\n@return an unmodifiable iterator containing all elements of the original iterator without any <code>null</code>\nreferences. Never <code>null</code>." ]
public static BoxCollaborationWhitelist.Info create(final BoxAPIConnection api, String domain, WhitelistDirection direction) { URL url = COLLABORATION_WHITELIST_ENTRIES_URL_TEMPLATE.build(api.getBaseURL()); BoxJSONRequest request = new BoxJSONRequest(api, url, HttpMethod.POST); JsonObject requestJSON = new JsonObject() .add("domain", domain) .add("direction", direction.toString()); request.setBody(requestJSON.toString()); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject responseJSON = JsonObject.readFrom(response.getJSON()); BoxCollaborationWhitelist domainWhitelist = new BoxCollaborationWhitelist(api, responseJSON.get("id").asString()); return domainWhitelist.new Info(responseJSON); }
[ "Creates a new Collaboration Whitelist for a domain.\n@param api the API connection to be used by the resource.\n@param domain the domain to be added to a collaboration whitelist for a Box Enterprise.\n@param direction an enum representing the direction of the collaboration whitelist. Can be set to\ninbound, outbound, or both.\n@return information about the collaboration whitelist created." ]
[ "slave=true", "The number of bytes required to hold the given number\n\n@param number The number being checked.\n@return The required number of bytes (must be 8 or less)", "Print the given values after displaying the provided message.", "Prepare a model JSON for analyze, resolves the hierarchical structure\ncreates a HashMap which contains all resourceIds as keys and for each key\nthe JSONObject, all id are keys of this map\n@param object\n@return a HashMap keys: all ressourceIds values: all child JSONObjects\n@throws org.json.JSONException", "binds the Identities Primary key values to the statement", "Populate the properties indicating the source of this schedule.\n\n@param properties project properties", "Check whether the URL end with one of the given suffixes.\n\n@param uri URI\n@param patterns possible suffixes\n@return true when URL ends with one of the suffixes", "Compare an array of bytes with a subsection of a larger array of bytes.\n\n@param lhs small array of bytes\n@param rhs large array of bytes\n@param rhsOffset offset into larger array of bytes\n@return true if a match is found", "Use this API to add nsip6 resources." ]
public static List<Versioned<byte[]>> pruneNonReplicaEntries(List<Versioned<byte[]>> vals, List<Integer> keyReplicas, MutableBoolean didPrune) { List<Versioned<byte[]>> prunedVals = new ArrayList<Versioned<byte[]>>(vals.size()); for(Versioned<byte[]> val: vals) { VectorClock clock = (VectorClock) val.getVersion(); List<ClockEntry> clockEntries = new ArrayList<ClockEntry>(); for(ClockEntry clockEntry: clock.getEntries()) { if(keyReplicas.contains((int) clockEntry.getNodeId())) { clockEntries.add(clockEntry); } else { didPrune.setValue(true); } } prunedVals.add(new Versioned<byte[]>(val.getValue(), new VectorClock(clockEntries, clock.getTimestamp()))); } return prunedVals; }
[ "Remove all non replica clock entries from the list of versioned values\nprovided\n\n@param vals list of versioned values to prune replicas from\n@param keyReplicas list of current replicas for the given key\n@param didPrune flag to mark if we did actually prune something\n@return pruned list" ]
[ "Create the Grid Point style.", "1-D Gaussian function.\n\n@param x value.\n@return Function's value at point x.", "Use this API to fetch wisite_binding resource of given name .", "Formats a percentage value.\n\n@param number MPXJ percentage value\n@return Primavera percentage value", "This method is called to format a percentage value.\n\n@param value numeric value\n@return percentage value", "Returns a diagonal matrix with the specified diagonal elements.\n@param values values of diagonal elements\n@return A diagonal matrix", "Returns the remote collection representing the given namespace.\n\n@param namespace the namespace referring to the remote collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the remote collection representing the given namespace.", "Shutdown the container.\n\n@see Weld#initialize()", "Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception" ]
public static <OutT, InT> PagedList<OutT> toPagedList(List<InT> list, final Func1<InT, OutT> mapper) { PageImpl<InT> page = new PageImpl<>(); page.setItems(list); page.setNextPageLink(null); PagedList<InT> pagedList = new PagedList<InT>(page) { @Override public Page<InT> nextPage(String nextPageLink) { return null; } }; PagedListConverter<InT, OutT> converter = new PagedListConverter<InT, OutT>() { @Override public Observable<OutT> typeConvertAsync(InT inner) { return Observable.just(mapper.call(inner)); } }; return converter.convert(pagedList); }
[ "Converts the given list of a type to paged list of a different type.\n\n@param list the list to convert to paged list\n@param mapper the mapper to map type in input list to output list\n@param <OutT> the type of items in output paged list\n@param <InT> the type of items in input paged list\n@return the paged list" ]
[ "Return true if the DeclarationExpression represents a 'final' variable declaration.\n\nNOTE: THIS IS A WORKAROUND.\n\nThere does not seem to be an easy way to determine whether the 'final' modifier has been\nspecified for a variable declaration. Return true if the 'final' is present before the variable name.", "Get a list of all methods.\n\n@return The method names\n@throws FlickrException", "Extract schema of the value field", "Not used.", "Returns the y-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the y coordinate", "Get a View that displays the data at the specified\nposition in the data set. In this case, if we are at\nthe end of the list and we are still in append mode, we\nask for a pending view and return it, plus kick off the\nbackground task to append more data to the wrapped\nadapter.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View", "Sleeps if necessary to slow down the caller.\n\n@param eventsSeen Number of events seen since last invocation. Basis for\ndetermining whether its necessary to sleep.", "Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded.", "Constructs a Google APIs HTTP client with the associated credentials." ]
public Map<Double, SingleAssetEuropeanOptionProductDescriptor> getDescriptors(LocalDate referenceDate){ int numberOfStrikes = strikes.length; HashMap<Double, SingleAssetEuropeanOptionProductDescriptor> descriptors = new HashMap<Double, SingleAssetEuropeanOptionProductDescriptor>(); LocalDate maturityDate = FloatingpointDate.getDateFromFloatingPointDate(referenceDate, maturity); for(int i = 0; i< numberOfStrikes; i++) { descriptors.put(strikes[i], new SingleAssetEuropeanOptionProductDescriptor(underlyingName, maturityDate, strikes[i])); } return descriptors; }
[ "Return a collection of product descriptors for each option in the smile.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@return a collection of product descriptors for each option in the smile." ]
[ "Return a vector of values corresponding to a given vector of times.\n@param times A given vector of times.\n@return A vector of values corresponding to the given vector of times.", "Function to filter files based on defined rules.", "Internal method that adds a metadata provider to the set associated with a particular hash key, creating the\nset if needed.\n\n@param key the hashKey identifying the media for which this provider can offer metadata (or the empty string if\nit can offer metadata for all media)\n@param provider the metadata provider to be added to the active set", "Helper to return the first item in the iterator or null.\n\n@return T the first item or null.", "Compares this value with the specified object for order. Returns a negative\ninteger, zero, or a positive integer as this value is less than, equal to, or\ngreater than the specified value.\n@param other Another Rational value.\n@return A negative integer, zero, or a positive integer as this value is less\nthan, equal to, or greater than the specified value.", "Set an outline code value.\n\n@param index outline code index (1-10)\n@param value outline code value", "Sets the name of the attribute group with which this attribute is associated.\n\n@param attributeGroup the attribute group name. Cannot be an empty string but can be {@code null}\nif the attribute is not associated with a group.\n@return a builder that can be used to continue building the attribute definition", "Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance", "Obtains a database connection, retrying if necessary.\n@param connectionHandle\n@return A DB connection.\n@throws SQLException" ]
public static boolean isDelayedQueue(final Jedis jedis, final String key) { return ZSET.equalsIgnoreCase(jedis.type(key)); }
[ "Determines if the queue identified by the given key is a delayed queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key identifies a delayed queue, false otherwise" ]
[ "Based on a provided locale return a SoyMsgBundle file.\n\nIf a passed in locale object is \"Optional.absent()\",\nthe implementation will return Optional.absent() as well\n@param locale - maybe locale\n@return maybe soy msg bundle", "Add all headers in a header map.\n\n@param headers a map of headers.\n@return the interceptor instance itself.", "Static method to convert a binary operator into a string.\n\n@param oper is the binary comparison operator to be converted", "Set session factory.\n\n@param sessionFactory session factory\n@throws HibernateLayerException could not get class metadata for data source", "Look up all recorded playback state information.\n\n@return the playback state recorded for any player\n@since 0.5.0", "Removes a design document from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@return {@link DesignDocument}", "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.", "Flush output streams.", "Reset a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked" ]
public Widget addControl(String name, int resId, Widget.OnTouchListener listener) { return addControl(name, resId, null, listener, -1); }
[ "Add new control at the end of control bar with specified touch listener and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener" ]
[ "Updates LetsEncrypt configuration.", "Notifies all listeners that the data is about to be loaded.", "Compare an array of bytes with a subsection of a larger array of bytes.\n\n@param lhs small array of bytes\n@param rhs large array of bytes\n@param rhsOffset offset into larger array of bytes\n@return true if a match is found", "Returns the default output for functions without configured JSPs.\n\n@param request the current request\n@return the default HTML output", "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)", "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", "Use this API to enable clusterinstance of given name.", "Reconstructs a number that is represented by more than one byte in a network packet in big-endian order.\n\n@param buffer the byte array containing the packet data\n@param start the index of the first byte containing a numeric value\n@param length the number of bytes making up the value\n@return the reconstructed number", "Notification that the process has become unstable.\n\n@return {@code true} if this is a change in status" ]
public float conditionalLogProb(int[] given, int of) { if (given.length != windowSize - 1) { System.err.println("error computing conditional log prob"); System.exit(0); } int[] label = indicesFront(given); float[] masses = new float[label.length]; for (int i = 0; i < masses.length; i++) { masses[i] = table[label[i]]; } float z = ArrayMath.logSum(masses); return table[indexOf(given, of)] - z; }
[ "given is at the begining, of is at the end" ]
[ "Demonstrates obtaining the request history data from a test run", "Use this API to fetch nstrafficdomain_bridgegroup_binding resources of given name .", "Reads the configuration of a field facet.\n@param pathPrefix The XML Path that leads to the field facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.", "Use this API to delete dnsview of given name.", "Gets a collection of photo counts for the given date ranges for the calling user.\n\nThis method requires authentication with 'read' permission.\n\n@param dates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@param takenDates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@return A Collection of Photocount objects", "Returns true if required properties for FluoClient are set", "Recursively read the WBS structure from a PEP file.\n\n@param parent parent container for tasks\n@param id initial WBS ID", "Translate the given byte array into a string of 1s and 0s\n\n@param bytes The bytes to translate\n@return The string", "Accessor method used to retrieve a Number instance representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails" ]
private static void parseTarget(ArrayList<Shape> shapes, JSONObject modelJSON, Shape current) throws JSONException { if (modelJSON.has("target")) { JSONObject targetObject = modelJSON.getJSONObject("target"); if (targetObject.has("resourceId")) { current.setTarget(getShapeWithId(targetObject.getString("resourceId"), shapes)); } } }
[ "parse the target resource and add it to the current shape\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException" ]
[ "Get the element at the index as a string.\n\n@param i the index of the element to access", "Find a statement group by its property id, without checking for\nequality with the site IRI. More efficient implementation than\nthe default one.", "Get the AuthInterface.\n\n@return The AuthInterface", "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", "Get the real Class\n\n@param objectOrProxy\n@return Class", "Returns true if this instance has the same config as a given config.\n@param that\n@return true if the instance has the same config, false otherwise.", "this method looks up the appropriate JDOClass for a given persistent Class.\nIt uses the JDOModel to perfom this lookup.\n@param c the persistent Class\n@return the JDOCLass object", "Convert moneyness given as difference to par swap rate to moneyness in bp.\nUses the fixing times of the fix schedule to determine fractions.\n\n@param moneyness as offset.\n@return Moneyness in bp.", "Performs an inline lower Cholesky decomposition on an inner row-major matrix. Only\nthe lower triangular portion of the matrix is read or written to.\n\n@param T Array containing an inner row-major matrix. Modified.\n@param indexT First index of the inner row-major matrix.\n@param n Number of rows and columns of the matrix.\n@return If the decomposition succeeded." ]
public void drawGeometry(Geometry geometry, SymbolInfo symbol, Color fillColor, Color strokeColor, float lineWidth, float[] dashArray, Rectangle clipRect) { template.saveState(); // clipping code if (clipRect != null) { template.rectangle(clipRect.getLeft() + origX, clipRect.getBottom() + origY, clipRect.getWidth(), clipRect .getHeight()); template.clip(); template.newPath(); } setStroke(strokeColor, lineWidth, dashArray); setFill(fillColor); drawGeometry(geometry, symbol); template.restoreState(); }
[ "Draw the specified geometry.\n\n@param geometry geometry to draw\n@param symbol symbol for geometry\n@param fillColor fill colour\n@param strokeColor stroke colour\n@param lineWidth line width\n@param clipRect clipping rectangle" ]
[ "Transforms a list of Integer objects to an array of primitive int values.\n\n@param integers\n@return", "Returns the context menu for the table item.\n@param itemId the table item.\n@return the context menu for the given item.", "Parse a currency symbol position from a string representation.\n\n@param value String representation\n@return CurrencySymbolPosition instance", "Remove the corresponding object from session AND application cache.", "Returns the ViewGroup used as a parent for the content view.\n\n@return The content view's parent.", "Add the key and return it's index code. If the key already is present, the previous\nindex code is returned and no insertion is done.\n\n@param key key to add\n@return index of the key", "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.", "Sets the the time of day\n\n@param hours the hours to set. Must be guaranteed to parse as an\ninteger between 0 and 23\n\n@param minutes the minutes to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param seconds the optional seconds to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param amPm the meridian indicator to use. Must be either 'am' or 'pm'\n\n@param zoneString the time zone to use in one of two formats:\n- zoneinfo format (America/New_York, America/Los_Angeles, etc)\n- GMT offset (+05:00, -0500, +5, etc)", "Called when is removed the parent of the scene object.\n\n@param parent Old parent of this scene object." ]
static ChangeEvent<BsonDocument> changeEventForLocalInsert( final MongoNamespace namespace, final BsonDocument document, final boolean writePending ) { final BsonValue docId = BsonUtils.getDocumentId(document); return new ChangeEvent<>( new BsonDocument(), OperationType.INSERT, document, namespace, new BsonDocument("_id", docId), null, writePending); }
[ "Generates a change event for a local insert of the given document in the given namespace.\n\n@param namespace the namespace where the document was inserted.\n@param document the document that was inserted.\n@return a change event for a local insert of the given document in the given namespace." ]
[ "Returns the comma separated list of available scopes\n\n@return String", "Decomposes the input matrix 'a' and makes sure it isn't modified.", "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", "Get the multicast socket address.\n\n@return the multicast address", "Sets the ojbQuery, needed only as long we\ndon't support the soda constraint stuff.\n@param ojbQuery The ojbQuery to set", "Use this API to fetch all the auditmessages resources that are configured on netscaler.", "Destroys an instance of the bean\n\n@param instance The instance", "Inserts the LokenList immediately following the 'before' token", "Use this API to Import sslfipskey." ]
private String mountPath(CdjStatus.TrackSourceSlot slot) { switch (slot) { case SD_SLOT: return "/B/"; case USB_SLOT: return "/C/"; } throw new IllegalArgumentException("Don't know how to NFS mount filesystem for slot " + slot); }
[ "Return the filesystem path needed to mount the NFS filesystem associated with a particular media slot.\n\n@param slot the slot whose filesystem is desired\n\n@return the path to use in the NFS mount request to access the files mounted in that slot\n\n@throws IllegalArgumentException if it is a slot that we don't know how to handle" ]
[ "Retrieve the most recent storepoint.\n\n@param phoenixProject project data\n@return Storepoint instance", "Determines the mutator method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name", "Deletes an organization\n\n@param organizationId String", "Use this API to fetch bridgegroup_vlan_binding resources of given name .", "Get the QNames of the port components to be declared\nin the namespaces\n\n@return collection of QNames", "Add the key and return it's index code. If the key already is present, the previous\nindex code is returned and no insertion is done.\n\n@param key key to add\n@return index of the key", "Init the bundle type member variable.\n@return the bundle type of the opened resource.", "Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null.", "Use this API to delete linkset of given name." ]
private void renderThumbnail(Video video) { Picasso.with(getContext()).cancelRequest(thumbnail); Picasso.with(getContext()) .load(video.getThumbnail()) .placeholder(R.drawable.placeholder) .into(thumbnail); }
[ "Use picasso to render the video thumbnail into the thumbnail widget using a temporal\nplaceholder.\n\n@param video to get the rendered thumbnail." ]
[ "Inserts the specified array into the specified original array at the specified index.\n\n@param original the original array into which we want to insert another array\n@param index the index at which we want to insert the array\n@param inserted the array that we want to insert\n@return the combined array", "Read calendar data.", "Start component timer for current instance\n@param type - of component", "Creates an endpoint reference by duplicating the endpoint reference of a given server.\n@param server\n@param address\n@param props\n@return", "Sets the SyncFrequency on this collection.\n\n@param syncFrequency the SyncFrequency that contains all the desired options\n\n@return A Task that completes when the SyncFrequency has been updated", "Set the draw mode for this mesh. Default is GL_TRIANGLES.\n\n@param drawMode", "Adds descriptions to the item.\n\n@param descriptions\nthe descriptions to add", "Creates a householder reflection.\n\n(I-gamma*v*v')*x = tau*e1\n\n<p>NOTE: Same as cs_house in csparse</p>\n@param x (Input) Vector x (Output) Vector v. Modified.\n@param xStart First index in X that is to be processed\n@param xEnd Last + 1 index in x that is to be processed.\n@param gamma (Output) Storage for computed gamma\n@return variable tau", "Adds an item to the list box, specifying its direction and an initial\nvalue for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param dir the item's direction\n@param text the text of the item to be added" ]
public final PJsonArray toJSON() { JSONArray jsonArray = new JSONArray(); final int size = this.array.size(); for (int i = 0; i < size; i++) { final Object o = get(i); if (o instanceof PYamlObject) { PYamlObject pYamlObject = (PYamlObject) o; jsonArray.put(pYamlObject.toJSON().getInternalObj()); } else if (o instanceof PYamlArray) { PYamlArray pYamlArray = (PYamlArray) o; jsonArray.put(pYamlArray.toJSON().getInternalArray()); } else { jsonArray.put(o); } } return new PJsonArray(null, jsonArray, getContextName()); }
[ "Convert this object to a json array." ]
[ "Convert an array of column definitions into a map keyed by column name.\n\n@param columns array of column definitions\n@return map of column definitions", "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", "Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid", "Use this API to fetch all the tunneltrafficpolicy resources that are configured on netscaler.", "Helper to read a line from the config file.\n@param propValue the property value\n@return the value of the variable set at this line.", "Obtains a local date in Coptic calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Coptic era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Coptic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code CopticEra}", "Extracts the version id from a string\n\n@param versionDir The string\n@return Returns the version id of the directory, else -1", "Get the underlying channel. This may block until the channel is set.\n\n@return the channel\n@throws IOException for any error", "Adds tags to the If-Match header.\n\n@param tag the tag to add, may be null. This means the same as adding {@link Tag#ALL}\n@throws IllegalArgumentException if ALL is supplied more than once, or you add a null tag more than once.\n@return a new Conditionals object with the If-Match tag added." ]
public static void validate(final License license) { // A license should have a name if(license.getName() == null || license.getName().isEmpty()){ throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST) .entity("License name should not be empty!") .build()); } // A license should have a long name if(license.getLongName() == null || license.getLongName().isEmpty()){ throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST) .entity("License long name should not be empty!") .build()); } // If there is a regexp, it should compile if(license.getRegexp() != null && !license.getRegexp().isEmpty()){ try{ Pattern.compile(license.getRegexp()); } catch (PatternSyntaxException e){ throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST) .entity("License regexp does not compile!").build()); } Pattern regex = Pattern.compile("[&%//]"); if(regex.matcher(license.getRegexp()).find()){ throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST) .entity("License regexp does not compile!").build()); } } }
[ "Checks if the provided license is valid and could be stored into the database\n\n@param license the license to test\n@throws WebApplicationException if the data is corrupted" ]
[ "Execute a HTTP request\n\n@param stringUrl URL\n@param method Method to use\n@param parameters Params\n@param input Input / Payload\n@param charset Input Charset\n@return response\n@throws IOException", "Use this API to fetch appflowpolicy_appflowglobal_binding resources of given name .", "Calls all initializers of the bean\n\n@param instance The bean instance", "Check whether vector addition works. This is pure Java code and should work.", "Creates an immutable map. A copy of the given map is used. As a result, it is safe to modify the source map afterwards.\n\n@param map the given map\n@return an immutable map", "Repeat a CharSequence a certain number of times.\n\n@param self a CharSequence to be repeated\n@param factor the number of times the CharSequence should be repeated\n@return a String composed of a repetition\n@throws IllegalArgumentException if the number of repetitions is &lt; 0\n@since 1.8.2", "The parameter 'project' is not used at the moment, but will be used once schema and plugin support lands.", "If directory doesn't exists try to create it.\n\n@param directory given directory to check\n@throws ReportGenerationException if can't create specified directory", "Create a table model from an object's properties.\n\n@param object target object\n@param excludedMethods method names to exclude\n@return table model" ]
public static String createResource( CmsObject cmsObject, String newLink, Locale locale, String sitePath, String modelFileName, String mode, String postCreateHandler) { String[] newLinkParts = newLink.split("\\|"); String rootPath = newLinkParts[1]; String typeName = newLinkParts[2]; CmsFile modelFile = null; if (StringUtils.equalsIgnoreCase(mode, CmsEditorConstants.MODE_COPY)) { try { modelFile = cmsObject.readFile(sitePath); } catch (CmsException e) { LOG.warn( "The resource at path" + sitePath + "could not be read. Thus it can not be used as model file.", e); } } CmsADEConfigData adeConfig = OpenCms.getADEManager().lookupConfiguration(cmsObject, rootPath); CmsResourceTypeConfig typeConfig = adeConfig.getResourceType(typeName); CmsResource newElement = null; try { CmsObject cmsClone = cmsObject; if ((locale != null) && !cmsObject.getRequestContext().getLocale().equals(locale)) { // in case the content locale does not match the request context locale, use a clone cms with the appropriate locale cmsClone = OpenCms.initCmsObject(cmsObject); cmsClone.getRequestContext().setLocale(locale); } newElement = typeConfig.createNewElement(cmsClone, modelFile, rootPath); CmsPair<String, String> handlerParameter = I_CmsCollectorPostCreateHandler.splitClassAndConfig( postCreateHandler); I_CmsCollectorPostCreateHandler handler = A_CmsResourceCollector.getPostCreateHandler( handlerParameter.getFirst()); handler.onCreate(cmsClone, cmsClone.readFile(newElement), modelFile != null, handlerParameter.getSecond()); } catch (CmsException e) { LOG.error("Could not create resource.", e); } return newElement == null ? null : cmsObject.getSitePath(newElement); }
[ "Creates a new resource.\n@param cmsObject The CmsObject of the current request context.\n@param newLink A string, specifying where which new content should be created.\n@param locale The locale for which the\n@param sitePath site path of the currently edited content.\n@param modelFileName not used.\n@param mode optional creation mode\n@param postCreateHandler optional class name of an {@link I_CmsCollectorPostCreateHandler} which is invoked after the content has been created.\nThe fully qualified class name can be followed by a \"|\" symbol and a handler specific configuration string.\n@return The site-path of the newly created resource." ]
[ "change server state between OFFLINE_SERVER and NORMAL_SERVER\n\n@param setToOffline True if set to OFFLINE_SERVER", "Checks to see within the flags if a reload, i.e. not a full restart, is required.\n\n@param flags the flags to check\n\n@return {@code true} if a reload is required, otherwise {@code false}", "Ensures that a String argument is a number.\n\n@param condition\ncondition must be {@code true}^ so that the check will be performed\n@param value\nvalue which must be a number\n@throws IllegalNumberArgumentException\nif the given argument {@code value} is not a number", "Use this API to unset the properties of onlinkipv6prefix resource.\nProperties that need to be unset are specified in args array.", "Merges information from the resource root into this resource root\n\n@param additionalResourceRoot The root to merge", "Check if the current node is part of routing request based on cluster.xml\nor throw an exception.\n\n@param key The key we are checking\n@param routingStrategy The routing strategy\n@param currentNode Current node", "Generate a report about the targeted module dependencies\n\n@param moduleId String\n@param filters FiltersHolder\n@return DependencyReport", "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", "Mapping originator.\n\n@param originator the originator\n@return the originator type" ]
public File getStylesheetPath() { String path = System.getProperty(STYLESHEET_KEY); return path == null ? null : new File(path); }
[ "If a custom CSS file has been specified, returns the path. Otherwise\nreturns null.\n@return A {@link File} pointing to the stylesheet, or null if no stylesheet\nis specified." ]
[ "Send a request to another handler internal to the server, getting back the response body and response code.\n\n@param request request to send to another handler.\n@return {@link InternalHttpResponse} containing the response code and body.", "This method writes data for an individual calendar to a PM XML file.\n\n@param mpxj ProjectCalander instance", "Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the main scene of the current context\nwill contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's owner.\n\nLoading the asset is performed in a separate thread.\nThis function returns before the asset has finished loading.\nIAssetEvents are emitted to the input event handler and\nto any event listener on the context.\n\n@param handler\nIAssetEvents handler to process asset loading events", "Set the attributes for this template.\n\n@param attributes the attribute map", "Resize the image passing the new height and width\n\n@param height\n@param width\n@return", "Create a clone of this volatility surface using a generic calibration\nof its parameters to given market data.\n\n@param calibrationModel The model used during calibration (contains additional objects required during valuation, e.g. curves).\n@param calibrationProducts The calibration products.\n@param calibrationTargetValues The target values of the calibration products.\n@param calibrationParameters A map containing additional settings like \"evaluationTime\" (Double).\n@param parameterTransformation An optional parameter transformation.\n@param optimizerFactory The factory providing the optimizer to be used during calibration.\n@return An object having the same type as this one, using (hopefully) calibrated parameters.\n@throws SolverException Exception thrown when solver fails.", "Load all string recognize.", "Generate random time stamps from the current time upto the next one second.\nPassed as texture coordinates to the vertex shader; an unused field is present\nwith every pair passed.\n\n@param totalTime\n@return", "Escapes control characters with a preceding backslash.\nOptionally encodes special chars as unicode escape sequence.\nThe resulting string is safe to be put into a Java string literal between\nthe quotes." ]
@Override @SuppressWarnings("unchecked") public ChronoLocalDateTime<Symmetry010Date> localDateTime(TemporalAccessor temporal) { return (ChronoLocalDateTime<Symmetry010Date>) super.localDateTime(temporal); }
[ "Obtains a Symmetry010 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 local date-time, not null\n@throws DateTimeException if unable to create the date-time" ]
[ "Set some initial values.", "Sends the error to responder.", "Detach a connection from a key.\n\n@param key\nthe key\n@param connection\nthe connection", "Delete a database for a given path and userId.\n@param appInfo the info for this application\n@param serviceName the name of the associated service\n@param clientFactory the associated factory that creates clients\n@param userId the id of the user's to delete\n@return true if successfully deleted, false if not", "Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected", "Dump an array of bytes in hexadecimal.\n\n@param displayOffset the display offset (left column)\n@param data the byte array of data\n@param offset the offset to start dumping in the byte array\n@param len the length of data to dump\n@return the dump string", "Add a \"post-run\" dependent for this model.\n\n@param dependent the \"post-run\" dependent.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group", "Upcasts a Builder instance to the generated superclass, to allow access to private fields.\n\n<p>Reuses an existing upcast instance if one was already declared in this scope.\n\n@param code the {@link SourceBuilder} to add the declaration to\n@param datatype metadata about the user type the builder is being generated for\n@param builder the Builder instance to upcast\n@returns a variable holding the upcasted instance", "Create the index and associate it with all project models in the Application" ]
@SuppressWarnings("unchecked") public static TimeUnit getInstance(String units, Locale locale) throws MPXJException { Map<String, Integer> map = LocaleData.getMap(locale, LocaleData.TIME_UNITS_MAP); Integer result = map.get(units.toLowerCase()); if (result == null) { throw new MPXJException(MPXJException.INVALID_TIME_UNIT + " " + units); } return (TimeUnit.getInstance(result.intValue())); }
[ "This method is used to parse a string representation of a time\nunit, and return the appropriate constant value.\n\n@param units string representation of a time unit\n@param locale target locale\n@return numeric constant\n@throws MPXJException normally thrown when parsing fails" ]
[ "Determines if this connection's access token has expired and needs to be refreshed.\n@return true if the access token needs to be refreshed; otherwise false.", "Get the multicast socket address.\n\n@return the multicast address", "Converts an XML file to an object.\n\n@param fileName The filename where to save it to.\n@return The object.\n@throws FileNotFoundException On error.", "Retrieve the set of start dates represented by this recurrence data.\n\n@return array of start dates", "Check whether the value is matched by a regular expression.\n\n@param value value\n@param regex regular expression\n@return true when value is matched", "Updates the polling state from a DELETE or POST operation.\n\n@param response the response from Retrofit REST call\n@throws IOException thrown by deserialization", "Processes the template for all reference definitions of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Do the set-up that's needed to access Amazon S3.", "Add an additional binary type" ]
@Override public boolean exists() { try { InputStream inputStream = this.assetManager.open(this.fileName); if (inputStream != null) { return true; } else { return false; } } catch (IOException e) { return false; } }
[ "This implementation returns whether the underlying asset exists." ]
[ "Get public photos from the user's contacts.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param userId\nThe user ID\n@param count\nThe number of photos to return\n@param justFriends\nTrue to include friends\n@param singlePhoto\nTrue to get a single photo\n@param includeSelf\nTrue to include self\n@return A collection of Photo objects\n@throws FlickrException", "Sets page shift orientation. The pages might be shifted horizontally or vertically relative\nto each other to make the content of each page on the screen at least partially visible\n@param orientation", "Given a symmetric matrix which is represented by a lower triangular matrix convert it back into\na full symmetric matrix.\n\n@param A (Input) Lower triangular matrix (Output) symmetric matrix", "get the setter method corresponding to given property", "Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests.", "Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj", "Iterate and insert each of the elements of the Collection.\n\n@param objects\nThe objects to insert\n@param outIdentifier\nIdentifier to lookup the returned objects\n@param returnObject\nboolean to specify whether the inserted Collection is part of the ExecutionResults\n@param entryPoint\nOptional EntryPoint for the insertions\n@return", "Count the total number of queued resource requests for all queues. The\nresult is \"approximate\" in the face of concurrency since individual\nqueues can change size during the aggregate count.\n\n@return The (approximate) aggregate count of queued resource requests.", "Get logs for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return log stream response" ]
public void keyboardSupportEnabled(Activity activity, boolean enable) { if (getContent() != null && getContent().getChildCount() > 0) { if (mKeyboardUtil == null) { mKeyboardUtil = new KeyboardUtil(activity, getContent().getChildAt(0)); mKeyboardUtil.disable(); } if (enable) { mKeyboardUtil.enable(); } else { mKeyboardUtil.disable(); } } }
[ "a helper method to enable the keyboardUtil for a specific activity\nor disable it. note this will cause some frame drops because of the\nlistener.\n\n@param activity\n@param enable" ]
[ "Unpause the server, allowing it to resume normal operations", "Parses int value and returns the provided default if the value can't be parsed.\n@param value the int to parse.\n@param defaultValue the default value.\n@return the parsed int, or the default value if parsing fails.", "Retrieves the timephased breakdown of cost.\n\n@return timephased cost", "Places the real component of the input matrix into the output matrix.\n\n@param input Complex matrix. Not modified.\n@param output real matrix. Modified.", "return a HashMap with all properties, name as key, value as value\n@return the properties", "Return all scripts of a given type\n\n@param type integer value of type\n@return Array of scripts of the given type", "Use this API to add inat resources.", "Checks whether the given class maps to a different table but also has the given collection.\n\n@param origCollDef The original collection to search for\n@param origTableDef The original table\n@param classDef The class descriptor to test\n@return <code>true</code> if the class maps to a different table and has the collection", "Use this API to add clusternodegroup resources." ]
@Subscribe public void onQuit(AggregatedQuitEvent e) { if (jsonWriter == null) return; try { jsonWriter.endArray(); jsonWriter.name("slaves"); jsonWriter.beginObject(); for (Map.Entry<Integer, ForkedJvmInfo> entry : slaves.entrySet()) { jsonWriter.name(Integer.toString(entry.getKey())); entry.getValue().serialize(jsonWriter); } jsonWriter.endObject(); jsonWriter.endObject(); jsonWriter.flush(); if (!Strings.isNullOrEmpty(jsonpMethod)) { writer.write(");"); } jsonWriter.close(); jsonWriter = null; writer = null; if (method == OutputMethod.HTML) { copyScaffolding(targetFile); } } catch (IOException x) { junit4.log(x, Project.MSG_ERR); } }
[ "All tests completed." ]
[ "Return all server groups for a profile\n\n@param profileId ID of profile\n@return collection of ServerGroups for a profile", "Replies the elements of the left map without the pairs in the right map.\nIf the pair's values differ from\nthe value within the map, the map entry is not removed.\n\n<p>\nThe difference is an immutable\nsnapshot of the state of the maps at the time this method is called. It\nwill never change, even if the maps change at a later time.\n</p>\n\n<p>\nSince this method uses {@code HashMap} instances internally, the keys of\nthe supplied maps must be well-behaved with respect to\n{@link Object#equals} and {@link Object#hashCode}.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to update.\n@param right the pairs to remove.\n@return the map with the content of the left map except the pairs of the right map.\n@since 2.15", "Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object.", "Increment the version info associated with the given node\n\n@param node The node", "Set dates where the event should not take place, even if they are part of the series.\n@param dates dates to set.", "Function to add a new Store to the Metadata store. This involves\n\n1. Create a new entry in the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeDef defines the new store to be created", "Add the declarationBinderRef to the ImportersManager, create the corresponding.\nBinderDescriptor.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder\n@throws InvalidFilterException", "request token from FCM", "dst is just for log information" ]
protected void generateTitleBand() { log.debug("Generating title band..."); JRDesignBand band = (JRDesignBand) getDesign().getPageHeader(); int yOffset = 0; //If title is not present then subtitle will be ignored if (getReport().getTitle() == null) return; if (band != null && !getDesign().isTitleNewPage()){ //Title and subtitle comes afer the page header yOffset = band.getHeight(); } else { band = (JRDesignBand) getDesign().getTitle(); if (band == null){ band = new JRDesignBand(); getDesign().setTitle(band); } } JRDesignExpression printWhenExpression = new JRDesignExpression(); printWhenExpression.setValueClass(Boolean.class); printWhenExpression.setText(EXPRESSION_TRUE_WHEN_FIRST_PAGE); JRDesignTextField title = new JRDesignTextField(); JRDesignExpression exp = new JRDesignExpression(); if (getReport().isTitleIsJrExpression()){ exp.setText(getReport().getTitle()); }else { exp.setText("\"" + Utils.escapeTextForExpression( getReport().getTitle()) + "\""); } exp.setValueClass(String.class); title.setExpression(exp); title.setWidth(getReport().getOptions().getPrintableWidth()); title.setHeight(getReport().getOptions().getTitleHeight()); title.setY(yOffset); title.setPrintWhenExpression(printWhenExpression); title.setRemoveLineWhenBlank(true); applyStyleToElement(getReport().getTitleStyle(), title); title.setStretchType( StretchTypeEnum.NO_STRETCH ); band.addElement(title); JRDesignTextField subtitle = new JRDesignTextField(); if (getReport().getSubtitle() != null) { JRDesignExpression exp2 = new JRDesignExpression(); exp2.setText("\"" + getReport().getSubtitle() + "\""); exp2.setValueClass(String.class); subtitle.setExpression(exp2); subtitle.setWidth(getReport().getOptions().getPrintableWidth()); subtitle.setHeight(getReport().getOptions().getSubtitleHeight()); subtitle.setY(title.getY() + title.getHeight()); subtitle.setPrintWhenExpression(printWhenExpression); subtitle.setRemoveLineWhenBlank(true); applyStyleToElement(getReport().getSubtitleStyle(), subtitle); title.setStretchType( StretchTypeEnum.NO_STRETCH ); band.addElement(subtitle); } }
[ "Adds title and subtitle to the TitleBand when it applies.\nIf title is not present then subtitle will be ignored" ]
[ "Use this API to fetch clusterinstance_binding resource of given name .", "Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields.", "Helper method for formatting connection termination messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@param terminationReason\nThe reason for terminating the connection\n@return A formatted message in the format:\n\"[&lt;connectionName&gt;] remote host[&lt;host&gt;] &lt;connectionReason&gt; - &lt;terminationReason&gt;\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG -\nterminated by remote host.", "A henson navigator is a class that helps a consumer to consume the navigation api that it\ndeclares in its dependencies. The henson navigator will wrap the intent builders. Thus, a\nhenson navigator, is driven by consumption of intent builders, whereas the henson classes are\ndriven by the production of an intent builder.\n\n<p>This task is created per android variant:\n\n<ul>\n<li>we scan the variant compile configuration for navigation api dependencies\n<li>we generate a henson navigator class for this variant that wraps the intent builders\n</ul>\n\n@param variant the variant for which to create a builder.\n@param hensonNavigatorPackageName the package name in which we create the class.", "Constructs a new FastEvent instance\n@param type the event type\n@param manager the bean manager\n@param notifier the notifier to be used for observer method resolution\n@param qualifiers the event qualifiers\n@return", "Accessor method used to retrieve an Rate object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails", "Returns the project membership record.\n\n@param projectMembership Globally unique identifier for the project membership.\n@return Request object", "Use this API to fetch responderpolicylabel_binding resource of given name .", "Returns the data about all of the plugins that are set\n\n@param onlyValid True to get only valid plugins, False for all\n@return array of Plugins set" ]
public int addPathnameToProfile(int id, String pathname, String actualPath) throws Exception { int pathOrder = getPathOrder(id).size() + 1; int pathId = -1; PreparedStatement statement = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement( "INSERT INTO " + Constants.DB_TABLE_PATH + "(" + Constants.PATH_PROFILE_PATHNAME + "," + Constants.PATH_PROFILE_ACTUAL_PATH + "," + Constants.PATH_PROFILE_GROUP_IDS + "," + Constants.PATH_PROFILE_PROFILE_ID + "," + Constants.PATH_PROFILE_PATH_ORDER + "," + Constants.PATH_PROFILE_CONTENT_TYPE + "," + Constants.PATH_PROFILE_REQUEST_TYPE + "," + Constants.PATH_PROFILE_GLOBAL + ")" + " VALUES (?, ?, ?, ?, ?, ?, ?, ?);", PreparedStatement.RETURN_GENERATED_KEYS ); statement.setString(1, pathname); statement.setString(2, actualPath); statement.setString(3, ""); statement.setInt(4, id); statement.setInt(5, pathOrder); statement.setString(6, Constants.PATH_PROFILE_DEFAULT_CONTENT_TYPE); // should be set by UI/API statement.setInt(7, Constants.REQUEST_TYPE_GET); // should be set by UI/API statement.setBoolean(8, false); statement.executeUpdate(); // execute statement and get resultSet which will have the generated path ID as the first field results = statement.getGeneratedKeys(); if (results.next()) { pathId = results.getInt(1); } else { // something went wrong throw new Exception("Could not add path"); } } catch (SQLException e) { throw e; } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (statement != null) { statement.close(); } } catch (Exception e) { } } // need to add to request response table for all clients for (Client client : ClientService.getInstance().findAllClients(id)) { this.addPathToRequestResponseTable(id, client.getUUID(), pathId); } return pathId; }
[ "Add a path to a profile, returns the id\n\n@param id ID of profile\n@param pathname name of path\n@param actualPath value of path\n@return ID of path created\n@throws Exception exception" ]
[ "Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity", "Creates a simple, annotation defined Web Bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return A Web Bean", "Sets reference to the graph owning this node.\n\n@param ownerGraph the owning graph", "Creates the udpClient with proper handler.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception", "Should this request URI be compressed?\n\n@param requestUri request URI\n@return true when should be compressed", "Sets the monitoring service.\n\n@param monitoringService the new monitoring service", "Renames this file.\n\n@param newName the new name of the file.", "Add a EXISTS clause with a sub-query inside of parenthesis.\n\n<p>\n<b>NOTE:</b> The sub-query will be prepared at the same time that the outside query is.\n</p>", "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" ]
private static Set<String> imageOrientationsOf(ImageMetadata metadata) { String exifIFD0DirName = new ExifIFD0Directory().getName(); Tag[] tags = Arrays.stream(metadata.getDirectories()) .filter(dir -> dir.getName().equals(exifIFD0DirName)) .findFirst() .map(Directory::getTags) .orElseGet(() -> new Tag[0]); return Arrays.stream(tags) .filter(tag -> tag.getType() == 274) .map(Tag::getRawValue) .collect(Collectors.toSet()); }
[ "returns the values of the orientation tag" ]
[ "Obtains a Symmetry010 zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return", "Installs the given set of URIs as the source level URIs. Does not copy the given\nset but uses it directly.", "Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma", "Returns the overtime cost of this resource assignment.\n\n@return cost", "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", "Uses data from a bar to populate a task.\n\n@param row bar data\n@param task task to populate", "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", "Creates the default editor state for editing a bundle with descriptor.\n@return the default editor state for editing a bundle with descriptor." ]
private long interpolateTimeFromUpdate(TrackPositionUpdate lastTrackUpdate, CdjStatus newDeviceUpdate, BeatGrid beatGrid) { final int beatNumber = newDeviceUpdate.getBeatNumber(); final boolean noLongerPlaying = !newDeviceUpdate.isPlaying(); // If we have just stopped, see if we are near a cue (assuming that information is available), and if so, // the best assumption is that the DJ jumped to that cue. if (lastTrackUpdate.playing && noLongerPlaying) { final CueList.Entry jumpedTo = findAdjacentCue(newDeviceUpdate, beatGrid); if (jumpedTo != null) return jumpedTo.cueTime; } // Handle the special case where we were not playing either in the previous or current update, but the DJ // might have jumped to a different place in the track. if (!lastTrackUpdate.playing) { if (lastTrackUpdate.beatNumber == beatNumber && noLongerPlaying) { // Haven't moved return lastTrackUpdate.milliseconds; } else { if (noLongerPlaying) { // Have jumped without playing. if (beatNumber < 0) { return -1; // We don't know the position any more; weird to get into this state and still have a grid? } // As a heuristic, assume we are right before the beat? return timeOfBeat(beatGrid, beatNumber, newDeviceUpdate); } } } // One way or another, we are now playing. long elapsedMillis = (newDeviceUpdate.getTimestamp() - lastTrackUpdate.timestamp) / 1000000; long moved = Math.round(lastTrackUpdate.pitch * elapsedMillis); long interpolated = (lastTrackUpdate.reverse)? (lastTrackUpdate.milliseconds - moved) : lastTrackUpdate.milliseconds + moved; if (Math.abs(beatGrid.findBeatAtTime(interpolated) - beatNumber) < 2) { return interpolated; // Our calculations still look plausible } // The player has jumped or drifted somewhere unexpected, correct. if (newDeviceUpdate.isPlayingForwards()) { return timeOfBeat(beatGrid, beatNumber, newDeviceUpdate); } else { return beatGrid.getTimeWithinTrack(Math.min(beatNumber + 1, beatGrid.beatCount)); } }
[ "Sanity-check a new non-beat update, make sure we are still interpolating a sensible position, and correct\nas needed.\n\n@param lastTrackUpdate the most recent digested update received from a player\n@param newDeviceUpdate a new status update from the player\n@param beatGrid the beat grid for the track that is playing, in case we have jumped\n\n@return the playback position we believe that player has reached at that point in time" ]
[ "Check whether the given id is included in the list of includes and not excluded.\n\n@param id id to check\n@param includes list of include regular expressions\n@param excludes list of exclude regular expressions\n@return true when id included and not excluded", "Inserts the currently contained data objects into the database.\n\n@param platform The (connected) database platform for inserting data\n@param model The database model\n@param batchSize The batch size; use 1 for not using batch mode", "a small static helper to set a multi state drawable on a view\n\n@param icon\n@param iconColor\n@param selectedIcon\n@param selectedIconColor\n@param tinted\n@param imageView", "Validates the deployment.\n\n@param isDomain {@code true} if this is a domain server, otherwise {@code false}\n\n@throws MojoDeploymentException if the deployment is invalid", "ChromeCast does not allow you to jump levels too quickly to avoid blowing speakers.\nSetting by increment allows us to easily get the level we want\n\n@param level volume level from 0 to 1 to set\n@throws IOException\n@see <a href=\"https://developers.google.com/cast/docs/design_checklist/sender#sender-control-volume\">sender</a>", "remove an objects entry from the object registry", "Print a booking type.\n\n@param value BookingType instance\n@return booking type value", "Cleans up the subsystem children for the deployment and each sub-deployment resource.\n\n@param resource the subsystem resource to clean up", "Does this procedure return any values to the 'caller'?\n\n@return <code>true</code> if the procedure returns at least 1\nvalue that is returned to the caller." ]
public static BoxTermsOfService.Info create(BoxAPIConnection api, BoxTermsOfService.TermsOfServiceStatus termsOfServiceStatus, BoxTermsOfService.TermsOfServiceType termsOfServiceType, String text) { URL url = ALL_TERMS_OF_SERVICES_URL_TEMPLATE.build(api.getBaseURL()); BoxJSONRequest request = new BoxJSONRequest(api, url, "POST"); JsonObject requestJSON = new JsonObject() .add("status", termsOfServiceStatus.toString()) .add("tos_type", termsOfServiceType.toString()) .add("text", text); request.setBody(requestJSON.toString()); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject responseJSON = JsonObject.readFrom(response.getJSON()); BoxTermsOfService createdTermsOfServices = new BoxTermsOfService(api, responseJSON.get("id").asString()); return createdTermsOfServices.new Info(responseJSON); }
[ "Creates a new Terms of Services.\n@param api the API connection to be used by the resource.\n@param termsOfServiceStatus the current status of the terms of services. Set to \"enabled\" or \"disabled\".\n@param termsOfServiceType the scope of terms of service. Set to \"external\" or \"managed\".\n@param text the text field of terms of service containing terms of service agreement info.\n@return information about the Terms of Service created." ]
[ "Resumes a given entry point type;\n\n@param entryPoint The entry point", "Returns a new ObjectPool for the specified connection descriptor.\nOverride this method to setup your own pool.\n@param jcd the connection descriptor for which to set up the pool\n@return a newly created object pool", "Generate a map file from a jar file.\n\n@param jarFile jar file\n@param mapFileName map file name\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws XMLStreamException\n@throws IOException\n@throws ClassNotFoundException\n@throws IntrospectionException", "Initializes class data structures and parameters", "Returns a human-readable string representation of a reference to a\nprecision that is used for a time value.\n\n@param precision\nthe numeric precision\n@return a string representation of the precision", "Initializes the alarm sensor command class. Requests the supported alarm types.", "Hide the following channels.\n@param channels The names of the channels to hide.\n@return this", "when divisionPrefixLen is null, isAutoSubnets has no effect", "Write the given number of bytes out to the array\n\n@param bytes The array to write to\n@param value The value to write from\n@param offset the offset into the array\n@param numBytes The number of bytes to write" ]
public byte[] getThumbnail(ThumbnailFileType fileType, int minWidth, int minHeight, int maxWidth, int maxHeight) { QueryStringBuilder builder = new QueryStringBuilder(); builder.appendParam("min_width", minWidth); builder.appendParam("min_height", minHeight); builder.appendParam("max_width", maxWidth); builder.appendParam("max_height", maxHeight); URLTemplate template; if (fileType == ThumbnailFileType.PNG) { template = GET_THUMBNAIL_PNG_TEMPLATE; } else if (fileType == ThumbnailFileType.JPG) { template = GET_THUMBNAIL_JPG_TEMPLATE; } else { throw new BoxAPIException("Unsupported thumbnail file type"); } URL url = template.buildWithQuery(this.getAPI().getBaseURL(), builder.toString(), this.getID()); BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET"); BoxAPIResponse response = request.send(); ByteArrayOutputStream thumbOut = new ByteArrayOutputStream(); InputStream body = response.getBody(); byte[] buffer = new byte[BUFFER_SIZE]; try { int n = body.read(buffer); while (n != -1) { thumbOut.write(buffer, 0, n); n = body.read(buffer); } } catch (IOException e) { throw new BoxAPIException("Error reading thumbnail bytes from response body", e); } finally { response.disconnect(); } return thumbOut.toByteArray(); }
[ "Retrieves a thumbnail, or smaller image representation, of this file. Sizes of 32x32, 64x64, 128x128,\nand 256x256 can be returned in the .png format and sizes of 32x32, 94x94, 160x160, and 320x320 can be returned\nin the .jpg format.\n\n@param fileType either PNG of JPG\n@param minWidth minimum width\n@param minHeight minimum height\n@param maxWidth maximum width\n@param maxHeight maximum height\n@return the byte array of the thumbnail image" ]
[ "Use this API to fetch all the nsspparams resources that are configured on netscaler.", "Retrieve a single value property.\n\n@param method method definition\n@param object target object\n@param map parameter values", "Use this API to fetch sslciphersuite resources of given names .", "Random string from string array\n\n@param s Array\n@return String", "This method writes data for an individual calendar to a PM XML file.\n\n@param mpxj ProjectCalander instance", "Writes an activity to a PM XML file.\n\n@param mpxj MPXJ Task instance", "Scans a set of classes for both ReaderListeners and Swagger annotations. All found listeners will\nbe instantiated before any of the classes are scanned for Swagger annotations - so they can be invoked\naccordingly.\n\n@param classes a set of classes to scan\n@return the generated Swagger definition", "Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails.", "Remove script for a given ID\n\n@param id ID of script\n@throws Exception exception" ]
public void setOnCloseListener(@NonNull final android.support.v7.widget.SearchView.OnCloseListener listener) { if (searchView != null) { searchView.setOnCloseListener(new SearchView.OnCloseListener() { @Override public boolean onClose() { return listener.onClose(); } }); } else if (supportView != null) { supportView.setOnCloseListener(listener); } else { throw new IllegalStateException(ERROR_NO_SEARCHVIEW); } }
[ "Sets a listener to inform when the user closes the SearchView.\n\n@param listener the listener to call when the user closes the SearchView." ]
[ "Indicate to the RecyclerView the type of Renderer used to one position using a numeric value.\n\n@param position to analyze.\n@return the id associated to the Renderer used to render the content given a position.", "Execute a slave process. Pump events to the given event bus.", "Reads a string of two byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nThe value starts at the position specified by the offset\nparameter.\n\n@param data byte array of data\n@param offset start point of unicode string\n@return string value", "Add a dependency to this node.\n\n@param node the dependency to add.", "Generates a full list of all parents and their children, in order.\n\n@param parentList A list of the parents from\nthe {@link ExpandableRecyclerAdapter}\n@return A list of all parents and their children, expanded", "Filter unsafe or unnecessary request.\n\n@param nodeDataMapValidSource\nthe node data map valid source\n@param nodeDataMapValidSafe\nthe node data map valid safe", "This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file", "Locate a child block by byte pattern and validate by\nchecking the length of the string we are expecting\nto follow the pattern.\n\n@param bufferIndex start index\n@return true if a child block starts at this point", "Stop the drag action." ]
protected Connection newConnectionFromDataSource(JdbcConnectionDescriptor jcd) throws LookupException { Connection retval = null; // use JNDI lookup DataSource ds = jcd.getDataSource(); if (ds == null) { // [tomdz] Would it suffice to store the datasources only at the JCDs ? // Only possible problem would be serialization of the JCD because // the data source object in the JCD does not 'survive' this ds = (DataSource) dataSourceCache.get(jcd.getDatasourceName()); } try { if (ds == null) { /** * this synchronization block won't be a big deal as we only look up * new datasources not found in the map. */ synchronized (dataSourceCache) { InitialContext ic = new InitialContext(); ds = (DataSource) ic.lookup(jcd.getDatasourceName()); /** * cache the datasource lookup. */ dataSourceCache.put(jcd.getDatasourceName(), ds); } } if (jcd.getUserName() == null) { retval = ds.getConnection(); } else { retval = ds.getConnection(jcd.getUserName(), jcd.getPassWord()); } } catch (SQLException sqlEx) { log.error("SQLException thrown while trying to get Connection from Datasource (" + jcd.getDatasourceName() + ")", sqlEx); throw new LookupException("SQLException thrown while trying to get Connection from Datasource (" + jcd.getDatasourceName() + ")", sqlEx); } catch (NamingException namingEx) { log.error("Naming Exception while looking up DataSource (" + jcd.getDatasourceName() + ")", namingEx); throw new LookupException("Naming Exception while looking up DataSource (" + jcd.getDatasourceName() + ")", namingEx); } // initialize connection initializeJdbcConnection(retval, jcd); if(log.isDebugEnabled()) log.debug("Create new connection using DataSource: "+retval); return retval; }
[ "Creates a new connection from the data source that the connection descriptor\nrepresents. If the connection descriptor does not directly contain the data source\nthen a JNDI lookup is performed to retrieve the data source.\n\n@param jcd The connection descriptor\n@return A connection instance\n@throws LookupException if we can't get a connection from the datasource either due to a\nnaming exception, a failed sanity check, or a SQLException." ]
[ "Set an enterprise date value.\n\n@param index date index (1-30)\n@param value date value", "Add a greeting to the specified guestbook.", "Transforms user name and icon size into the image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path", "Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix.", "End building the prepared script, adding a return value statement\n@param value the value to return\n@param config the configuration for the script to build\n@return the new {@link LuaPreparedScript} instance", "Write each predecessor for a task.\n\n@param record Task instance", "Returns the total number of weights associated with this classifier.\n\n@return number of weights", "This method takes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent\n@param belief_name\nThe name of the belief inside agent's adf\n@param connector\nThe connector to get the external access\n@return belief_value The value of the requested belief", "Use this API to add ipset." ]
public void invalidate(final int dataIndex) { synchronized (mMeasuredChildren) { Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "invalidate [%d]", dataIndex); mMeasuredChildren.remove(dataIndex); } }
[ "Invalidate the item in layout\n@param dataIndex data index" ]
[ "Issue the database statements to create the table associated with a table configuration.\n\n@param connectionSource\nconnectionSource Associated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@return The number of statements executed to do so.", "Returns the association row with the given key.\n\n@param key the key of the row to return.\n@return the association row with the given key or {@code null} if no row with that key is contained in this\nassociation", "Counts the number of lines.\n\n@param str the input string\n@return Returns the number of lines terminated by '\\n' in string", "Check if the print has not been asked to stop taking new jobs.\n\n@return true if it's OK to take new jobs.", "We will always try to gather as many results as possible and never throw an exception.\n\nTODO: Make MemberResponse hold an exception that we can populate if something bad happens so we always\nget to return something for a member in order to indicate a failure. Getting the result when there\nis an error should throw an exception.\n\n@param execSvc\n@param members\n@param callable\n@param maxWaitTime - a value of 0 indicates forever\n@param unit\n@return", "Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() method on the JavascriptEnum\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property.", "Makes object obj persistent in the underlying persistence system.\nE.G. by INSERT INTO ... or UPDATE ... in an RDBMS.\nThe ObjectModification parameter can be used to determine whether INSERT or update is to be used.\nThis functionality is typically called from transaction managers, that\ntrack which objects have to be stored. If the object is an unmaterialized\nproxy the method return immediately.", "Minimize the function starting at the given initial point.", "given the groupName, it returns the groupId\n\n@param groupName name of group\n@return ID of group" ]
public static <T> Observable<T> delayedEmitAsync(T event, int milliseconds) { return delayProvider.delayedEmitAsync(event, milliseconds); }
[ "Wrapper delayed emission, based on delayProvider.\n\n@param event the event to emit\n@param milliseconds the delay in milliseconds\n@param <T> the type of event\n@return delayed observable" ]
[ "Add the key and return it's index code. If the key already is present, the previous\nindex code is returned and no insertion is done.\n\n@param key key to add\n@return index of the key", "This may cost twice what it would in the original Map because we have to find\nthe original value for this key.\n\n@param key key with which the specified value is to be associated.\n@param value value to be associated with the specified key.\n@return previous value associated with specified key, or <tt>null</tt>\nif there was no mapping for key. A <tt>null</tt> return can\nalso indicate that the map previously associated <tt>null</tt>\nwith the specified key, if the implementation supports\n<tt>null</tt> values.", "Verifies that the TestMatrix is correct and sane without using a specification.\nThe Proctor API doesn't use a test specification so that it can serve all tests in the matrix\nwithout restriction.\nDoes a limited set of sanity checks that are applicable when there is no specification,\nand thus no required tests or provided context.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test.", "Returns true if required properties for FluoClient are set", "Cancel a particular download in progress. Returns 1 if the download Id is found else returns 0.\n\n@param downloadId\n@return int", "Function to serialize the given list of Vector clocks into a string. If\nsomething goes wrong, it returns an empty string.\n\n@param vectorClocks The Vector clock list to serialize\n@return The string (JSON) version of the specified Vector clock", "Removes all items from the list box.", "Use this API to fetch dnsnsecrec resources of given names .", "Set the weekdays at which the event should take place.\n@param weekDays the weekdays at which the event should take place." ]
public void postConstruct() throws URISyntaxException { WmsVersion.lookup(this.version); Assert.isTrue(validateBaseUrl(), "invalid baseURL"); Assert.isTrue(this.layers.length > 0, "There must be at least one layer defined for a WMS request" + " to make sense"); // OpenLayers 2 compatibility. It will post a single empty style no matter how many layers there are if (this.styles != null && this.styles.length != this.layers.length && this.styles.length == 1 && this.styles[0].trim().isEmpty()) { this.styles = null; } else { Assert.isTrue(this.styles == null || this.layers.length == this.styles.length, String.format( "If styles are defined then there must be one for each layer. Number of" + " layers: %s\nStyles: %s", this.layers.length, Arrays.toString(this.styles))); } if (this.imageFormat.indexOf('/') < 0) { LOGGER.warn("The format {} should be a mime type", this.imageFormat); this.imageFormat = "image/" + this.imageFormat; } Assert.isTrue(this.method == HttpMethod.GET || this.method == HttpMethod.POST, String.format("Unsupported method %s for WMS layer", this.method.toString())); }
[ "Validate some of the properties of this layer." ]
[ "Stops the HTTP service gracefully and release all resources.\n\n@param quietPeriod the quiet period as described in the documentation of {@link EventExecutorGroup}\n@param timeout the maximum amount of time to wait until the executor is\n{@linkplain EventExecutorGroup#shutdown()}\nregardless if a task was submitted during the quiet period\n@param unit the unit of {@code quietPeriod} and {@code timeout}\n@throws Exception if there is exception raised during shutdown.", "Clean up the environment object for the given storage engine", "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", "Scale all widgets in Main Scene hierarchy\n@param scale", "Enable a custom response\n\n@param custom custom response\n@param path_id path ID of the response\n@param client_uuid client UUID\n@throws Exception exception", "Returns a long between interval\n@param min Minimum value\n@param max Maximum value\n@return long number", "Use this API to update nspbr6 resources.", "Access an attribute, hereby using the class name as key.\n\n@param type the type, not {@code null}\n@return the type attribute value, or {@code null}.", "Creates a \"delta clone\" of this Map, where only the differences are\nrepresented." ]
public static nssimpleacl[] get(nitro_service service, String aclname[]) throws Exception{ if (aclname !=null && aclname.length>0) { nssimpleacl response[] = new nssimpleacl[aclname.length]; nssimpleacl obj[] = new nssimpleacl[aclname.length]; for (int i=0;i<aclname.length;i++) { obj[i] = new nssimpleacl(); obj[i].set_aclname(aclname[i]); response[i] = (nssimpleacl) obj[i].get_resource(service); } return response; } return null; }
[ "Use this API to fetch nssimpleacl resources of given names ." ]
[ "Quick and dirty XML text escape.\n\n@param sb working string buffer\n@param text input text\n@return escaped text", "Returns a date and time string which is formatted as ISO-8601.", "Get the short exception message using the requested locale. This does not include the cause exception message.\n\n@param locale locale for message\n@return (short) exception message", "The amount of time to keep an idle client thread alive\n\n@param threadIdleTime", "The primary run loop of the kqueue event processor.", "Transforms each character from this reader by passing it to the given\nclosure. The Closure should return each transformed character, which\nwill be passed to the Writer. The reader and writer will be both be\nclosed before this method returns.\n\n@param self a Reader object\n@param writer a Writer to receive the transformed characters\n@param closure a closure that performs the required transformation\n@throws IOException if an IOException occurs.\n@since 1.5.0", "Extract the generic return type from the given method.\n@param method the method to check the return type for\n@param source the source class/interface defining the generic parameter types\n@param typeIndex the index of the type (e.g. 0 for Collections,\n0 for Map keys, 1 for Map values)\n@param nestingLevel the nesting level of the target type\n@return the generic type, or {@code null} if none", "Write attributes for an individual custom field.\nNote that at present we are only writing a subset of the\navailable data... in this instance the field alias.\nIf the field does not have an alias we won't write an\nentry.\n\n@param field custom field to write\n@throws IOException", "create an instance from the className\n@param <E> class of object\n@param className full class name\n@return an object or null if className is null" ]
@Override public double getDiscountFactor(AnalyticModelInterface model, double maturity) { // Change time scale maturity *= timeScaling; double beta1 = parameter[0]; double beta2 = parameter[1]; double beta3 = parameter[2]; double beta4 = parameter[3]; double tau1 = parameter[4]; double tau2 = parameter[5]; double x1 = tau1 > 0 ? FastMath.exp(-maturity/tau1) : 0.0; double x2 = tau2 > 0 ? FastMath.exp(-maturity/tau2) : 0.0; double y1 = tau1 > 0 ? (maturity > 0.0 ? (1.0-x1)/maturity*tau1 : 1.0) : 0.0; double y2 = tau2 > 0 ? (maturity > 0.0 ? (1.0-x2)/maturity*tau2 : 1.0) : 0.0; double zeroRate = beta1 + beta2 * y1 + beta3 * (y1-x1) + beta4 * (y2-x2); return Math.exp(- zeroRate * maturity); }
[ "Return the discount factor within a given model context for a given maturity.\n@param model The model used as a context (not required for this class).\n@param maturity The maturity in terms of ACT/365 daycount form this curve reference date. Note that this parameter might get rescaled to a different time parameter.\n@see net.finmath.marketdata.model.curves.DiscountCurveInterface#getDiscountFactor(net.finmath.marketdata.model.AnalyticModelInterface, double)" ]
[ "Add the steal information to the rebalancer state\n\n@param stealInfo The steal information to add", "Returns a client model from a ResultSet\n\n@param result resultset containing client information\n@return Client or null\n@throws Exception exception", "Called by the engine to trigger the cleanup at the end of a payload thread.", "Convert an Object to a Time, without an Exception", "Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable", "Read resource assignment baseline values.\n\n@param row result set row", "Convenience method to allow a cause. Grrrr.", "Use this API to fetch all the configstatus resources that are configured on netscaler.", "Create a new Date. To the last day." ]
public void commit() { if (directory == null) return; try { if (reader != null) reader.close(); // it turns out that IndexWriter.optimize actually slows // searches down, because it invalidates the cache. therefore // not calling it any more. // http://www.searchworkings.org/blog/-/blogs/uwe-says%3A-is-your-reader-atomic // iwriter.optimize(); iwriter.commit(); openSearchers(); } catch (IOException e) { throw new DukeException(e); } }
[ "Flushes all changes to disk." ]
[ "Initializes data structures", "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.", "Processes one of the menu responses that jointly constitute the track metadata, updating our\nfields accordingly.\n\n@param item the menu response to be considered", "Utility method to remove ampersands embedded in names.\n\n@param name name text\n@return name text without embedded ampersands", "Makes the scene object pickable by eyes. However, the object has to be touchable to process\nthe touch events.\n\n@param sceneObject", "generate a prepared UPDATE-Statement for the Class\ndescribed by cld\n@param cld the ClassDescriptor", "Use this API to Force clustersync.", "Runs the record linkage process.", "Read a text file resource into a single string\n\n@param context\nA non-null Android Context\n@param resourceId\nAn Android resource id\n@return The contents, or null on error." ]
@SuppressWarnings("deprecation") private void cancelRequestAndWorkerOnHost(List<String> targetHosts) { List<String> validTargetHosts = new ArrayList<String>(workers.keySet()); validTargetHosts.retainAll(targetHosts); logger.info("targetHosts for cancel: Total: {}" + " Valid in current manager with worker threads: {}", targetHosts.size(), validTargetHosts.size()); for (String targetHost : validTargetHosts) { ActorRef worker = workers.get(targetHost); if (worker != null && !worker.isTerminated()) { worker.tell(OperationWorkerMsgType.CANCEL, getSelf()); logger.info("Submitted CANCEL request on Host {}", targetHost); } else { logger.info( "Did NOT Submitted " + "CANCEL request on Host {} as worker on this host is null or already killed", targetHost); } } }
[ "Cancel request and worker on host.\n\n@param targetHosts\nthe target hosts" ]
[ "Get info about the shards in the database.\n\n@return List of shards\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-database-_shards-\"\ntarget=\"_blank\">_shards</a>", "Parses command-line and gets metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "Redirect to page\n\n@param model\n@return", "Create a SVG graphic with the give dimensions.\n\n@param size The size of the SVG graphic.", "Called internally to actually process the Iteration.", "Subtract a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the subtract of specified complex number with a scalar value.", "Finds out which dump files of the given type are available for download.\nThe result is a list of objects that describe the available dump files,\nin descending order by their date. Not all of the dumps included might be\nactually available.\n\n@return list of objects that provide information on available full dumps", "Fling the content\n\n@param velocityX The initial velocity in the X direction. Positive numbers mean that the\nfinger/cursor is moving to the left on the screen, which means we want to\nscroll towards the beginning.\n@param velocityY The initial velocity in the Y direction. Positive numbers mean that the\nfinger/cursor is moving down the screen, which means we want to scroll\ntowards the top.\n@param velocityZ TODO: Z-scrolling is currently not supported\n@return", "adds a CmsJspImageBean as hi-DPI variant to this image\n@param factor the variant multiplier, e.g. \"2x\" (the common retina multiplier)\n@param image the image to be used for this variant" ]
public static base_response add(nitro_service client, ipset resource) throws Exception { ipset addresource = new ipset(); addresource.name = resource.name; addresource.td = resource.td; return addresource.add_resource(client); }
[ "Use this API to add ipset." ]
[ "Handles week day changes.\n@param event the change event.", "Use this API to fetch responderpolicylabel_responderpolicy_binding resources of given name .", "Internal method which is called when the user has finished editing the title.\n\n@param box the text box which has been edited", "Performs a null edit on a property. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param propertyId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection", "Update the default time unit for durations based on data read from the file.\n\n@param column column data", "Writes assignment data to a PM XML file.", "Use this API to update csparameter.", "persist decorator and than continue to children without touching the model", "Helper method for getting the current parameter values from a list of annotated parameters.\n\n@param parameters The list of annotated parameter to look up\n@param manager The Bean manager\n@return The object array of looked up values" ]
public BoxComment.Info reply(String message) { JsonObject itemJSON = new JsonObject(); itemJSON.add("type", "comment"); itemJSON.add("id", this.getID()); JsonObject requestJSON = new JsonObject(); requestJSON.add("item", itemJSON); if (BoxComment.messageContainsMention(message)) { requestJSON.add("tagged_message", message); } else { requestJSON.add("message", message); } URL url = ADD_COMMENT_URL_TEMPLATE.build(this.getAPI().getBaseURL()); BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST"); request.setBody(requestJSON.toString()); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject responseJSON = JsonObject.readFrom(response.getJSON()); BoxComment addedComment = new BoxComment(this.getAPI(), responseJSON.get("id").asString()); return addedComment.new Info(responseJSON); }
[ "Replies to this comment with another message.\n@param message the message for the reply.\n@return info about the newly created reply comment." ]
[ "Takes a String and converts it to a Date\n\n@param dateString the date\n@return Date denoted by dateString", "Returns the next object in the table.\n\n@throws IllegalStateException\nIf there was a problem extracting the object from SQL.", "Use this API to fetch all the nsconfig resources that are configured on netscaler.", "Calculate the layout container size along the axis\n@param axis {@link Axis}\n@return size", "Function to update store definitions. Unlike the put method, this\nfunction does not delete any existing state. It only updates the state of\nthe stores specified in the given stores.xml\n\n@param valueBytes specifies the bytes of the stores.xml containing\nupdates for the specified stores", "Get all registration points associated with this registration.\n\n@return all registration points. Will not be {@code null} but may be empty", "Add image with a exception message in the PDF document.\n\n@param context\nPDF context\n@param e\nexception to put in image", "Returns the entry associated with the given key.\n\n@param key the key of the entry to look up\n@return the entry associated with that key, or null\nif the key is not in this map", "Marshal the assertion as a JSON object.\n\n@param assertion the assertion to marshal" ]
public void processCalendar(Row row) { ProjectCalendar calendar = m_project.addCalendar(); Integer id = row.getInteger("clndr_id"); m_calMap.put(id, calendar); calendar.setName(row.getString("clndr_name")); try { calendar.setMinutesPerDay(Integer.valueOf((int) NumberHelper.getDouble(row.getDouble("day_hr_cnt")) * 60)); calendar.setMinutesPerWeek(Integer.valueOf((int) (NumberHelper.getDouble(row.getDouble("week_hr_cnt")) * 60))); calendar.setMinutesPerMonth(Integer.valueOf((int) (NumberHelper.getDouble(row.getDouble("month_hr_cnt")) * 60))); calendar.setMinutesPerYear(Integer.valueOf((int) (NumberHelper.getDouble(row.getDouble("year_hr_cnt")) * 60))); } catch (ClassCastException ex) { // We have seen examples of malformed calendar data where fields have been missing // from the record. We'll typically get a class cast exception here as we're trying // to process something which isn't a double. // We'll just return at this point as it's not clear that we can salvage anything // sensible from this record. return; } // Process data String calendarData = row.getString("clndr_data"); if (calendarData != null && !calendarData.isEmpty()) { Record root = Record.getRecord(calendarData); if (root != null) { processCalendarDays(calendar, root); processCalendarExceptions(calendar, root); } } else { // if there is not DaysOfWeek data, Primavera seems to default to Mon-Fri, 8:00-16:00 DateRange defaultHourRange = new DateRange(DateHelper.getTime(8, 0), DateHelper.getTime(16, 0)); for (Day day : Day.values()) { if (day != Day.SATURDAY && day != Day.SUNDAY) { calendar.setWorkingDay(day, true); ProjectCalendarHours hours = calendar.addCalendarHours(day); hours.addRange(defaultHourRange); } else { calendar.setWorkingDay(day, false); } } } m_eventManager.fireCalendarReadEvent(calendar); }
[ "Process data for an individual calendar.\n\n@param row calendar data" ]
[ "Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default.", "return currently-loaded Proctor instance, throwing IllegalStateException if not loaded", "Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under", "Input method, called by a Subscriber indicating its intent into receive notification about a given topic.\n\n@param sr DTO containing the info given by the protocol", "Reads the configuration of a range facet.\n@param pathPrefix The XML Path that leads to the range facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.", "Begin writing a named list attribute.\n\n@param name attribute name", "The full path of a jrxml file, or the path in the classpath of a jrxml\nresource.\n\n@param path\n@return", "Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits", "Notifies that multiple content items are removed.\n\n@param positionStart the position.\n@param itemCount the item count." ]
private List<Variable> parseAssignRange(Sequence sequence, TokenList tokens, TokenList.Token t0) { // find assignment symbol TokenList.Token tokenAssign = t0.next; while( tokenAssign != null && tokenAssign.symbol != Symbol.ASSIGN ) { tokenAssign = tokenAssign.next; } if( tokenAssign == null ) throw new ParseError("Can't find assignment operator"); // see if it is a sub matrix before if( tokenAssign.previous.symbol == Symbol.PAREN_RIGHT ) { TokenList.Token start = t0.next; if( start.symbol != Symbol.PAREN_LEFT ) throw new ParseError(("Expected left param for assignment")); TokenList.Token end = tokenAssign.previous; TokenList subTokens = tokens.extractSubList(start,end); subTokens.remove(subTokens.getFirst()); subTokens.remove(subTokens.getLast()); handleParentheses(subTokens,sequence); List<TokenList.Token> inputs = parseParameterCommaBlock(subTokens, sequence); if (inputs.isEmpty()) throw new ParseError("Empty function input parameters"); List<Variable> range = new ArrayList<>(); addSubMatrixVariables(inputs, range); if( range.size() != 1 && range.size() != 2 ) { throw new ParseError("Unexpected number of range variables. 1 or 2 expected"); } return range; } return null; }
[ "See if a range for assignment is specified. If so return the range, otherwise return null\n\nExample of assign range:\na(0:3,4:5) = blah\na((0+2):3,4:5) = blah" ]
[ "Generate a module graph regarding the filters\n\n@param moduleId String\n@return AbstractGraph", "Use this API to fetch the statistics of all cmppolicy_stats resources that are configured on netscaler.", "Checks if the date is a holiday\n\n@param dateString the date\n@return true if it is a holiday, false otherwise", "Gets the groupby for ReportQueries of all Criteria and Sub Criteria\nthe elements are of class FieldHelper\n@return List of FieldHelper", "get target hosts from line by line.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the list\n@throws TargetHostsLoadException\nthe target hosts load exception", "Creates a searchable item that represents a metadata field found for a track.\n\n@param menuItem the rendered menu item containing the searchable metadata field\n@return the searchable metadata field", "Creates a REST client used to perform Voldemort operations against the\nCoordinator\n\n@param storeName Name of the store to perform the operations on\n@param resolver Custom resolver as specified by the application\n@return", "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", "this callback is invoked after an Object is materialized\nwithin an IndirectionHandler.\nthis callback allows to defer registration of objects until\nit's really neccessary.\n@param handler the invoking handler\n@param materializedObject the materialized Object" ]
public double Function2D(double x, double y) { return Math.exp(-(x * x + y * y) / (2 * sqrSigma)) / (2 * Math.PI * sqrSigma); }
[ "2-D Gaussian function.\n\n@param x value.\n@param y value.\n@return Function's value at point (x,y)." ]
[ "Returns all information related to a single texture.\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture information", "Get the cached ETag for the given host and file\n@param host the host\n@param file the file\n@return the cached ETag or null if there is no ETag in the cache", "Replace a photo from a File.\n\n@param file\n@param flickrId\n@param async\n@return photoId or ticketId\n@throws FlickrException", "Add all the items from an iterable to a collection.\n\n@param <T>\nThe type of items in the iterable and the collection\n@param collection\nThe collection to which the items should be added.\n@param items\nThe items to add to the collection.", "Tokenize the the string as a package hierarchy\n\n@param str\n@return", "Retrieves all Metadata Cascade Policies on a folder.\n\n@param fields optional fields to retrieve for cascade policies.\n@return the Iterable of Box Metadata Cascade Policies in your enterprise.", "Extracts a house holder vector from the column of A and stores it in u\n@param A Complex matrix with householder vectors stored in the lower left triangle\n@param row0 first row in A (implicitly assumed to be r + i0)\n@param row1 last row + 1 in A\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U", "if any item in toCheck is present in collection\n@param <T>\n@param collection\n@param toCheck\n@return", "Registers a BeanNameAutoProxyCreator class that wraps the bean being\nmonitored. The proxy is associated with the PerformanceMonitorInterceptor\nfor the bean, which is created when parsing the methods attribute from\nthe springconfiguration xml file.\n\n@param source An Attribute node from the spring configuration\n@param holder A container for the beans I will create\n@param context the context currently parsing my spring config" ]
public static vpnsessionaction[] get(nitro_service service) throws Exception{ vpnsessionaction obj = new vpnsessionaction(); vpnsessionaction[] response = (vpnsessionaction[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the vpnsessionaction resources that are configured on netscaler." ]
[ "Remove a server mapping from current profile by ID\n\n@param serverMappingId server mapping ID\n@return Collection of updated ServerRedirects", "Read a two byte integer from the data.\n\n@param offset current offset into data block\n@param data data block\n@return int value", "Opens the favorite dialog.\n\n@param explorer the explorer instance (null if not currently in explorer)", "Open the log file for writing.", "Parse the XML for a collection as returned by getTree call.\n\n@param collectionElement\n@return", "Creates a converter function that converts value into primitive type.\n\n@return A converter function or {@code null} if the given type is not primitive type or boxed type", "Try Oracle update batching and call executeUpdate or revert to\nJDBC update batching.\n@param stmt the statement beeing added to the batch\n@throws PlatformException upon JDBC failure", "Notifies that multiple content items are inserted.\n\n@param positionStart the position.\n@param itemCount the item count.", "Get the related tags.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param tag\nThe source tag\n@return A RelatedTagsList object\n@throws FlickrException" ]
public static boolean intersectsPointWithRectF(RectF _Rect, float _X, float _Y) { return _X > _Rect.left && _X < _Rect.right && _Y > _Rect.top && _Y < _Rect.bottom; }
[ "Checks if a point is in the given rectangle.\n\n@param _Rect rectangle which is checked\n@param _X x-coordinate of the point\n@param _Y y-coordinate of the point\n@return True if the points intersects with the rectangle." ]
[ "This method is called to alert project listeners to the fact that\na resource has been read from a project file.\n\n@param resource resource instance", "Calculates the bearing, in degrees, of the end LatLong point from this\nLatLong point.\n\n@param end The point that the bearing is calculated for.\n@return The bearing, in degrees, of the supplied point from this point.", "Checks the preconditions for creating a new Truncate processor.\n\n@param maxSize\nthe maximum size of the String\n@param suffix\nthe String to append if the input is truncated (e.g. \"...\")\n@throws IllegalArgumentException\nif {@code maxSize <= 0}\n@throws NullPointerException\nif suffix is null", "Use this API to fetch all the sslcertlink resources that are configured on netscaler.", "Returns iban's country code and check digit.\n\n@param iban String\n@return countryCodeAndCheckDigit String", "Add a metadata profile.\n@see #loadProfile", "Flushes all changes to disk.", "Maps a story if it is allowed by the meta filter\n\n@param story\nthe Story\n@param metaFilter\nthe meta filter", "Convenience method dispatches the specified event to the source appender,\nwhich will result in the custom event data being appended to the new file.\n\n@param customLoggingEvent\nThe custom Log4J event to be appended." ]
public DbLicense getLicense(final String name) { final DbLicense license = repoHandler.getLicense(name); if (license == null) { throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND) .entity("License " + name + " does not exist.").build()); } return license; }
[ "Return a html view that contains the targeted license\n\n@param name String\n@return DbLicense" ]
[ "Compare two versions\n\n@param other\n@return an integer: 0 if equals, -1 if older, 1 if newer\n@throws IncomparableException is thrown when two versions are not coparable", "Generates a Map of query parameters for Module regarding the filters\n\n@return Map<String, Object>", "Convenience method to set the underlying bean instance for a proxy.\n\n@param proxy the proxy instance\n@param beanInstance the instance of the bean", "Processes the template for all procedures of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Read general project properties.", "Reports a given exception as a RuntimeException, since the interface does\nnot allow us to throw checked exceptions directly.\n\n@param e\nthe exception to report\n@throws RuntimeException\nin all cases", "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", "returns a sorted array of nested classes and interfaces", "Write the domain controller's data to an output stream.\n\n@param outstream the output stream\n@throws Exception" ]
private Auth constructAuth(String authToken, String tokenSecret, String username) throws IOException { Auth auth = new Auth(); auth.setToken(authToken); auth.setTokenSecret(tokenSecret); // Prompt to ask what permission is needed: read, update or delete. auth.setPermission(Permission.fromString("delete")); User user = new User(); // Later change the following 3. Either ask user to pass on command line or read // from saved file. user.setId(nsid); user.setUsername((username)); user.setRealName(""); auth.setUser(user); this.authStore.store(auth); return auth; }
[ "If the Authtoken was already created in a separate program but not saved to file.\n\n@param authToken\n@param tokenSecret\n@param username\n@return\n@throws IOException" ]
[ "Return true if the processor of the node has previously been executed.\n\n@param processorGraphNode the node to test.", "Adds a rule row to the table with a given style.\n@param style the rule style, must not be null nor {@link TableRowStyle#UNKNOWN}\n@throws {@link NullPointerException} if style was null\n@throws {@link IllegalArgumentException} if style was {@link TableRowStyle#UNKNOWN}", "Use this context as prototype for a new mutable builder. The new builder is\npre-populated with the current settings of this context instance.", "This method is called when the locale of the parent file is updated.\nIt resets the locale specific date attributes to the default values\nfor the new locale.\n\n@param locale new locale", "The handling method.", "Obtain collection of headers to remove\n\n@return\n@throws Exception", "Start a server.\n\n@return the http server\n@throws Exception the exception", "Sets the specified short attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Print the class's constructors m" ]
protected void parseSequencesWithColons(TokenList tokens , Sequence sequence ) { TokenList.Token t = tokens.getFirst(); if( t == null ) return; int state = 0; TokenList.Token start = null; TokenList.Token middle = null; TokenList.Token prev = t; boolean last = false; while( true ) { if( state == 0 ) { if( isVariableInteger(t) && (t.next != null && t.next.getSymbol() == Symbol.COLON) ) { start = t; state = 1; t = t.next; } else if( t != null && t.getSymbol() == Symbol.COLON ) { // If it starts with a colon then it must be 'all' or a type-o IntegerSequence range = new IntegerSequence.Range(null,null); VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(range); TokenList.Token n = new TokenList.Token(varSequence); tokens.insert(t.previous, n); tokens.remove(t); t = n; } } else if( state == 1 ) { // var : ? if (isVariableInteger(t)) { state = 2; } else { // array range IntegerSequence range = new IntegerSequence.Range(start,null); VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(range); replaceSequence(tokens, varSequence, start, prev); state = 0; } } else if ( state == 2 ) { // var:var ? if( t != null && t.getSymbol() == Symbol.COLON ) { middle = prev; state = 3; } else { // create for sequence with start and stop elements only IntegerSequence numbers = new IntegerSequence.For(start,null,prev); VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(numbers); replaceSequence(tokens, varSequence, start, prev ); if( t != null ) t = t.previous; state = 0; } } else if ( state == 3 ) { // var:var: ? if( isVariableInteger(t) ) { // create 'for' sequence with three variables IntegerSequence numbers = new IntegerSequence.For(start,middle,t); VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(numbers); t = replaceSequence(tokens, varSequence, start, t); } else { // array range with 2 elements IntegerSequence numbers = new IntegerSequence.Range(start,middle); VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(numbers); replaceSequence(tokens, varSequence, start, prev); } state = 0; } if( last ) { break; } else if( t.next == null ) { // handle the case where it is the last token in the sequence last = true; } prev = t; t = t.next; } }
[ "Searches for descriptions of integer sequences and array ranges that have a colon character in them\n\nExamples of integer sequences:\n1:6\n2:4:20\n:\n\nExamples of array range\n2:\n2:4:" ]
[ "Sorts the specified list itself into ascending order, according to the natural ordering of its elements.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)", "Use this API to update spilloverpolicy.", "Use this API to unset the properties of nsrpcnode resources.\nProperties that need to be unset are specified in args array.", "get the setter method corresponding to given property", "Get the element at the index as a json array.\n\n@param i the index of the element to access", "Add the extra parameters which are passed as report parameters. The type of the parameter is \"guessed\" from the\nfirst letter of the parameter name.\n\n@param model view model\n@param request servlet request", "Returns the formula for the percentage\n@param group\n@param type\n@return", "Start check of execution time\n@param extra", "This method finds the start of the next working period.\n\n@param cal current Calendar instance" ]
public ProjectCalendarException getException(Date date) { ProjectCalendarException exception = null; // We're working with expanded exceptions, which includes any recurring exceptions // expanded into individual entries. populateExpandedExceptions(); if (!m_expandedExceptions.isEmpty()) { sortExceptions(); int low = 0; int high = m_expandedExceptions.size() - 1; long targetDate = date.getTime(); while (low <= high) { int mid = (low + high) >>> 1; ProjectCalendarException midVal = m_expandedExceptions.get(mid); int cmp = 0 - DateHelper.compare(midVal.getFromDate(), midVal.getToDate(), targetDate); if (cmp < 0) { low = mid + 1; } else { if (cmp > 0) { high = mid - 1; } else { exception = midVal; break; } } } } if (exception == null && getParent() != null) { // Check base calendar as well for an exception. exception = getParent().getException(date); } return (exception); }
[ "Retrieve a calendar exception which applies to this date.\n\n@param date target date\n@return calendar exception, or null if none match this date" ]
[ "Cancel a particular download in progress. Returns 1 if the download Id is found else returns 0.\n\n@param downloadId\n@return int", "Obtains a Discordian zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "The range of velocities that a particle generated from this emitter can have.\n@param minV Minimum velocity that a particle can have\n@param maxV Maximum velocity that a particle can have", "Writes and reads the XOP attachment using a CXF JAX-RS Proxy\nThe proxy automatically sets the \"mtom-enabled\" property by checking\nthe CXF EndpointProperty set on the XopAttachment interface.\n\n@throws Exception", "Create a Renderer getting a copy from the prototypes collection.\n\n@param content to render.\n@param parent used to inflate the view.\n@return a new renderer.", "Create the OJB_CLAZZ pseudo column based on CASE WHEN.\nThis column defines the Class to be instantiated.\n@param buf", "Parser for forecast\n\n@param feed\n@return", "Returns the result of a stored procedure executed on the backend.\n\n@param embeddedCacheManager embedded cache manager\n@param storedProcedureName name of stored procedure\n@param queryParameters parameters passed for this query\n@param classLoaderService the class loader service\n\n@return a {@link ClosableIterator} with the result of the query", "for testing purpose" ]
public void rename(String newName) { URL url = FILE_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID()); BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT"); JsonObject updateInfo = new JsonObject(); updateInfo.add("name", newName); request.setBody(updateInfo.toString()); BoxAPIResponse response = request.send(); response.disconnect(); }
[ "Renames this file.\n\n@param newName the new name of the file." ]
[ "Select the specific vertex and fragment shader to use.\n\nThe shader template is used to generate the sources for the vertex and\nfragment shader based on the vertex, material and light properties. This\nfunction may compile the shader if it does not already exist.\n\n@param context\nGVRContext\n@param rdata\nrenderable entity with mesh and rendering options\n@param scene\nlist of light sources", "Set an enterprise number value.\n\n@param index number index (1-40)\n@param value number value", "Return the List of Arguments for the specified MethodCallExpression or a ConstructorCallExpression.\nThe returned List contains either ConstantExpression or MapEntryExpression objects.\n@param methodCall - the AST MethodCallExpression or ConstructorCalLExpression\n@return the List of argument objects", "Stop announcing ourselves and listening for status updates.", "Use this API to update vpnsessionaction.", "Build and return a string version of the query. If you change the where or make other calls you will need to\nre-call this method to re-prepare the query for execution.", "Emits a change event for the given document id.\n\n@param nsConfig the configuration for the namespace to which the\ndocument referred to by the change event belongs.\n@param event the change event.", "Generate a weighted score based on position for matches of URI parts.\nThe matches are weighted in descending order from left to right.\nExact match is weighted higher than group match, and group match is weighted higher than wildcard match.\n\n@param requestUriParts the parts of request URI\n@param destUriParts the parts of destination URI\n@return weighted score", "Computes the inner product of A times A and stores the results in B. The inner product is symmetric and this\nfunction will only store the lower triangle. The value of the upper triangular matrix is undefined.\n\n<p>B = A<sup>T</sup>*A</sup>\n\n@param A (Input) Matrix\n@param B (Output) Storage for output." ]
@Pure public static <P1, P2> Procedure1<P2> curry(final Procedure2<? super P1, ? super P2> procedure, final P1 argument) { if (procedure == null) throw new NullPointerException("procedure"); return new Procedure1<P2>() { @Override public void apply(P2 p) { procedure.apply(argument, p); } }; }
[ "Curries a procedure that takes two arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes one argument. Never <code>null</code>." ]
[ "Removes a design document using the id and rev from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}", "Bessel function of the second kind, of order n.\n\n@param n Order.\n@param x Value.\n@return Y value.", "Get EditMode based on os and mode\n\n@return edit mode", "Prepare the document before rendering.\n\n@param outputStream output stream to render to, null if only for layout\n@param format format\n@throws DocumentException oops\n@throws IOException oops\n@throws PrintingException oops", "Use this API to add ntpserver.", "Use this API to expire cacheobject resources.", "Set the list of supported resolutions. Each resolution is specified in map units per pixel.\n\n@param resolutions\nresolutions\n@deprecated use {@link #setZoomLevels()}", "Associate an input stream with the operation. Closing the input stream\nis the responsibility of the caller.\n\n@param in the input stream. Cannot be {@code null}\n@return a builder than can be used to continue building the operation", "Retrieve the parent task based on its WBS.\n\n@param wbs parent WBS\n@return parent task" ]
public void addCollaborator(String appName, String collaborator) { connection.execute(new SharingAdd(appName, collaborator), apiKey); }
[ "Add a collaborator to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param collaborator Username of the collaborator to add. This is usually in the form of \"[email protected]\"." ]
[ "Get the unique set of declared methods on the leaf class and all superclasses. Leaf\nclass methods are included first and while traversing the superclass hierarchy any methods found\nwith signatures matching a method already included are filtered out.", "Computes the p=2 norm. If A is a matrix then the induced norm is computed. This\nimplementation is faster, but more prone to buffer overflow or underflow problems.\n\n@param A Matrix or vector.\n@return The norm.", "Returns the query string of a URL from a parameter list.\n\n@param params\nMap with parameters\n@return query string", "Transform the given bytes into an object.\n\n@param bytes The bytes to construct the object from\n@return The object constructed", "Retrieves an integer value from the extended data.\n\n@param type Type identifier\n@return integer value", "Modifies the \"msgCount\" belief\n\n@param int - the number to add or remove", "Diagnostic method used to dump known field map data.\n\n@param props props block containing field map data", "Creates a curator built using the given zookeeper connection string and timeout", "Obtain the profile identifier.\n\n@param profileIdentifier Can be profile ID, or friendly name\n@return\n@throws Exception" ]
private void RunScript(InteractiveObject interactiveObject, String functionName, Object[] parameters) { boolean complete = false; if ( V8JavaScriptEngine) { GVRJavascriptV8File gvrJavascriptV8File = interactiveObject.getScriptObject().getGVRJavascriptV8File(); String paramString = "var params =["; for (int i = 0; i < parameters.length; i++ ) { paramString += (parameters[i] + ", "); } paramString = paramString.substring(0, (paramString.length()-2)) + "];"; final GVRJavascriptV8File gvrJavascriptV8FileFinal = gvrJavascriptV8File; final InteractiveObject interactiveObjectFinal = interactiveObject; final String functionNameFinal = functionName; final Object[] parametersFinal = parameters; final String paramStringFinal = paramString; gvrContext.runOnGlThread(new Runnable() { @Override public void run() { RunScriptThread (gvrJavascriptV8FileFinal, interactiveObjectFinal, functionNameFinal, parametersFinal, paramStringFinal); } }); } // end V8JavaScriptEngine else { // Mozilla Rhino engine GVRJavascriptScriptFile gvrJavascriptFile = interactiveObject.getScriptObject().getGVRJavascriptScriptFile(); complete = gvrJavascriptFile.invokeFunction(functionName, parameters); if (complete) { // The JavaScript (JS) ran. Now get the return // values (saved as X3D data types such as SFColor) // stored in 'localBindings'. // Then call SetResultsFromScript() to set the GearVR values Bindings localBindings = gvrJavascriptFile.getLocalBindings(); SetResultsFromScript(interactiveObject, localBindings); } else { Log.e(TAG, "Error in SCRIPT node '" + interactiveObject.getScriptObject().getName() + "' running Rhino Engine JavaScript function '" + functionName + "'"); } } }
[ "Run the JavaScript program, Output saved in localBindings" ]
[ "Adds an HTTP header to this request.\n@param key the header key.\n@param value the header value.", "Get cached value that is dynamically loaded by the Acacia content editor.\n\n@param attribute the attribute to load the value to\n@return the cached value", "Returns a new client id for the profileIdentifier\n\n@param model\n@param profileIdentifier\n@return json with a new client_id\n@throws Exception", "Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values", "Returns true of the specified matrix element is valid element inside this matrix.\n\n@param row Row index.\n@param col Column index.\n@return true if it is a valid element in the matrix.", "Returns an iterator over the items in this collection.\n@return an iterator over the items in this collection.", "Populate a sorted list of custom fields to ensure that these fields\nare written to the file in a consistent order.", "Parses a single query facet item with query and label.\n@param prefix path to the query facet item (with trailing '/').\n@return the query facet item.", "dispatch to gravity state" ]
@Override public String toHexString(boolean with0xPrefix) { String result; if(hasNoStringCache() || (result = (with0xPrefix ? stringCache.hexStringPrefixed : stringCache.hexString)) == null) { result = toHexString(with0xPrefix, null); if(with0xPrefix) { stringCache.hexStringPrefixed = result; } else { stringCache.hexString = result; } } return result; }
[ "Writes this address as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix." ]
[ "Use this API to fetch all the configstatus resources that are configured on netscaler.", "Initializes unspecified sign properties using available defaults\nand global settings.", "Sets allowed values for attribute\n\n@param allowedValues values that are legal as part in this attribute\n@return a builder that can be used to continue building the attribute definition", "Retrieve the configuration of the named template.\n\n@param name the template name;", "Creates an object from the given JSON data.\n\n@param data the JSON data\n@param clazz the class object for the content of the JSON data\n@param <T> the type of the class object extending {@link InterconnectObject}\n@return the object contained in the given JSON data\n@throws JsonParseException if a the JSON data could not be parsed\n@throws JsonMappingException if the mapping of the JSON data to the IVO failed\n@throws IOException if an I/O related problem occurred", "Returns a copy of the given document.\n@param document the document to copy.\n@return a copy of the given document.", "Returns the locale specified by the named scoped attribute or context\nconfiguration parameter.\n\n<p> The named scoped attribute is searched in the page, request,\nsession (if valid), and application scope(s) (in this order). If no such\nattribute exists in any of the scopes, the locale is taken from the\nnamed context configuration parameter.\n\n@param pageContext the page in which to search for the named scoped\nattribute or context configuration parameter\n@param name the name of the scoped attribute or context configuration\nparameter\n\n@return the locale specified by the named scoped attribute or context\nconfiguration parameter, or <tt>null</tt> if no scoped attribute or\nconfiguration parameter with the given name exists", "Determines the component type for a given array type.\n\n@param type the given array type\n@return the component type of a given array type", "Retrieve the finish slack.\n\n@return finish slack" ]
public static base_response unset(nitro_service client, bridgetable resource, String[] args) throws Exception{ bridgetable unsetresource = new bridgetable(); return unsetresource.unset_resource(client,args); }
[ "Use this API to unset the properties of bridgetable resource.\nProperties that need to be unset are specified in args array." ]
[ "Creates and start an engine representing the node named as the given parameter.\n\n@param name\nname of the node, as present in the configuration (case sensitive)\n@param handler\ncan be null. A set of callbacks hooked on different engine life cycle events.\n@return an object allowing to stop the engine.", "Replies the elements of the given map except the pair with the given key.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param key the key to remove.\n@return the map with the content of the map except the key.\n@since 2.15", "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", "Update artifact download url of an artifact\n\n@param gavc String\n@param downLoadUrl String", "Use this API to fetch all the tmsessionparameter resources that are configured on netscaler.", "Creates a new resource.\n@param cmsObject The CmsObject of the current request context.\n@param newLink A string, specifying where which new content should be created.\n@param locale The locale for which the\n@param sitePath site path of the currently edited content.\n@param modelFileName not used.\n@param mode optional creation mode\n@param postCreateHandler optional class name of an {@link I_CmsCollectorPostCreateHandler} which is invoked after the content has been created.\nThe fully qualified class name can be followed by a \"|\" symbol and a handler specific configuration string.\n@return The site-path of the newly created resource.", "Use this API to update nsrpcnode.", "DISPATCHING - COMMANDS", "What is the maximum bounds in screen space? Needed for correct clipping calculation.\n\n@param tile\ntile\n@param panOrigin\npan origin\n@return max screen bbox" ]
public Photoset create(String title, String description, String primaryPhotoId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_CREATE); parameters.put("title", title); parameters.put("description", description); parameters.put("primary_photo_id", primaryPhotoId); Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element photosetElement = response.getPayload(); Photoset photoset = new Photoset(); photoset.setId(photosetElement.getAttribute("id")); photoset.setUrl(photosetElement.getAttribute("url")); return photoset; }
[ "Create a new photoset.\n\n@param title\nThe photoset title\n@param description\nThe photoset description\n@param primaryPhotoId\nThe primary photo id\n@return The new Photset\n@throws FlickrException" ]
[ "Set a colspan in a group of columns. First add the cols to the report\n\n@param colNumber the index of the col\n@param colQuantity the number of cols how i will take\n@param colspanTitle colspan title\n@return a Dynamic Report Builder\n@throws ColumnBuilderException When the index of the cols is out of\nbounds.", "Finishes the process of attaching a metadata cache file once it has been opened and validated.\n\n@param slot the slot to which the cache should be attached\n@param cache the opened, validated metadata cache file", "Calculate power of a complex number.\n\n@param z1 Complex Number.\n@param n Power.\n@return Returns a new complex number containing the power of a specified number.", "Processes an anonymous field definition specified at the class level.\n\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"true,false\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the field\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"", "Create a new AwsServiceClient instance with a different codec registry.\n\n@param codecRegistry the new {@link CodecRegistry} for the client.\n@return a new AwsServiceClient instance with the different codec registry", "Read assignment data.", "Returns the arguments as a list in their command line form.\n\n@return the arguments for the command line", "Send ourselves \"updates\" about any tracks that were loaded before we started, since we missed them.", "Run through the map and remove any references that have been null'd out by the GC." ]