query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
protected List<String> arguments() { List<String> args = new ArgumentsBuilder() .flag("-v", verbose) .flag("--package-dir", packageDir) .param("-d", outputDirectory.getPath()) .param("-p", packageName) .map("--package:", packageNameMap()) .param("--class-prefix", classPrefix) .param("--param-prefix", parameterPrefix) .param("--chunk-size", chunkSize) .flag("--no-dispatch-client", !generateDispatchClient) .flag("--dispatch-as", generateDispatchAs) .param("--dispatch-version", dispatchVersion) .flag("--no-runtime", !generateRuntime) .intersperse("--wrap-contents", wrapContents) .param("--protocol-file", protocolFile) .param("--protocol-package", protocolPackage) .param("--attribute-prefix", attributePrefix) .flag("--prepend-family", prependFamily) .flag("--blocking", !async) .flag("--lax-any", laxAny) .flag("--no-varargs", !varArgs) .flag("--ignore-unknown", ignoreUnknown) .flag("--autopackages", autoPackages) .flag("--mutable", mutable) .flag("--visitor", visitor) .getArguments(); return unmodifiableList(args); }
[ "Returns the command line options to be used for scalaxb, excluding the\ninput file names." ]
[ "Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved parameter type of the method return type, or {@code null}\nif not resolvable or if the single argument is of type {@link WildcardType}.", "Sets the position vector of the keyframe.", "Use this API to reset Interface resources.", "Obtain instance of the SQL Service\n\n@return instance of SQLService\n@throws Exception exception", "Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead", "This method opens the named project, applies the named filter\nand displays the filtered list of tasks or resources. If an\ninvalid filter name is supplied, a list of valid filter names\nis shown.\n\n@param filename input file name\n@param filtername input filter name", "Configure if you want this collapsible container to\naccordion its child elements or use expandable.", "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", "Record a new event." ]
private String escapeQuotes(String value) { StringBuilder sb = new StringBuilder(); int length = value.length(); char c; sb.append('"'); for (int index = 0; index < length; index++) { c = value.charAt(index); sb.append(c); if (c == '"') { sb.append('"'); } } sb.append('"'); return (sb.toString()); }
[ "This method is called when double quotes are found as part of\na value. The quotes are escaped by adding a second quote character\nand the entire value is quoted.\n\n@param value text containing quote characters\n@return escaped and quoted text" ]
[ "Remove a named object", "Returns the decoded string, in case it contains non us-ascii characters.\nReturns the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.\n\n@param str string to be decoded\n@return the decoded string, in case it contains non us-ascii characters;\nor the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.", "Convenience method for first removing all enum style constants and then adding the single one.\n\n@see #removeEnumStyleNames(UIObject, Class)\n@see #addEnumStyleName(UIObject, Style.HasCssName)", "Queries taking longer than this limit to execute are logged.\n@param queryExecuteTimeLimit the limit to set in milliseconds.\n@param timeUnit", "simple echo implementation", "Parse a string representation of an Integer value.\n\n@param value string representation\n@return Integer value", "This method is used to associate a child task with the current\ntask instance. It has package access, and has been designed to\nallow the hierarchical outline structure of tasks in an MPX\nfile to be constructed as the file is read in.\n\n@param child Child task.\n@param childOutlineLevel Outline level of the child task.", "set custom request for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise", "if |a11-a22| >> |a12+a21| there might be a better way. see pg371" ]
public AsciiTable setPaddingTopChar(Character paddingTopChar) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingTopChar(paddingTopChar); } } return this; }
[ "Sets the top padding character for all cells in the table.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining" ]
[ "Use this API to fetch dnspolicylabel resource of given name .", "Get the URI for the given statement.\n\n@param statement\nthe statement for which to create a URI\n@return the URI", "Use this API to fetch nslimitselector resource of given name .", "Get the GroupDiscussInterface.\n\n@return The GroupDiscussInterface", "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", "Opens a JDBC connection with the given parameters.", "set custom request for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise", "Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string", "Mark for creation all objects that were included into dependent collections.\nMark for deletion all objects that were excluded from dependent collections." ]
private void fillConnections(int connectionsToCreate) throws InterruptedException { try { for (int i=0; i < connectionsToCreate; i++){ // boolean dbDown = this.pool.getDbIsDown().get(); if (this.pool.poolShuttingDown){ break; } this.partition.addFreeConnection(new ConnectionHandle(null, this.partition, this.pool, false)); } } catch (Exception e) { logger.error("Error in trying to obtain a connection. Retrying in "+this.acquireRetryDelayInMs+"ms", e); Thread.sleep(this.acquireRetryDelayInMs); } }
[ "Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException" ]
[ "Computes the blend weights for the given time and\nupdates them in the target.", "Extracts the list of columns from the given field list.\n\n@param fields The fields\n@return The corresponding columns", "Load a classifier from the specified InputStream. The classifier is\nreinitialized from the flags serialized in the classifier. This does not\nclose the InputStream.\n\n@param in\nThe InputStream to load the serialized classifier from\n@param props\nThis Properties object will be used to update the\nSeqClassifierFlags which are read from the serialized classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data", "return a prepared Update Statement fitting to the given ClassDescriptor", "Retrieve the field location for a specific field.\n\n@param type field type\n@return field location", "Generate attachment extension from mime type\n\n@param type valid mime-type\n@return extension if it's known for specified mime-type, or empty string\notherwise", "Skips the given count of bytes, but at most the currently available count.\n\n@return number of bytes actually skipped from this buffer (0 if no bytes are available)", "Use this API to fetch all the autoscaleaction resources that are configured on netscaler.", "replace the counter for K1-index o by new counter c" ]
public static final int getInt(String value) { return (value == null || value.length() == 0 ? 0 : Integer.parseInt(value)); }
[ "This method retrieves an int value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of an integer\n@return int value" ]
[ "1-D Backward Discrete Cosine Transform.\n\n@param data Data.", "Guesses the best set to use at the specified index by looking at the surrounding sets. In general, characters in\nlower-numbered sets are more common, so we choose them if we can. If no good surrounding sets can be found, the default\nvalue returned is the first value from the valid set.\n\n@param index the current index\n@param length the maximum length to look at\n@param valid the valid sets for this index\n@return the best set to use at the specified index", "Transforms a list of Integer objects to an array of primitive int values.\n\n@param integers\n@return", "Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference", "Creates a non-binary media type with the given type, subtype, and charSet\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}", "Checks that native primarykey fields have readonly access, and warns if not.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)", "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", "Deletes a user from an enterprise account.\n@param notifyUser whether or not to send an email notification to the user that their account has been deleted.\n@param force whether or not this user should be deleted even if they still own files.", "orientation state factory method" ]
public void insertValue(int index, float[] newValue) { if ( newValue.length == 2) { try { value.add( index, new SFVec2f(newValue[0], newValue[1]) ); } catch (IndexOutOfBoundsException e) { Log.e(TAG, "X3D MFVec2f get1Value(index) out of bounds." + e); } catch (Exception e) { Log.e(TAG, "X3D MFVec2f get1Value(index) exception " + e); } } else { Log.e(TAG, "X3D MFVec2f insertValue set with array length not equal to 2"); } }
[ "Insert a new value prior to the index location in the existing value array,\nincreasing the field length accordingly.\n@param index - where the new values in an SFVec2f object will be placed in the array list\n@param newValue - the new x, y value for the array list" ]
[ "Get the Avro Schema of the input path, assuming the path contains just one\nschema version in all files under that path.", "Start ssh session and obtain session.\n\n@return the session", "Returns the collection definition of the given name if it exists.\n\n@param name The name of the collection\n@return The collection definition or <code>null</code> if there is no such collection", "On host controller reload, remove a not running server registered in the process controller declared as down.", "Get a property as a float or Default value.\n\n@param key the property name\n@param defaultValue default value", "Read predecessors from a Gantt Designer file.\n\n@param gantt Gantt Designer file", "Remove any mapping for this key, and return any previously\nmapped value.\n\n@param key the key whose mapping is to be removed\n@return the value removed, or null", "Utility method used to convert an arbitrary Number into an Integer.\n\n@param value Number instance\n@return Integer instance", "Utility method to read a percentage value.\n\n@param data data block\n@param offset offset into data block\n@return percentage value" ]
public static String capitalizePropertyName(String s) { if (s.length() == 0) { return s; } char[] chars = s.toCharArray(); chars[0] = Character.toUpperCase(chars[0]); return new String(chars); }
[ "Return a capitalized version of the specified property name.\n\n@param s\nThe property name" ]
[ "Adds the newState and the edge between the currentState and the newState on the SFG.\n\n@param newState the new state.\n@param eventable the clickable causing the new state.\n@return the clone state iff newState is a clone, else returns null", "This method is called to format a task type.\n\n@param value task type value\n@return formatted task type", "Use this API to update nspbr6.", "For the DC to check whether an operation should be ignored on the slave, if the slave is set up to ignore config not relevant to it\n\n@param domainResource the domain root resource\n@param serverConfigs the server configs the slave is known to have\n@param pathAddress the address of the operation to check if should be ignored or not", "Asta Powerproject assigns an explicit calendar for each task. This method\nis used to find the most common calendar and use this as the default project\ncalendar. This allows the explicitly assigned task calendars to be removed.", "Serialize the Document object.\n\n@param dom the document to serialize\n@return the serialized dom String", "Writes a buffered some-value restriction.\n\n@param propertyUri\nURI of the property to which the restriction applies\n@param rangeUri\nURI of the class or datatype to which the restriction applies\n@param bnode\nblank node representing the restriction\n@throws RDFHandlerException\nif there was a problem writing the RDF triples", "Find a statement group by its property id, without checking for\nequality with the site IRI. More efficient implementation than\nthe default one.", "Get stream for URL only\n\n@param stringUrl URL to get content\n@return the input stream\n@throws IOException I/O error happened" ]
private List<I_CmsSearchFieldMapping> getMappings() { CmsSearchManager manager = OpenCms.getSearchManager(); I_CmsSearchFieldConfiguration fieldConfig = manager.getFieldConfiguration(getParamFieldconfiguration()); CmsLuceneField field; List<I_CmsSearchFieldMapping> result = null; Iterator<CmsSearchField> itFields; if (fieldConfig != null) { itFields = fieldConfig.getFields().iterator(); while (itFields.hasNext()) { field = (CmsLuceneField)itFields.next(); if (field.getName().equals(getParamField())) { result = field.getMappings(); } } } else { result = Collections.emptyList(); if (LOG.isErrorEnabled()) { LOG.error( Messages.get().getBundle().key( Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, A_CmsFieldConfigurationDialog.PARAM_FIELDCONFIGURATION)); } } return result; }
[ "Returns the configured mappings of the current field.\n\n@return the configured mappings of the current field" ]
[ "Returns the service id with the propertype.\n\n@param serviceReference\n@return long value for the service id", "Tests correctness. Try\nfrom=1000, to=10000\nfrom=200, to=1000\nfrom=16, to=1000\nfrom=1000, to=Integer.MAX_VALUE", "For each node in specified zones, tries swapping some minimum number of\nrandom partitions per node with some minimum number of random partitions\nfrom other specified nodes. Chooses the best swap in each iteration.\nLarge values of the greedSwapMaxPartitions... arguments make this method\nequivalent to comparing every possible swap. This may get very expensive.\n\nSo if a node had partitions P1, P2, P3 and P4 and the other partitions\nset was Q1, Q2, Q3, Q4, Q5 The combinations that will be tried for\nswapping will be the cartesian product of the two sets. That is, {P1,\nQ1}, {P2, Q2}...{P2,Q1}, {P2,Q2}, in total 20 such swap pairs will be\ngenerated. The best among these swap pairs will be chosen.\n\n@param nextCandidateCluster\n@param nodeIds Node IDs within which to shuffle partitions\n@param greedySwapMaxPartitionsPerNode See RebalanceCLI.\n@param greedySwapMaxPartitionsPerZone See RebalanceCLI.\n@param storeDefs\n@return updated cluster", "Returns an interval representing the subtraction of the\ngiven interval from this one.\n@param other interval to subtract from this one\n@return result of subtraction", "Helper to read an optional Integer value.\n@param path The XML path of the element to read.\n@return The Integer value stored in the XML, or <code>null</code> if the value could not be read.", "Extract WOEID after XML loads", "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.", "Returns the x-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the x coordinate", "Split an artifact gavc to get the groupId\n@param gavc\n@return String" ]
private void appendJoinSQL92(Join join, StringBuffer where, StringBuffer buf) { if (join.isOuter) { buf.append(" LEFT OUTER JOIN "); } else { buf.append(" INNER JOIN "); } if (join.right.hasJoins()) { buf.append("("); appendTableWithJoins(join.right, where, buf); buf.append(")"); } else { appendTableWithJoins(join.right, where, buf); } buf.append(" ON "); join.appendJoinEqualities(buf); }
[ "Append Join for SQL92 Syntax" ]
[ "Specifies the maximum capacity of the counter.\n\n@param capacity\n<code>long</code>\n@throws IllegalArgumentException\nif windowMillis is less than 1.", "Print classes that were parts of relationships, but not parsed by javadoc", "Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class", "Sets the distance from the origin to the near clipping plane for the\nwhole camera rig.\n\n@param near\nDistance to the near clipping plane.", "Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler.", "Adds title and subtitle to the TitleBand when it applies.\nIf title is not present then subtitle will be ignored", "creates a shape list containing all child shapes and set it to the\ncurrent shape new shape get added to the shape array\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException", "Returns all the dependencies of a module\n\n@param module Module\n@return List<Dependency>", "Send a tempo changed announcement to all registered master listeners.\n\n@param tempo the new master tempo" ]
public void setLicense(String photoId, int licenseId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_SET_LICENSE); parameters.put("photo_id", photoId); parameters.put("license_id", Integer.toString(licenseId)); // Note: This method requires an HTTP POST request. Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } // This method has no specific response - It returns an empty sucess response if it completes without error. }
[ "Sets the license for a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo to update the license for.\n@param licenseId\nThe license to apply, or 0 (zero) to remove the current license.\n@throws FlickrException" ]
[ "Send an album art update announcement to all registered listeners.", "Creates an element that represents an image drawn at the specified coordinates in the page.\n@param x the X coordinate of the image\n@param y the Y coordinate of the image\n@param width the width coordinate of the image\n@param height the height coordinate of the image\n@param type the image type: <code>\"png\"</code> or <code>\"jpeg\"</code>\n@param resource the image data depending on the specified type\n@return", "Use this API to unset the properties of callhome resource.\nProperties that need to be unset are specified in args array.", "Creates a scheduled thread pool where each thread has the daemon\nproperty set to true. This allows the program to quit without\nexplicitly calling shutdown on the pool\n\n@param corePoolSize the number of threads to keep in the pool,\neven if they are idle\n\n@return a newly created scheduled thread pool", "Parses command-line and synchronizes metadata versions across all\nnodes.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "Use this API to fetch all the onlinkipv6prefix resources that are configured on netscaler.", "Returns a new analysis context builder that extracts the information about the available extensions from\nthe provided Revapi instance.\n\n<p>The extensions have to be known so that both old and new style of configuration can be usefully worked with.\n\n@param revapi the revapi instance to read the available extensions from\n@return a new analysis context builder", "Webkit based browsers require that we set the webkit-user-drag style\nattribute to make an element draggable.", "Count the number of occurrences of a sub CharSequence.\n\n@param self a CharSequence\n@param text a sub CharSequence\n@return the number of occurrences of the given CharSequence inside this CharSequence\n@see #count(String, String)\n@since 1.8.2" ]
private void writeAssignmentExtendedAttributes(Project.Assignments.Assignment xml, ResourceAssignment mpx) { Project.Assignments.Assignment.ExtendedAttribute attrib; List<Project.Assignments.Assignment.ExtendedAttribute> extendedAttributes = xml.getExtendedAttribute(); for (AssignmentField mpxFieldID : getAllAssignmentExtendedAttributes()) { Object value = mpx.getCachedValue(mpxFieldID); if (FieldTypeHelper.valueIsNotDefault(mpxFieldID, value)) { m_extendedAttributesInUse.add(mpxFieldID); Integer xmlFieldID = Integer.valueOf(MPPAssignmentField.getID(mpxFieldID) | MPPAssignmentField.ASSIGNMENT_FIELD_BASE); attrib = m_factory.createProjectAssignmentsAssignmentExtendedAttribute(); extendedAttributes.add(attrib); attrib.setFieldID(xmlFieldID.toString()); attrib.setValue(DatatypeConverter.printExtendedAttribute(this, value, mpxFieldID.getDataType())); attrib.setDurationFormat(printExtendedAttributeDurationFormat(value)); } } }
[ "This method writes extended attribute data for an assignment.\n\n@param xml MSPDI assignment\n@param mpx MPXJ assignment" ]
[ "Given a RendererViewHolder passed as argument and a position renders the view using the\nRenderer previously stored into the RendererViewHolder.\n\n@param viewHolder with a Renderer class inside.\n@param position to render.", "Gets the value of the given header field.\n@param fieldName name of the header field.\n@return value of the header.", "Closes the JDBC statement and its associated connection.", "Use this API to update route6 resources.", "Add a calendar node.\n\n@param parentNode parent node\n@param calendar calendar", "Gets the current Stack. If the stack is not set, a new empty instance is created and set.\n@return", "Computes the square root of the complex number.\n\n@param input Input complex number.\n@param root Output. The square root of the input", "Two stage promotion, dry run and actual promotion to verify correctness.\n\n@param promotion\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException", "Read an exception day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT exception day" ]
public void copy(ProjectCalendar cal) { setName(cal.getName()); setParent(cal.getParent()); System.arraycopy(cal.getDays(), 0, getDays(), 0, getDays().length); for (ProjectCalendarException ex : cal.m_exceptions) { addCalendarException(ex.getFromDate(), ex.getToDate()); for (DateRange range : ex) { ex.addRange(new DateRange(range.getStart(), range.getEnd())); } } for (ProjectCalendarHours hours : getHours()) { if (hours != null) { ProjectCalendarHours copyHours = cal.addCalendarHours(hours.getDay()); for (DateRange range : hours) { copyHours.addRange(new DateRange(range.getStart(), range.getEnd())); } } } }
[ "Copy the settings from another calendar to this calendar.\n\n@param cal calendar data source" ]
[ "Find the collision against a specific collider in a list of collisions.\n@param pickList collision list\n@param findme collider to find\n@return collision with the specified collider, null if not found", "get the setter method corresponding to given property", "Adds the given property and value to the constructed reference.\n\n@param propertyIdValue\nthe property to add\n@param value\nthe value to add\n@return builder object to continue construction", "This method writes extended attribute data for a resource.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource", "Removes elements from begin to end from the list, inclusive. Returns a new list which\nis composed of the removed elements", "Calculate the file to compile a jasper report template to.\n\n@param configuration the configuration for the current app.\n@param jasperFileXml the jasper report template in xml format.\n@param extension the extension of the compiled report template.\n@param logger the logger to log errors to if an occur.", "Returns new boolean matrix with true or false values selected with equal probability.\n\n@param numRow Number of rows in the new matrix.\n@param numCol Number of columns in the new matrix.\n@param rand Random number generator used to fill the matrix.\n@return The randomly generated matrix.", "Get all the names of inputs that are required to be in the Values object when this graph is executed.", "Determines the constraints relating to a task.\n\n@param row row data\n@param task Task instance" ]
public void setHtml(String html) { this.html = html; if (widget != null) { if (widget.isAttached()) { tooltipElement.find("span") .html(html != null ? html : ""); } else { widget.addAttachHandler(event -> tooltipElement.find("span") .html(html != null ? html : "")); } } else { GWT.log("Please initialize the Target widget.", new IllegalStateException()); } }
[ "Set the html as value inside the tooltip." ]
[ "A specific, existing project can be updated by making a PUT request on the\nURL for that project. Only the fields provided in the `data` block will be\nupdated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated project record.\n\n@param project The project to update.\n@return Request object", "Use this API to fetch responderpolicy_binding resource of given name .", "Execute a Runnable on a thread pool thread\n\n@param priority\nThe thread priority. Be careful with this! <blockquote>\n<b>Note:</b> Use Thread.MIN_PRIORITY..Thread.MAX_PRIORITY\n(1..10), <b>not</b> the Process/Linux -20..19 range!\n</blockquote>\n@param threadProc\nThe code to run. It doesn't matter if this code never returns\n- by using spawn (and, hence the thread pool) there is at\nleast a chance that you will be reusing a thread, thus saving\nteardown/startup costs.\n\n@return A Future<?> that lets you wait for thread completion, if\nnecessary", "Reads a single resource from a ConceptDraw PROJECT file.\n\n@param resource ConceptDraw PROJECT resource", "Get the upload parameters.\n@return", "Use this API to fetch lbvserver_filterpolicy_binding resources of given name .", "Assign a new value to this field.\n@param numStrings - number of strings\n@param newValues - the new strings", "Returns a OkHttpClient that ignores SSL cert errors\n@return", "Returns the full record for the given webhook.\n\n@param webhook The webhook to get.\n@return Request object" ]
public void add(final String source, final T destination) { // replace multiple slashes with a single slash. String path = source.replaceAll("/+", "/"); path = (path.endsWith("/") && path.length() > 1) ? path.substring(0, path.length() - 1) : path; String[] parts = path.split("/", maxPathParts + 2); if (parts.length - 1 > maxPathParts) { throw new IllegalArgumentException(String.format("Number of parts of path %s exceeds allowed limit %s", source, maxPathParts)); } StringBuilder sb = new StringBuilder(); List<String> groupNames = new ArrayList<>(); for (String part : parts) { Matcher groupMatcher = GROUP_PATTERN.matcher(part); if (groupMatcher.matches()) { groupNames.add(groupMatcher.group(1)); sb.append("([^/]+?)"); } else if (WILD_CARD_PATTERN.matcher(part).matches()) { sb.append(".*?"); } else { sb.append(part); } sb.append("/"); } //Ignore the last "/" sb.setLength(sb.length() - 1); Pattern pattern = Pattern.compile(sb.toString()); patternRouteList.add(ImmutablePair.of(pattern, new RouteDestinationWithGroups(destination, groupNames))); }
[ "Add a source and destination.\n\n@param source Source path to be routed. Routed path can have named wild-card pattern with braces \"{}\".\n@param destination Destination of the path." ]
[ "Given a year, month, and day, find the number of occurrences of that day in the month\n\n@param year the year\n@param month the month\n@param day the day\n@return the number of occurrences of the day in the month", "True if a CharSequence only contains whitespace characters.\n\n@param self The CharSequence to check the characters in\n@return true If all characters are whitespace characters\n@see #isAllWhitespace(String)\n@since 1.8.2", "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.", "Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream", "updates the groupname in the table given the id\n\n@param newGroupName new group name\n@param id ID of group", "Get a store definition from the given list of store definitions\n\n@param list A list of store definitions\n@param name The name of the store\n@return The store definition", "returns an Array with an Objects PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values", "Emit an event object with parameters.\n\nThis will invoke all {@link SimpleEventListener} bound to the event object\nclass given the listeners has the matching argument list.\n\nIf there is no parameter passed in, i.e. `args.length == 0`, then it will\nalso invoke all the {@link ActEventListener} bound to the event class.\n\nFor example, suppose we have the following Event defined:\n\n```java\npublic class UserActivityEvent extends ActEvent<User> {\npublic UserActivityEvent(User user) {super(user);}\n}\n```\n\nAnd we have the following event handler defined:\n\n```java\n{@literal @}OnEvent\npublic void logUserLogin(UserActivityEvent event, long timestamp) {...}\n\n{@literal @}OnEvent\npublic void checkDuplicateLoginAttempts(UserActivityEvent, Object... args) {...}\n\n{@literal @}OnEvent\npublic void foo(UserActivityEvent event) {...}\n```\n\nThe following code will invoke `logUserLogin` and `checkDuplicateLoginAttempts` methods:\n\n```java\nUser user = ...;\neventBus.emit(new UserActivityEvent(user), System.currentTimeMills());\n```\n\nThe `foo(UserActivityEvent)` will not invoked because:\n\n* The parameter list `(UserActivityEvent, long)` does not match the declared\nargument list `(UserActivityEvent)`. Here the `String` in the parameter\nlist is taken out because it is used to indicate the event, instead of being\npassing through to the event handler method.\n* The method `checkDuplicateLoginAttempts(UserActivityEvent, Object ...)` will\nbe invoked because it declares a varargs typed arguments, meaning it matches\nany parameters passed in.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener", "Resolves a conflict between a synchronized document's local and remote state. The resolution\nwill result in either the document being desynchronized or being replaced with some resolved\nstate based on the conflict resolver specified for the document. Uses the last uncommitted\nlocal event as the local state.\n\n@param nsConfig the namespace synchronization config of the namespace where the document\nlives.\n@param docConfig the configuration of the document that describes the resolver and current\nstate.\n@param remoteEvent the remote change event that is conflicting." ]
@SafeVarargs public static <T> Set<T> of(T... elements) { Preconditions.checkNotNull(elements); return ImmutableSet.<T> builder().addAll(elements).build(); }
[ "Creates a new immutable set that consists of given elements.\n\n@param elements the given elements\n@return a new immutable set that consists of given elements" ]
[ "Exports json encoded content to CrashReport object\n\n@param json valid json body.\n@return new instance of CrashReport", "Parses a String comprised of 0 or more comma-delimited key=value pairs.\n\n@param s the string to parse\n@return the Map of parsed key value pairs", "Performs the closure within a transaction using a cached connection.\nIf the closure takes a single argument, it will be called\nwith the connection, otherwise it will be called with no arguments.\n\n@param closure the given closure\n@throws SQLException if a database error occurs", "Convert this path address to its model node representation.\n\n@return the model node list of properties", "Restore authentications from persisted state.\n\n@param savedAuthorization saved authorizations", "Load and run the OnBrowserCreatedPlugins, this call has been made from the browser pool when a\nnew browser has been created and ready to be used by the Crawler. The PreCrawling plugins are\nexecuted before these plugins are executed except that the pre-crawling plugins are only\nexecuted on the first created browser.\n\n@param newBrowser the new created browser object", "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", "Use this API to update clusterinstance resources.", "Gets a JavaMail Session for given server type such as IMAP and additional props for JavaMail.\n\n@param setup the setup type, such as <code>ServerSetup.IMAP</code>\n@param mailProps additional mail properties.\n@return the JavaMail session." ]
public static void scanClassPathForFormattingAnnotations() { ExecutorService executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2); // scan classpath and filter out classes that don't begin with "com.nds" Reflections reflections = new Reflections("com.nds","com.cisco"); Set<Class<?>> annotated = reflections.getTypesAnnotatedWith(DefaultFormat.class); // Reflections ciscoReflections = new Reflections("com.cisco"); // // annotated.addAll(ciscoReflections.getTypesAnnotatedWith(DefaultFormat.class)); for (Class<?> markerClass : annotated) { // if the marker class is indeed implementing FoundationLoggingMarker // interface if (FoundationLoggingMarker.class.isAssignableFrom(markerClass)) { final Class<? extends FoundationLoggingMarker> clazz = (Class<? extends FoundationLoggingMarker>) markerClass; executorService.execute(new Runnable() { @Override public void run() { if (markersMap.get(clazz) == null) { try { // generate formatter class for this marker // class generateAndUpdateFormatterInMap(clazz); } catch (Exception e) { LOGGER.trace("problem generating formatter class from static scan method. error is: " + e.toString()); } } } }); } else {// if marker class does not implement FoundationLoggingMarker // interface, log ERROR // verify the LOGGER was initialized. It might not be as this // Method is called in a static block if (LOGGER == null) { LOGGER = LoggerFactory.getLogger(AbstractFoundationLoggingMarker.class); } LOGGER.error("Formatter annotations should only appear on foundationLoggingMarker implementations"); } } try { TimeUnit.SECONDS.sleep(30); } catch (InterruptedException e) { LOGGER.trace(e.toString(), e); } executorService.shutdown(); // try { // executorService.awaitTermination(15, TimeUnit.SECONDS); // } catch (InterruptedException e) { // LOGGER.error("creation of formatters has been interrupted"); // } }
[ "Scan all the class path and look for all classes that have the Format\nAnnotations." ]
[ "Auto re-initialize external resourced\nif resources have been already released.", "Reads a single byte from the input stream.", "Creates a scenario with 3 different steps classes.\n\nTo share state between the different steps instances use the\n{@link com.tngtech.jgiven.annotation.ScenarioState} annotation\n\n@param givenClass the Given steps class\n@param whenClass the When steps class\n@param thenClass the Then steps class\n@return the new scenario", "Sets the specified long attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Write flow id.\n\n@param message the message\n@param flowId the flow id", "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", "Extract the DatabaseTableConfig for a particular class by looking for class and field annotations. This is used\nby internal classes to configure a class.", "Use this API to fetch all the nsacl6 resources that are configured on netscaler.", "Associate a type with the given resource model." ]
public static boolean validate(Statement stmt) { try { Connection conn = stmt.getConnection(); if (conn == null) return false; if (!conn.isClosed() && conn.isValid(10)) return true; stmt.close(); conn.close(); } catch (SQLException e) { // this may well fail. that doesn't matter. we're just making an // attempt to clean up, and if we can't, that's just too bad. } return false; }
[ "Verifies that the connection is still alive. Returns true if it\nis, false if it is not. If the connection is broken we try\nclosing everything, too, so that the caller need only open a new\nconnection." ]
[ "Retrieves the time at which work finishes on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return finish time, or null for non-working day", "Find a toBuilder method, if the user has provided one.", "Replace the last element of an address with a static path element.\n\n@param element the path element\n@return the operation address transformer", "Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory", "Attempts to add classification to a file. If classification already exists then do update.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type on the file.", "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.", "Method used to update fields with values received from API.\n@param jsonObject JSON-encoded info about File Version object.", "Adds a new floating point variable. If one already has the same name it is written over.\n@param value Value of the number\n@param name Name in code", "Method handle a change on the cluster members set\n@param event" ]
public boolean startsWith(Bytes prefix) { Objects.requireNonNull(prefix, "startWith(Bytes prefix) cannot have null parameter"); if (prefix.length > this.length) { return false; } else { int end = this.offset + prefix.length; for (int i = this.offset, j = prefix.offset; i < end; i++, j++) { if (this.data[i] != prefix.data[j]) { return false; } } } return true; }
[ "Checks if this has the passed prefix\n\n@param prefix is a Bytes object to compare to this\n@return true or false\n@since 1.1.0" ]
[ "Checks the component type of the given array against the expected component type.\n\n@param array\nthe array to be checked. May not be <code>null</code>.\n@param expectedComponentType\nthe expected component type of the array. May not be <code>null</code>.\n@return the unchanged array.\n@throws ArrayStoreException\nif the expected runtime {@code componentType} does not match the actual runtime component type.", "Kicks off an animation that will result in the pointer being centered in the\npie slice of the currently selected item.", "Compress contiguous partitions into format \"e-i\" instead of\n\"e, f, g, h, i\". This helps illustrate contiguous partitions within a\nzone.\n\n@param cluster\n@param zoneId\n@return pretty string of partitions per zone", "Returns the total number of weights associated with this classifier.\n\n@return number of weights", "Disconnects from the serial interface and stops\nsend and receive threads.", "Gets the project name for a favorite entry.\n\n@param cms the CMS context\n@param entry the favorite entry\n@return the project name for the favorite entry\n@throws CmsException if something goes wrong", "Sets the current collection definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the collection as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\ncollection on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe collection\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\ncollection\"\[email protected] name=\"collection-class\" optional=\"true\" description=\"The type of the collection if not a\njava.util type or an array\"\[email protected] name=\"database-foreignkey\" optional=\"true\" description=\"Whether a database foreignkey shall be created\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the collection\"\[email protected] name=\"element-class-ref\" optional=\"true\" description=\"The fully qualified name of\nthe element type\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The name of the\nforeign keys (columns when an indirection table is given)\"\[email protected] name=\"foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the foreign keys as a comma-separated list if using an indirection table\"\[email protected] name=\"indirection-table\" optional=\"true\" description=\"The name of the indirection\ntable for m:n associations\"\[email protected] name=\"indirection-table-documentation\" optional=\"true\" description=\"Documentation\non the indirection table\"\[email protected] name=\"indirection-table-primarykeys\" optional=\"true\" description=\"Whether the\nfields referencing the collection and element classes, should also be primarykeys\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the collection is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the collection\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"query-customizer\" optional=\"true\" description=\"The query customizer for this collection\"\[email protected] name=\"query-customizer-attributes\" optional=\"true\" description=\"Attributes for the query customizer\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\ncollection\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The name of the\nforeign key columns pointing to the elements if using an indirection table\"\[email protected] name=\"remote-foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the remote foreign keys as a comma-separated list if using an indirection table\"", "Construct an InterestRateSwapProductDescriptor from a node in a FpML file.\n\n@param trade The node containing the swap.\n@return Descriptor of the swap.", "Commits the writes to the remote collection." ]
public int getIgnoredCount() { int count = 0; for (AggregatedTestResultEvent t : getTests()) { if (t.getStatus() == TestStatus.IGNORED || t.getStatus() == TestStatus.IGNORED_ASSUMPTION) { count++; } } return count; }
[ "Return the number of ignored or assumption-ignored tests." ]
[ "returns the bytesize of the give bitmap", "Get a property as a boolean or throw exception.\n\n@param key the property name", "Checks if Docker Machine is installed by running docker-machine and inspect the result.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n\n@return true if it is installed, false otherwise.", "Account for key being fetched.\n\n@param key", "Calcs the bonding size of given mesh.\n\n@param mesh Mesh to calc its bouding size.\n@return The bounding size for x, y and z axis.", "In Gerrit < 2.12 the XSRF token was included in the start page HTML.", "Parse the string representation of a timestamp.\n\n@param value string representation\n@return Java representation", "One of DEFAULT, or LARGE.", "Not implemented.\n@param point1 Point1\n@param point2 Point2\n@return Throws an exception." ]
private void addSubMatrixVariables(List<TokenList.Token> inputs, List<Variable> variables) { for (int i = 0; i < inputs.size(); i++) { TokenList.Token t = inputs.get(i); if( t.getType() != Type.VARIABLE ) throw new ParseError("Expected variables only in sub-matrix input, not "+t.getType()); Variable v = t.getVariable(); if( v.getType() == VariableType.INTEGER_SEQUENCE || isVariableInteger(t) ) { variables.add(v); } else { throw new ParseError("Expected an integer, integer sequence, or array range to define a submatrix"); } } }
[ "Goes through the token lists and adds all the variables which can be used to define a sub-matrix. If anything\nelse is found an excpetion is thrown" ]
[ "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", "Rethrows platform specific OperationCanceledExceptions and unwraps OperationCanceledErrors. Does nothing for any other type of Throwable.", "Reads data sets from a passed reader.\n\n@param reader\ndata sets source\n@param recover\nmax number of errors reading process will try to recover from.\nSet to 0 to fail immediately\n@throws IOException\nif reader can't read underlying stream\n@throws InvalidDataSetException\nif invalid/undefined data set is encountered", "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)", "Computes the eigenvalue of the provided tridiagonal matrix. Note that only the upper portion\nneeds to be tridiagonal. The bottom diagonal is assumed to be the same as the top.\n\n@param sideLength Number of rows and columns in the input matrix.\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@return true if it succeeds and false if it fails.", "Returns the Class object of the class specified in the OJB.properties\nfile for the \"PersistentFieldClass\" property.\n\n@return Class The Class object of the \"PersistentFieldClass\" class\nspecified in the OJB.properties file.", "First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe error\n@param errorMessage\nthe error message\n@param stackTrace\nthe stack trace\n@param statusCode\nthe status code\n@param statusCodeInt\nthe status code int", "Use this API to delete onlinkipv6prefix of given name.", "Use this API to fetch sslcertkey_crldistribution_binding resources of given name ." ]
public static String common() { String common = SysProps.get(KEY_COMMON_CONF_TAG); if (S.blank(common)) { common = "common"; } return common; }
[ "Return the \"common\" configuration set name. By default it is \"common\"\n@return the \"common\" conf set name" ]
[ "Ensures that the foreign keys required by the given collection are present in the element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the foreign keys", "Given a storedefinition, constructs the xml string to be sent out in\nresponse to a \"schemata\" fetch request\n\n@param storeDefinition\n@return serialized store definition", "Gets the Kullback Leibler divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Kullback Leibler divergence between u and v.", "Creates an IndexableTaskItem from provided FunctionalTaskItem.\n\n@param taskItem functional TaskItem\n@return IndexableTaskItem", "Returns a converter instance for the given annotation.\n\n@param annotation the annotation\n@return a converter instance or {@code null} if the given annotation is no option annotation", "Get the last date to keep logs from, by a given current date.\n@param currentDate the date of today\n@return the last date to keep log files from.", "Return a logger associated with a particular class name.", "Emit information about all of suite's tests.", "Notify all WorkerListeners currently registered for the given WorkerEvent.\n@param event the WorkerEvent that occurred\n@param worker the Worker that the event occurred in\n@param queue the queue the Worker is processing\n@param job the Job related to the event (only supply for JOB_PROCESS, JOB_EXECUTE, JOB_SUCCESS, and\nJOB_FAILURE events)\n@param runner the materialized object that the Job specified (only supply for JOB_EXECUTE and\nJOB_SUCCESS events)\n@param result the result of the successful execution of the Job (only set for JOB_SUCCESS and if the Job was\na Callable that returned a value)\n@param t the Throwable that caused the event (only supply for JOB_FAILURE and ERROR events)" ]
public static base_responses add(nitro_service client, cmppolicylabel resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { cmppolicylabel addresources[] = new cmppolicylabel[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new cmppolicylabel(); addresources[i].labelname = resources[i].labelname; addresources[i].type = resources[i].type; } result = add_bulk_request(client, addresources); } return result; }
[ "Use this API to add cmppolicylabel resources." ]
[ "Creates the stats type.\n\n@param statsItems\nthe stats items\n@param sortType\nthe sort type\n@param functionParser\nthe function parser\n@return the string", "Use this API to fetch all the nstimeout resources that are configured on netscaler.", "Helper method to send message on outputStream and account for network\ntime stats.\n\n@param outputStream\n@param message\n@throws IOException", "Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source", "Get the object responsible for printing to the correct output format.\n\n@param specJson the request json from the client", "Converts days of the week into a bit field.\n\n@param data recurring data\n@return bit field", "Mark objects no longer available in collection for delete and new objects for insert.\n\n@param broker the PB to persist all objects", "Returns true if templates are to be instantiated synchronously and false if\nasynchronously.", "High-accuracy Complementary normal distribution function.\n\n@param x Value.\n@return Result." ]
private void setBelief(String bName, Object value) { introspector.setBeliefValue(this.getLocalName(), bName, value, null); }
[ "Modifies the belief referenced by bName parameter.\n\n@param bName\n- the name of the belief to update.\n@param value\n- the new value for the belief" ]
[ "Finds a child resource with the given key.\n\n@param key the child resource key\n@return null if no child resource exists with the given name else the child resource", "The parameter must never be null\n\n@param queryParameters", "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.", "Given a Task instance, this task determines if it should be written to the\nPM XML file as an activity or as a WBS item, and calls the appropriate\nmethod.\n\n@param task Task instance", "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.", "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", "Instantiates a new event collector.", "Destroys an instance of the bean\n\n@param instance The instance", "Creates a MetaMatcher based on the filter content.\n\n@param filterAsString the String representation of the filter\n@param metaMatchers the Map of custom MetaMatchers\n@return A MetaMatcher used to match the filter content" ]
public IPv6AddressSegment join(IPv6AddressCreator creator, IPv4AddressSegment low) throws IncompatibleAddressException { int shift = IPv4Address.BITS_PER_SEGMENT; Integer prefix = getJoinedSegmentPrefixLength(shift, getSegmentPrefixLength(), low.getSegmentPrefixLength()); if(isMultiple()) { //if the high segment has a range, the low segment must match the full range, //otherwise it is not possible to create an equivalent range when joining if(!low.isFullRange()) { throw new IncompatibleAddressException(this, low, "ipaddress.error.invalidMixedRange"); } } return creator.createSegment( (getSegmentValue() << shift) | low.getSegmentValue(), (getUpperSegmentValue() << shift) | low.getUpperSegmentValue(), prefix); }
[ "Joins with another IPv4 segment to produce a IPv6 segment.\n\n@param creator\n@param low\n@return" ]
[ "2-D Forward Discrete Cosine Transform.\n\n@param data Data.", "Sets the value if the date only should be shown.\n@param dateOnly if the date only should be shown", "Returns a String summarizing overall accuracy that will print nicely.", "Start the host controller services.\n\n@throws Exception", "Creates an endpoint reference by duplicating the endpoint reference of a given server.\n@param server\n@param address\n@param props\n@return", "Calculate Euclidean distance between two points.\n\n@param anotherPoint Point to calculate distance to.\n@return Euclidean distance between this point and anotherPoint points.", "Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value", "Sets the polling status.\n\n@param status the polling status.\n@param statusCode the HTTP status code\n@throws IllegalArgumentException thrown if status is null.", "Updates the store definition object and the retention time based on the\nupdated store definition" ]
@Deprecated public void setResolutions(List<Double> resolutions) { getZoomLevels().clear(); for (Double resolution : resolutions) { getZoomLevels().add(new ScaleInfo(1. / resolution)); } }
[ "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()}" ]
[ "Executes the API action \"wbsetclaim\" for the given parameters.\n\n@param statement\nthe JSON serialization of claim to add or delete.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException", "Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.", "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", "Returns an array of the names of all atributes of this descriptor.\n\n@return The list of attribute names (will not be <code>null</code>)", "Stops all transitions.", "Convert a drawable object into a Bitmap.\n@param drawable Drawable to extract a Bitmap from.\n@return A Bitmap created from the drawable parameter.", "Returns real unquoted value for a DisplayValue\n@param key\n@return", "Sets divider padding for axis. If axis does not match the orientation, it has no effect.\n@param padding\n@param axis {@link Axis}", "Reads a markdown link ID.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link ID." ]
private void addClass(URLClassLoader loader, JarEntry jarEntry, XMLStreamWriter writer, boolean mapClassMethods) throws ClassNotFoundException, XMLStreamException, IntrospectionException { String className = jarEntry.getName().replaceAll("\\.class", "").replaceAll("/", "."); writer.writeStartElement("class"); writer.writeAttribute("name", className); Set<Method> methodSet = new HashSet<Method>(); Class<?> aClass = loader.loadClass(className); processProperties(writer, methodSet, aClass); if (mapClassMethods && !Modifier.isInterface(aClass.getModifiers())) { processClassMethods(writer, aClass, methodSet); } writer.writeEndElement(); }
[ "Add an individual class to the map file.\n\n@param loader jar file class loader\n@param jarEntry jar file entry\n@param writer XML stream writer\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException" ]
[ "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", "Gets the flags associated with this attribute.\n@return the flags. Will not return {@code null}", "This method writes assignment data to an MSPDI file.\n\n@param project Root node of the MSPDI file", "Checks if the provided artifactQuery is valid\n\n@param artifactQuery ArtifactQuery\n@throws WebApplicationException if the data is corrupted", "Method handle a change on the cluster members set\n@param event", "Parse the string representation of a timestamp.\n\n@param value string representation\n@return Java representation", "The % Work Complete field contains the current status of a task,\nexpressed as the percentage of the task's work that has been completed.\nYou can enter percent work complete, or you can have Microsoft Project\ncalculate it for you based on actual work on the task.\n\n@return percentage as float", "Start the operation by instantiating the first job instance in a separate Thread.\n\n@param arguments {@inheritDoc}", "Sets the body of this request to a given JSON string.\n@param body the JSON string to use as the body." ]
public static spilloverpolicy get(nitro_service service, String name) throws Exception{ spilloverpolicy obj = new spilloverpolicy(); obj.set_name(name); spilloverpolicy response = (spilloverpolicy) obj.get_resource(service); return response; }
[ "Use this API to fetch spilloverpolicy resource of given name ." ]
[ "at this point definition below is not really needed as it is the same as for 1.1, but it is here as place holder when subsystem parser evolves.", "Removes a parameter from this configuration.\n\n@param key the parameter to remove", "User-initiated commands use this method.\n\n@param command The CLI command\n@return A Response object containing the command line, DMR request, and DMR response\n@throws CommandFormatException\n@throws IOException", "Find the style filter that must be applied to this feature.\n\n@param feature\nfeature to find the style for\n@param styles\nstyle filters to select from\n@return a style filter", "Adds the complex number with a scalar value.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the add of specified complex number with scalar value.", "Use this API to fetch systemsession resources of given names .", "This method is used to process an MPP8 file. This is the file format\nused by Project 98.\n\n@param reader parent file reader\n@param file Parent MPX file\n@param root Root of the POI file system.\n@throws MPXJException\n@throws IOException", "Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException", "Clears the proxy. A cleared proxy is defined as loaded\n\n@see Collection#clear()" ]
public static boolean equal(Vector3f v1, Vector3f v2) { return equal(v1.x, v2.x) && equal(v1.y, v2.y) && equal(v1.z, v2.z); }
[ "Are these two numbers effectively equal?\n\nThe same logic is applied for each of the 3 vector dimensions: see {@link #equal}\n@param v1\n@param v2" ]
[ "Loads all localizations not already loaded.\n@throws CmsException thrown if locking a file fails.\n@throws UnsupportedEncodingException thrown if reading a file fails.\n@throws IOException thrown if reading a file fails.", "Start offering shared dbserver sessions.\n\n@throws SocketException if there is a problem opening connections", "Get the class name without the qualified package name.\n@param className the className to get the short name for\n@return the class name of the class without the package name\n@throws IllegalArgumentException if the className is empty", "Add the given headers to the given HTTP request.\n@param httpRequest the request to add the headers to\n@param headers the headers to add", "May have to be changed to let multiple touch", "Clear out our DAO caches.", "Use this API to fetch appfwsignatures resource of given name .", "Samples a batch of indices in the range [0, numExamples) without replacement.", "Returns an empty Promotion details in Json\n\n@return String\n@throws IOException" ]
public static Map<String, String> mapStringToMap(String map) { String[] m = map.split("[,;]"); Map<String, String> res = new HashMap<String, String>(); for (String str : m) { int index = str.lastIndexOf('='); String key = str.substring(0, index); String val = str.substring(index + 1); res.put(key.trim(), val.trim()); } return res; }
[ "Takes a string of the form \"x1=y1,x2=y2,...\" and returns Map\n@param map A string of the form \"x1=y1,x2=y2,...\"\n@return A Map m is returned such that m.get(xn) = yn" ]
[ "Determines whether the current object on the specified level has a specific property, and if so, processes the\ntemplate\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"", "Add network interceptor to httpClient to track download progress for\nasync requests.", "Finds all lazily-declared classes and methods and adds their definitions to the source.", "Checks if a Zip is valid navigating through the entries\n\n@param file File to validate\n@throws IOException I/O Error", "Use this API to fetch all the clusterinstance resources that are configured on netscaler.", "This method performs a series of permissions checks given a directory and properties file path.\n\n1 - Check whether the parent directory dirPath has proper execute and read permissions\n2 - Check whether properties file path is readable and writable\n\nIf either of the permissions checks fail, update validFilePermissions and filePermissionsProblemPath\nappropriately.", "Validates the return value\n\n@param instance The instance to validate", "Checks if the query should be executed using the debug mode where the security restrictions do not apply.\n@param cms the current context.\n@param query the query to execute.\n@return a flag, indicating, if the query should be performed in debug mode.", "Create a model controller client which is exclusively receiving messages on an existing channel.\n\n@param channel the channel\n@param executorService an executor\n@return the created client" ]
@Override public void close() throws VoldemortException { logger.debug("Close called for read-only store."); this.fileModificationLock.writeLock().lock(); try { if(isOpen) { this.isOpen = false; fileSet.close(); } else { logger.debug("Attempt to close already closed store " + getName()); } } finally { this.fileModificationLock.writeLock().unlock(); } }
[ "Close the store." ]
[ "Use this API to delete linkset of given name.", "Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise", "Returns the default conversion for the given java type.\n\n@param javaType The qualified java type\n@return The default conversion or <code>null</code> if there is no default conversion for the type", "This private method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions. It assumes\nthat the caller has already calculated the day of the week on which\nthe given day falls.\n\n@param date Date to be tested\n@param day Day of the week for the date under test\n@return boolean flag", "See also JLS8, 4.12.5 Initial Values of Variables.\n\n@param type\n@return the default value for the given type as defined by JLS", "True if deleted, false if not found.", "Computes the blend weights for the given time and\nupdates them in the target.", "Set the menu view from a layout resource.\n\n@param layoutResId Resource ID to be inflated.", "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" ]
private void getSingleValue(Method method, Object object, Map<String, String> map) { Object value; try { value = filterValue(method.invoke(object)); } catch (Exception ex) { value = ex.toString(); } if (value != null) { map.put(getPropertyName(method), String.valueOf(value)); } }
[ "Retrieve a single value property.\n\n@param method method definition\n@param object target object\n@param map parameter values" ]
[ "Gets the Jensen Shannon divergence.\n\n@param p U vector.\n@param q V vector.\n@return The Jensen Shannon divergence between u and v.", "EXecutes command to given container returning the inspection object as well. This method does 3 calls to\ndockerhost. Create, Start and Inspect.\n\n@param containerId\nto execute command.", "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", "Use this API to fetch authorizationpolicylabel_binding resource of given name .", "Normalizes elements in 'u' by dividing by max and computes the norm2 of the normalized\narray u. Adjust the sign of the returned value depending on the size of the first\nelement in 'u'. Normalization is done to avoid overflow.\n\n<pre>\nfor i=j:numRows\nu[i] = u[i] / max\ntau = tau + u[i]*u[i]\nend\ntau = sqrt(tau)\nif( u[j] &lt; 0 )\ntau = -tau;\n</pre>\n\n@param j Element in 'u' that it starts at.\n@param numRows Element in 'u' that it stops at.\n@param u Array\n@param max Max value in 'u' that is used to normalize it.\n@return norm2 of 'u'", "Returns the currently scheduled job description identified by the given id.\n\n@param id the job id\n\n@return a job or <code>null</code> if not found", "Use this API to fetch lbvserver_rewritepolicy_binding resources of given name .", "Hashes a path, if the path points to a directory then hashes the contents recursively.\n@param messageDigest the digest used to hash.\n@param path the file/directory we want to hash.\n@return the resulting hash.\n@throws IOException", "Get the art available for all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the album art associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the ArtFinder is not running" ]
public static Span prefix(CharSequence rowPrefix) { Objects.requireNonNull(rowPrefix); return prefix(Bytes.of(rowPrefix)); }
[ "Returns a Span that covers all rows beginning with a prefix String parameters will be encoded\nas UTF-8" ]
[ "Associate the batched Children with their owner object.\nLoop over owners", "Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges", "Write a resource.\n\n@param record resource instance\n@throws IOException", "Get a property as a json array or throw exception.\n\n@param key the property name", "Convert string to qname.\n\n@param str the string\n@return the qname", "Gets an overrideID for a class name, method name\n\n@param className name of class\n@param methodName name of method\n@return override ID of method", "Get or create the log context based on the logging profile.\n\n@param loggingProfile the logging profile to get or create the log context for\n\n@return the log context that was found or a new log context", "Clear all overrides, reset repeat counts for a request path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception", "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" ]
public static int getPrecedence( int type, boolean throwIfInvalid ) { switch( type ) { case LEFT_PARENTHESIS: return 0; case EQUAL: case PLUS_EQUAL: case MINUS_EQUAL: case MULTIPLY_EQUAL: case DIVIDE_EQUAL: case INTDIV_EQUAL: case MOD_EQUAL: case POWER_EQUAL: case LOGICAL_OR_EQUAL: case LOGICAL_AND_EQUAL: case LEFT_SHIFT_EQUAL: case RIGHT_SHIFT_EQUAL: case RIGHT_SHIFT_UNSIGNED_EQUAL: case BITWISE_OR_EQUAL: case BITWISE_AND_EQUAL: case BITWISE_XOR_EQUAL: return 5; case QUESTION: return 10; case LOGICAL_OR: return 15; case LOGICAL_AND: return 20; case BITWISE_OR: case BITWISE_AND: case BITWISE_XOR: return 22; case COMPARE_IDENTICAL: case COMPARE_NOT_IDENTICAL: return 24; case COMPARE_NOT_EQUAL: case COMPARE_EQUAL: case COMPARE_LESS_THAN: case COMPARE_LESS_THAN_EQUAL: case COMPARE_GREATER_THAN: case COMPARE_GREATER_THAN_EQUAL: case COMPARE_TO: case FIND_REGEX: case MATCH_REGEX: case KEYWORD_INSTANCEOF: return 25; case DOT_DOT: case DOT_DOT_DOT: return 30; case LEFT_SHIFT: case RIGHT_SHIFT: case RIGHT_SHIFT_UNSIGNED: return 35; case PLUS: case MINUS: return 40; case MULTIPLY: case DIVIDE: case INTDIV: case MOD: return 45; case NOT: case REGEX_PATTERN: return 50; case SYNTH_CAST: return 55; case PLUS_PLUS: case MINUS_MINUS: case PREFIX_PLUS_PLUS: case PREFIX_MINUS_MINUS: case POSTFIX_PLUS_PLUS: case POSTFIX_MINUS_MINUS: return 65; case PREFIX_PLUS: case PREFIX_MINUS: return 70; case POWER: return 72; case SYNTH_METHOD: case LEFT_SQUARE_BRACKET: return 75; case DOT: case NAVIGATE: return 80; case KEYWORD_NEW: return 85; } if( throwIfInvalid ) { throw new GroovyBugError( "precedence requested for non-operator" ); } return -1; }
[ "Returns the precedence of the specified operator. Non-operator's will\nreceive -1 or a GroovyBugError, depending on your preference." ]
[ "Generates a torque schema for the model.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"", "Use this API to update snmpalarm.", "Returns the matrix's rank. Automatic selection of threshold\n\n@param A Matrix. Not modified.\n@return The rank of the decomposed matrix.", "Forceful cleanup the logs", "Obtains a British Cutover zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Add a property with the given name and the given list of values to this Properties object. Name\nand values are trimmed before the property is added.\n\n@param name the name of the property, must not be <code>null</code>.\n@param values the values of the property, must no be <code>null</code>,\nnone of the values must be <code>null</code>", "Translate a Wikimedia language code to its preferred value\nif this code is deprecated, or return it untouched if the string\nis not a known deprecated Wikimedia language code\n\n@param wikimediaLanguageCode\nthe language code as used by Wikimedia\n@return\nthe preferred language code corresponding to the original language code", "Concats an element and an array.\n\n@param firstElement the first element\n@param array the array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after the first element", "Set the ambient light intensity.\n\nThis designates the color of the ambient reflection.\nIt is multiplied by the material ambient color to derive\nthe hue of the ambient reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code ambient_intensity} to control the intensity of ambient light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)" ]
public static String joinStrings(List<String> strings, boolean fixCase, char withChar) { if (strings == null || strings.size() == 0) { return ""; } StringBuilder result = null; for (String s : strings) { if (fixCase) { s = fixCase(s); } if (result == null) { result = new StringBuilder(s); } else { result.append(withChar); result.append(s); } } return result.toString(); }
[ "Generic string joining function.\n@param strings Strings to be joined\n@param fixCase does it need to fix word case\n@param withChar char to join strings with.\n@return joined-string" ]
[ "Reads a command \"tag\" from the request.", "Sets the database dialect.\n\n@param dialect\nthe database dialect", "Determines if the queue identified by the given key is a regular 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 regular queue, false otherwise", "Sets a file whose contents will be prepended to the JAR file's data.\n\n@param file the prefix file, or {@code null} for none.\n@return {@code this}", "Create a request for elevations for samples along a path.\n\n@param req\n@param callback", "This method processes any extended attributes associated with a resource.\n\n@param xml MSPDI resource instance\n@param mpx MPX resource instance", "Adds a column pair to this foreignkey.\n\n@param localColumn The column in the local table\n@param remoteColumn The column in the remote table", "Extract and return the table name for a class.", "Specify the artifact configuration to be searched for\n@param artifact configured artifact object\n@return" ]
private boolean hidden(ProgramElementDoc c) { if (c.tags("hidden").length > 0 || c.tags("view").length > 0) return true; Options opt = optionProvider.getOptionsFor(c instanceof ClassDoc ? (ClassDoc) c : c.containingClass()); return opt.matchesHideExpression(c.toString()) // || (opt.hidePrivateInner && c instanceof ClassDoc && c.isPrivate() && ((ClassDoc) c).containingClass() != null); }
[ "Return true if c has a @hidden tag associated with it" ]
[ "Finds the file at the provided path within the archive.\n\nEg, getChildFile(ArchiveModel, \"/META-INF/MANIFEST.MF\") will return a {@link FileModel} if a file named\n/META-INF/MANIFEST.MF exists within the archive\n\n@return Returns the located {@link FileModel} or null if no file with this path could be located", "Obtains a local date in Discordian calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Discordian local date, not null\n@throws DateTimeException if unable to create the date", "Convert element to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed", "Get an exception reporting a missing, required XML child element.\n@param reader the stream reader\n@param required a set of enums whose toString method returns the\nattribute name\n@return the exception", "Use this API to fetch appfwlearningsettings resource of given name .", "private HttpServletResponse headers;", "Get EditMode based on os and mode\n\n@return edit mode", "Verify that the given queues are all valid.\n\n@param queues the given queues", "Returns all the elements in the sorted set with a score in the given range.\nIn contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered\nfrom high to low scores.\nThe elements having the same score are returned in reverse lexicographical order.\n@param scoreRange\n@return elements in the specified score range" ]
public void addAll(Vertex vtx) { if (head == null) { head = vtx; } else { tail.next = vtx; } vtx.prev = tail; while (vtx.next != null) { vtx = vtx.next; } tail = vtx; }
[ "Adds a chain of vertices to the end of this list." ]
[ "Prints a cluster xml to a file.\n\n@param outputDirName\n@param fileName\n@param cluster", "Pretty prints a task list of rebalancing tasks.\n\n@param infos list of rebalancing tasks (RebalancePartitionsInfo)\n@return pretty-printed string", "Creates a new SimpleMatrix with the specified DMatrixRMaj used as its internal matrix. This means\nthat the reference is saved and calls made to the returned SimpleMatrix will modify the passed in DMatrixRMaj.\n\n@param internalMat The internal DMatrixRMaj of the returned SimpleMatrix. Will be modified.", "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", "Use this API to fetch cacheselector resource of given name .", "Returns server group by ID\n\n@param id ID of server group\n@return ServerGroup\n@throws Exception exception", "Gets the numeric codes. Setting it to -1 search for currencies that have no numeric code.\n\n@return the query for chaining.", "Sets an attribute in a non-main section of the manifest.\n\n@param section the section's name\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.", "Gets the bytes for the highest address in the range represented by this address.\n\n@return" ]
public synchronized X509Certificate getCertificateByHostname(final String hostname) throws KeyStoreException, CertificateParsingException, InvalidKeyException, CertificateExpiredException, CertificateNotYetValidException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, UnrecoverableKeyException{ String alias = _subjectMap.get(getSubjectForHostname(hostname)); if(alias != null) { return (X509Certificate)_ks.getCertificate(alias); } return getMappedCertificateForHostname(hostname); }
[ "Returns the aliased certificate. Certificates are aliased by their hostname.\n@see ThumbprintUtil\n@param alias\n@return\n@throws KeyStoreException\n@throws UnrecoverableKeyException\n@throws NoSuchProviderException\n@throws NoSuchAlgorithmException\n@throws CertificateException\n@throws SignatureException\n@throws CertificateNotYetValidException\n@throws CertificateExpiredException\n@throws InvalidKeyException\n@throws CertificateParsingException" ]
[ "Deserializes a variable, NOT checking whether the datatype is custom\n@param s\n@param variableType\n@return", "Clears the handler hierarchy.", "Returns the ARGB components for all pixels in this image\n\n@return an array containing an array for each ARGB components in that order.", "Determines if the queue identified by the given key is used.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key is used, false otherwise", "Generates required number of placeholders as string.\n\nExample: {@code numberOfPlaceholders == 1, result == \"?\"},\n{@code numberOfPlaceholders == 2, result == \"?,?\"}.\n\n@param numberOfPlaceholders required amount of placeholders, should be {@code > 0}.\n@return string with placeholders.", "Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction", "Use this API to fetch all the ci resources that are configured on netscaler.", "Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declared in the\ninterface.\n@param args an array of objects containing the values of the arguments\npassed in the method invocation on the proxy instance. If a\nparameter type is a primitive type, the type of the array\nelement is a wrapper class.\n@return the resulting value of the method invocation.\n@throws Throwable if the method invocation fails.", "Returns the directory of the file.\n\n@param filePath Path of the file.\n@return The directory string or {@code null} if\nthere is no parent directory.\n@throws IllegalArgumentException if path is bad" ]
public PayloadBuilder resizeAlertBody(final int payloadLength, final String postfix) { int currLength = length(); if (currLength <= payloadLength) { return this; } // now we are sure that truncation is required String body = (String)customAlert.get("body"); final int acceptableSize = Utilities.toUTF8Bytes(body).length - (currLength - payloadLength + Utilities.toUTF8Bytes(postfix).length); body = Utilities.truncateWhenUTF8(body, acceptableSize) + postfix; // set it back customAlert.put("body", body); // calculate the length again currLength = length(); if(currLength > payloadLength) { // string is still too long, just remove the body as the body is // anyway not the cause OR the postfix might be too long customAlert.remove("body"); } return this; }
[ "Shrinks the alert message body so that the resulting payload\nmessage fits within the passed expected payload length.\n\nThis method performs best-effort approach, and its behavior\nis unspecified when handling alerts where the payload\nwithout body is already longer than the permitted size, or\nif the break occurs within word.\n\n@param payloadLength the expected max size of the payload\n@param postfix for the truncated body, e.g. \"...\"\n@return this" ]
[ "Seeks forward or backwards to a particular season based on the current date\n\n@param seasonString The season to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek", "Use this API to unset the properties of sslocspresponder resource.\nProperties that need to be unset are specified in args array.", "Collect the total times measured by all known named timers of the given\nname. This is useful to add up times that were collected across separate\nthreads.\n\n@param timerName\n@return timer", "once animation is setup, start the animation record the beginning and\nending time for the animation", "Append the text supplied by the Writer at the end of the File, using a specified encoding.\n\n@param file a File\n@param writer the Writer supplying the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 2.3", "Deletes a story. A user can only delete stories they have created. Returns an empty data record.\n\n@param story Globally unique identifier for the story.\n@return Request object", "Calculate start dates for a yearly relative recurrence.\n\n@param calendar current date\n@param dates array of start dates", "Utility method to convert an array of bytes into a long. Byte ordered is\nassumed to be big-endian.\n@param bytes The data to read from.\n@param offset The position to start reading the 8-byte long from.\n@return The 64-bit integer represented by the eight bytes.\n@since 1.1", "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" ]
public boolean existsElement(String predicate) throws org.odmg.QueryInvalidException { DList results = (DList) this.query(predicate); if (results == null || results.size() == 0) return false; else return true; }
[ "Determines whether there is an element of the collection that evaluates to true\nfor the predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tTrue if there is an element of the collection that evaluates to true\nfor the predicate, otherwise false.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid." ]
[ "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", "Check config.\n\n@param context the context\n@return true, if successful\n@throws Exception the exception", "This method processes any extended attributes associated with a task.\n\n@param xml MSPDI task instance\n@param mpx MPX task instance", "Triggers a replication request.", "digest message with MD5\n\n@param source message\n@return 32 bit MD5 value (lower case)", "This is the profiles page. this is the 'regular' page when the url is typed in", "Static method to convert a binary operator into a string.\n\n@param oper is the binary comparison operator to be converted", "Return the IP address as text such as \"192.168.1.15\".", "Process an individual UDF.\n\n@param udf UDF definition" ]
public static StringBuffer leftShift(String self, Object value) { return new StringBuffer(self).append(value); }
[ "Overloads the left shift operator to provide an easy way to append multiple\nobjects as string representations to a String.\n\n@param self a String\n@param value an Object\n@return a StringBuffer built from this string\n@since 1.0" ]
[ "Use this API to delete dnsview of given name.", "Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed.", "Returns the compact records for all stories on the task.\n\n@param task Globally unique identifier for the task.\n@return Request object", "Creates an Odata filter string that can be used for filtering list results by tags.\n\n@param tagName the name of the tag. If not provided, all resources will be returned.\n@param tagValue the value of the tag. If not provided, only tag name will be filtered.\n@return the Odata filter to pass into list methods", "Add the given entries of the input map into the output map.\n\n<p>\nIf a key in the inputMap already exists in the outputMap, its value is\nreplaced in the outputMap by the value from the inputMap.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param outputMap the map to update.\n@param inputMap the entries to add.\n@since 2.15", "Compares the StoreVersionManager's internal state with the content on the file-system\nof the rootDir provided at construction time.\n\nTODO: If the StoreVersionManager supports non-RO stores in the future,\nwe should move some of the ReadOnlyUtils functions below to another Utils class.", "Process task dependencies.", "Returns the name under which this dump file. This is the name used online\nand also locally when downloading the file.\n\n@param dumpContentType\nthe type of the dump\n@param projectName\nthe project name, e.g. \"wikidatawiki\"\n@param dateStamp\nthe date of the dump in format YYYYMMDD\n@return file name string", "Returns the list of store defs as a map\n\n@param storeDefs\n@return" ]
private String type(Options opt, Type t, boolean generics) { return ((generics ? opt.showQualifiedGenerics : opt.showQualified) ? // t.qualifiedTypeName() : t.typeName()) // + (opt.hideGenerics ? "" : typeParameters(opt, t.asParameterizedType())); }
[ "Print a a basic type t" ]
[ "Returns the rendered element content for all the given containers.\n\n@param element the element to render\n@param containers the containers the element appears in\n\n@return a map from container names to rendered page contents", "Common method for creating styles.\n\n@param template the template that the map is part of\n@param styleRef the style ref identifying the style\n@param <T> the source type", "This method is used to extract the resource hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param resource resource instance\n@param data hyperlink data block", "Returns the proxies real subject. The subject will be materialized if\nnecessary.\n\n@return The subject", "Create new multipart with a text part and an attachment\n\n@param msg Message text\n@param attachment Attachment data\n@param contentType MIME content type of body\n@param filename File name of the attachment\n@param description Description of the attachment\n@return New multipart", "Pads the given String to the left with the given character to ensure that\nit's at least totalChars long.", "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.", "Create a request for elevations for samples along a path.\n\n@param req\n@param callback", "Used to retrieve the watermark for the item.\nIf the item does not have a watermark applied to it, a 404 Not Found will be returned by API.\n@param itemUrl url template for the item.\n@param fields the fields to retrieve.\n@return the watermark associated with the item." ]
public static base_response enable(nitro_service client, String trapname) throws Exception { snmpalarm enableresource = new snmpalarm(); enableresource.trapname = trapname; return enableresource.perform_operation(client,"enable"); }
[ "Use this API to enable snmpalarm of given name." ]
[ "Use this API to fetch dnspolicy_dnspolicylabel_binding resources of given name .", "Send a database announcement to all registered listeners.\n\n@param slot the media slot whose database availability has changed\n@param database the database whose relevance has changed\n@param available if {@code} true, the database is newly available, otherwise it is no longer relevant", "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", "Compares the two comma-separated lists.\n\n@param list1 The first list\n@param list2 The second list\n@return <code>true</code> if the lists are equal", "Abort an active extern transaction associated with the given PB.", "Add the string representation of the given object to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param object\nthe appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.", "Re-reads the given entity, refreshing any properties updated on the server-side during insert or update.", "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns the number of elements in the sorted set with a value in the given range.\n@param lexRange\n@return the number of elements in the specified range.", "Moves the drawer to the position passed.\n\n@param position The position the content is moved to.\n@param velocity Optional velocity if called by releasing a drag event.\n@param animate Whether the move is animated." ]
public void addFileSet(FileSet fs) { add(fs); if (fs.getProject() == null) { fs.setProject(getProject()); } }
[ "Adds a set of tests based on pattern matching." ]
[ "Set the rate types.\n\n@param rateTypes the rate types, not null and not empty.\n@return this, for chaining.\n@throws IllegalArgumentException when not at least one {@link RateType} is provided.", "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.", "If first and second are Strings, then this returns an MutableInternedPair\nwhere the Strings have been interned, and if this Pair is serialized\nand then deserialized, first and second are interned upon\ndeserialization.\n\n@param p A pair of Strings\n@return MutableInternedPair, with same first and second as this.", "Use this API to add gslbsite.", "returns a collection of Reader LockEntries for object obj.\nIf no LockEntries could be found an empty Vector is returned.", "Sorts the specified list itself according to the order induced by applying a key function to each element which\nyields a comparable criteria.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)", "Update the content of the tables.", "Create servlet deployment.\n\nCan be overridden with custom servlet deployment. e.g. exact resources listing in restricted env like GAE\n\n@param context the servlet context\n@param bootstrap the bootstrap\n@return new servlet deployment", "Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nrequest queue." ]
protected void AddLODSceneObject(GVRSceneObject currentSceneObject) { if (this.transformLODSceneObject != null) { GVRSceneObject levelOfDetailSceneObject = null; if ( currentSceneObject.getParent() == this.transformLODSceneObject) { levelOfDetailSceneObject = currentSceneObject; } else { GVRSceneObject lodSceneObj = root.getSceneObjectByName((currentSceneObject.getName() + TRANSFORM_TRANSLATION_)); if ( lodSceneObj != null ) { if (lodSceneObj.getParent() == this.transformLODSceneObject) { levelOfDetailSceneObject = lodSceneObj; } } if (levelOfDetailSceneObject == null) { lodSceneObj = root.getSceneObjectByName((currentSceneObject.getName() + TRANSFORM_ROTATION_)); if ( lodSceneObj != null ) { if (lodSceneObj.getParent() == this.transformLODSceneObject) { levelOfDetailSceneObject = lodSceneObj; } } } if (levelOfDetailSceneObject == null) { lodSceneObj = root.getSceneObjectByName((currentSceneObject.getName() + TRANSFORM_SCALE_)); if ( lodSceneObj != null ) { if (lodSceneObj.getParent() == this.transformLODSceneObject) { levelOfDetailSceneObject = lodSceneObj; } } } } if ( levelOfDetailSceneObject != null) { final GVRLODGroup lodGroup = (GVRLODGroup) this.transformLODSceneObject.getComponent(GVRLODGroup.getComponentType()); lodGroup.addRange(this.getMinRange(), levelOfDetailSceneObject); this.increment(); } } }
[ "Add the currentSceneObject to an active Level-of-Detail" ]
[ "Locates a task within a child task container which matches the supplied UUID.\n\n@param parent child task container\n@param uuid required UUID\n@return Task instance or null if the task is not found", "Read a list of sub projects.\n\n@param data byte array\n@param uniqueIDOffset offset of unique ID\n@param filePathOffset offset of file path\n@param fileNameOffset offset of file name\n@param subprojectIndex index of the subproject, used to calculate unique id offset", "Use this API to create sslfipskey resources.", "Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect", "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command removes all elements in the sorted set between the lexicographical range specified.\n@param lexRange\n@return the number of elements removed.", "Get the Attribute metadata for an MBean by name.\n@return the {@link Map} of {@link String} attribute names to {@link MBeanAttributeInfo} values.", "20130512 Converts the sdsm string generated above to Date format.\n\n@param str\nthe str\n@return the date from concise str", "generates a Meta Object Protocol method, that is used to call a non public\nmethod, or to make a call to super.\n\n@param mopCalls list of methods a mop call method should be generated for\n@param useThis true if \"this\" should be used for the naming", "Processes an anonymous reference definition.\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 reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"false\" description=\"The fully qualified name of the class\nowning the referenced field\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\"" ]
private void addModuleToTree(final DbModule module, final TreeNode tree) { final TreeNode subTree = new TreeNode(); subTree.setName(module.getName()); tree.addChild(subTree); // Add SubsubModules for (final DbModule subsubmodule : module.getSubmodules()) { addModuleToTree(subsubmodule, subTree); } }
[ "Add a module to a module tree\n\n@param module\n@param tree" ]
[ "Gets the first value for the key.\n\n@param key the key to check for the value\n\n@return the value or {@code null} if the key is not found or the value was {@code null}", "Handler for month changes.\n@param event change event.", "Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x and y.", "Handles logging tasks related to a failure to connect to a remote HC.\n@param uri the URI at which the connection attempt was made. Can be {@code null} indicating a failure to discover the HC\n@param discoveryOption the {@code DiscoveryOption} used to determine {@code uri}\n@param moreOptions {@code true} if there are more untried discovery options\n@param e the exception", "Get a property as a float or throw an exception.\n\n@param key the property name", "Decode a code from the stream s using huffman table h. Return the symbol or\na negative value if there is an error. If all of the lengths are zero, i.e.\nan empty code, or if the code is incomplete and an invalid code is received,\nthen -9 is returned after reading MAXBITS bits.\n\nFormat notes:\n\n- The codes as stored in the compressed data are bit-reversed relative to\na simple integer ordering of codes of the same lengths. Hence below the\nbits are pulled from the compressed data one at a time and used to\nbuild the code value reversed from what is in the stream in order to\npermit simple integer comparisons for decoding.\n\n- The first code for the shortest length is all ones. Subsequent codes of\nthe same length are simply integer decrements of the previous code. When\nmoving up a length, a one bit is appended to the code. For a complete\ncode, the last code of the longest length will be all zeros. To support\nthis ordering, the bits pulled during decoding are inverted to apply the\nmore \"natural\" ordering starting with all zeros and incrementing.\n\n@param h Huffman table\n@return status code", "Gets the string representation of the path to the current JSON element.\n\n@param key the leaf key", "Calculates the rho of a digital option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The rho of the digital option", "Use this API to fetch a dnsglobal_binding resource ." ]
private void stereotype(Options opt, Doc c, Align align) { for (Tag tag : c.tags("stereotype")) { String t[] = tokenize(tag.text()); if (t.length != 1) { System.err.println("@stereotype expects one field: " + tag.text()); continue; } tableLine(align, guilWrap(opt, t[0])); } }
[ "Return as a string the stereotypes associated with c\nterminated by the escape character term" ]
[ "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", "Lift a Java Func1 to a Scala Function1\n\n@param f the function to lift\n\n@returns the Scala function", "Notifies all registered BufferChangeLogger instances of a change.\n\n@param newData the buffer that contains the new data being added\n@param numChars the number of valid characters in the buffer", "Use this API to clear bridgetable.", "Update the object in the database.", "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)", "Updates the terms and statements of the current document.\nThe updates are computed with respect to the current data in the document,\nmaking sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in a given language are kept distinct.\n\n@param currentDocument\nthe document to be updated; needs to have a correct revision id and\nentity id\n@param addLabels\nlabels to be set on the item. They will overwrite existing values\nin the same language.\n@param addDescriptions\ndescription to be set on the item. They will overwrite existing values\nin the same language.\n@param addAliases\naliases to be added. Existing aliases will be kept.\n@param deleteAliases\naliases to be deleted.\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection", "Obtains a Discordian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Add all headers in a header multimap.\n\n@param headers a multimap of headers.\n@return the interceptor instance itself." ]
private boolean verify(String key, BoxSignatureAlgorithm actualAlgorithm, String actualSignature, String webHookPayload, String deliveryTimestamp) { if (actualSignature == null) { return false; } byte[] actual = Base64.decode(actualSignature); byte[] expected = this.signRaw(actualAlgorithm, key, webHookPayload, deliveryTimestamp); return Arrays.equals(expected, actual); }
[ "Verifies a provided signature.\n\n@param key\nfor which signature key\n@param actualAlgorithm\ncurrent signature algorithm\n@param actualSignature\ncurrent signature\n@param webHookPayload\nfor signing\n@param deliveryTimestamp\nfor signing\n@return true if verification passed" ]
[ "Copied from original SeleniumProxyHandler\nChanged SslRelay to SslListener and getSslRelayOrCreateNew to getSslRelayOrCreateNewOdo\nNo other changes to the function\n\n@param pathInContext\n@param pathParams\n@param request\n@param response\n@throws HttpException\n@throws IOException", "Copy the given Collection into a Class array.\nThe Collection must contain Class elements only.\n@param collection the Collection to copy\n@return the Class array ({@code null} if the passed-in\nCollection was {@code null})", "required for rest assured base URI configuration.", "Gets the publisher of the specified type, if it is wrapped by the \"Flexible Publish\" publisher in a project.\nNull is returned if no such publisher is found.\n@param project The project\n@param type The type of the publisher", "Use this API to add snmpuser.", "Find the index of the first matching element in the list\n@param element the element value to find\n@return the index of the first matching element, or <code>-1</code> if none found", "Use this API to unset the properties of nsrpcnode resource.\nProperties that need to be unset are specified in args array.", "Propagate onNoPick events to listeners\n@param picker GVRPicker which generated the event", "Creates a block matrix the same size as A_inv, inverts the matrix and copies the results back\nonto A_inv.\n\n@param A_inv Where the inverted matrix saved. Modified." ]
public static void initializeInternalProject(CommandExecutor executor) { final long creationTimeMillis = System.currentTimeMillis(); try { executor.execute(createProject(creationTimeMillis, Author.SYSTEM, INTERNAL_PROJ)) .get(); } catch (Throwable cause) { cause = Exceptions.peel(cause); if (!(cause instanceof ProjectExistsException)) { throw new Error("failed to initialize an internal project", cause); } } // These repositories might be created when creating an internal project, but we try to create them // again here in order to make sure them exist because sometimes their names are changed. for (final String repo : ImmutableList.of(Project.REPO_META, Project.REPO_DOGMA)) { try { executor.execute(createRepository(creationTimeMillis, Author.SYSTEM, INTERNAL_PROJ, repo)) .get(); } catch (Throwable cause) { cause = Exceptions.peel(cause); if (!(cause instanceof RepositoryExistsException)) { throw new Error(cause); } } } }
[ "Creates an internal project and repositories such as a token storage." ]
[ "Removes the expiration flag.", "Read a single weekday from the provided JSON value.\n@param val the value to read the week day from.\n@return the week day read\n@throws IllegalArgumentException thrown if the provided JSON value is not the representation of a week day.", "Use this API to renumber nspbr6 resources.", "Rename an existing app.\n@param appName Existing app name. See {@link #listApps()} for names that can be used.\n@param newName New name to give the existing app.\n@return the new name of the object", "Read a single calendar exception.\n\n@param bc parent calendar\n@param exception exception data", "Set the amount of padding between child objects.\n@param axis {@link Axis}\n@param padding", "Sets the server groups for the deployment.\n\n@param serverGroups the server groups to set\n\n@return this deployment", "iteration not synchronized", "Use this API to export application." ]
public boolean doSyncPass() { if (!this.isConfigured || !syncLock.tryLock()) { return false; } try { if (logicalT == Long.MAX_VALUE) { if (logger.isInfoEnabled()) { logger.info("reached max logical time; resetting back to 0"); } logicalT = 0; } logicalT++; if (logger.isInfoEnabled()) { logger.info(String.format( Locale.US, "t='%d': doSyncPass START", logicalT)); } if (networkMonitor == null || !networkMonitor.isConnected()) { if (logger.isInfoEnabled()) { logger.info(String.format( Locale.US, "t='%d': doSyncPass END - Network disconnected", logicalT)); } return false; } if (authMonitor == null || !authMonitor.tryIsLoggedIn()) { if (logger.isInfoEnabled()) { logger.info(String.format( Locale.US, "t='%d': doSyncPass END - Logged out", logicalT)); } return false; } syncRemoteToLocal(); syncLocalToRemote(); if (logger.isInfoEnabled()) { logger.info(String.format( Locale.US, "t='%d': doSyncPass END", logicalT)); } } catch (InterruptedException e) { if (logger.isInfoEnabled()) { logger.info(String.format( Locale.US, "t='%d': doSyncPass INTERRUPTED", logicalT)); } return false; } finally { syncLock.unlock(); } return true; }
[ "Performs a single synchronization pass in both the local and remote directions; the order\nof which does not matter. If switching the order produces different results after one pass,\nthen there is a bug.\n\n@return whether or not the synchronization pass was successful." ]
[ "Helper to read a mandatory String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read.\n@throws Exception thrown if the list of String values can not be read.", "This method writes calendar data to a Planner file.\n\n@throws JAXBException on xml creation errors", "Returns the shared prefix of these columns. Null otherwise.\n\n@param associationKeyColumns the columns sharing a prefix\n@return the shared prefix of these columns. {@code null} otherwise.", "Acquires a broker instance. If no PBKey is available a runtime exception will be thrown.\n\n@return A broker instance", "Convert a floating point date to a LocalDateTime.\n\nNote: This method currently performs a rounding to the next second.\n\nIf referenceDate is null, the method returns null.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param floatingPointDate The value to the time offset \\( t \\).\n@return The date resulting from adding Math.round(fixingTime*SECONDS_PER_DAY) seconds to referenceDate, where one day has SECONDS_PER_DAY seconds and SECONDS_PER_DAY is a constant 365*24*60*60", "Checks if two claims are equivalent in the sense that they have the same\nmain snak and the same qualifiers, but possibly in a different order.\n\n@param claim1\n@param claim2\n@return true if claims are equivalent", "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)", "Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed.", "Returns a correlation matrix which has rank &lt; n and for which the first n factors agree with the factors of correlationMatrix.\n\n@param correlationMatrix The given correlation matrix.\n@param numberOfFactors The requested number of factors (Eigenvectors).\n@return Factor reduced correlation matrix." ]
protected InputStream getCompressorInputStream(InputStream inputStream, CompressionType compressionType) throws IOException { switch (compressionType) { case NONE: return inputStream; case GZIP: return new GZIPInputStream(inputStream); case BZ2: return new BZip2CompressorInputStream(new BufferedInputStream( inputStream)); default: throw new IllegalArgumentException("Unsupported compression type: " + compressionType); } }
[ "Returns an input stream that applies the required decompression to the\ngiven input stream.\n\n@param inputStream\nthe input stream with the (possibly compressed) data\n@param compressionType\nthe kind of compression\n@return an input stream with decompressed data\n@throws IOException\nif there was a problem creating the decompression streams" ]
[ "Create the grid feature type.\n\n@param mapContext the map context containing the information about the map the grid will be\nadded to.\n@param geomClass the geometry type", "Adds a tag to a task. Returns an empty data block.\n\n@param task The task to add a tag to.\n@return Request object", "Save the values to the bundle descriptor.\n@throws CmsException thrown if saving fails.", "Adds this vector to v1 and places the result in this vector.\n\n@param v1\nright-hand vector", "Gets the data by id.\n\n@param id the id\n@return the data by id\n@throws IOException Signals that an I/O exception has occurred.", "Create a new file but fail if it already exists. The check for\nexistance of the file and it's creation are an atomic operation with\nrespect to other filesystem activities.", "Clears all scopes. Useful for testing and not getting any leak...", "Disassociate a name with an object\n@param name The name of an object.\n@exception ObjectNameNotFoundException No object exists in the database with that name.", "Read resource assignment data from a PEP file." ]
protected void parseOperationsLR(Symbol ops[], TokenList tokens, Sequence sequence) { if( tokens.size == 0 ) return; TokenList.Token token = tokens.first; if( token.getType() != Type.VARIABLE ) throw new ParseError("The first token in an equation needs to be a variable and not "+token); boolean hasLeft = false; while( token != null ) { if( token.getType() == Type.FUNCTION ) { throw new ParseError("Function encountered with no parentheses"); } else if( token.getType() == Type.VARIABLE ) { if( hasLeft ) { if( isTargetOp(token.previous,ops)) { token = createOp(token.previous.previous,token.previous,token,tokens,sequence); } } else { hasLeft = true; } } else { if( token.previous.getType() == Type.SYMBOL ) { throw new ParseError("Two symbols next to each other. "+token.previous+" and "+token); } } token = token.next; } }
[ "Parses operations where the input comes from variables to its left and right\n\n@param ops List of operations which should be parsed\n@param tokens List of all the tokens\n@param sequence List of operation sequence" ]
[ "Merge the two maps.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n<p>\nIf a key exists in the left and right operands, the value in the right operand is preferred.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@throws IllegalArgumentException - when a right operand key exists in the left operand.\n@since 2.15", "Write resource assignment.\n\n@param record resource assignment instance\n@throws IOException", "Generates timephased costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost", "Returns true if a pixel with the given color exists\n\n@param color the pixel colour to look for.\n@return true if there exists at least one pixel that has the given pixels color", "Replace the current with a new generated identity object and\nreturns the old one.", "Makes this pose the inverse of the input pose.\n@param src pose to invert.", "Create an object of the given type using a constructor that matches the\nsupplied arguments and invoke the setters with the supplied variables.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@param vars\nthe named arguments for setters\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception", "Obtain collection of Parameters from request\n\n@param dataArray request parameters\n@return Map of parameters\n@throws Exception exception", "Get the parameters of determining this parametric\ncovariance model. The parameters are usually free parameters\nwhich may be used in calibration.\n\n@return Parameter vector." ]
public Bundler put(String key, Parcelable[] value) { delegate.putParcelableArray(key, value); return this; }
[ "Inserts an array of Parcelable values into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value an array of Parcelable objects, or null\n@return this bundler instance to chain method calls" ]
[ "This method extracts data for a single predecessor from an MSPDI file.\n\n@param currTask Current task object\n@param link Predecessor data", "Specify the socket to be used as underlying socket to connect\nto the APN service.\n\nThis assumes that the socket connects to a SOCKS proxy.\n\n@deprecated use {@link ApnsServiceBuilder#withProxy(Proxy)} instead\n@param proxySocket the underlying socket for connections\n@return this", "Retrieve an instance of the TaskField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return TaskField instance", "Adds a new Token to the end of the linked list", "Write an double field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Use this API to fetch the statistics of all authenticationvserver_stats resources that are configured on netscaler.", "Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color", "to check availability, then class name is truncated to bundle id", "This produces a canonical string.\n\nRFC 5952 describes canonical representations.\nhttp://en.wikipedia.org/wiki/IPv6_address#Recommended_representation_as_text\nhttp://tools.ietf.org/html/rfc5952" ]
@PostConstruct protected void buildCopyrightMap() { if (null == declaredPlugins) { return; } // go over all plug-ins, adding copyright info, avoiding duplicates (on object key) for (PluginInfo plugin : declaredPlugins.values()) { for (CopyrightInfo copyright : plugin.getCopyrightInfo()) { String key = copyright.getKey(); String msg = copyright.getKey() + ": " + copyright.getCopyright() + " : licensed as " + copyright.getLicenseName() + ", see " + copyright.getLicenseUrl(); if (null != copyright.getSourceUrl()) { msg += " source " + copyright.getSourceUrl(); } if (!copyrightMap.containsKey(key)) { log.info(msg); copyrightMap.put(key, copyright); } } } }
[ "Build copyright map once." ]
[ "Read custom fields for a GanttProject resource.\n\n@param gpResource GanttProject resource\n@param mpxjResource MPXJ Resource instance", "Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler.", "Use this API to fetch all the vrid6 resources that are configured on netscaler.", "Add the option specifying if the categories should be displayed collapsed\nwhen the dialog opens.\n\n@see org.opencms.ui.actions.I_CmsADEAction#getParams()", "This function is intended to detect the subset of IOException which are not\nconsidered recoverable, in which case we want to bubble up the exception, instead\nof retrying.\n\n@throws VoldemortException", "Show or hide the options column dependent on the provided edit mode.\n@param oldMode the old edit mode\n@param newMode the edit mode for which the options column's visibility should be adjusted.", "Retrieve and validate the zone id value from the REST request.\n\"X-VOLD-Zone-Id\" is the zone id header.\n\n@return valid zone id or -1 if there is no/invalid zone id", "Factory method, validates the given triplet year, month and dayOfMonth.\n\n@param prolepticYear the International fixed proleptic-year\n@param month the International fixed month, from 1 to 13\n@param dayOfMonth the International fixed day-of-month, from 1 to 28 (29 for Leap Day or Year Day)\n@return the International fixed date\n@throws DateTimeException if the date is invalid", "Method that takes an inputstream, read it preserving the end lines, and subtitute using commons-lang-3 calls\nthe variables, first searching as system properties vars and then in environment var list.\nIn case of missing the property is replaced by white space.\n@param stream\n@return" ]
private void processTasks() throws SQLException { // // Yes... we could probably read this in one query in the right order // using a CTE... but life's too short. // List<Row> rows = getRows("select * from zscheduleitem where zproject=? and zparentactivity_ is null and z_ent=? order by zorderinparentactivity", m_projectID, m_entityMap.get("Activity")); for (Row row : rows) { Task task = m_project.addTask(); populateTask(row, task); processChildTasks(task); } }
[ "Read all top level tasks." ]
[ "Return an artifact regarding its gavc\n\n@param gavc String\n@return DbArtifact", "Get a list of path transformers for a given address.\n\n@param address the path address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return a list of path transformations", "Clear all overrides, reset repeat counts for a response path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception", "Set the active view.\nIf the mdActiveIndicator attribute is set, this View will have the indicator drawn next to it.\n\n@param v The active view.\n@param position Optional position, usually used with ListView. v.setTag(R.id.mdActiveViewPosition, position)\nmust be called first.", "This method only overrides properties that are specific from Cube like await strategy or before stop events.\n\n@param overrideDockerCompositions\nthat contains information to override.", "Gets the publisher wrapped by the specofoed FlexiblePublisher.\n@param publisher The FlexiblePublisher wrapping the publisher.\n@param type The type of the publisher wrapped by the FlexiblePublisher.\n@return The publisher object wrapped by the FlexiblePublisher.\nNull is returned if the FlexiblePublisher does not wrap a publisher of the specified type.\n@throws IllegalArgumentException In case publisher is not of type\n{@link org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher}", "appends a WHERE-clause to the Statement\n@param where\n@param crit\n@param stmt", "Warning emitter. Uses whatever alternative non-event communication channel is.", "Safe write error response.\n\n@param channel the channel\n@param header the request header\n@param error the exception" ]
public boolean contains(String column) { for ( String columnName : columnNames ) { if ( columnName.equals( column ) ) { return true; } } return false; }
[ "Check if a column is part of the row key columns.\n\n@param column the name of the column to check\n@return true if the column is one of the row key columns, false otherwise" ]
[ "Resolves the base directory. If the system property is set that value will be used. Otherwise the path is\nresolved from the home directory.\n\n@param name the system property name\n@param dirName the directory name relative to the base directory\n\n@return the resolved base directory", "Create a field map for enterprise custom fields.\n\n@param props props data\n@param c target class", "Skip to the next matching short value.\n\n@param buffer input data array\n@param offset start offset into the input array\n@param value value to match\n@return offset of matching pattern", "Checks whether a character sequence matches against a specified pattern or not.\n\n@param pattern\npattern, that the {@code chars} must correspond to\n@param chars\na readable sequence of {@code char} values which should match the given pattern\n@return {@code true} when {@code chars} matches against the passed {@code pattern}, otherwise {@code false}", "Write flow id to message.\n\n@param message the message\n@param flowId the flow id", "Helper to read an optional Boolean value.\n@param path The XML path of the element to read.\n@return The Boolean value stored in the XML, or <code>null</code> if the value could not be read.", "Go through all node IDs and determine which node\n\n@param cluster\n@param storeRoutingPlan\n@return", "Use this API to add sslocspresponder resources.", "Convenience method which allows all projects in the database to\nbe read in a single operation.\n\n@return list of ProjectFile instances\n@throws MPXJException" ]
public static boolean isAllWhitespace(CharSequence self) { String s = self.toString(); for (int i = 0; i < s.length(); i++) { if (!Character.isWhitespace(s.charAt(i))) return false; } return true; }
[ "True if a CharSequence only contains whitespace characters.\n\n@param self The CharSequence to check the characters in\n@return true If all characters are whitespace characters\n@see #isAllWhitespace(String)\n@since 1.8.2" ]
[ "Writes assignment data to a PM XML file.", "Converts url path to the Transloadit full url.\nReturns the url passed if it is already full.\n\n@param url\n@return String", "Adds a leaf node, which could be a task or a milestone.\n\n@param parentName parent bar name\n@param row row to add\n@param task task to populate with data from the row", "Finds an entity given its primary key.\n\n@throws RowNotFoundException\nIf no such object was found.\n@throws TooManyRowsException\nIf more that one object was returned for the given ID.", "Get the PropertyDescriptor for aClass and aPropertyName", "Calculate the duration percent complete.\n\n@param row task data\n@return percent complete", "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", "Write the document object to a file.\n\n@param document the document object.\n@param filePathname the path name of the file to be written to.\n@param method the output method: for instance html, xml, text\n@param indent amount of indentation. -1 to use the default.\n@throws TransformerException if an exception occurs.\n@throws IOException if an IO exception occurs.", "First looks for zeros and then performs the implicit single step in the QR Algorithm." ]
public static final String printDuration(Duration value) { return value == null ? null : Double.toString(value.getDuration()); }
[ "Print a duration value.\n\n@param value Duration instance\n@return string representation of a duration" ]
[ "Use this API to fetch all the systemeventhistory resources that are configured on netscaler.\nThis uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources.", "Parse representations from a file object response.\n@param jsonObject representations json object in get response for /files/file-id?fields=representations\n@return list of representations", "Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if\nthe users are not already members of the project they will also become members as a result of this operation.\nReturns the updated project record.\n\n@param project The project to add followers to.\n@return Request object", "Use this API to add cacheselector resources.", "The full path of a jrxml file, or the path in the classpath of a jrxml\nresource.\n\n@param path\n@return", "Gets a JavaMail Session for given server type such as IMAP and additional props for JavaMail.\n\n@param setup the setup type, such as <code>ServerSetup.IMAP</code>\n@param mailProps additional mail properties.\n@return the JavaMail session.", "Get a property as a object or throw exception.\n\n@param key the property name", "Validates an operation against its description provider\n\n@param operation The operation to validate\n@throws IllegalArgumentException if the operation is not valid", "This method extracts a portion of a byte array and writes it into\nanother byte array.\n\n@param data Source data\n@param offset Offset into source data\n@param size Required size to be extracted from the source data\n@param buffer Destination buffer\n@param bufferOffset Offset into destination buffer" ]
public GVRAnimation setRepeatMode(int repeatMode) { if (GVRRepeatMode.invalidRepeatMode(repeatMode)) { throw new IllegalArgumentException(repeatMode + " is not a valid repetition type"); } mRepeatMode = repeatMode; return this; }
[ "Set the repeat type.\n\nIn the default {@linkplain GVRRepeatMode#ONCE run-once} mode, animations\nrun once, ignoring the {@linkplain #getRepeatCount() repeat count.} In\n{@linkplain GVRRepeatMode#PINGPONG ping pong} and\n{@linkplain GVRRepeatMode#REPEATED repeated} modes, animations do honor\nthe repeat count, which {@linkplain #DEFAULT_REPEAT_COUNT defaults} to 2.\n\n@param repeatMode\nOne of the {@link GVRRepeatMode} constants\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code repetitionType} is not one of the\n{@link GVRRepeatMode} constants" ]
[ "Gets the final transform of the bone.\n\n@return the 4x4 matrix representing the final transform of the\nbone during animation, which comprises bind pose and skeletal\ntransform at the current time of the animation.", "This filter uses a 9-patch to overlay the image.\n\n@param imageUrl Watermark image URL. It is very important to understand that the same image\nloader that Thumbor uses will be used here.", "Get a collection of methods declared on this object by method name and parameter count.\n\n@param name the name of the method\n@param paramCount the number of parameters\n@return the (possibly empty) collection of methods with the given name and parameter count", "Test the list of TimephasedWork instances to see\nif any of them have been modified.\n\n@param list list of TimephasedWork instances\n@return boolean flag", "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", "Process the given batch of files and pass the results back to the listener as each file is processed.", "Parse an extended attribute value.\n\n@param file parent file\n@param mpx parent entity\n@param value string value\n@param mpxFieldID field ID\n@param durationFormat duration format associated with the extended attribute", "Use this API to update nd6ravariables resources.", "Computes FPS average" ]
public Class<E> getEventClass() { if (cachedClazz != null) { return cachedClazz; } Class<?> clazz = this.getClass(); while (clazz != Object.class) { try { Type mySuperclass = clazz.getGenericSuperclass(); Type tType = ((ParameterizedType) mySuperclass).getActualTypeArguments()[0]; cachedClazz = (Class<E>) Class.forName(tType.getTypeName()); return cachedClazz; } catch (Exception e) { } clazz = clazz.getSuperclass(); } throw new IllegalStateException("Failed to load event class - " + this.getClass().getCanonicalName()); }
[ "Returns the Class object of the Event implementation." ]
[ "Obtain the profile name associated with a profile ID\n\n@param id ID of profile\n@return Name of corresponding profile", "Pops the top of the stack of active elements if the current position in the call stack corresponds to the one\nthat pushed the active elements.\n\n<p>This method does not do any type checks, so take care to retrieve the elements with the same types used to push\nto them onto the stack.\n\n@param <T> the type of the elements\n\n@return the active elements or null if the current call stack did not push any active elements onto the stack", "Validations specific to PUT", "Remove a DropPasteWorker from the helper.\n@param worker the worker that should be removed", "Determines the field name based on an accessor method name.\n\n@param methodName\nan accessor method name\n@return the resulting field name", "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.", "Reopen the associated static logging stream. Set to null to redirect to System.out.", "Returns the number of history entries for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param searchFilter unused\n@return number of history entries", "Parse representations from a file object response.\n@param jsonObject representations json object in get response for /files/file-id?fields=representations\n@return list of representations" ]
public void process(String driverClass, String connectionString, String projectID, String outputFile) throws Exception { System.out.println("Reading Primavera database started."); Class.forName(driverClass); Properties props = new Properties(); // // This is not a very robust way to detect that we're working with SQLlite... // If you are trying to grab data from // a standalone P6 using SQLite, the SQLite JDBC driver needs this property // in order to correctly parse timestamps. // if (driverClass.equals("org.sqlite.JDBC")) { props.setProperty("date_string_format", "yyyy-MM-dd HH:mm:ss"); } Connection c = DriverManager.getConnection(connectionString, props); PrimaveraDatabaseReader reader = new PrimaveraDatabaseReader(); reader.setConnection(c); processProject(reader, Integer.parseInt(projectID), outputFile); }
[ "Extract Primavera project data and export in another format.\n\n@param driverClass JDBC driver class name\n@param connectionString JDBC connection string\n@param projectID project ID\n@param outputFile output file\n@throws Exception" ]
[ "Determine whether the calling thread is the GL thread.\n\n@return {@code True} if called from the GL thread, {@code false} if\ncalled from another thread.", "Returns the most likely class for the word at the given position.", "Gets the Topsoe divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Topsoe divergence between p and q.", "Change contrast of the image\n\n@param contrast default is 0, pos values increase contrast, neg. values decrease contrast", "Checks that sequence-name is only used with autoincrement='ojb'\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", "Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found", "Check local saved copy first ??. If Auth by username is available, then we will not need to make the API call.\n\n@throws FlickrException", "Gets an iterator to the EJB descriptors for an EJB implementation class\n\n@param beanClass The EJB class\n@return An iterator", "Ranks a map based on integer values\n@param inputMap Input\n@return The ranked map" ]
public void setFieldByAlias(String alias, Object value) { set(getParentFile().getCustomFields().getFieldByAlias(FieldTypeClass.TASK, alias), value); }
[ "Set the value of a field using its alias.\n\n@param alias field alias\n@param value field value" ]
[ "Forces removal of one or several faceted attributes for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining.", "Handles the response of the SerialApiGetInitData request.\n@param incomingMlivessage the response message to process.", "Blocks until the server has started successfully or an exception is\nthrown.\n\n@throws VoldemortException if a problem occurs during start-up wrapping\nthe original exception.", "True if a CharSequence only contains whitespace characters.\n\n@param self The CharSequence to check the characters in\n@return true If all characters are whitespace characters\n@see #isAllWhitespace(String)\n@since 1.8.2", "Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file", "Save the values to the bundle descriptor.\n@throws CmsException thrown if saving fails.", "Get an array of property ids.\n\nNot all property ids need be returned. Those properties\nwhose ids are not returned are considered non-enumerable.\n\n@return an array of Objects. Each entry in the array is either\na java.lang.String or a java.lang.Number", "Read JdbcConnectionDescriptors from the given repository file.\n\n@see #mergeConnectionRepository", "Invoke the operation.\n@param parameterMap the {@link Map} of parameter names to value arrays.\n@return the {@link Object} return value from the operation.\n@throws JMException Java Management Exception" ]
public Pair<int[][][], int[]> documentToDataAndLabels(List<IN> document) { int docSize = document.size(); // first index is position in the document also the index of the // clique/factor table // second index is the number of elements in the clique/window these // features are for (starting with last element) // third index is position of the feature in the array that holds them // element in data[j][k][m] is the index of the mth feature occurring in // position k of the jth clique int[][][] data = new int[docSize][windowSize][]; // index is the position in the document // element in labels[j] is the index of the correct label (if it exists) at // position j of document int[] labels = new int[docSize]; if (flags.useReverse) { Collections.reverse(document); } // System.err.println("docSize:"+docSize); for (int j = 0; j < docSize; j++) { CRFDatum<List<String>, CRFLabel> d = makeDatum(document, j, featureFactory); List<List<String>> features = d.asFeatures(); for (int k = 0, fSize = features.size(); k < fSize; k++) { Collection<String> cliqueFeatures = features.get(k); data[j][k] = new int[cliqueFeatures.size()]; int m = 0; for (String feature : cliqueFeatures) { int index = featureIndex.indexOf(feature); if (index >= 0) { data[j][k][m] = index; m++; } else { // this is where we end up when we do feature threshold cutoffs } } // Reduce memory use when some features were cut out by threshold if (m < data[j][k].length) { int[] f = new int[m]; System.arraycopy(data[j][k], 0, f, 0, m); data[j][k] = f; } } IN wi = document.get(j); labels[j] = classIndex.indexOf(wi.get(AnswerAnnotation.class)); } if (flags.useReverse) { Collections.reverse(document); } // System.err.println("numClasses: "+classIndex.size()+" "+classIndex); // System.err.println("numDocuments: 1"); // System.err.println("numDatums: "+data.length); // System.err.println("numFeatures: "+featureIndex.size()); return new Pair<int[][][], int[]>(data, labels); }
[ "Convert a document List into arrays storing the data features and labels.\n\n@param document\nTraining documents\n@return A Pair, where the first element is an int[][][] representing the\ndata and the second element is an int[] representing the labels" ]
[ "Finish initializing service.\n\n@throws IOException oop", "Inserts a column name, value pair into the SQL.\n\n@param column\nName of the table column.\n@param value\nValue to substitute in. InsertBuilder does *no* interpretation\nof this. If you want a string constant inserted, you must\nprovide the single quotes and escape the internal quotes. It\nis more common to use a question mark or a token in the style\nof {@link ParameterizedPreparedStatementCreator}, e.g. \":foo\".", "Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels", "Returns the logger name that should be used in the log manager.\n\n@param name the name of the logger from the resource\n\n@return the name of the logger", "Return the structured backup data\n\n@return Backup of current configuration\n@throws Exception exception", "Use this API to fetch lbvserver_appflowpolicy_binding resources of given name .", "This method is used to quote any special characters that appear in\nliteral text that is required as part of the currency format.\n\n@param literal Literal text\n@return literal text with special characters in quotes", "Merges the two classes into a single class. The smaller class is\nremoved, while the largest class is kept.", "Update the project properties from the project summary task.\n\n@param task project summary task" ]
public static String plus(CharSequence left, Object value) { return left + DefaultGroovyMethods.toString(value); }
[ "Appends the String representation of the given operand to this CharSequence.\n\n@param left a CharSequence\n@param value any Object\n@return the original toString() of the CharSequence with the object appended\n@since 1.8.2" ]
[ "Closes the server socket.", "Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for", "Helper method that stores in a hash map how often a certain key occurs.\nIf the key has not been encountered yet, a new entry is created for it in\nthe map. Otherwise the existing value for the key is incremented.\n\n@param map\nthe map where the counts are stored\n@param key\nthe key to be counted\n@param count\nvalue by which the count should be incremented; 1 is the usual\ncase", "Add the buildInfo to step variables if missing and set its cps script.\n\n@param cpsScript the cps script\n@param stepVariables step variables map\n@return the build info", "Retrieves a vertex attribute as a float array.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>float</i>\n@see #setFloatVec(String, FloatBuffer)\n@see #getFloatArray(String)", "Use this API to delete dnstxtrec.", "Adds a command class to the list of supported command classes by this\nendpoint. Does nothing if command class is already added.\n@param commandClass the command class instance to add.", "Use this API to fetch all the inatparam resources that are configured on netscaler.", "Return a copy of the result as a String.\n\n<p>The default version of this method copies the result into a temporary byte array and then\ntries to decode it using the configured encoding.\n\n@return string version of the result.\n@throws IOException if the data cannot be produced or could not be decoded to a String." ]
public static Cluster repeatedlyBalanceContiguousPartitionsPerZone(final Cluster nextCandidateCluster, final int maxContiguousPartitionsPerZone) { System.out.println("Looping to evenly balance partitions across zones while limiting contiguous partitions"); // This loop is hard to make definitive. I.e., there are corner cases // for small clusters and/or clusters with few partitions for which it // may be impossible to achieve tight limits on contiguous run lenghts. // Therefore, a constant number of loops are run. Note that once the // goal is reached, the loop becomes a no-op. int repeatContigBalance = 10; Cluster returnCluster = nextCandidateCluster; for(int i = 0; i < repeatContigBalance; i++) { returnCluster = balanceContiguousPartitionsPerZone(returnCluster, maxContiguousPartitionsPerZone); returnCluster = balancePrimaryPartitions(returnCluster, false); System.out.println("Completed round of balancing contiguous partitions: round " + (i + 1) + " of " + repeatContigBalance); } return returnCluster; }
[ "Loops over cluster and repeatedly tries to break up contiguous runs of\npartitions. After each phase of breaking up contiguous partitions, random\npartitions are selected to move between zones to balance the number of\npartitions in each zone. The second phase may re-introduce contiguous\npartition runs in another zone. Therefore, this overall process is\nrepeated multiple times.\n\n@param nextCandidateCluster\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return updated cluster" ]
[ "Check that the range resulting from the mask is contiguous, otherwise we cannot represent it.\n\nFor instance, for the range 0 to 3 (bits are 00 to 11), if we mask all 4 numbers from 0 to 3 with 2 (ie bits are 10),\nthen we are left with 1 and 3. 2 is not included. So we cannot represent 1 and 3 as a contiguous range.\n\nThe underlying rule is that mask bits that are 0 must be above the resulting range in each segment.\n\nAny bit in the mask that is 0 must not fall below any bit in the masked segment range that is different between low and high.\n\nAny network mask must eliminate the entire segment range. Any host mask is fine.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException", "Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string", "Read all of the fields information from the configuration file.", "Creates a file logger in the current thread. The file is in XML format, suitable for interpretation by Eclipse's Drools Audit View\nor other tools. Note that while events are written as they happen, the file will not be flushed until it is closed or the underlying\nfile buffer is filled. If you need real time logging then use a Console Logger or a Threaded File Logger.\n\n@param session\n@param fileName - .log is appended to this.\n@return", "Method used to update fields with values received from API.\n@param jsonObject JSON-encoded info about File Version object.", "Confirms a user with the given token and token id.\n\n@param token the confirmation token.\n@param tokenId the id of the confirmation token.\n@return A {@link Task} that completes when confirmation completes/fails.", "Plots the MSD curve for trajectory t\n@param t Trajectory to calculate the msd curve\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param msdeval Evaluates the mean squared displacment", "Invoked periodically.", "This method retrieves the calendar hours for the specified day.\nNote that if this is a derived calendar, then this method\nwill refer to the base calendar where no hours are specified\nin the derived calendar.\n\n@param day Day instance\n@return calendar hours" ]
public static String find(CharSequence self, CharSequence regex, @ClosureParams(value=SimpleType.class, options="java.lang.String[]") Closure closure) { return find(self.toString(), Pattern.compile(regex.toString()), closure); }
[ "Returns the result of calling a closure with the first occurrence of a regular expression found within a CharSequence.\nIf the regex doesn't match, the closure will not be called and find will return null.\n\n@param self a CharSequence\n@param regex the capturing regex CharSequence\n@param closure the closure that will be passed the full match, plus each of the capturing groups (if any)\n@return a String containing the result of calling the closure (calling toString() if needed), or null if the regex pattern doesn't match\n@see #find(String, java.util.regex.Pattern, groovy.lang.Closure)\n@since 1.8.2" ]
[ "Returns a single parent of the given tag. If there are multiple parents, throws a WindupException.", "Merges the item from the resultLocaleValues into the corresponding item of the localeValues.\n@param item the item to merge\n@param localeValues the values where the item gets merged into\n@param resultLocaleValues the values where the item to merge is read from\n@return the modified localeValues with the merged item", "Adds a tag to a task. Returns an empty data block.\n\n@param task The task to add a tag to.\n@return Request object", "Sets the target hosts from json path.\n\n@param jsonPath\nthe json path\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception", "Adds a new cell to the current grid\n@param cell the td component", "Throw IllegalArgumentException if the value is null.\n\n@param name the parameter name.\n@param value the value that should not be null.\n@param <T> the value type.\n@throws IllegalArgumentException if value is null.", "Returns the full record for a single team.\n\n@param team Globally unique identifier for the team.\n@return Request object", "Removes top of thread-local shell stack.", "Resolve the targeted license thanks to the license ID\nReturn null if no license is matching the licenseId\n\n@param licenseId\n@return DbLicense" ]
public static Priority getInstance(int priority) { Priority result; if (priority >= LOWEST && priority <= DO_NOT_LEVEL && (priority % 100 == 0)) { result = VALUE[(priority / 100) - 1]; } else { result = new Priority(priority); } return (result); }
[ "This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance" ]
[ "Closes this output stream and releases any system resources associated with the stream.\n\n@throws IOException\nif an I/O error occurs.", "Obtain newline-delimited headers from request\n\n@param request HttpServletRequest to scan\n@return newline-delimited headers", "Method to initialize the list.\n\n@param resList a given instance or null\n@return an instance", "Starts the ephemeral node and waits for it to be created\n\n@param node Node to start\n@param maxWaitSec Maximum time in seconds to wait", "Initializes the persistence strategy to be used when accessing the datastore. In particular, all the required\ncaches will be configured and initialized.\n\n@param cacheMappingType the {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType} to be used\n@param entityTypes meta-data of all the entity types registered with the current session factory\n@param associationTypes meta-data of all the association types registered with the current session factory\n@param idSourceTypes meta-data of all the id source types registered with the current session factory\n@param namespaces from the database currently in use", "used by Error template", "Closes off this connection\n@param connection to close", "Specifies the angle of the effect.\n\n@param angle the angle of the effect.\n@angle", "Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference." ]
private ProjectFile handleZipFile(InputStream stream) throws Exception { File dir = null; try { dir = InputStreamHelper.writeZipStreamToTempDir(stream); ProjectFile result = handleDirectory(dir); if (result != null) { return result; } } finally { FileHelper.deleteQuietly(dir); } return null; }
[ "We have identified that we have a zip file. Extract the contents into\na temporary directory and process.\n\n@param stream schedule data\n@return ProjectFile instance" ]
[ "Returns whether the values of this division grouping contain the prefix block for the given prefix length\n\n@param prefixLength\n@return", "Returns the available module names regarding the filters\n\n@param name String\n@param filters FiltersHolder\n@return List<String>", "Loads a CRF classifier from a filepath, and returns it.\n\n@param file\nFile to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data", "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)", "Removes an accessory from being handled or advertised by this root. Any existing Homekit\nconnections will be terminated to allow the clients to reconnect and see the updated accessory\nlist.\n\n@param accessory accessory to cease advertising and handling", "get children nodes name\n\n@param zkClient zkClient\n@param path full path\n@return children nodes name or null while path not exist", "Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory", "Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record", "Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions." ]
public static boolean bidiagOuterBlocks( final int blockLength , final DSubmatrixD1 A , final double gammasU[], final double gammasV[]) { // System.out.println("---------- Orig"); // A.original.print(); int width = Math.min(blockLength,A.col1-A.col0); int height = Math.min(blockLength,A.row1-A.row0); int min = Math.min(width,height); for( int i = 0; i < min; i++ ) { //--- Apply reflector to the column // compute the householder vector if (!computeHouseHolderCol(blockLength, A, gammasU, i)) return false; // apply to rest of the columns in the column block rank1UpdateMultR_Col(blockLength,A,i,gammasU[A.col0+i]); // apply to the top row block rank1UpdateMultR_TopRow(blockLength,A,i,gammasU[A.col0+i]); System.out.println("After column stuff"); A.original.print(); //-- Apply reflector to the row if(!computeHouseHolderRow(blockLength,A,gammasV,i)) return false; // apply to rest of the rows in the row block rank1UpdateMultL_Row(blockLength,A,i,i+1,gammasV[A.row0+i]); System.out.println("After update row"); A.original.print(); // apply to the left column block // TODO THIS WON'T WORK!!!!!!!!!!!!! // Needs the whole matrix to have been updated by the left reflector to compute the correct solution // rank1UpdateMultL_LeftCol(blockLength,A,i,i+1,gammasV[A.row0+i]); System.out.println("After row stuff"); A.original.print(); } return true; }
[ "Performs a standard bidiagonal decomposition just on the outer blocks of the provided matrix\n\n@param blockLength\n@param A\n@param gammasU" ]
[ "Accessor method used to retrieve a Float object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Use this API to add clusterinstance resources.", "Sends all events to the web service. Events will be transformed with mapper before sending.\n\n@param events the events", "Merges the item from the resultLocaleValues into the corresponding item of the localeValues.\n@param item the item to merge\n@param localeValues the values where the item gets merged into\n@param resultLocaleValues the values where the item to merge is read from\n@return the modified localeValues with the merged item", "Removes a design document using DesignDocument object from the database.\n\n@param designDocument the design document object to be removed\n@return {@link DesignDocument}", "Escape a value to be HTML friendly.\n@param value the Object value.\n@return the HTML-escaped String, or <null> if the value is null.", "Returns the value that has to be set for the dynamic attribute.\n\n@param file the file where the current content is stored\n@param value the content value that is represented by the attribute\n@param attributeName the attribute's name\n@param editedLocalEntity the entities that where edited last\n@return the value that has to be set for the dynamic attribute.", "Obtain the path ID for a profile\n\n@param identifier Can be the path ID, or friendly name\n@param profileId\n@return\n@throws Exception", "Method is called by spring and verifies that there is only one plugin per URI scheme." ]
public static boolean isCompleteZip(File file) throws IOException, NonScannableZipException { FileChannel channel = null; try { channel = new FileInputStream(file).getChannel(); long size = channel.size(); if (size < ENDLEN) { // Obvious case return false; } else if (validateEndRecord(file, channel, size - ENDLEN)) { // typical case where file is complete and end record has no comment return true; } // Either file is incomplete or the end of central directory record includes an arbitrary length comment // So, we have to scan backwards looking for an end of central directory record return scanForEndSig(file, channel); } finally { safeClose(channel); } }
[ "Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException" ]
[ "This method changes package_path into folder's path\n\n@param path\n, as es.upm.gsi\n@return the new path, es/upm/gsi", "Generate random velocities for every particle. The direction is obtained by assuming\nthe position of a particle as a vector. This normalised vector is scaled by\nthe speed range.\n\n@return", "Get the size of the painting area required to draw the scalebar with labels.\n\n@param scalebarParams Parameters for the scalebar.\n@param settings Parameters for rendering the scalebar.\n@param maxLabelSize The max. size of the labels.", "Updates the backing render texture. This method should not\nbe called when capturing is in progress.\n\n@param width The width of the backing texture in pixels.\n@param height The height of the backing texture in pixels.\n@param sampleCount The MSAA sample count.", "Calculates the vega of a digital option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The vega of the digital option", "Write back to hints file.", "Renames this folder.\n\n@param newName the new name of the folder.", "Convert one project file format to another.\n\n@param inputFile input file\n@param outputFile output file\n@throws Exception", "Checks to see if the rows of the provided matrix are linearly independent.\n\n@param A Matrix whose rows are being tested for linear independence.\n@return true if linearly independent and false otherwise." ]
public void addColumnPair(String localColumn, String remoteColumn) { if (!_localColumns.contains(localColumn)) { _localColumns.add(localColumn); } if (!_remoteColumns.contains(remoteColumn)) { _remoteColumns.add(remoteColumn); } }
[ "Adds a column pair to this foreignkey.\n\n@param localColumn The column in the local table\n@param remoteColumn The column in the remote table" ]
[ "Deletes a redirect by id\n\n@param id redirect ID", "Creates a polling state.\n\n@param response the response from Retrofit REST call that initiate the long running operation.\n@param lroOptions long running operation options.\n@param defaultRetryTimeout the long running operation retry timeout.\n@param resourceType the type of the resource the long running operation returns\n@param serializerAdapter the adapter for the Jackson object mapper\n@param <T> the result type\n@return the polling state\n@throws IOException thrown by deserialization", "Use this API to add lbroute.", "Returns the configured request parameter for the query string, or the default parameter if no core is configured.\n@return The configured request parameter for the query string, or the default parameter if no core is configured.", "This method checks for paging information and returns the appropriate\ndata\n\n@param result\n@param httpResponse\n@param where\n@return a {@link WrappingPagedList} if there is paging, result if not.", "Returns the first number available, starting at portNumberStartingPoint that's not already in the reservedPorts\nlist.\n\n@param portNumberStartingPoint first port number to start from.\n@param reservedPorts the ports already reserved.\n@return first number available not in the given list, starting at the given parameter.", "Function to delete the specified store from Metadata store. This involves\n\n1. Remove entry from the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeName specifies name of the store to be deleted.", "Use this API to renumber nspbr6 resources.", "Determines the median value of the data set.\n@return If the number of elements is odd, returns the middle element.\nIf the number of elements is even, returns the midpoint of the two\nmiddle elements.\n@since 1.0.1" ]
public void displayUseCases() { System.out.println(); for (int i = 0; i < useCases.size(); i++) { System.out.println("[" + i + "] " + ((UseCase) useCases.get(i)).getDescription()); } }
[ "Disply available use cases." ]
[ "Converts this update description to its document representation as it would appear in a\nMongoDB Change Event.\n\n@return the update description document as it would appear in a change event", "Add a cause to the backtrace.\n\n@param cause\nthe cause\n@param bTrace\nthe backtrace list", "This is a convenience method which allows all projects in an\nXER file to be read in a single pass.\n\n@param is input stream\n@param linkCrossProjectRelations add Relation links that cross ProjectFile boundaries\n@return list of ProjectFile instances\n@throws MPXJException", "Handle click on \"Add\" button.\n@param e the click event.", "Return the list of module dependencies\n\n@param moduleName\n@param moduleVersion\n@param fullRecursive\n@param corporate\n@param thirdParty\n@return List<Dependency>\n@throws GrapesCommunicationException", "Figure out, based on how much time has elapsed since we received an update, and the playback position,\nspeed, and direction at the time of that update, where the player will be now.\n\n@param update the most recent update received from a player\n@param currentTimestamp the nanosecond timestamp representing when we want to interpolate the track's position\n\n@return the playback position we believe that player has reached now", "Get DPI suggestions.\n\n@return DPI suggestions", "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", "Disassociate a name with an object\n@param name The name of an object.\n@exception ObjectNameNotFoundException No object exists in the database with that name." ]
public static vpntrafficpolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{ vpntrafficpolicy_vpnglobal_binding obj = new vpntrafficpolicy_vpnglobal_binding(); obj.set_name(name); vpntrafficpolicy_vpnglobal_binding response[] = (vpntrafficpolicy_vpnglobal_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch vpntrafficpolicy_vpnglobal_binding resources of given name ." ]
[ "Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\n\n@param object\n@param outIdentifier\n@return", "Sets the debug JPDA remote socket debugging argument.\n\n@param suspend {@code true} to suspend otherwise {@code false}\n@param port the port to listen on\n\n@return the builder", "PUT and POST are identical calls except for the header specifying the method", "This method allows nested tasks to be added, with the WBS being\ncompleted automatically.\n\n@return new task", "Synthesize and forward a KeyEvent to the library.\n\nThis call is made from the native layer.\n\n@param code id of the button\n@param action integer representing the action taken on the button", "Only call with the read lock held", "Abort and close the transaction.\nCalling abort abandons all persistent object modifications and releases the\nassociated locks.\nIf transaction is not in progress a TransactionNotInProgressException is thrown", "Find the number of Strings matched to the given Matcher.\n\n@param matcher a Matcher\n@return int the number of Strings matched to the given matcher.\n@since 1.0", "Read exactly buffer.length bytes from the stream into the buffer\n\n@param stream The stream to read from\n@param buffer The buffer to read into" ]
protected ClassDescriptor selectClassDescriptor(Map row) throws PersistenceBrokerException { ClassDescriptor result = m_cld; Class ojbConcreteClass = (Class) row.get(OJB_CONCRETE_CLASS_KEY); if(ojbConcreteClass != null) { result = m_cld.getRepository().getDescriptorFor(ojbConcreteClass); // if we can't find class-descriptor for concrete class, something wrong with mapping if (result == null) { throw new PersistenceBrokerException("Can't find class-descriptor for ojbConcreteClass '" + ojbConcreteClass + "', the main class was " + m_cld.getClassNameOfObject()); } } return result; }
[ "Check if there is an attribute which tells us which concrete class is to be instantiated." ]
[ "Creates a resource key with id defined as enumeration value name and bundle specified by given class.\n@param clazz the class owning the bundle\n@param value enumeration value used to define key id\n@return the resource key", "Sets the lower limits for the \"moving\" body translation relative to joint point.\n\n@param limitX the X axis lower translation limit\n@param limitY the Y axis lower translation limit\n@param limitZ the Z axis lower translation limit", "Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts.", "Re-reads the given entity, refreshing any properties updated on the server-side during insert or update.", "main class entry point.", "generate a message for loglevel WARN\n\n@param pObject the message Object", "Traverses the test case annotations. Will inject a HiveShell in the test case that envelopes the HiveServer.", "Confirms a user with the given token and token id.\n\n@param token the confirmation token.\n@param tokenId the id of the confirmation token.\n@return A {@link Task} that completes when confirmation completes/fails.", "Use this API to unset the properties of sslcertkey resources.\nProperties that need to be unset are specified in args array." ]
protected void loadEntries(final StorageAwareResource resource, final ZipInputStream zipIn) throws IOException { zipIn.getNextEntry(); BufferedInputStream _bufferedInputStream = new BufferedInputStream(zipIn); this.readContents(resource, _bufferedInputStream); zipIn.getNextEntry(); BufferedInputStream _bufferedInputStream_1 = new BufferedInputStream(zipIn); this.readResourceDescription(resource, _bufferedInputStream_1); if (this.storeNodeModel) { zipIn.getNextEntry(); BufferedInputStream _bufferedInputStream_2 = new BufferedInputStream(zipIn); this.readNodeModel(resource, _bufferedInputStream_2); } }
[ "Load entries from the storage.\nOverriding methods should first delegate to super before adding their own entries." ]
[ "Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}.", "Helper method to create a Dao object without having to define a class. Dao classes are supposed to be convenient\nbut if you have a lot of classes, they can seem to be a pain.\n\n<p>\n<b>NOTE:</b> You should use {@link DaoManager#createDao(ConnectionSource, DatabaseTableConfig)} instead of this\nmethod so you won't have to create the DAO multiple times.\n</p>", "Returns the context the view is running in, through which it can\naccess the current theme, resources, etc.\n\n@return The view's Context.", "Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts.", "This method changes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent to change a belief\n@param belief_name\nThe name of the belief to change\n@param new_value\nThe new value of the belief to be changed\n@param connector\nThe connector to get the external access", "Sets a string-valued additional info entry on the user.\n\n@param username the name of the user\n@param infoName the additional info key\n@param value the additional info value\n\n@throws CmsException if something goes wrong", "Extract data for a single calendar.\n\n@param row calendar data", "Switches from a sparse to dense matrix", "Returns iterable with all folder assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all folder assignments." ]
public void setCapture(boolean capture, float fps) { capturing = capture; NativeTextureCapturer.setCapture(getNative(), capture, fps); }
[ "Starts or stops capturing.\n\n@param capture If true, capturing is started. If false, it is stopped.\n@param fps Capturing FPS (frames per second)." ]
[ "Fills the week panel with checkboxes.", "Use this API to add route6 resources.", "Use this API to fetch a sslglobal_sslpolicy_binding resources.", "This method returns the duplicated certificate mapped to the passed in cert, or\ncreates and returns one if no mapping has yet been performed. If a naked public\nkey has already been mapped that matches the key in the cert, the already mapped\nkeypair will be reused for the mapped cert.\n@param cert\n@return\n@throws CertificateEncodingException\n@throws InvalidKeyException\n@throws CertificateException\n@throws CertificateNotYetValidException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws SignatureException\n@throws KeyStoreException\n@throws UnrecoverableKeyException", "Sets the right padding for all cells in the row.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining", "Move this rectangle to the specified bottom-left point.\n\n@param rect rectangle to move\n@param x new x origin\n@param y new y origin", "Validates the return value\n\n@param instance The instance to validate", "Returns sql statement used in this prepared statement together with the parameters.\n@param sql base sql statement\n@param logParams parameters to print out\n@return returns printable statement", "Convert this update description to an update document.\n\n@return an update document with the appropriate $set and $unset documents." ]
public String calculateLabelUnit(final CoordinateReferenceSystem mapCrs) { String unit; if (this.labelProjection != null) { unit = this.labelCRS.getCoordinateSystem().getAxis(0).getUnit().toString(); } else { unit = mapCrs.getCoordinateSystem().getAxis(0).getUnit().toString(); } return unit; }
[ "Determine which unit to use when creating grid labels.\n\n@param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined." ]
[ "Implement this to do your drawing.\n\n@param canvas the canvas on which the background will be drawn", "Set the value of the underlying component. Note that this will\nnot work for ListEditor components. Also, note that for a JComboBox,\nThe value object must have the same identity as an object in the drop-down.\n\n@param propName The DMR property name to set.\n@param value The value.", "Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows", "calculate the point a's angle of rectangle consist of point a,point b, point c;\n\n@param vertex\n@param A\n@param B\n@return", "Populate the UDF values for this entity.\n\n@param tableName parent table name\n@param type entity type\n@param container entity\n@param uniqueID entity Unique ID", "Use this API to create sslfipskey.", "Marshal the assertion as a JSON object.\n\n@param assertion the assertion to marshal", "Handle value change event on the individual dates list.\n@param event the change event.", "Used to determine if the current method should be ignored.\n\n@param name method name\n@return true if the method should be ignored" ]
private WaveformPreview requestPreviewInternal(final DataReference trackReference, final boolean failIfPassive) { // First check if we are using cached data for this slot MetadataCache cache = MetadataFinder.getInstance().getMetadataCache(SlotReference.getSlotReference(trackReference)); if (cache != null) { return cache.getWaveformPreview(null, trackReference); } // Then see if any registered metadata providers can offer it for us. final MediaDetails sourceDetails = MetadataFinder.getInstance().getMediaDetailsFor(trackReference.getSlotReference()); if (sourceDetails != null) { final WaveformPreview provided = MetadataFinder.getInstance().allMetadataProviders.getWaveformPreview(sourceDetails, trackReference); if (provided != null) { return provided; } } // At this point, unless we are allowed to actively request the data, we are done. We can always actively // request tracks from rekordbox. if (MetadataFinder.getInstance().isPassive() && failIfPassive && trackReference.slot != CdjStatus.TrackSourceSlot.COLLECTION) { return null; } // We have to actually request the preview using the dbserver protocol. ConnectionManager.ClientTask<WaveformPreview> task = new ConnectionManager.ClientTask<WaveformPreview>() { @Override public WaveformPreview useClient(Client client) throws Exception { return getWaveformPreview(trackReference.rekordboxId, SlotReference.getSlotReference(trackReference), client); } }; try { return ConnectionManager.getInstance().invokeWithClientSession(trackReference.player, task, "requesting waveform preview"); } catch (Exception e) { logger.error("Problem requesting waveform preview, returning null", e); } return null; }
[ "Ask the specified player for the waveform preview in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param trackReference uniquely identifies the desired waveform preview\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nwaveform updates will use available caches only\n\n@return the waveform preview found, if any" ]
[ "This method writes data for a single task to a Planner file.\n\n@param mpxjTask MPXJ Task instance\n@param taskList list of child tasks for current parent", "Converts a vector from sample space into eigen space.\n\n@param sampleData Sample space data.\n@return Eigen space projection.", "Send the message using the JavaMail session defined in the message\n\n@param mimeMessage Message to send", "Convert an array of bytes into an array of ints. 4 bytes from the\ninput data map to a single int in the output data.\n@param bytes The data to read from.\n@return An array of 32-bit integers constructed from the data.\n@since 1.1", "Finds properties of datatype string on test.wikidata.org. Since the test\nsite changes all the time, we cannot hardcode a specific property here.\nInstead, we just look through all properties starting from P1 to find the\nfirst few properties of type string that have an English label. These\nproperties are used for testing in this code.\n\n@param connection\n@throws MediaWikiApiErrorException\n@throws IOException", "Deals with the case where we have had to map a task ID to a new value.\n\n@param id task ID from database\n@return mapped task ID", "Special multiplication that takes in account the zeros and one in Y, which\nis the matrix that stores the householder vectors.", "Use this API to add sslcertkey resources.", "Use this API to clear nsconfig." ]
@Override public DiscordianDate date(int prolepticYear, int month, int dayOfMonth) { return DiscordianDate.of(prolepticYear, month, dayOfMonth); }
[ "Obtains a local date in Discordian calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Discordian local date, not null\n@throws DateTimeException if unable to create the date" ]
[ "An efficient method for exchanging data between two bit strings. Both bit strings must\nbe long enough that they contain the full length of the specified substring.\n@param other The bitstring with which this bitstring should swap bits.\n@param start The start position for the substrings to be exchanged. All bit\nindices are big-endian, which means position 0 is the rightmost bit.\n@param length The number of contiguous bits to swap.", "a small static helper class to get the color from the colorHolder\n\n@param colorHolder\n@param ctx\n@return", "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", "Retrieve a finish date.\n\n@param data byte array\n@param offset offset into byte array\n@return finish date", "digest message with MD5\n\n@param source message\n@return 32 bit MD5 value (lower case)", "Returns the position for a given number of occurrences or NOT_FOUND if\nthis value is not found.\n\n@param nOccurrence\nnumber of occurrences\n@return the position for a given number of occurrences or NOT_FOUND if\nthis value is not found", "Unregister the mgmt channel.\n\n@param old the proxy controller to unregister\n@param shuttingDown whether the server inventory is shutting down\n@return whether the registration can be removed from the domain-controller", "retrieve a collection of type collectionClass matching the Query query\n\n@see org.apache.ojb.broker.PersistenceBroker#getCollectionByQuery(Class, Query)", "Apply the remote domain model to the local host controller.\n\n@param bootOperations the result of the remote read-domain-model op\n@return {@code true} if the model was applied successfully, {@code false} otherwise" ]
public static service_stats get(nitro_service service, String name) throws Exception{ service_stats obj = new service_stats(); obj.set_name(name); service_stats response = (service_stats) obj.stat_resource(service); return response; }
[ "Use this API to fetch statistics of service_stats resource of given name ." ]
[ "Create an `AppDescriptor` with appName and package name specified\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param packageName\nthe package name of the app\n@return\nan `AppDescriptor` instance", "Checks if ranges contain the uid\n\n@param idRanges the id ranges\n@param uid the uid\n@return true, if ranges contain given uid", "Returns the plugins classpath elements.", "Links the two field names into a single left.right field name.\nIf the left field is empty, right is returned\n\n@param left one field name\n@param right the other field name\n\n@return left.right or right if left is an empty string", "Throws an IllegalStateException when the given value is not false.", "Chooses the ECI mode most suitable for the content of this symbol.", "Designate the vertex attribute and shader variable for the texture coordinates\nassociated with the named texture.\n\n@param texName name of texture\n@param texCoordAttr name of vertex attribute with texture coordinates.\n@param shaderVarName name of shader variable to get texture coordinates.", "Sets the value of a UDF.\n\n@param udf user defined field\n@param dataType MPXJ data type\n@param value field value", "Create a new thread\n\n@param name The name of the thread\n@param runnable The work for the thread to do\n@param daemon Should the thread block JVM shutdown?\n@return The unstarted thread" ]
public boolean fling(float velocityX, float velocityY, float velocityZ) { boolean scrolled = true; float viewportX = mScrollable.getViewPortWidth(); if (Float.isNaN(viewportX)) { viewportX = 0; } float maxX = Math.min(MAX_SCROLLING_DISTANCE, viewportX * MAX_VIEWPORT_LENGTHS); float viewportY = mScrollable.getViewPortHeight(); if (Float.isNaN(viewportY)) { viewportY = 0; } float maxY = Math.min(MAX_SCROLLING_DISTANCE, viewportY * MAX_VIEWPORT_LENGTHS); float xOffset = (maxX * velocityX)/VELOCITY_MAX; float yOffset = (maxY * velocityY)/VELOCITY_MAX; Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "fling() velocity = [%f, %f, %f] offset = [%f, %f]", velocityX, velocityY, velocityZ, xOffset, yOffset); if (equal(xOffset, 0)) { xOffset = Float.NaN; } if (equal(yOffset, 0)) { yOffset = Float.NaN; } // TODO: Think about Z-scrolling mScrollable.scrollByOffset(xOffset, yOffset, Float.NaN, mInternalScrollListener); return scrolled; }
[ "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" ]
[ "Await the completion of all currently active operations.\n\n@param timeout the timeout\n@param unit the time unit\n@return {@code } false if the timeout was reached and there were still active operations\n@throws InterruptedException", "This continuously tries to reconnect in a separate thread and will only stop if the connection was established\nsuccessfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters\nand callback will get updated.\n\n@param reconnectUri the updated connection uri\n@param authKey the updated authentication key\n@param callback the current callback", "Restores a BoxAPIConnection from a saved state.\n\n@see #save\n@param clientID the client ID to use with the connection.\n@param clientSecret the client secret to use with the connection.\n@param state the saved state that was created with {@link #save}.\n@return a restored API connection.", "Returns list of files matches specified regex in specified directories\n\n@param regex to match file names\n@param directories to find\n@return list of files matches specified regex in specified directories", "build a complete set of local files, files from referenced projects, and dependencies.", "This method is called from the task class each time an attribute\nis added, ensuring that all of the attributes present in each task\nrecord are present in the resource model.\n\n@param field field identifier", "Updates LetsEncrypt configuration.", "Find out the scrollable child view from a ViewGroup.\n\n@param viewGroup", "Start the actual migration. Take the version of the database, get all required migrations and execute them or do\nnothing if the DB is already up to date.\n\nAt the end the underlying database instance is closed.\n\n@throws MigrationException if a migration fails" ]
public void setContentType(String photoId, String contentType) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_SET_CONTENTTYPE); parameters.put("photo_id", photoId); parameters.put("content_type", contentType); Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } }
[ "Set the content type of a photo.\n\nThis method requires authentication with 'write' permission.\n\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_PHOTO\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_SCREENSHOT\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_OTHER\n@param photoId\nThe photo ID\n@param contentType\nThe contentType to set\n@throws FlickrException" ]
[ "Takes a string of the form \"x1=y1,x2=y2,...\" and returns Map\n@param map A string of the form \"x1=y1,x2=y2,...\"\n@return A Map m is returned such that m.get(xn) = yn", "Returns the value of a property of the current object on the specified level.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"", "Saves meta tree, writes database root and flushes the log.\n\n@param metaTree mutable meta tree\n@param env enclosing environment\n@param expired expired loggables (database root to be added)\n@return database root loggable which is read again from the log.", "Handle changes of the series check box.\n@param event the change event.", "Computes the eigenvalue of the provided tridiagonal matrix. Note that only the upper portion\nneeds to be tridiagonal. The bottom diagonal is assumed to be the same as the top.\n\n@param sideLength Number of rows and columns in the input matrix.\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@return true if it succeeds and false if it fails.", "Moves the given row up.\n\n@param row the row to move", "Returns a single template.\n\n@param id id of the template to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "Set the repeat count of an override at ordinal index\n\n@param pathName Path name\n@param methodName Fully qualified method name\n@param ordinal 1-based index of the override within the overrides of type methodName\n@param repeatCount new repeat count to set\n@return true if success, false otherwise", "format with lazy-eval" ]
public static lbvserver_appflowpolicy_binding[] get(nitro_service service, String name) throws Exception{ lbvserver_appflowpolicy_binding obj = new lbvserver_appflowpolicy_binding(); obj.set_name(name); lbvserver_appflowpolicy_binding response[] = (lbvserver_appflowpolicy_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch lbvserver_appflowpolicy_binding resources of given name ." ]
[ "Retrieves the earliest start date for all assigned tasks.\n\n@return start date", "Determines whether a project has the specified publisher type, wrapped by the \"Flexible Publish\" publisher.\n@param project The project\n@param type The type of the publisher\n@return true if the project contains a publisher of the specified type wrapped by the \"Flexible Publish\" publisher.", "The entity instance is not in the session cache\n\nCopied from Loader#instanceNotYetLoaded", "Updates event definitions for all throwing events.\n@param def Definitions", "Return the serialized form of this Identity.\n\n@return The serialized representation\n@see #fromByteArray\n@deprecated", "Generate a call to the delegate object.", "Updates the Q matrix to take inaccount the row that was removed by only multiplying e\nlements that need to be. There is still some room for improvement here...\n@param rowIndex", "If a and b are not null, returns a new duration of a + b.\nIf a is null and b is not null, returns b.\nIf a is not null and b is null, returns a.\nIf a and b are null, returns null.\nIf needed, b is converted to a's time unit using the project properties.\n\n@param a first duration\n@param b second duration\n@param defaults project properties containing default values\n@return a + b", "Interim and final clusters ought to have same partition counts, same\nzones, and same node state. Partitions per node may of course differ.\n\n@param interimCluster\n@param finalCluster" ]
public static clusterinstance_binding get(nitro_service service, Long clid) throws Exception{ clusterinstance_binding obj = new clusterinstance_binding(); obj.set_clid(clid); clusterinstance_binding response = (clusterinstance_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch clusterinstance_binding resource of given name ." ]
[ "Remember execution time for all executed suites.", "Parses command line arguments.\n\n@param args\nArray of arguments, like the ones provided by\n{@code void main(String[] args)}\n@param objs\nOne or more objects with annotated public fields.\n@return A {@code List} containing all unparsed arguments (i.e. arguments\nthat are no switches)\n@throws IOException\nif a parsing error occurred.\n@see CmdArgument", "Bind a prepared statment that represents a call to a procedure or\nuser-defined function.\n\n@param stmt the statement to bind.\n@param cld the class descriptor of the object that triggered the\ninvocation of the procedure or user-defined function.\n@param obj the object that triggered the invocation of the procedure\nor user-defined function.\n@param proc the procedure descriptor that provides information about\nthe arguments that shoudl be passed to the procedure or\nuser-defined function", "Go over the task list and create a map of stealerId -> Tasks\n\n@param sbTaskList List of all stealer-based rebalancing tasks to be\nscheduled.", "Internal method used to retrieve a integer from an\nembedded data block.\n\n@param blocks list of data blocks\n@return int value", "Extract the generic type from the given Class object.\n@param clazz the Class to check\n@param source the expected raw source type (can be {@code null})\n@param typeIndex the index of the actual type argument\n@param nestingLevel the nesting level of the target type\n@param currentLevel the current nested level\n@return the generic type as Class, or {@code null} if none", "Check, if all values used for calculating the series for a specific pattern are valid.\n@return <code>null</code> if the pattern is valid, a suitable error message otherwise.", "Iterates through the given CharSequence line by line, splitting each line using\nthe given regex delimiter. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see #splitEachLine(CharSequence, java.util.regex.Pattern, groovy.lang.Closure)\n@since 1.8.2", "Return a list of contacts for a user who have recently uploaded photos along with the total count of photos uploaded.\n\n@param lastUpload\nLimits the resultset to contacts that have uploaded photos since this date. The date should be in the form of a Unix timestamp. The default,\nand maximum, offset is (1) hour. (Optional, can be null)\n@param filter\nLimit the result set to all contacts or only those who are friends or family.<br/>\nValid options are: <b>ff</b> -&gt; friends and family, <b>all</b> -&gt; all your contacts. (Optional, can be null)\n\n@return List of Contacts\n@throws FlickrException" ]
protected boolean setFieldIfNecessary(String field, Object value) { if (!isOpen()) throw new ClosedObjectException("The Document object is closed."); if (!compareFieldValue(field, value)) { _doc.setField(field, value); return true; } return false; }
[ "Verifies if the new value is different from the field's old value. It's\nuseful, for example, in NoSQL databases that replicates data between\nservers. This verification prevents to mark a field as modified and to be\nreplicated needlessly.\n\n@param field\nthe field that we are checking before to be modified\n@param value\nthe new value\n@return true if the new and the old values are different and the value\nwas changed." ]
[ "Visit the implicit first frame of this method.", "This is a convenience method which allows all projects in an\nXER file to be read in a single pass.\n\n@param is input stream\n@param linkCrossProjectRelations add Relation links that cross ProjectFile boundaries\n@return list of ProjectFile instances\n@throws MPXJException", "Returns the raw class of the given type.", "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", "Decide whether failure should trigger a rollback.\n\n@param cause\nthe cause of the failure, or {@code null} if failure is not\nthe result of catching a throwable\n@return the result action", "Start with specifying the artifact version", "Retrieves the default calendar for this project based on the calendar name\ngiven in the project properties. If a calendar of this name cannot be found, then\nthe first calendar listed for the project will be returned. If the\nproject contains no calendars, then a default calendar is added.\n\n@return default projectCalendar instance", "Use this API to update nd6ravariables resources.", "Prepares this DAG for node enumeration using getNext method, each call to getNext returns next node\nin the DAG with no dependencies." ]
public void setStructuredAppendMessageId(String messageId) { if (messageId != null && !messageId.matches("^[\\x21-\\x7F]+$")) { throw new IllegalArgumentException("Invalid Aztec Code structured append message ID: " + messageId); } this.structuredAppendMessageId = messageId; }
[ "If this Aztec Code symbol is part of a series of Aztec Code symbols appended in a structured format,\nthis method sets the unique message ID for the series. Values may not contain spaces and must contain\nonly printable ASCII characters. Message IDs are optional.\n\n@param messageId the unique message ID for the series that this symbol is part of" ]
[ "Returns the artifact available versions\n\n@param gavc String\n@return List<String>", "Use this API to add ntpserver resources.", "Write file creation record.\n\n@throws IOException", "Get the last modified time for a set of files.", "return a prepared DELETE Statement fitting for the given ClassDescriptor", "Add the line to the content\n\n@param bufferedFileReader The file reader\n@param content The content of the file\n@param line The current read line\n@throws IOException", "returns a unique long value for class clazz and field fieldName.\nthe returned number is unique accross all tables in the extent of clazz.", "Adds folders to perform the search in.\n@param folders Folders to search in.", "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\"" ]
@SuppressWarnings("unchecked") public List<Difference> compare() { Diff diff = new Diff(this.controlDOM, this.testDOM); DetailedDiff detDiff = new DetailedDiff(diff); return detDiff.getAllDifferences(); }
[ "Compare the controlDOM and testDOM and save and return the differences in a list.\n\n@return list with differences" ]
[ "Process a device update once it has been received. Track it as the most recent update from its address,\nand notify any registered listeners, including master listeners if it results in changes to tracked state,\nsuch as the current master player and tempo. Also handles the Baroque dance of handing off the tempo master\nrole from or to another device.", "Throws an IllegalStateException when the given value is null.\n@return the value", "Transfer the data from the inputStream to the outputStream. Then close both streams.", "Use this API to fetch all the systemcore resources that are configured on netscaler.\nThis uses systemcore_args which is a way to provide additional arguments while fetching the resources.", "Use this API to fetch appflowpolicy_appflowpolicylabel_binding resources of given name .", "Use this API to count linkset_interface_binding resources configued on NetScaler.", "If needed, destroy the remaining conversation contexts after an HTTP session was invalidated within the current request.\n\n@param request", "adds a value to the list\n\n@param value the value", "Writes an untagged OK response, with the supplied response code,\nand an optional message.\n\n@param responseCode The response code, included in [].\n@param message The message to follow the []" ]
public Task<Void> resendConfirmationEmail(@NonNull final String email) { return dispatcher.dispatchTask( new Callable<Void>() { @Override public Void call() { resendConfirmationEmailInternal(email); return null; } }); }
[ "Resend the confirmation for a user to the given email.\n\n@param email the email of the user.\n@return A {@link Task} that completes when the resend request completes/fails." ]
[ "A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field.\n\nReturns an empty data record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object", "Use this API to update cacheselector.", "Process the graphical indicator data.", "Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.\nIf it is valid, the initializer function is applied to it.", "Retrieve the result produced by a task with the given id in the group.\n\nThis method can be used to retrieve the result of invocation of both dependency\nand \"post-run\" dependent tasks. If task with the given id does not exists then\nIllegalArgumentException exception will be thrown.\n\n@param taskId the task item id\n@return the task result, null will be returned if task has not yet been invoked", "Load a test file, run the classifier on it, and then write a Viterbi search\ngraph for each sequence.\n\n@param testFile\nThe file to test on.", "Generate date patterns based on the project configuration.\n\n@param properties project properties\n@return date patterns", "Handle interval change.\n@param event the change event.", "This method returns an array containing all of the unique identifiers\nfor which data has been stored in the Var2Data block.\n\n@return array of unique identifiers" ]
public static String truncate(int n, int smallestDigit, int biggestDigit) { int numDigits = biggestDigit - smallestDigit + 1; char[] result = new char[numDigits]; for (int j = 1; j < smallestDigit; j++) { n = n / 10; } for (int j = numDigits - 1; j >= 0; j--) { result[j] = Character.forDigit(n % 10, 10); n = n / 10; } return new String(result); }
[ "This returns a string from decimal digit smallestDigit to decimal digit\nbiggest digit. Smallest digit is labeled 1, and the limits are\ninclusive." ]
[ "copied and altered from TransactionHelper", "Assign float value to inputOutput SFFloat field named speed.\nNote that our implementation with ExoPlayer that pitch and speed will be set to the same value.\n@param newValue", "Build query string.\n@return Query string or null if query string contains no parameters at all.", "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.", "Processes the template for all column definitions of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Use this API to fetch appfwwsdl resource of given name .", "Provisions a new app user in an enterprise using Box Developer Edition.\n@param api the API connection to be used by the created user.\n@param name the name of the user.\n@return the created user's info.", "Adds an artifact to the module.\n\n<P>\nINFO: If the module is promoted, all added artifacts will be promoted.\n\n@param artifact Artifact", "Called to update the cached formats when something changes." ]
public void restoreSecurityContext(CacheContext context) { SavedAuthorization cached = context.get(CacheContext.SECURITY_CONTEXT_KEY, SavedAuthorization.class); if (cached != null) { log.debug("Restoring security context {}", cached); securityManager.restoreSecurityContext(cached); } else { securityManager.clearSecurityContext(); } }
[ "Puts the cached security context in the thread local.\n\n@param context the cache context" ]
[ "Use this API to add nslimitselector.", "Get the FieldDescriptor for the PathInfo\n\n@param aTableAlias\n@param aPathInfo\n@return FieldDescriptor", "Analyses the command-line arguments which are relevant for the\nserialization process in general. It fills out the class arguments with\nthis data.\n\n@param cmd\n{@link CommandLine} objects; contains the command line\narguments parsed by a {@link CommandLineParser}", "Get the SuggestionsInterface.\n\n@return The SuggestionsInterface", "Get a list of people in a given photo.\n\n@param photoId\n@throws FlickrException", "Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges", "Fetches the contents of a file representation with asset path and writes them to the provided output stream.\n@see <a href=https://developer.box.com/reference#section-x-rep-hints-header>X-Rep-Hints Header</a>\n@param representationHint the X-Rep-Hints query for the representation to fetch.\n@param assetPath the path of the asset for representations containing multiple files.\n@param output the output stream to write the contents to.", "Process an operand value used in the definition of the graphical\nindicator criteria.\n\n@param index position in operand list\n@param type field type\n@param criteria indicator criteria", "Send a get artifacts request\n\n@param hasLicense\n@return list of artifact\n@throws GrapesCommunicationException" ]
private void readPage(byte[] buffer, Table table) { int magicNumber = getShort(buffer, 0); if (magicNumber == 0x4400) { //System.out.println(ByteArrayHelper.hexdump(buffer, 0, 6, true, 16, "")); int recordSize = m_definition.getRecordSize(); RowValidator rowValidator = m_definition.getRowValidator(); String primaryKeyColumnName = m_definition.getPrimaryKeyColumnName(); int index = 6; while (index + recordSize <= buffer.length) { //System.out.println(ByteArrayHelper.hexdump(buffer, index, recordSize, true, 16, "")); int btrieveValue = getShort(buffer, index); if (btrieveValue != 0) { Map<String, Object> row = new HashMap<String, Object>(); row.put("ROW_VERSION", Integer.valueOf(btrieveValue)); for (ColumnDefinition column : m_definition.getColumns()) { Object value = column.read(index, buffer); //System.out.println(column.getName() + ": " + value); row.put(column.getName(), value); } if (rowValidator == null || rowValidator.validRow(row)) { table.addRow(primaryKeyColumnName, row); } } index += recordSize; } } }
[ "Reads data from a single page of the database file.\n\n@param buffer page from the database file\n@param table Table instance" ]
[ "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", "Retrieves child nodes from a directory entry.\n\n@param parent parent directory entry\n@return list of child nodes", "Use this API to unset the properties of rnatparam resource.\nProperties that need to be unset are specified in args array.", "Fetch all relevant attributes from the backing store and copy instances which are not present in the local bean store.", "Create a new file but fail if it already exists. The check for\nexistance of the file and it's creation are an atomic operation with\nrespect to other filesystem activities.", "For use on a slave HC to get all the server groups used by the host\n\n@param hostResource the host resource\n@return the server configs on this host", "Return the bean type, untangling the proxy if needed\n\n@param name\nthe bean name\n@return The Class of the bean", "Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations", "Retrieves a vertex attribute as a float array.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>float</i>\n@see #setFloatVec(String, FloatBuffer)\n@see #getFloatArray(String)" ]
@Override public synchronized void stop(final StopContext context) { final boolean shutdownServers = runningModeControl.getRestartMode() == RestartMode.SERVERS; if (shutdownServers) { Runnable task = new Runnable() { @Override public void run() { try { serverInventory.shutdown(true, -1, true); // TODO graceful shutdown serverInventory = null; // client.getValue().setServerInventory(null); } finally { serverCallback.getValue().setCallbackHandler(null); context.complete(); } } }; try { executorService.getValue().execute(task); } catch (RejectedExecutionException e) { task.run(); } finally { context.asynchronous(); } } else { // We have to set the shutdown flag in any case serverInventory.shutdown(false, -1, true); serverInventory = null; } }
[ "Stops all servers.\n\n{@inheritDoc}" ]
[ "Add a cause to the backtrace.\n\n@param cause\nthe cause\n@param bTrace\nthe backtrace list", "Create a Collection Proxy for a given query.\n\n@param brokerKey The key of the persistence broker\n@param query The query\n@param collectionClass The class to build the proxy for\n@return The collection proxy", "Removes the value from the Collection mapped to by this key, leaving the\nrest of the collection intact.\n\n@param key\nthe key to the Collection to remove the value from\n@param value\nthe value to remove", "Returns a new iterable filtering any null references.\n\n@param unfiltered\nthe unfiltered iterable. May not be <code>null</code>.\n@return an unmodifiable iterable containing all elements of the original iterable without any <code>null</code> references. Never <code>null</code>.", "This method will return a list of installed identities for which\nthe corresponding .conf file exists under .installation directory.\nThe list will also include the default identity even if the .conf\nfile has not been created for it.", "Load the layers based on the default setup.\n\n@param jbossHome the jboss home directory\n@param productConfig the product config\n@param repoRoots the repository roots\n@return the available layers\n@throws IOException", "Print the method parameter p", "Calcs the bonding size of given mesh.\n\n@param mesh Mesh to calc its bouding size.\n@return The bounding size for x, y and z axis.", "splits a string into a list of strings, ignoring the empty string" ]
@SuppressWarnings("unchecked") public Map<String, Object> getCustomProperties() { return (Map<String, Object>) getCachedValue(ProjectField.CUSTOM_PROPERTIES); }
[ "Retrieve a map of custom document properties.\n\n@return the Document Summary Information Map" ]
[ "Calculate the highlight color. Saturate at 0xff to make sure that high values\ndon't result in aliasing.\n\n@param _Slice The Slice which will be highlighted.", "Search for photos which match the given search parameters.\n\n@param params\nThe search parameters\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return A PhotoList\n@throws FlickrException", "Helper method that stores in a hash map how often a certain key occurs.\nIf the key has not been encountered yet, a new entry is created for it in\nthe map. Otherwise the existing value for the key is incremented.\n\n@param map\nthe map where the counts are stored\n@param key\nthe key to be counted\n@param count\nvalue by which the count should be incremented; 1 is the usual\ncase", "Set default interval for sending events to monitoring service. DefaultInterval will be used by\nscheduler.\n\n@param defaultInterval the new default interval", "Assign a new value to this field.\n@param numStrings - number of strings\n@param newValues - the new strings", "Returns the resource bundle for current Locale, i.e. locale set in the PageComponent.\nAlways create a new instance, this avoids getting the incorrect locale information.\n\n@return resourcebundle for internationalized messages", "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", "Appends the indentation string at the current position of the parent and adds a new composite node, indicating the same indentation for\nsubsequent lines.\n\n@return an indentation node, using the given indentString, appended as a child on the given parent", "Get PhoneNumber object\n\n@return PhonenUmber | null on error" ]
private void addAuthentication(HttpHost host, Credentials credentials, AuthScheme authScheme, HttpClientContext context) { AuthCache authCache = context.getAuthCache(); if (authCache == null) { authCache = new BasicAuthCache(); context.setAuthCache(authCache); } CredentialsProvider credsProvider = context.getCredentialsProvider(); if (credsProvider == null) { credsProvider = new BasicCredentialsProvider(); context.setCredentialsProvider(credsProvider); } credsProvider.setCredentials(new AuthScope(host), credentials); if (authScheme != null) { authCache.put(host, authScheme); } }
[ "Add authentication information for the given host\n@param host the host\n@param credentials the credentials\n@param authScheme the scheme for preemptive authentication (should be\n<code>null</code> if adding authentication for a proxy server)\n@param context the context in which the authentication information\nshould be saved" ]
[ "With the QR algorithm it is possible for the found singular values to be native. This\nmakes them all positive by multiplying it by a diagonal matrix that has", "retrieve a collection of type collectionClass matching the Query query\n\n@see org.apache.ojb.broker.PersistenceBroker#getCollectionByQuery(Class, Query)", "Checks the preconditions for creating a new LMinMax processor.\n\n@param min\nthe minimum value (inclusive)\n@param max\nthe maximum value (inclusive)\n@throws IllegalArgumentException\nif {@code max < min}", "End building the prepared script\n@param config the configuration for the script to build\n@return the new {@link LuaPreparedScript} instance", "Computes an MD4 hash for the password.\n\n@param password the password for which to compute the hash\n@throws NoSuchAlgorithmException\n@throws InvalidKeyException\n\n@return the password hash", "Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved parameter type of the method return type, or {@code null}\nif not resolvable or if the single argument is of type {@link WildcardType}.", "Remove colProxy from list of pending collections and\nregister its contents with the transaction.", "Prints one line to the csv file\n\n@param cr data pipe with search results", "Subtract two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the subtract of specified complex numbers." ]
private Properties mapToProperties(Map<String, String> map) { Properties p = new Properties(); for (Map.Entry<String,String> entry : map.entrySet()) { p.put(entry.getKey(), entry.getValue()); } return p; }
[ "Legacy conversion.\n@param map\n@return Properties" ]
[ "Add a clause where the ID is from an existing object.", "Selects a specific vertex and fragment shader to use for rendering.\n\nIf a shader template has been specified, it is used to generate\na vertex and fragment shader based on mesh attributes, bound textures\nand light sources. If the textures bound to the material are changed\nor a new light source is added, this function must be called again\nto select the appropriate shaders. This function may cause recompilation\nof shaders which is quite slow.\n\n@param scene scene being rendered\n@see GVRShaderTemplate GVRMaterialShader.getShaderType", "Deserialize a directory of javascript design documents to a List of DesignDocument objects.\n\n@param directory the directory containing javascript files\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read", "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", "Adds an additional interface that the proxy should implement. The default\nimplementation will be to forward invocations to the bean instance.\n\n@param newInterface an interface", "Send the message with the given attributes and the given body using the specified SMTP settings\n\n@param to Destination address(es)\n@param from Sender address\n@param subject Message subject\n@param body Message content. May either be a MimeMultipart or another body that java mail recognizes\n@param contentType MIME content type of body\n@param serverSetup Server settings to use for connecting to the SMTP server", "Populates a relation list.\n\n@param task parent task\n@param field target task field\n@param data MPX relation list data", "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", "Use this API to fetch a vpnglobal_auditnslogpolicy_binding resources." ]
public ValueContainer[] getKeyValues(ClassDescriptor cld, Object objectOrProxy) throws PersistenceBrokerException { return getKeyValues(cld, objectOrProxy, true); }
[ "returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException" ]
[ "Retrieves the class object for the class with the given name.\n\n@param name The class name\n@return The class object\n@throws ClassNotFoundException If the class is not on the classpath (the exception message contains the class name)", "Provides an object that can build SQL clauses to match this string representation.\n\nThis method can be overridden for other IP address types to match in their own ways.\n\n@param isEntireAddress\n@param translator\n@return", "Close all JDBC objects related to this connection.", "Checks if the given AnnotatedType is sensible, otherwise provides warnings.", "Read the table headers. This allows us to break the file into chunks\nrepresenting the individual tables.\n\n@param is input stream\n@return list of tables in the file", "Stops the current debug server. Active connections are\nnot affected.", "just as facade but we keep the qualifiers so that we can recognize Bean from @Intercepted Bean.", "Converts an absolute rectangle to a relative one wrt to the current coordinate system.\n\n@param rect absolute rectangle\n@return relative rectangle", "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" ]
public static ExtensibleConfigurationPersister createDomainXmlConfigurationPersister(final ConfigurationFile file, ExecutorService executorService, ExtensionRegistry extensionRegistry, final HostControllerEnvironment environment) { DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorService, extensionRegistry); boolean suppressLoad = false; ConfigurationFile.InteractionPolicy policy = file.getInteractionPolicy(); final boolean isReloaded = environment.getRunningModeControl().isReloaded(); if (!isReloaded && (policy == ConfigurationFile.InteractionPolicy.NEW && (file.getBootFile().exists() && file.getBootFile().length() != 0))) { throw HostControllerLogger.ROOT_LOGGER.cannotOverwriteDomainXmlWithEmpty(file.getBootFile().getName()); } if (!isReloaded && (policy == ConfigurationFile.InteractionPolicy.NEW || policy == ConfigurationFile.InteractionPolicy.DISCARD)) { suppressLoad = true; } BackupXmlConfigurationPersister persister = new BackupXmlConfigurationPersister(file, new QName(Namespace.CURRENT.getUriString(), "domain"), domainXml, domainXml, suppressLoad); for (Namespace namespace : Namespace.domainValues()) { if (!namespace.equals(Namespace.CURRENT)) { persister.registerAdditionalRootElement(new QName(namespace.getUriString(), "domain"), domainXml); } } extensionRegistry.setWriterRegistry(persister); return persister; }
[ "domain.xml" ]
[ "Return the trimmed source line corresponding to the specified AST node\n\n@param node - the Groovy AST node", "callers of doLogin should be serialized before calling in.", "Calculate the first argument raised to the power of the second.\nThis method only supports non-negative powers.\n@param value The number to be raised.\n@param power The exponent (must be positive).\n@return {@code value} raised to {@code power}.", "Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.", "Cancels all the pending & running requests and releases all the dispatchers.", "Process the response by reporting proper log and feeding failure\ndetectors\n\n@param response\n@param pipeline", "This method takes an array of data and uses this to populate the\nfield map.\n\n@param defaultData field map default data", "Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to process.", "Writes long strings to output stream as several chunks.\n\n@param stream stream to write to.\n@param str string to be written.\n@throws IOException if something went wrong" ]
private void readResourceBaselines(Project.Resources.Resource xmlResource, Resource mpxjResource) { for (Project.Resources.Resource.Baseline baseline : xmlResource.getBaseline()) { int number = NumberHelper.getInt(baseline.getNumber()); Double cost = DatatypeConverter.parseCurrency(baseline.getCost()); Duration work = DatatypeConverter.parseDuration(m_projectFile, TimeUnit.HOURS, baseline.getWork()); if (number == 0) { mpxjResource.setBaselineCost(cost); mpxjResource.setBaselineWork(work); } else { mpxjResource.setBaselineCost(number, cost); mpxjResource.setBaselineWork(number, work); } } }
[ "Reads baseline values for the current resource.\n\n@param xmlResource MSPDI resource instance\n@param mpxjResource MPXJ resource instance" ]
[ "Throws an IllegalArgumentException when the given value is not true.\n@param value the value to assert if true\n@param message the message to display if the value is false\n@return the value", "Given the current and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@throws IOException", "Returns the precedence of the specified operator. Non-operator's will\nreceive -1 or a GroovyBugError, depending on your preference.", "Retrieves a timestamp from the property data.\n\n@param type Type identifier\n@return timestamp", "Use this API to delete clusterinstance resources.", "Retrieves the parent task for a Phoenix activity.\n\n@param activity Phoenix activity\n@return parent task", "Set a bean in the context.\n\n@param name bean name\n@param object bean value", "Check if the an operation is done or not.\n\n@param requestId Id of the request\n@param remove Whether remove the request out of the list if it is done.\n@return True if request is complete, false otherwise", "Recursively construct a LblTree from DOM tree\n\n@param walker tree walker for DOM tree traversal\n@return tree represented by DOM tree" ]
public static Enum castToEnum(Object object, Class<? extends Enum> type) { if (object==null) return null; if (type.isInstance(object)) return (Enum) object; if (object instanceof String || object instanceof GString) { return Enum.valueOf(type, object.toString()); } throw new GroovyCastException(object, type); }
[ "this class requires that the supplied enum is not fitting a\nCollection case for casting" ]
[ "This method is used to push install referrer via Intent\n@param intent An Intent with the install referrer parameters", "Use this API to add spilloverpolicy.", "Cache key calculation.\n@param sql\n@param resultSetType\n@param resultSetConcurrency\n@return cache key", "Use this API to fetch all the route6 resources that are configured on netscaler.", "Initializes the counters for a property to zero if not done yet.\n\n@param usageStatistics\nstatistics object to initialize\n@param property\nthe property to count", "Returns the scene graph root.\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built-in behavior is to return a {@link AiVector}.\n\n@param wrapperProvider the wrapper provider (used for type inference)\n@return the scene graph root", "Print the class's constructors m", "Get the group URL for the specified group ID\n\n@param groupId\nThe group ID\n@return The group URL\n@throws FlickrException", "Returns all ApplicationProjectModels." ]
private void dbUpgrade() { DbConn cnx = this.getConn(); Map<String, Object> rs = null; int db_schema_version = 0; try { rs = cnx.runSelectSingleRow("version_select_latest"); db_schema_version = (Integer) rs.get("VERSION_D1"); } catch (Exception e) { // Database is to be created, so version 0 is OK. } cnx.rollback(); if (SCHEMA_VERSION > db_schema_version) { jqmlogger.warn("Database is being upgraded from version {} to version {}", db_schema_version, SCHEMA_VERSION); // Upgrade scripts are named from_to.sql with 5 padding (e.g. 00000_00003.sql) // We try to find the fastest path (e.g. a direct 00000_00005.sql for creating a version 5 schema from nothing) // This is a simplistic and non-optimal algorithm as we try only a single path (no going back) int loop_from = db_schema_version; int to = db_schema_version; List<String> toApply = new ArrayList<>(); toApply.addAll(adapter.preSchemaCreationScripts()); while (to != SCHEMA_VERSION) { boolean progressed = false; for (int loop_to = SCHEMA_VERSION; loop_to > db_schema_version; loop_to--) { String migrationFileName = String.format("/sql/%05d_%05d.sql", loop_from, loop_to); jqmlogger.debug("Trying migration script {}", migrationFileName); if (Db.class.getResource(migrationFileName) != null) { toApply.add(migrationFileName); to = loop_to; loop_from = loop_to; progressed = true; break; } } if (!progressed) { break; } } if (to != SCHEMA_VERSION) { throw new DatabaseException( "There is no migration path from version " + db_schema_version + " to version " + SCHEMA_VERSION); } for (String s : toApply) { jqmlogger.info("Running migration script {}", s); ScriptRunner.run(cnx, s); } cnx.commit(); // Yes, really. For advanced DB! cnx.close(); // HSQLDB does not refresh its schema without this. cnx = getConn(); cnx.runUpdate("version_insert", SCHEMA_VERSION, SCHEMA_COMPATIBLE_VERSION); cnx.commit(); jqmlogger.info("Database is now up to date"); } else { jqmlogger.info("Database is already up to date"); } cnx.close(); }
[ "Updates the database. Never call this during normal operations, upgrade is a user-controlled operation." ]
[ "Returns the names of the bundles configured as workplace bundles in any module configuration.\n@return the names of the bundles configured as workplace bundles in any module configuration.", "Set the inner angle of the spotlight cone in degrees.\n\nBeyond the outer cone angle there is no illumination.\nThe underlying uniform \"outer_cone_angle\" is the cosine\nof this input angle. If the inner cone angle is larger than the outer cone angle\nthere will be unexpected results.\n@see #setInnerConeAngle(float)\n@see #getOuterConeAngle()", "Helper function to find the beat grid section in a rekordbox track analysis file.\n\n@param anlzFile the file that was downloaded from the player\n\n@return the section containing the beat grid", "Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store", "Populate the supplied response with the model representation of the certificates.\n\n@param result the response to populate.\n@param certificates the certificates to add to the response.\n@throws CertificateEncodingException\n@throws NoSuchAlgorithmException", "Get viewport size along the axis\n@param axis {@link Axis}\n@return size", "Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by the specified comparator.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@param comparator\nthe comparator to be used. May be <code>null</code> to indicate that the natural ordering of the\nelements should be used.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List, Comparator)\n@see #sort(Iterable)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List, Comparator)\n@since 2.7", "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", "Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer" ]
public static String getAt(String text, Range range) { RangeInfo info = subListBorders(text.length(), range); String answer = text.substring(info.from, info.to); if (info.reverse) { answer = reverse(answer); } return answer; }
[ "Support the range subscript operator for String\n\n@param text a String\n@param range a Range\n@return a substring corresponding to the Range\n@since 1.0" ]
[ "Extracts baseline cost from the MPP file for a specific baseline.\nReturns null if no baseline cost is present, otherwise returns\na list of timephased work items.\n\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work", "Return the value from the field in the object that is defined by this FieldType. If the field is a foreign object\nthen the ID of the field is returned instead.", "Use this API to fetch csvserver_spilloverpolicy_binding resources of given name .", "2-D Complex Gabor function.\n\n@param x X axis coordinate.\n@param y Y axis coordinate.\n@param wavelength Wavelength.\n@param orientation Orientation.\n@param phaseOffset Phase offset.\n@param gaussVariance Gaussian variance.\n@param aspectRatio Aspect ratio.\n@return Gabor response.", "Returns whether this represents a valid host name or address format.\n@return", "Set default interval for sending events to monitoring service. DefaultInterval will be used by\nscheduler.\n\n@param defaultInterval the new default interval", "Specifies the maximum capacity of the counter.\n\n@param capacity\n<code>long</code>\n@throws IllegalArgumentException\nif windowMillis is less than 1.", "Constraint that ensures that the field has a conversion if the java type requires it. Also checks the conversion class.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If the conversion class is invalid", "Start the timer." ]