query
stringlengths
74
6.1k
positive
listlengths
1
1
negative
listlengths
9
9
public static EventType map(Event event) { EventType eventType = new EventType(); eventType.setTimestamp(Converter.convertDate(event.getTimestamp())); eventType.setEventType(convertEventType(event.getEventType())); OriginatorType origType = mapOriginator(event.getOriginator()); eventType.setOriginator(origType); MessageInfoType miType = mapMessageInfo(event.getMessageInfo()); eventType.setMessageInfo(miType); eventType.setCustomInfo(convertCustomInfo(event.getCustomInfo())); eventType.setContentCut(event.isContentCut()); if (event.getContent() != null) { DataHandler datHandler = getDataHandlerForString(event); eventType.setContent(datHandler); } return eventType; }
[ "convert Event bean to EventType manually.\n\n@param event the event\n@return the event type" ]
[ "This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance", "Fetch the specified expression from the cache or create it if necessary.\n\n@param expressionString the expression string\n@return the expression\n@throws ParseException oops", "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", "Construct a pretty string documenting progress for this batch plan thus\nfar.\n\n@return pretty string documenting progress", "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.", "Collapse repeated records, using exact string match on the record.\nThis is generally useful for making very verbose logs more readable.\n@return this", "Resize the mesh to given size for each axis.\n\n@param mesh Mesh to be resized.\n@param xsize Size for x-axis.\n@param ysize Size for y-axis.\n@param zsize Size fof z-axis.", "Search for interesting photos using the Flickr Interestingness algorithm.\n\n@param params\nAny search parameters\n@param perPage\nNumber of items per page\n@param page\nThe page to start on\n@return A PhotoList\n@throws FlickrException", "Determine whether we should use the normal repaint process, or delegate that to another component that is\nhosting us in a soft-loaded manner to save memory.\n\n@param x the left edge of the region that we want to have redrawn\n@param y the top edge of the region that we want to have redrawn\n@param width the width of the region that we want to have redrawn\n@param height the height of the region that we want to have redrawn" ]
public static void unregisterMbean(ObjectName name) { try { ManagementFactory.getPlatformMBeanServer().unregisterMBean(name); } catch(Exception e) { logger.error("Error unregistering mbean", e); } }
[ "Unregister the mbean with the given name from the platform mbean server\n\n@param name The name of the mbean to unregister" ]
[ "Convert raw data into Java types.\n\n@param type data type\n@param data raw data\n@return list of Java object", "Generate a sql where-clause matching the contraints defined by the array of fields\n\n@param columns array containing all columns used in WHERE clause", "Select the default currency properties from the database.\n\n@param currencyID default currency ID", "Generates the routing Java source code", "Returns the description of the running container.\n\n@param client the client used to query the server\n\n@return the description of the running container\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to query the container fails", "Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.", "Keep a cache of items files associated with classification in order to improve performance.", "Visits a dependence of the current module.\n\n@param module the qualified name of the dependence.\n@param access the access flag of the dependence among\nACC_TRANSITIVE, ACC_STATIC_PHASE, ACC_SYNTHETIC\nand ACC_MANDATED.\n@param version the module version at compile time or null.", "Use this API to fetch auditsyslogpolicy_aaauser_binding resources of given name ." ]
public void setShortVec(CharBuffer data) { if (data == null) { throw new IllegalArgumentException("Input data for indices cannot be null"); } if (getIndexSize() != 2) { throw new UnsupportedOperationException("Cannot update integer indices with char array"); } if (data.isDirect()) { if (!NativeIndexBuffer.setShortVec(getNative(), data)) { throw new UnsupportedOperationException("Input buffer is wrong size"); } } else if (data.hasArray()) { if (!NativeIndexBuffer.setShortArray(getNative(), data.array())) { throw new UnsupportedOperationException("Input buffer is wrong size"); } } else { throw new UnsupportedOperationException( "CharBuffer type not supported. Must be direct or have backing array"); } }
[ "Updates the indices in the index buffer from a Java CharBuffer.\nAll of the entries of the input buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data CharBuffer containing the new values\n@throws IllegalArgumentException if char array is wrong size" ]
[ "Write a short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at", "Populate a task from a Row instance.\n\n@param row Row instance\n@param task Task instance", "Validates the type", "Create a standalone target.\n\n@param controllerClient the connected controller client to a standalone instance.\n@return the remote target", "Returns a byte array containing a copy of the bytes", "Called whenever a rebalance task completes. This means one task is done\nand some number of partition stores have been migrated.\n\n@param taskId\n@param partitionStoresMigrated Number of partition stores moved by this\ncompleted task.", "Construct a new uri by replacing query parameters in initialUri with the query parameters provided.\n\n@param initialUri the initial/template URI\n@param queryParams the new query parameters.", "A comment.\n\n@param args the parameters", "Registers a new user with the given email and password.\n\n@param email the email to register with. This will be the username used during log in.\n@param password the password to associated with the email. The password must be between\n6 and 128 characters long.\n@return A {@link Task} that completes when registration completes/fails." ]
public Where<T, ID> rawComparison(String columnName, String rawOperator, Object value) throws SQLException { addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value, rawOperator)); return this; }
[ "Make a comparison where the operator is specified by the caller. It is up to the caller to specify an appropriate\noperator for the database and that it be formatted correctly." ]
[ "Converts the key to the format in which it is stored for searching\n\n@param key Byte array of the key\n@return The format stored in the index file", "Retrieve a single field value.\n\n@param id parent entity ID\n@param type field type\n@param fixedData fixed data block\n@param varData var data block\n@return field value", "Return the BundleCapability of a bundle exporting the package packageName.\n\n@param context The BundleContext\n@param packageName The package name\n@return the BundleCapability of a bundle exporting the package packageName", "Append the html-code to finish a html mail message to the given buffer.\n\n@param buffer The StringBuffer to add the html code to.", "Calculate a threshold.\n\n@param x first string.\n@param y second string.\n@param p the threshold coefficient.\n@return 2 maxLength(x, y) (1-p)", "Converts url path to the Transloadit full url.\nReturns the url passed if it is already full.\n\n@param url\n@return String", "Copies just the upper or lower triangular portion of a matrix.\n\n@param src Matrix being copied. Not modified.\n@param dst Where just a triangle from src is copied. If null a new one will be created. Modified.\n@param upper If the upper or lower triangle should be copied.\n@return The copied matrix.", "Returns width and height that allow the given source width, height to fit inside the target width, height\nwithout losing aspect ratio", "Read an optional month value form a JSON value.\n@param val the JSON value that should represent the month.\n@return the month from the JSON or null if reading the month fails." ]
@Override public String toFullString() { String result; if(hasNoStringCache() || (result = getStringCache().fullString) == null) { getStringCache().fullString = result = toNormalizedString(IPv6StringCache.fullParams); } return result; }
[ "This produces a string with no compressed segments and all segments of full length,\nwhich is 4 characters for IPv6 segments and 3 characters for IPv4 segments." ]
[ "Create a temporary directory with the same attributes as its parent directory.\n@param dir\nthe path to directory in which to create the directory\n@param prefix\nthe prefix string to be used in generating the directory's name;\nmay be {@code null}\n@return the path to the newly created directory that did not exist before\nthis method was invoked\n@throws IOException", "Returns a String summarizing overall accuracy that will print nicely.", "Use this API to fetch all the tmtrafficaction resources that are configured on netscaler.", "Apply aliases to task and resource fields.\n\n@param aliases map of aliases", "Adds OPT_F | OPT_FILE option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Returns the accrued interest of the bond for a given time.\n\n@param time The time of interest as double.\n@param model The model under which the product is valued.\n@return The accrued interest.", "Builds the path for a closed arc, returning a PolygonOptions that can be\nfurther customised before use.\n\n@param center\n@param start\n@param end\n@param arcType Pass in either ArcType.CHORD or ArcType.ROUND\n@return PolygonOptions with the paths element populated.", "Saves the favorites.\n\n@param favorites the list of favorites to save\n@throws CmsException if something goes wrong", "Add a line symbolizer definition to the rule.\n\n@param styleJson The old style." ]
public Integer getEnd() { if (mtasPositionType.equals(POSITION_RANGE) || mtasPositionType.equals(POSITION_SET)) { return mtasPositionEnd; } else if (mtasPositionType.equals(POSITION_SINGLE)) { return mtasPositionStart; } else { return null; } }
[ "Gets the end.\n\n@return the end" ]
[ "Format a cue countdown indicator in the same way as the CDJ would at this point in the track.\n\n@return the value that the CDJ would display to indicate the distance to the next cue\n@see #getCueCountdown()", "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", "Converts a batch indexing into the sample, to a batch indexing into the\noriginal function.\n\n@param batch The batch indexing into the sample.\n@return A new batch indexing into the original function, containing only\nthe indices from the sample.", "A fairly basic 5-way classifier, that notes digits, and upper\nand lower case, mixed, and non-alphanumeric.\n\n@param s String to find word shape of\n@return Its word shape: a 5 way classification", "Set whether we should retrieve the waveform details in addition to the waveform previews.\n\n@param findDetails if {@code true}, both types of waveform will be retrieved, if {@code false} only previews\nwill be retrieved", "Overridden method always creating a new instance\n\n@param contextual The bean to create\n@param creationalContext The creation context", "Acquire the shared lock allowing the acquisition to be interrupted.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@throws InterruptedException - if the acquiring thread is interrupted.\n@throws IllegalArgumentException if {@code permit} is null.", "Use this API to enable Interface of given name.", "Arrange to become the tempo master. Starts a sequence of interactions with the other players that should end\nup with us in charge of the group tempo and beat alignment.\n\n@throws IllegalStateException if we are not sending status updates\n@throws IOException if there is a problem sending the master yield request" ]
@RequestMapping(value = "/scripts", method = RequestMethod.GET) public String scriptView(Model model) throws Exception { return "script"; }
[ "Returns script view\n\n@param model\n@return\n@throws Exception" ]
[ "Reloads the synchronization config. This wipes all in-memory synchronization settings.", "Use this API to add dnsaaaarec resources.", "Moves a calendar to the last named day of the month.\n\n@param calendar current date", "Adds new holes to the polygon.\n\n@param holes holes, must be contained in the exterior ring and must not overlap or\nintersect another hole\n@return this for chaining", "Create the actual patchable target.\n\n@param name the layer name\n@param layer the layer path config\n@param metadata the metadata location for this target\n@param image the installed image\n@return the patchable target\n@throws IOException", "Dump the contents of a row from an MPD file.\n\n@param row row data", "Define the set of extensions.\n\n@param extensions\n@return self", "Convert an ObjectBank to corresponding collection of data features and\nlabels.\n\n@return A List of pairs, one for each document, where the first element is\nan int[][][] representing the data and the second element is an\nint[] representing the labels.", "Assign based on execution time history. The algorithm is a greedy heuristic\nassigning the longest remaining test to the slave with the\nshortest-completion time so far. This is not optimal but fast and provides\na decent average assignment." ]
private boolean hasMultipleCostRates() { boolean result = false; CostRateTable table = getCostRateTable(); if (table != null) { // // We assume here that if there is just one entry in the cost rate // table, this is an open ended rate which covers any work, it won't // have specific dates attached to it. // if (table.size() > 1) { // // If we have multiple rates in the table, see if the same rate // is in force at the start and the end of the aaaignment. // CostRateTableEntry startEntry = table.getEntryByDate(getStart()); CostRateTableEntry finishEntry = table.getEntryByDate(getFinish()); result = (startEntry != finishEntry); } } return result; }
[ "Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment" ]
[ "Request metadata for a specific track ID, given a dbserver connection to a player that has already been set up.\nSeparated into its own method so it could be used multiple times with the same connection when gathering\nall track metadata.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved metadata, or {@code null} if there is no such track\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations", "Checks if the provided license is valid and could be stored into the database\n\n@param license the license to test\n@throws WebApplicationException if the data is corrupted", "Determines whether the given array only contains unbounded type variables or Object.class.\n\n@param types the given array of types\n@return true if and only if the given array only contains unbounded type variables or Object.class", "Get the collection of public contacts for the specified user ID.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The Collection of Contact objects\n@throws FlickrException", "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", "Little helper function that recursivly deletes a directory.\n\n@param dir The directory", "Use this API to update snmpuser.", "Separate from other findNonProgressingOp variant to allow unit testing without needing a mock OperationContext", "Returns an text table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns." ]
public SimplifySpanBuild appendMultiClickable(SpecialClickableUnit specialClickableUnit, Object... specialUnitOrStrings) { processMultiClickableSpecialUnit(false, specialClickableUnit, specialUnitOrStrings); return this; }
[ "append multi clickable SpecialUnit or String\n\n@param specialClickableUnit SpecialClickableUnit\n@param specialUnitOrStrings Unit Or String\n@return" ]
[ "Checks if a new version of the file can be uploaded with the specified name and size.\n@param name the new name for the file.\n@param fileSize the size of the new version content in bytes.\n@return whether or not the file version can be uploaded.", "Query a player to determine the port on which its database server is running.\n\n@param announcement the device announcement with which we detected a new player on the network.", "Log a warning for the resource at the provided address and a single attribute. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attribute attribute we are warning about", "Use this API to fetch filtered set of lbvserver resources.\nset the filter parameter values in filtervalue object.", "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", "Ask the specified player for the specified artwork from the specified media slot, first checking if we have a\ncached copy.\n\n@param artReference uniquely identifies the desired artwork\n@param trackType the kind of track that owns the artwork\n\n@return the artwork, if it was found, or {@code null}\n\n@throws IllegalStateException if the ArtFinder is not running", "Process TestCaseFinishedEvent. Add steps and attachments from\ntop step from stepStorage to current testCase, then remove testCase\nand step from stores. Also remove attachments matches removeAttachments\nconfig.\n\n@param event to process", "Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops", "Write the field to the specified channel.\n\n@param channel the channel to which it should be written\n\n@throws IOException if there is a problem writing to the channel" ]
public final void setValue(String value) { if ((null == value) || value.isEmpty()) { setDefaultValue(); } else { try { tryToSetParsedValue(value); } catch (@SuppressWarnings("unused") Exception e) { CmsDebugLog.consoleLog("Could not set invalid serial date value: " + value); setDefaultValue(); } } notifyOnValueChange(); }
[ "Set the value as provided.\n@param value the serial date value as JSON string." ]
[ "set the textColor of the ColorHolder to a view\n\n@param view", "Reads a string of two byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nThe value starts at the position specified by the offset\nparameter.\n\n@param data byte array of data\n@param offset start point of unicode string\n@return string value", "Bean types of a session bean.", "Returns the name of the directory where the dumpfile of the given type\nand date should be stored.\n\n@param dumpContentType\nthe type of the dump\n@param dateStamp\nthe date of the dump in format YYYYMMDD\n@return the local directory name for the dumpfile", "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", "Provides a message which describes the expected format and arguments\nfor this command. This is used to provide user feedback when a command\nrequest is malformed.\n\n@return A message describing the command protocol format.", "Stops this progress bar.", "Use this API to fetch all the linkset resources that are configured on netscaler.", "Use this API to delete nsip6 of given name." ]
@Inline(value = "$1.putAll($2)", statementExpression = true) public static <K, V> void operator_add(Map<K, V> outputMap, Map<? extends K, ? extends V> inputMap) { outputMap.putAll(inputMap); }
[ "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" ]
[ "Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Random matrix", "Sets the character translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator\n@return this to allow chaining", "Use this API to fetch aaauser_binding resource of given name .", "Gets or creates id of the entity type.\n\n@param entityType entity type name.\n@param allowCreate if set to true and if there is no entity type like entityType,\ncreate the new id for the entityType.\n@return entity type id.", "Extract resource provider from a resource ID string.\n@param id the resource ID string\n@return the resource group name", "Returns the ReportModel with given name.", "Helper. Current transaction is committed in some cases.", "This method maps the task unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param taskFixedMeta Fixed meta data for this task\n@param taskFixedData Fixed data for this task\n@param taskVarData Variable task data\n@return Mapping between task identifiers and block position", "get the bean property type\n\n@param clazz\n@param propertyName\n@param originalType\n@return" ]
public Release rollback(String appName, String releaseUuid) { return connection.execute(new Rollback(appName, releaseUuid), apiKey); }
[ "Rollback an app to a specific release.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param releaseUuid Release UUID. See {@link #listReleases} for a list of the app's releases.\n@return the release object" ]
[ "Curries a procedure that takes three arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes two arguments. Never <code>null</code>.", "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", "Obtain the realm used for authentication.\n\nThis realm name applies to both the user and the groups.\n\n@return The name of the realm used for authentication.", "Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClasses\n@return self", "Scans given directory for files passing given filter, adds the results into given list.", "Clears out the statement handles.\n@param internalClose if true, close the inner statement handle too.", "Return the TransactionManager of the external app", "Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler.", "Bessel function of the second kind, of order 0.\n\n@param x Value.\n@return Y0 value." ]
private void processFieldNameAliases(Map<Integer, FieldType> map, byte[] data) { if (data != null) { int offset = 0; int index = 0; CustomFieldContainer fields = m_file.getCustomFields(); while (offset < data.length) { String alias = MPPUtility.getUnicodeString(data, offset); if (!alias.isEmpty()) { FieldType field = map.get(Integer.valueOf(index)); if (field != null) { fields.getCustomField(field).setAlias(alias); } } offset += (alias.length() + 1) * 2; index++; } } }
[ "Retrieve any resource field aliases defined in the MPP file.\n\n@param map index to field map\n@param data resource field name alias data" ]
[ "Obtain parameters from query\n\n@param query query to scan\n@return Map of parameters", "Get the Avro Schema of the input path, assuming the path contains just one\nschema version in all files under that path.", "Use this API to fetch appflowpolicy_appflowpolicylabel_binding resources of given name .", "Throws an IllegalStateException when the given value is not true.", "Check that an array only contains null elements.\n@param values, can't be null\n@return", "mark a node as blacklisted\n\n@param nodeId Integer node id of the node to be blacklisted", "Adds the given value to the list of values that should still be\nserialized. The given RDF resource will be used as a subject.\n\n@param value\nthe value to be serialized\n@param resource\nthe RDF resource that is used as a subject for serialization", "Perform a module dependency graph of the target and return the graph as a JSON\n\n@param moduleName\n@param moduleVersion\n@param uriInfo\n@return Response", "Add a point to this curveFromInterpolationPoints. The method will throw an exception if the point\nis already part of the curveFromInterpolationPoints.\n\n@param time The x<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param value The y<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param isParameter If true, then this point is served via {@link #getParameter()} and changed via {@link #getCloneForParameter(RandomVariable[])}, i.e., it can be calibrated." ]
public Path getReportDirectory() { WindupConfigurationModel cfg = WindupConfigurationService.getConfigurationModel(getGraphContext()); Path path = cfg.getOutputPath().asFile().toPath().resolve(REPORTS_DIR); createDirectoryIfNeeded(path); return path.toAbsolutePath(); }
[ "Returns the output directory for reporting." ]
[ "Record the connection establishment time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param connEstTimeUs The number of us to wait before establishing a\nconnection", "Returns the adapter position of the Child associated with this ChildViewHolder\n\n@return The adapter position of the Child if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.", "Parse a list of String into a list of Integer.\nIf one element can not be parsed, the behavior depends on the value of failOnException.\n@param strList can't be null\n@param failOnException if an element can not be parsed should we return null or add a null element to the list.\n@return list of all String parsed as Integer or null if failOnException", "Returns the first product found in the vector of calibration products\nwhich matches the given symbol, where symbol is the String set in\nthe calibrationSpecs.\n\n@param symbol A given symbol string.\n@return The product associated with that symbol.", "Get an InputStream for the original image. Callers must close the stream upon completion.\n\n@deprecated\n@see PhotosInterface#getImageAsStream(Photo, int)\n@return The InputStream\n@throws IOException", "Retrieves the amount of work on a given day, and\nreturns it in the specified format.\n\n@param date target date\n@param format required format\n@return work duration", "Gets the Searcher for a given variant.\n\n@param variant an identifier to differentiate this Searcher from eventual others.\n@return the corresponding Searcher instance.\n@throws IllegalStateException if no searcher was {@link #create(Searchable) created} before for this {@code variant}.", "Removes the row with the specified key from this association.\n\n@param key the key of the association row to remove", "Init the bundle type member variable.\n@return the bundle type of the opened resource." ]
protected void createParentXmlElements(CmsXmlContent xmlContent, String xmlPath, Locale l) { if (CmsXmlUtils.isDeepXpath(xmlPath)) { String parentPath = CmsXmlUtils.removeLastXpathElement(xmlPath); if (null == xmlContent.getValue(parentPath, l)) { createParentXmlElements(xmlContent, parentPath, l); xmlContent.addValue(m_cms, parentPath, l, CmsXmlUtils.getXpathIndexInt(parentPath) - 1); } } }
[ "Creates the parents of nested XML elements if necessary.\n@param xmlContent the XML content that is edited.\n@param xmlPath the path of the (nested) element, for which the parents should be created\n@param l the locale for which the XML content is edited." ]
[ "Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week", "Use this API to restore appfwprofile resources.", "Assembles an avro format string of single store config from store\nproperties\n\n@param props Store properties\n@return String in avro format that contains single store configs", "This is the main entry point used to convert the internal representation\nof timephased cost into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range", "This method is used by JNI, do not call or modify.\n\n@param type the type\n@param number the number", "Checks given permissions are needed to show rationale.\n\n@return returns true if one of the permission is needed to show rationale.", "Sets the bean store\n\n@param beanStore The bean store", "Return all URI schemes that are supported in the system.", "Process stop.\n\n@param endpoint the endpoint\n@param eventType the event type" ]
public String getTextForExpression(DJGroup group, DJGroup childGroup, String type) { return "new Double( $V{" + getReportName() + "_" + getGroupVariableName(childGroup) + "}.doubleValue() / $V{" + getReportName() + "_" + getGroupVariableName(type,group.getColumnToGroupBy().getColumnProperty().getProperty()) + "}.doubleValue())"; }
[ "Returns the formula for the percentage\n@param group\n@param type\n@return" ]
[ "Dumps the partition IDs per node in terms of zone n-ary type.\n\n@param cluster\n@param storeRoutingPlan\n@return pretty printed string of detailed zone n-ary type.", "Add calendars to the tree.\n\n@param parentNode parent tree node\n@param file calendar container", "Set OAuth 1 authentication credentials for the replication target\n\n@param consumerSecret client secret\n@param consumerKey client identifier\n@param tokenSecret OAuth server token secret\n@param token OAuth server issued token\n@return this Replication instance to set more options or trigger the replication", "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", "Pause between cluster change in metadata and starting server rebalancing\nwork.", "Delete the given file in a separate thread\n\n@param file The file to delete", "EAP 7.1", "Parse a duration value.\n\n@param value duration value\n@return Duration instance", "Obtain the profile name associated with a profile ID\n\n@param id ID of profile\n@return Name of corresponding profile" ]
private Map<String, String> generateCommonConfigPart() { Map<String, String> result = new HashMap<>(); if (m_category != null) { result.put(CONFIGURATION_CATEGORY, m_category); } // append 'only leafs' to configuration if (m_onlyLeafs) { result.put(CONFIGURATION_ONLYLEAFS, null); } // append 'property' to configuration if (m_property != null) { result.put(CONFIGURATION_PROPERTY, m_property); } // append 'selectionType' to configuration if (m_selectiontype != null) { result.put(CONFIGURATION_SELECTIONTYPE, m_selectiontype); } return result; }
[ "Helper to generate the common configuration part for client-side and server-side widget.\n@return the common configuration options as map" ]
[ "Get the list of active tasks from the server.\n\n@return List of tasks\n@see <a href=\"https://console.bluemix.net/docs/services/Cloudant/api/active_tasks.html\">\nActive tasks</a>", "Iterates over the contents of an object or collection, and checks whether a\npredicate is valid for at least one element.\n\n@param self the object over which we iterate\n@param closure the closure predicate used for matching\n@return true if any iteration for the object matches the closure predicate\n@since 1.0", "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.", "Gets the time warp.\n\n@return the time warp", "Creates a timestamp from the equivalent long value. This conversion\ntakes account of the time zone and any daylight savings time.\n\n@param timestamp timestamp expressed as a long integer\n@return new Date instance", "Use this API to clear Interface.", "Return the number of entries in the cue list that represent hot cues.\n\n@return the number of cue list entries that are hot cues", "Read the version number.\n\n@param is input stream", "Decodes stream data based on content encoding\n@param contentEncoding\n@param bytes\n@return String representing the stream data" ]
public static base_response update(nitro_service client, nsacl6 resource) throws Exception { nsacl6 updateresource = new nsacl6(); updateresource.acl6name = resource.acl6name; updateresource.aclaction = resource.aclaction; updateresource.srcipv6 = resource.srcipv6; updateresource.srcipop = resource.srcipop; updateresource.srcipv6val = resource.srcipv6val; updateresource.srcport = resource.srcport; updateresource.srcportop = resource.srcportop; updateresource.srcportval = resource.srcportval; updateresource.destipv6 = resource.destipv6; updateresource.destipop = resource.destipop; updateresource.destipv6val = resource.destipv6val; updateresource.destport = resource.destport; updateresource.destportop = resource.destportop; updateresource.destportval = resource.destportval; updateresource.srcmac = resource.srcmac; updateresource.protocol = resource.protocol; updateresource.protocolnumber = resource.protocolnumber; updateresource.icmptype = resource.icmptype; updateresource.icmpcode = resource.icmpcode; updateresource.vlan = resource.vlan; updateresource.Interface = resource.Interface; updateresource.priority = resource.priority; updateresource.established = resource.established; return updateresource.update_resource(client); }
[ "Use this API to update nsacl6." ]
[ "Merges information from the resource root into this resource root\n\n@param additionalResourceRoot The root to merge", "Populates a relation list.\n\n@param task parent task\n@param field target task field\n@param data MPX relation list data", "Performs a get operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key (and\n/ or default value) and timeout.\n@return The Versioned value corresponding to the key", "Creates a new Product in Grapes database\n\n@param dbProduct DbProduct", "Configures a RequestBuilder to send an RPC request when the RequestBuilder\nis intended to be returned through the asynchronous proxy interface.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a RequestBuilder object that is ready to have its\n{@link RequestBuilder#send()} method invoked.", "Checks a returned Javascript value where we expect a boolean but could\nget null.\n\n@param val The value from Javascript to be checked.\n@param def The default return value, which can be null.\n@return The actual value, or if null, returns false.", "Run the configured crawl. This method blocks until the crawl is done.\n\n@return the CrawlSession once the crawl is done.", "Write an error response.\n\n@param channel the channel\n@param header the request\n@param error the error\n@throws IOException", "Use this API to fetch dnssuffix resources of given names ." ]
public static Method getGetterPropertyMethod(Class<?> type, String propertyName) { String sourceMethodName = "get" + BeanUtils.capitalizePropertyName(propertyName); Method sourceMethod = BeanUtils.getMethod(type, sourceMethodName); if (sourceMethod == null) { sourceMethodName = "is" + BeanUtils.capitalizePropertyName(propertyName); sourceMethod = BeanUtils.getMethod(type, sourceMethodName); if (sourceMethod != null && sourceMethod.getReturnType() != Boolean.TYPE) { sourceMethod = null; } } return sourceMethod; }
[ "get the getter method corresponding to given property" ]
[ "Check the variable name and if not set, set it with the singleton variable name being on the top of the stack.", "To be used with AutoText class constants ALIGMENT_LEFT, ALIGMENT_CENTER and ALIGMENT_RIGHT\n@param aligment\n@return", "Entry point with no system exit", "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.", "Use this API to add nsacl6.", "This method writes extended attribute data for an assignment.\n\n@param xml MSPDI assignment\n@param mpx MPXJ assignment", "Make superclasses method protected??", "Returns a single item from the Iterator.\nIf there's none, returns null.\nIf there are more, throws an IllegalStateException.\n\n@throws IllegalStateException", "Returns the entry associated with the given key.\n\n@param key the key of the entry to look up\n@return the entry associated with that key, or null\nif the key is not in this map" ]
public void declareShovel(String vhost, ShovelInfo info) { Map<String, Object> props = info.getDetails().getPublishProperties(); if(props != null && props.isEmpty()) { throw new IllegalArgumentException("Shovel publish properties must be a non-empty map or null"); } final URI uri = uriWithPath("./parameters/shovel/" + encodePathSegment(vhost) + "/" + encodePathSegment(info.getName())); this.rt.put(uri, info); }
[ "Declares a shovel.\n\n@param vhost virtual host where to declare the shovel\n@param info Shovel info." ]
[ "Sets the action label to be displayed, if any. Note that if this is not set, the action\nbutton will not be displayed\n\n@param actionButtonLabel\n@return", "Use this API to update transformpolicy.", "Sets the specified date 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", "Use this API to unset the properties of snmpoption resource.\nProperties that need to be unset are specified in args array.", "Get the original image URL.\n\n@return The original image URL", "Update the current position with specified length.\nThe input will append to the current position of the iterator.\n\n@param length update length", "Sets the path of the edited file in the corresponding display.\n@param editedFilePath path of the edited file to set.", "Specialized version of readValue just for reading map keys, because the StdDeserializer methods like\n_parseIntPrimitive blow up when the current JsonToken is FIELD_NAME", "Create an instance from the given config.\n\n@param param Grid param from the request." ]
public static Map<String, StoreDefinition> getSystemStoreDefMap() { Map<String, StoreDefinition> sysStoreDefMap = Maps.newHashMap(); List<StoreDefinition> storesDefs = SystemStoreConstants.getAllSystemStoreDefs(); for(StoreDefinition def: storesDefs) { sysStoreDefMap.put(def.getName(), def); } return sysStoreDefMap; }
[ "Utility function that fetches system store definitions\n\n@return The map container that maps store names to store definitions" ]
[ "Create a new instance for the specified host and encryption key.\n\n@see #create(String)", "Calculate start dates for a monthly relative recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Resets all member fields that hold information about the revision that is\ncurrently being processed.", "orientation state factory method", "Processes an object cache tag.\n\n@param template The template\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 object-cache as name-value pairs 'name=value',\[email protected] name=\"class\" optional=\"false\" description=\"The object cache implementation\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the object cache\"", "Adds another scene object to pick against.\nEach frame all the colliders in the scene will be compared\nagainst the bounding volumes of all the collidables associated\nwith this picker.\n@param sceneObj new collidable\n@return index of collidable added, this is the CursorID in the GVRPickedObject", "Exception handler if we are unable to parse a json value into a java representation\n\n@param expectedType Name of the expected Type\n@param type Type of the json node\n@return SpinJsonDataFormatException", "gets the profile_name associated with a specific id", "Emit a string event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)" ]
protected Violation createViolationForImport(SourceCode sourceCode, ImportNode importNode, String message) { Map importInfo = ImportUtil.sourceLineAndNumberForImport(sourceCode, importNode); Violation violation = new Violation(); violation.setRule(this); violation.setSourceLine((String) importInfo.get("sourceLine")); violation.setLineNumber((Integer) importInfo.get("lineNumber")); violation.setMessage(message); return violation; }
[ "Create and return a new Violation for this rule and the specified import\n@param sourceCode - the SourceCode\n@param importNode - the ImportNode for the import triggering the violation\n@return a new Violation object" ]
[ "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", "Calculate start dates for a yearly relative recurrence.\n\n@param calendar current date\n@param dates array of start dates", "Get a list of people in a given photo.\n\n@param photoId\n@throws FlickrException", "Returns an text table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.", "Checks for duplicate elements. A is sorted\n@param A Matrix to be tested.\n@return true if duplicates or false if false duplicates", "Returns the average event value in the current interval", "Create a list out of the items in the Iterable.\n\n@param <T>\nThe type of items in the Iterable.\n@param items\nThe items to be made into a list.\n@return A list consisting of the items of the Iterable, in the same order.", "Processes an anonymous field definition specified at the class level.\n\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"true,false\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the field\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"", "Internal utility to help JNI add hit objects to the pick list. Specifically for MeshColliders with picking\nfor UV, Barycentric, and normal coordinates enabled" ]
private ChildTaskContainer getParentTask(Activity activity) { // // Make a map of activity codes and their values for this activity // Map<UUID, UUID> map = getActivityCodes(activity); // // Work through the activity codes in sequence // ChildTaskContainer parent = m_projectFile; StringBuilder uniqueIdentifier = new StringBuilder(); for (UUID activityCode : m_codeSequence) { UUID activityCodeValue = map.get(activityCode); String activityCodeText = m_activityCodeValues.get(activityCodeValue); if (activityCodeText != null) { if (uniqueIdentifier.length() != 0) { uniqueIdentifier.append('>'); } uniqueIdentifier.append(activityCodeValue.toString()); UUID uuid = UUID.nameUUIDFromBytes(uniqueIdentifier.toString().getBytes()); Task newParent = findChildTaskByUUID(parent, uuid); if (newParent == null) { newParent = parent.addTask(); newParent.setGUID(uuid); newParent.setName(activityCodeText); } parent = newParent; } } return parent; }
[ "Retrieves the parent task for a Phoenix activity.\n\n@param activity Phoenix activity\n@return parent task" ]
[ "Returns true if this Bytes object equals another. This method doesn't check it's arguments.\n\n@since 1.2.0", "Calculate the value of a swaption assuming the Black'76 model.\n\n@param forwardSwaprate The forward (spot)\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity.\n@param optionStrike The option strike.\n@param swapAnnuity The swap annuity corresponding to the underlying swap.\n@return Returns the value of a Swaption under the Black'76 model", "Description accessor provided for JSON serialization only.", "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", "Print classes that were parts of relationships, but not parsed by javadoc", "Set child components.\n\n@param children\nchildren", "Sets the columns width by reading some report options like the\nprintableArea and useFullPageWidth.\ncolumns with fixedWidth property set in TRUE will not be modified", "Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values.", "Used to ensure that the general footer label will be at the same Y position as the variables in the band.\n@param band\n@return" ]
public static void load(File file) { try(FileInputStream inputStream = new FileInputStream(file)) { LineIterator it = IOUtils.lineIterator(inputStream, "UTF-8"); while (it.hasNext()) { String line = it.next(); if (!line.startsWith("#") && !line.trim().isEmpty()) { add(line); } } } catch (Exception e) { throw new WindupException("Failed loading archive ignore patterns from [" + file.toString() + "]", e); } }
[ "Load the given configuration file." ]
[ "Search for rectangles which have the same width and x position, and\nwhich join together vertically and merge them together to reduce the\nnumber of rectangles needed to describe a symbol.", "Return the inverse cumulative distribution function at x.\n\n@param x Argument\n@return Inverse cumulative distribution function at x.", "Adds the specified type to this frame, and returns a new object that implements this type.", "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", "Retrieves basic meta data from the result set.\n\n@throws SQLException", "Create a function that will create the style on demand. This is called later in a separate thread so\nany blocking calls will not block the parsing of the layer attributes.\n\n@param template the template for this map\n@param styleString a string that identifies a style.", "Maps a field index to an AssignmentField instance.\n\n@param fields array of fields used as the basis for the mapping.\n@param index required field index\n@return AssignmnetField instance", "Parse the URI and get all the parameters in map form. Query name -&gt; List of Query values.\n\n@param rawQuery query portion of the uri to analyze.", "get an AdminClient from the cache if exists, if not create new one\nand return it. This method is non-blocking.\n\nAll AdminClient returned from checkout, once after the completion of\nusage must be returned to the pool by calling checkin. If not,\nthere will be leak of AdminClients (connections, threads and file handles).\n\n@return AdminClient" ]
private void populateUserDefinedFieldValues(String tableName, FieldTypeClass type, FieldContainer container, Integer uniqueID) { Map<Integer, List<Row>> tableData = m_udfValues.get(tableName); if (tableData != null) { List<Row> udf = tableData.get(uniqueID); if (udf != null) { for (Row r : udf) { addUDFValue(type, container, r); } } } }
[ "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" ]
[ "defines the KEY in the parent report parameters map where to get the subreport parameters map.\n@param path where to get the parameter map for the subrerpot.\n@return", "Emit a string event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)", "Quits server by closing server socket and closing client socket handlers.", "Print an earned value method.\n\n@param value EarnedValueMethod instance\n@return earned value method value", "Copy bytes from an input stream to a file and log progress\n@param is the input stream to read\n@param destFile the file to write to\n@throws IOException if an I/O error occurs", "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}", "compute Sin using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "URL-Decodes a given string using UTF-8. No UnsupportedEncodingException to handle as it is dealt with in this\nmethod.", "Initializes the default scope type" ]
private void addClasses(XMLStreamWriter writer, File jarFile, boolean mapClassMethods) throws IOException, ClassNotFoundException, XMLStreamException, IntrospectionException { ClassLoader currentThreadClassLoader = Thread.currentThread().getContextClassLoader(); URLClassLoader loader = new URLClassLoader(new URL[] { jarFile.toURI().toURL() }, currentThreadClassLoader); JarFile jar = new JarFile(jarFile); Enumeration<JarEntry> enumeration = jar.entries(); while (enumeration.hasMoreElements()) { JarEntry jarEntry = enumeration.nextElement(); if (!jarEntry.isDirectory() && jarEntry.getName().endsWith(".class")) { addClass(loader, jarEntry, writer, mapClassMethods); } } jar.close(); }
[ "Add classes to the map file.\n\n@param writer XML stream writer\n@param jarFile jar file\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws IOException\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException" ]
[ "Extract name of the resource from a resource ID.\n@param id the resource ID\n@return the name of the resource", "Get all field attributes in an unmodifiable Map, or null if no attributes have been added\n\n@return all field attributes, or <code>NULL</code> if none exist", "Obtains a local date in Symmetry454 calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Symmetry454 era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Symmetry454 local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code IsoEra}", "Returns a BoxStoragePolicyAssignment information.\n@param api the API connection to be used by the resource.\n@param resolvedForType the assigned entity type for the storage policy.\n@param resolvedForID the assigned entity id for the storage policy.\n@return information about this {@link BoxStoragePolicyAssignment}.", "Given a string with the scenario or story name, creates a Class Name with\nno spaces and first letter capital\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name", "Handle a start time change.\n\n@param event the change event", "gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeClassCacheEntry(String)\n@see #setClassCacheEntry(Class)\n@see #clearCache()", "Parses an RgbaColor from a hexadecimal value.\n\n@return returns the parsed color", "Ensure that the nodeList is either null or empty.\n\n@param nodeList the nodeList to ensure to be either null or empty\n@param expression the expression was used to fine the nodeList\n@throws SpinXPathException if the nodeList is either null or empty" ]
public void update(int width, int height, int sampleCount) { if (capturing) { throw new IllegalStateException("Cannot update backing texture while capturing"); } this.width = width; this.height = height; if (sampleCount == 0) captureTexture = new GVRRenderTexture(getGVRContext(), width, height); else captureTexture = new GVRRenderTexture(getGVRContext(), width, height, sampleCount); setRenderTexture(captureTexture); readBackBuffer = new int[width * height]; }
[ "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." ]
[ "Parse rate.\n\n@param value rate value\n@return Rate instance", "Returns true if the predicate is true for all pixels in the image.\n\n@param predicate a predicate function that accepts 3 parameters - the x,y coordinate and the pixel at that coordinate\n@return true if f holds for at least one pixel", "Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach.", "Throw fault.\n\n@param code the fault code\n@param message the message\n@param t the throwable type\n@throws PutEventsFault", "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", "Dump data for all non-summary tasks to stdout.\n\n@param name file name", "Use this API to unset the properties of callhome resource.\nProperties that need to be unset are specified in args array.", "Get a string property, or, if no such property is defined, return\nthe given default value\n\n@param props the properties\n@param name the key in the properties\n@param defaultValue the default value if the key not exists\n@return value in the props or defaultValue while name not exist", "Set default values for annotations.\nInitial annotation take precedence over the default annotation when both annotation types are present\n\n@param defaultAnnotations default value for annotations" ]
@PrefMetadata(type = CmsHiddenBuiltinPreference.class) public String getExplorerFileEntryOptions() { if (m_settings.getExplorerFileEntryOptions() == null) { return ""; } else { return "" + m_settings.getExplorerFileEntryOptions(); } }
[ "Gets the explorer file entry options.\n\n@return the explorer file entry options" ]
[ "Execute blocking for a prepared result.\n\n@param operation the operation to execute\n@param client the protocol client\n@return the prepared operation\n@throws IOException\n@throws InterruptedException", "Count the number of non-zero elements in V", "Use this API to fetch vrid_nsip6_binding resources of given name .", "Get all Groups\n\n@return\n@throws Exception", "Cleans up a extension module's subsystems from the resource registration model.\n\n@param rootResource the model root resource\n@param moduleName the name of the extension's module. Cannot be {@code null}\n@throws IllegalStateException if the extension still has subsystems present in {@code rootResource} or its children", "Add the declarationSRef to the DeclarationsManager.\nCalculate the matching of the Declaration with the DeclarationFilter of the\nLinker.\n\n@param declarationSRef the ServiceReference<D> of the Declaration", "Walks from the most outer embeddable to the most inner one\nlook for all columns contained in these embeddables\nand exclude the embeddables that have a non null column\nbecause of caching, the algorithm is only run once per column parameter", "Print an earned value method.\n\n@param value EarnedValueMethod instance\n@return earned value method value", "Reads GIF image from stream.\n\n@param is containing GIF file.\n@return read status code (0 = no errors)." ]
public static Dimension dimensionsToFit(Dimension target, Dimension source) { // if target width/height is zero then we have no preference for that, so set it to the original value, // since it cannot be any larger int maxWidth; if (target.getX() == 0) { maxWidth = source.getX(); } else { maxWidth = target.getX(); } int maxHeight; if (target.getY() == 0) { maxHeight = source.getY(); } else { maxHeight = target.getY(); } double wscale = maxWidth / (double) source.getX(); double hscale = maxHeight / (double) source.getY(); if (wscale < hscale) return new Dimension((int) (source.getX() * wscale), (int) (source.getY() * wscale)); else return new Dimension((int) (source.getX() * hscale), (int) (source.getY() * hscale)); }
[ "Returns width and height that allow the given source width, height to fit inside the target width, height\nwithout losing aspect ratio" ]
[ "Reads the next \"word from the request, comprising all characters up to the next SPACE.\nCharacters are tested by the supplied CharacterValidator, and an exception is thrown\nif invalid characters are encountered.", "Creates an element that represents a single positioned box containing the specified text string.\n@param data the text string to be contained in the created box.\n@return the resulting DOM element", "Extract a slice [from, to) of this buffer. This methods creates a copy of the specified region.\n@param from\n@param to\n@return", "Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction\nagain.\n\n@since 2.4\n@noreference", "Removes the given value to the set.\n\n@return true if the value was actually removed", "Adds the value to the Collection mapped to by the key.", "Use this API to fetch a rewriteglobal_binding resource .", "Invokes a JavaScript function that takes no arguments.\n\n@param <T>\n@param function The function to invoke\n@param returnType The type of object to return\n@return The result of the function.", "This method displays the resource assignments for each task. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a task-by-task basis.\n\n@param file MPX file" ]
public ItemRequest<Task> update(String task) { String path = String.format("/tasks/%s", task); return new ItemRequest<Task>(this, Task.class, path, "PUT"); }
[ "A specific, existing task can be updated by making a PUT request on the\nURL for that task. Only the fields provided in the `data` block will be\nupdated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated task record.\n\n@param task The task to update.\n@return Request object" ]
[ "Sets the replace var map to single target from map.\n\n@param replacementVarMapNodeSpecific\nthe replacement var map node specific\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder", "Obtain the profile identifier.\n\n@param profileIdentifier Can be profile ID, or friendly name\n@return\n@throws Exception", "Convenience method for retrieving an Integer resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value", "Get an extent aware Iterator based on the ReportQuery\n\n@param query\n@param cld\n@return OJBIterator", "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", "Specialized version of readValue just for reading map keys, because the StdDeserializer methods like\n_parseIntPrimitive blow up when the current JsonToken is FIELD_NAME", "Calculate Median value.\n@param values Values.\n@return Median.", "Store the versioned values\n\n@param values list of versioned bytes\n@return the list of versioned values rolled into an array of bytes", "Shows a dialog with user information for given session.\n\n@param session to show information for" ]
public static void addService(final ServiceTarget serviceTarget, final Bootstrap.Configuration configuration, final ControlledProcessState processState, final BootstrapListener bootstrapListener, final RunningModeControl runningModeControl, final AbstractVaultReader vaultReader, final ManagedAuditLogger auditLogger, final DelegatingConfigurableAuthorizer authorizer, final ManagementSecurityIdentitySupplier securityIdentitySupplier, final SuspendController suspendController) { // Install Executor services final ThreadGroup threadGroup = new ThreadGroup("ServerService ThreadGroup"); final String namePattern = "ServerService Thread Pool -- %t"; final ThreadFactory threadFactory = doPrivileged(new PrivilegedAction<ThreadFactory>() { public ThreadFactory run() { return new JBossThreadFactory(threadGroup, Boolean.FALSE, null, namePattern, null, null); } }); // TODO determine why QueuelessThreadPoolService makes boot take > 35 secs // final QueuelessThreadPoolService serverExecutorService = new QueuelessThreadPoolService(Integer.MAX_VALUE, false, new TimeSpec(TimeUnit.SECONDS, 5)); // serverExecutorService.getThreadFactoryInjector().inject(threadFactory); final boolean forDomain = ProcessType.DOMAIN_SERVER == getProcessType(configuration.getServerEnvironment()); final ServerExecutorService serverExecutorService = new ServerExecutorService(threadFactory, forDomain); serviceTarget.addService(MANAGEMENT_EXECUTOR, serverExecutorService) .addAliases(Services.JBOSS_SERVER_EXECUTOR, ManagementRemotingServices.SHUTDOWN_EXECUTOR_NAME) // Use this executor for mgmt shutdown for now .install(); final ServerScheduledExecutorService serverScheduledExecutorService = new ServerScheduledExecutorService(threadFactory); serviceTarget.addService(JBOSS_SERVER_SCHEDULED_EXECUTOR, serverScheduledExecutorService) .addAliases(JBOSS_SERVER_SCHEDULED_EXECUTOR) .addDependency(MANAGEMENT_EXECUTOR, ExecutorService.class, serverScheduledExecutorService.executorInjector) .install(); final CapabilityRegistry capabilityRegistry = configuration.getCapabilityRegistry(); ServerService service = new ServerService(configuration, processState, null, bootstrapListener, new ServerDelegatingResourceDefinition(), runningModeControl, vaultReader, auditLogger, authorizer, securityIdentitySupplier, capabilityRegistry, suspendController); ExternalManagementRequestExecutor.install(serviceTarget, threadGroup, EXECUTOR_CAPABILITY.getCapabilityServiceName(), service.getStabilityMonitor()); ServiceBuilder<?> serviceBuilder = serviceTarget.addService(Services.JBOSS_SERVER_CONTROLLER, service); serviceBuilder.addDependency(DeploymentMountProvider.SERVICE_NAME,DeploymentMountProvider.class, service.injectedDeploymentRepository); serviceBuilder.addDependency(ContentRepository.SERVICE_NAME, ContentRepository.class, service.injectedContentRepository); serviceBuilder.addDependency(Services.JBOSS_SERVICE_MODULE_LOADER, ServiceModuleLoader.class, service.injectedModuleLoader); serviceBuilder.addDependency(Services.JBOSS_EXTERNAL_MODULE_SERVICE, ExternalModuleService.class, service.injectedExternalModuleService); serviceBuilder.addDependency(PATH_MANAGER_CAPABILITY.getCapabilityServiceName(), PathManager.class, service.injectedPathManagerService); if (configuration.getServerEnvironment().isAllowModelControllerExecutor()) { serviceBuilder.addDependency(MANAGEMENT_EXECUTOR, ExecutorService.class, service.getExecutorServiceInjector()); } if (configuration.getServerEnvironment().getLaunchType() == ServerEnvironment.LaunchType.DOMAIN) { serviceBuilder.addDependency(HostControllerConnectionService.SERVICE_NAME, ControllerInstabilityListener.class, service.getContainerInstabilityInjector()); } serviceBuilder.install(); }
[ "Add this service to the given service target.\n@param serviceTarget the service target\n@param configuration the bootstrap configuration" ]
[ "Copy one Gradient into another.\n@param g the Gradient to copy into", "Use this API to add nsip6 resources.", "Creates a curator built using Application's zookeeper connection string. Root path will start\nat Fluo application chroot.", "Read a task relationship.\n\n@param link ConceptDraw PROJECT task link", "Sets any application-specific custom fields. The values\nare presented to the application and the iPhone doesn't\ndisplay them automatically.\n\nThis can be used to pass specific values (urls, ids, etc) to\nthe application in addition to the notification message\nitself.\n\n@param key the custom field name\n@param value the custom field value\n@return this", "Call with pathEntries lock taken", "Parses and adds dictionaries to the Solr index.\n\n@param cms the OpenCms object.\n\n@throws CmsRoleViolationException in case the user does not have the required role ROOT_ADMIN", "Apply aliases to task and resource fields.\n\n@param aliases map of aliases", "Validates that this string is a valid host name or IP address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws HostNameException" ]
public void setGroupsForPath(Integer[] groups, int pathId) { String newGroups = Arrays.toString(groups); newGroups = newGroups.substring(1, newGroups.length() - 1).replaceAll("\\s", ""); logger.info("adding groups={}, to pathId={}", newGroups, pathId); EditService.updatePathTable(Constants.PATH_PROFILE_GROUP_IDS, newGroups, pathId); }
[ "Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path" ]
[ "Creates the container for a bundle without descriptor.\n@return the container for a bundle without descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails.", "Processes the template for all index descriptors 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\"", "Writes all error responses to the client.\n\nTODO REST-Server 1. collect error stats\n\n@param messageEvent - for retrieving the channel details\n@param status - error code\n@param message - error message", "Parses a raw WBS value from the database and breaks it into\ncomponent parts ready for formatting.\n\n@param value raw WBS value", "Sets a custom configuration attribute.\n@param attributeName the attribute name. Names starting with\n{@link #JDBC_PROPERTY_NAME_PREFIX} will be used (without the prefix) by the\nConnectionFactory when creating connections from DriverManager\n(not used for external DataSource connections). Names starting with\n{@link #DBCP_PROPERTY_NAME_PREFIX} to Commons DBCP (if used, also without prefix).\n@param attributeValue the attribute value", "Session connect generate channel.\n\n@param session\nthe session\n@return the channel\n@throws JSchException\nthe j sch exception", "Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment", "Return the item view type used by the adapter to implement recycle mechanism.\n\n@param content to be rendered.\n@return an integer that represents the renderer inside the adapter.", "Construct a new simple attachment key.\n\n@param valueClass the value class\n@param <T> the attachment type\n@return the new instance" ]
protected List<CmsUUID> undelete() throws CmsException { List<CmsUUID> modifiedResources = new ArrayList<CmsUUID>(); CmsObject cms = m_context.getCms(); for (CmsResource resource : m_context.getResources()) { CmsLockActionRecord actionRecord = null; try { actionRecord = CmsLockUtil.ensureLock(m_context.getCms(), resource); cms.undeleteResource(cms.getSitePath(resource), true); modifiedResources.add(resource.getStructureId()); } finally { if ((actionRecord != null) && (actionRecord.getChange() == LockChange.locked)) { try { cms.unlockResource(resource); } catch (CmsLockException e) { LOG.warn(e.getLocalizedMessage(), e); } } } } return modifiedResources; }
[ "Undeletes the selected files\n\n@return the ids of the modified resources\n\n@throws CmsException if something goes wrong" ]
[ "Finds or opens a client to talk to the dbserver on the specified player, incrementing its use count.\n\n@param targetPlayer the player number whose database needs to be interacted with\n@param description a short description of the task being performed for error reporting if it fails,\nshould be a verb phrase like \"requesting track metadata\"\n\n@return the communication client for talking to that player, or {@code null} if the player could not be found\n\n@throws IllegalStateException if we can't find the target player or there is no suitable player number for us\nto pretend to be\n@throws IOException if there is a problem communicating", "Read correlation id from message.\n\n@param message the message\n@return the CorrelationId as string", "Set a bean in the context.\n\n@param name bean name\n@param object bean value", "Helper method to add a Java integer value to a message digest.\n\n@param digest the message digest being built\n@param value the integer whose bytes should be included in the digest", "this class requires that the supplied enum is not fitting a\nCollection case for casting", "Creates a list of all permutations for a set with N elements.\n\n@param N Number of elements in the list being permuted.\n@return A list containing all the permutations.", "Draws the specified image with the first rectangle's bounds, clipping with the second one.\n\n@param img image\n@param rect rectangle\n@param clipRect clipping bounds\n@param opacity opacity of the image (1 = opaque, 0= transparent)", "Compiles and fills the reports design.\n\n@param dr the DynamicReport\n@param layoutManager the object in charge of doing the layout\n@param ds The datasource\n@param _parameters Map with parameters that the report may need\n@return\n@throws JRException", "Publish finish events for each of the specified query labels\n\n<pre>\n{@code\nLabelledEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId Identifier\n@param bus EventBus to post events to\n@param labels Query types to post to event bus" ]
public Where<T, ID> gt(String columnName, Object value) throws SQLException { addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value, SimpleComparison.GREATER_THAN_OPERATION)); return this; }
[ "Add a '&gt;' clause so the column must be greater-than the value." ]
[ "Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler.", "Readable yyyyMMdd representation of a day, which is also sortable.", "Initialize the style generators for the messages table.", "Returns the constructor of the indirection handler class.\n\n@return The constructor for indirection handlers", "Post a license to the server\n\n@param license\n@param user\n@param password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Transits a float propertyId from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self", "Retrieve and validate the key from the REST request.\n\n@return true if present, false if missing", "Returns data tree structured as Transloadit expects it.\n\n@param data\n@return {@link Map}\n@throws LocalOperationException", "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" ]
@Override public void destroy(SocketDestination dest, ClientRequestExecutor clientRequestExecutor) throws Exception { clientRequestExecutor.close(); int numDestroyed = destroyed.incrementAndGet(); if(stats != null) { stats.incrementCount(dest, ClientSocketStats.Tracked.CONNECTION_DESTROYED_EVENT); } if(logger.isDebugEnabled()) logger.debug("Destroyed socket " + numDestroyed + " connection to " + dest.getHost() + ":" + dest.getPort()); }
[ "Close the ClientRequestExecutor." ]
[ "use this method to construct the ChainingIterator\niterator by iterator.", "Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name", "Create and return a new Violation for this rule and the specified import className and alias\n@param sourceCode - the SourceCode\n@param className - the class name (as specified within the import statement)\n@param alias - the alias for the import statement\n@param violationMessage - the violation message; may be null\n@return a new Violation object", "Update the state of the picker. If it has an owner, the picker\nwill use that object to derive its position and orientation.\nThe \"active\" state of this controller is used to indicate touch.\nThe cursor position is updated after picking.", "Add an empty work week.\n\n@return new work week", "Extract schema of the key field", "Retuns the Windows UNC style path with backslashs intead of forward slashes.\n\n@return The UNC path.", "Updates the indices in the index buffer from a Java IntBuffer.\nAll of the entries of the input int buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if int buffer is wrong size", "Given a HTTPResponce, process it, throwing an error if needed and return a Token for the next\nrequest." ]
@Override public void detachScriptFile(IScriptable target) { IScriptFile scriptFile = mScriptMap.remove(target); if (scriptFile != null) { scriptFile.invokeFunction("onDetach", new Object[] { target }); } }
[ "Detach any script file from a scriptable target.\n\n@param target The scriptable target." ]
[ "Sets the width and height of the canvas the text is drawn to.\n\n@param width\nwidth of the new canvas.\n\n@param height\nhegiht of the new canvas.", "Processes one of the menu responses that jointly constitute the track metadata, updating our\nfields accordingly.\n\n@param item the menu response to be considered", "Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed.", "Obtains a local date in Symmetry010 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 Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date", "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", "returns a proxy or a fully materialized Object from the current row of the\nunderlying resultset.", "Handles the response of the SendData request.\n@param incomingMessage the response message to process.", "Size of a queue.\n\n@param jedis\n@param queueName\n@return", "Sets the background color of the scene rendered by this camera.\n\nIf you don't set the background color, the default is an opaque black.\nMeaningful parameter values are from 0 to 1, inclusive: values\n{@literal < 0} are clamped to 0; values {@literal > 1} are clamped to 1." ]
public static int cudnnConvolutionForward( cudnnHandle handle, Pointer alpha, cudnnTensorDescriptor xDesc, Pointer x, cudnnFilterDescriptor wDesc, Pointer w, cudnnConvolutionDescriptor convDesc, int algo, Pointer workSpace, long workSpaceSizeInBytes, Pointer beta, cudnnTensorDescriptor yDesc, Pointer y) { return checkResult(cudnnConvolutionForwardNative(handle, alpha, xDesc, x, wDesc, w, convDesc, algo, workSpace, workSpaceSizeInBytes, beta, yDesc, y)); }
[ "Function to perform the forward pass for batch convolution" ]
[ "delete topic never used\n\n@param topic topic name\n@param password password\n@return number of partitions deleted\n@throws IOException if an I/O error", "If the burst mode is on, emit the particles only once.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps", "Gets the Taneja divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Taneja divergence between p and q.", "Use this API to fetch statistics of gslbdomain_stats resource of given name .", "Calculate where within the beat grid array the information for the specified beat can be found.\nYes, this is a super simple calculation; the main point of the method is to provide a nice exception\nwhen the beat is out of bounds.\n\n@param beatNumber the beat desired\n\n@return the offset of the start of our cache arrays for information about that beat", "This method removes all RTF formatting from a given piece of text.\n\n@param text Text from which the RTF formatting is to be removed.\n@return Plain text", "Provides lookup of elements by non-namespaced name.\n\n@param name the name or shortcut key for nodes of interest\n@return the nodes of interest which match name", "Use this API to fetch all the dospolicy resources that are configured on netscaler.", "Closes off this connection pool." ]
public void initialize() throws SQLException { if (initialized) { // just skip it if already initialized return; } if (connectionSource == null) { throw new IllegalStateException("connectionSource was never set on " + getClass().getSimpleName()); } databaseType = connectionSource.getDatabaseType(); if (databaseType == null) { throw new IllegalStateException( "connectionSource is getting a null DatabaseType in " + getClass().getSimpleName()); } if (tableConfig == null) { tableInfo = new TableInfo<T, ID>(databaseType, dataClass); } else { tableConfig.extractFieldTypes(databaseType); tableInfo = new TableInfo<T, ID>(databaseType, tableConfig); } statementExecutor = new StatementExecutor<T, ID>(databaseType, tableInfo, this); /* * This is a bit complex. Initially, when we were configuring the field types, external DAO information would be * configured for auto-refresh, foreign BaseDaoEnabled classes, and foreign-collections. This would cause the * system to go recursive and for class loops, a stack overflow. * * Then we fixed this by putting a level counter in the FieldType constructor that would stop the configurations * when we reach some recursion level. But this created some bad problems because we were using the DaoManager * to cache the created DAOs that had been constructed already limited by the level. * * What we do now is have a 2 phase initialization. The constructor initializes most of the fields but then we * go back and call FieldType.configDaoInformation() after we are done. So for every DAO that is initialized * here, we have to see if it is the top DAO. If not we save it for dao configuration later. */ List<BaseDaoImpl<?, ?>> daoConfigList = daoConfigLevelLocal.get(); daoConfigList.add(this); if (daoConfigList.size() > 1) { // if we have recursed then just save the dao for later configuration return; } try { /* * WARNING: We do _not_ use an iterator here because we may be adding to the list as we process it and we'll * get exceptions otherwise. This is an ArrayList so the get(i) should be efficient. * * Also, do _not_ get a copy of daoConfigLevel.doArray because that array may be replaced by another, larger * one during the recursion. */ for (int i = 0; i < daoConfigList.size(); i++) { BaseDaoImpl<?, ?> dao = daoConfigList.get(i); /* * Here's another complex bit. The first DAO that is being constructed as part of a DAO chain is not yet * in the DaoManager cache. If we continue onward we might come back around and try to configure this * DAO again. Forcing it into the cache here makes sure it won't be configured twice. This will cause it * to be stuck in twice when it returns out to the DaoManager but that's a small price to pay. This also * applies to self-referencing classes. */ DaoManager.registerDao(connectionSource, dao); try { // config our fields which may go recursive for (FieldType fieldType : dao.getTableInfo().getFieldTypes()) { fieldType.configDaoInformation(connectionSource, dao.getDataClass()); } } catch (SQLException e) { // unregister the DAO we just pre-registered DaoManager.unregisterDao(connectionSource, dao); throw e; } // it's now been fully initialized dao.initialized = true; } } finally { // if we throw we want to clear our class hierarchy here daoConfigList.clear(); daoConfigLevelLocal.remove(); } }
[ "Initialize the various DAO configurations after the various setters have been called." ]
[ "Use this API to disable snmpalarm resources of given names.", "Prepare all tasks.\n\n@param entry the patch entry\n@param context the patch context\n@param tasks a list for prepared tasks\n@param conflicts a list for conflicting content items\n@throws PatchingException", "Add an addon to the app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param addonName Addon name. See {@link #listAllAddons} to get a list of addons that can be used.\n@return The request object", "Whether the given column is part of this key family or not.\n\n@return {@code true} if the given column is part of this key, {@code false} otherwise.", "Updates the database. Never call this during normal operations, upgrade is a user-controlled operation.", "Creates a converter function that converts value into primitive type.\n\n@return A converter function or {@code null} if the given type is not primitive type or boxed type", "Get the auth URL, this is step two of authorization.\n\n@param oAuthRequestToken\nthe token from a {@link AuthInterface#getRequestToken} call.", "Get the error message with the dependencies appended\n\n@param dependencies - the list with dependencies to be attached to the message\n@param message - the custom error message to be displayed to the user\n@return String", "This method writes a resource's availability table.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource" ]
protected TokenList.Token parseBlockNoParentheses(TokenList tokens, Sequence sequence, boolean insideMatrixConstructor) { // search for matrix bracket operations if( !insideMatrixConstructor ) { parseBracketCreateMatrix(tokens, sequence); } // First create sequences from anything involving a colon parseSequencesWithColons(tokens, sequence ); // process operators depending on their priority parseNegOp(tokens, sequence); parseOperationsL(tokens, sequence); parseOperationsLR(new Symbol[]{Symbol.POWER, Symbol.ELEMENT_POWER}, tokens, sequence); parseOperationsLR(new Symbol[]{Symbol.TIMES, Symbol.RDIVIDE, Symbol.LDIVIDE, Symbol.ELEMENT_TIMES, Symbol.ELEMENT_DIVIDE}, tokens, sequence); parseOperationsLR(new Symbol[]{Symbol.PLUS, Symbol.MINUS}, tokens, sequence); // Commas are used in integer sequences. Can be used to force to compiler to treat - as negative not // minus. They can now be removed since they have served their purpose stripCommas(tokens); // now construct rest of the lists and combine them together parseIntegerLists(tokens); parseCombineIntegerLists(tokens); if( !insideMatrixConstructor ) { if (tokens.size() > 1) { System.err.println("Remaining tokens: "+tokens.size); TokenList.Token t = tokens.first; while( t != null ) { System.err.println(" "+t); t = t.next; } throw new RuntimeException("BUG in parser. There should only be a single token left"); } return tokens.first; } else { return null; } }
[ "Parses a code block with no parentheses and no commas. After it is done there should be a single token left,\nwhich is returned." ]
[ "Parses the configuration node and provides a pipeline configuration without any extensions marked for loading.\nThe configuration node is supposed to conform to the pipeline configuration JSON schema.\n\n<p>The caller is supposed to use the methods from the builder to add/find extension classes that will be used in\nthe analysis.\n\n<p>Note that the returned pipeline configuration might not contain all the extensions available in\nthe classloader depending on the include/exclude filters in the configuration.\n\n@param json the configuration node\n@return a pipeline configuration parsed from the configuration\n@see Builder#build()", "Creates a region from a name and a label.\n\n@param name the uniquely identifiable name of the region\n@param label the label of the region\n@return the newly created region", "Generate and return the list of statements to drop a database table.", "Converts from partitionId to nodeId. The list of partition IDs,\npartitionIds, is expected to be a \"replicating partition list\", i.e., the\nmapping from partition ID to node ID should be one to one.\n\n@param partitionIds List of partition IDs for which to find the Node ID\nfor the Node that owns the partition.\n@return List of node ids, one for each partition ID in partitionIds\n@throws VoldemortException If multiple partition IDs in partitionIds map\nto the same Node ID.", "return a prepared DELETE Statement fitting for the given ClassDescriptor", "Suite end.", "Record a prepare operation timeout.\n\n@param failedOperation the prepared operation", "Adds the specified type to this frame, and returns a new object that implements this type.", "Modies the matrix to make sure that at least one element in each column has a value" ]
public void initialize() { this.enqueue(new SerialMessage(SerialMessage.SerialMessageClass.GetVersion, SerialMessage.SerialMessageType.Request, SerialMessage.SerialMessageClass.GetVersion, SerialMessage.SerialMessagePriority.High)); this.enqueue(new SerialMessage(SerialMessage.SerialMessageClass.MemoryGetId, SerialMessage.SerialMessageType.Request, SerialMessage.SerialMessageClass.MemoryGetId, SerialMessage.SerialMessagePriority.High)); this.enqueue(new SerialMessage(SerialMessage.SerialMessageClass.SerialApiGetCapabilities, SerialMessage.SerialMessageType.Request, SerialMessage.SerialMessageClass.SerialApiGetCapabilities, SerialMessage.SerialMessagePriority.High)); }
[ "Initializes communication with the Z-Wave controller stick." ]
[ "Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder", "Start the rendering of the scalebar.", "Process an MPP file to make it anonymous.\n\n@param input input file name\n@param output output file name\n@throws Exception", "Stores the output from a Frontier into the queue, pausing and waiting if the given queue is too large\n\n@param resultsMap map of String and String representing the output of a Frontier's DFS", "Generates the Base64 encoded SHA-1 hash for content available in the stream.\nIt can be used to calculate the hash of a file.\n@param stream the input stream of the file or data.\n@return the Base64 encoded hash string.", "Use this API to add sslocspresponder.", "Use this API to add cachepolicylabel resources.", "Register the given common classes with the ClassUtils cache.", "Writes triples which conect properties with there corresponding rdf\nproperties for statements, simple statements, qualifiers, reference\nattributes and values.\n\n@param document\n@throws RDFHandlerException" ]
protected static void captureSystemStreams(boolean captureOut, boolean captureErr){ if(captureOut){ System.setOut(new RedwoodPrintStream(STDOUT, realSysOut)); } if(captureErr){ System.setErr(new RedwoodPrintStream(STDERR, realSysErr)); } }
[ "Captures System.out and System.err and redirects them\nto Redwood logging.\n@param captureOut True is System.out should be captured\n@param captureErr True if System.err should be captured" ]
[ "Parse work units.\n\n@param value work units value\n@return TimeUnit instance", "Read the calendar data from a Gantt Designer file.\n\n@param gantt Gantt Designer file.", "Makes sure that there is a class definition for the given qualified name, and returns it.\n\n@param original The XDoclet class object\n@return The class definition", "Build query string.\n@return Query string or null if query string contains no parameters at all.", "Find a toBuilder method, if the user has provided one.", "Returns an iterator that will only offer leaf trace regions. If the nested regions have gaps, these will be\nfilled with parent data. If this region is a leaf, a singleton iterator will be returned.\n\n@return an unmodifiable iterator for all leafs. Never <code>null</code>.", "Return true if the Declaration can be linked to the ImporterService.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference<ImporterService> of the ImporterService\n@return true if the Declaration can be linked to the ImporterService", "Constraint that ensures that the field has a length if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)", "Create new logging action\nThis method check if there is an old instance for this thread-local\nIf not - Initialize new instance and set it as this thread-local's instance\n@param logger\n@param auditor\n@param instance\n@return whether new instance was set to thread-local" ]
protected void closeConnection(ConnectionHandle connection) { if (connection != null) { try { connection.internalClose(); } catch (Throwable t) { logger.error("Destroy connection exception", t); } finally { this.pool.postDestroyConnection(connection); } } }
[ "Closes off this connection\n@param connection to close" ]
[ "Serialize the Document object.\n\n@param dom the document to serialize\n@return the serialized dom String", "Returns the parsed story from the given path\n\n@param configuration the Configuration used to run story\n@param storyPath the story path\n@return The parsed Story", "This method is currently in use only by the SvnCoordinator", "Computes the inverse permutation vector\n\n@param original Original permutation vector\n@param inverse It's inverse", "Returns the \"short rate\" from timeIndex to timeIndex+1.\n\n@param timeIndex The time index (corresponding to {@link getTime()).\n@return The \"short rate\" from timeIndex to timeIndex+1.\n@throws CalculationException Thrown if simulation failed.", "Load the given class using the default constructor\n\n@param className The name of the class\n@return The class object", "Returns the value of the identified field as a Float.\n@param fieldName the name of the field\n@return the value of the field as a Float\n@throws FqlException if the field cannot be expressed as an Float", "Paint a check pattern, used for a background to indicate image transparency.\n@param c the component to draw into\n@param g the Graphics objects\n@param x the x position\n@param y the y position\n@param width the width\n@param height the height", "Returns a flag represented as a String, indicating if\nthe supplied day is a working day.\n\n@param mpxjCalendar MPXJ ProjectCalendar instance\n@param day Day instance\n@return boolean flag as a string" ]
public static long directorySize(File self) throws IOException, IllegalArgumentException { final long[] size = {0L}; eachFileRecurse(self, FileType.FILES, new Closure<Void>(null) { public void doCall(Object[] args) { size[0] += ((File) args[0]).length(); } }); return size[0]; }
[ "Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory" ]
[ "This method writes resource data to an MSPDI file.\n\n@param project Root node of the MSPDI file", "returns an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searched objects\n@param query the query", "Calculate start dates for a monthly relative recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Converts the real matrix into a complex matrix.\n\n@param input Real matrix. Not modified.\n@param output Complex matrix. Modified.", "Return true if the expression is a constructor call on a class that matches the supplied.\n@param expression - the expression\n@param classNamePattern - the possible List of class names\n@return as described", "Use this API to update dospolicy resources.", "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", "Get the photo or ticket id from the response.\n\n@param async\n@param response\n@return", "Transforms each character from this reader by passing it to the given\nclosure. The Closure should return each transformed character, which\nwill be passed to the Writer. The reader and writer will be both be\nclosed before this method returns.\n\n@param self a Reader object\n@param writer a Writer to receive the transformed characters\n@param closure a closure that performs the required transformation\n@throws IOException if an IOException occurs.\n@since 1.5.0" ]
public void initialize() { if (dataClass == null) { throw new IllegalStateException("dataClass was never set on " + getClass().getSimpleName()); } if (tableName == null) { tableName = extractTableName(databaseType, dataClass); } }
[ "Initialize the class if this is being called with Spring." ]
[ "Refresh the layout element.", "Creates an IndexableTaskItem from provided FunctionalTaskItem.\n\n@param taskItem functional TaskItem\n@return IndexableTaskItem", "Loads the favorite list.\n\n@return the list of favorites\n\n@throws CmsException if something goes wrong", "Updates the story and returns the full record for the updated story.\nOnly comment stories can have their text updated, and only comment stories and\nattachment stories can be pinned. Only one of `text` and `html_text` can be specified.\n\n@param story Globally unique identifier for the story.\n@return Request object", "Sets the current configuration if it is a valid configuration. Otherwise the configuration is not set.\n@param configuration the configuration to set.\n@return flag, indicating if the configuration is set.", "Remove a custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object", "Extract site path, base name and locale from the resource opened with the editor.", "Very basic implementation of an inner join between two result sets.\n\n@param leftRows left result set\n@param leftColumn left foreign key column\n@param rightTable right table name\n@param rightRows right result set\n@param rightColumn right primary key column\n@return joined result set", "Render the scalebar.\n\n@param mapContext The context of the map for which the scalebar is created.\n@param scalebarParams The scalebar parameters.\n@param tempFolder The directory in which the graphic file is created.\n@param template The template that containts the scalebar processor" ]
public Class<? extends com.vividsolutions.jts.geom.Geometry> toInternal(LayerType layerType) { switch (layerType) { case GEOMETRY: return com.vividsolutions.jts.geom.Geometry.class; case LINESTRING: return LineString.class; case MULTILINESTRING: return MultiLineString.class; case POINT: return Point.class; case MULTIPOINT: return MultiPoint.class; case POLYGON: return Polygon.class; case MULTIPOLYGON: return MultiPolygon.class; case RASTER: return null; default: throw new IllegalStateException("Don't know how to handle layer type " + layerType); } }
[ "Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class" ]
[ "Returns true if the string is a valid Java full qualified class name.\n\n@param str the string to be examined\n@return true if str is a valid Java Fqcn", "Create a rollback patch based on the recorded actions.\n\n@param patchId the new patch id, depending on release or one-off\n@param patchType the current patch identity\n@return the rollback patch", "Use this API to fetch sslcipher resources of given names .", "Classify stdin by documents seperated by 3 blank line\n@param readerWriter\n@return boolean reached end of IO\n@throws IOException", "Creates an immutable copy that we can cache.", "Get a property as a float or throw an exception.\n\n@param key the property name", "Reads an argument of type \"nstring\" from the request.", "This method writes project extended attribute data into an MSPDI file.\n\n@param project Root node of the MSPDI file", "Parse the given file to obtains a Properties object.\n\n@param file\n@return a properties object containing all the properties present in the file.\n@throws InvalidDeclarationFileException" ]
public GVRAnimator start(int animIndex) { if ((animIndex < 0) || (animIndex >= mAnimations.size())) { throw new IndexOutOfBoundsException("Animation index out of bounds"); } GVRAnimator anim = mAnimations.get(animIndex); start(anim); return anim; }
[ "Starts the animation with the given index.\n@param animIndex 0-based index of {@link GVRAnimator} to start;\n@see GVRAvatar#stop()\n@see #start(String)" ]
[ "Get the sub registry for the hosts.\n\n@param range the version range\n@return the sub registry", "Adds a logical operator block.\n\n@param list parent criteria list\n@param block current block\n@param operator logical operator represented by this block", "Use this API to expire cachecontentgroup.", "Delete all backups asynchronously", "Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable", "Attempts to checkout a resource so that one queued request can be\nserviced.\n\n@param key The key for which to process the requestQueue\n@return true iff an item was processed from the Queue.", "Returns true if required properties for MiniFluo are set", "Attempts to detect the provided pattern as an exact match.\n@param pattern the pattern to find in the reader stream\n@return the number of times the pattern is found,\nor an error code\n@throws MalformedPatternException if the pattern is invalid\n@throws Exception if a generic error is encountered", "Set the individual dates where the event should take place.\n@param dates the dates to set." ]
public void switchDataSource(BoneCPConfig newConfig) throws SQLException { logger.info("Switch to new datasource requested. New Config: "+newConfig); DataSource oldDS = getTargetDataSource(); if (!(oldDS instanceof BoneCPDataSource)){ throw new SQLException("Unknown datasource type! Was expecting BoneCPDataSource but received "+oldDS.getClass()+". Not switching datasource!"); } BoneCPDataSource newDS = new BoneCPDataSource(newConfig); newDS.getConnection().close(); // initialize a connection (+ throw it away) to force the datasource to initialize the pool // force application to start using the new one setTargetDataSource(newDS); logger.info("Shutting down old datasource slowly. Old Config: "+oldDS); // tell the old datasource to terminate. This terminates the pool lazily so existing checked out connections can still be used. ((BoneCPDataSource)oldDS).close(); }
[ "Switch to a new DataSource using the given configuration.\n@param newConfig BoneCP DataSource to use.\n@throws SQLException" ]
[ "Get info about the shard a document belongs to.\n\n@param docId document ID\n@return Shard info\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-database-_shards-\"\ntarget=\"_blank\">_shards</a>", "Retrieve the document with the specified ID from the database and deserialize to an\ninstance of the POJO of type T.\n\n@param <T> object type\n@param classType the class of type T\n@param id the document id\n@return an object of type T\n@throws NoDocumentException if the document is not found in the database\n@see #find(Class, String, String)\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/document.html#read\"\ntarget=\"_blank\">Documents - read</a>", "Read resource data.", "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'", "create a HTTP POST request.\n\n@return {@link HttpConnection}", "caching is not supported for this method", "Converts a DTO attribute into a generic attribute object.\n\n@param attribute\nThe DTO attribute.\n@return The server side attribute representation. As we don't know at this point what kind of object the\nattribute is (that's a problem for the <code>FeatureModel</code>), we return an <code>Object</code>.", "When set to true, all items in layout will be considered having the size of the largest child. If false, all items are\nmeasured normally. Disabled by default.\n@param enable true to measure children using the size of the largest child, false - otherwise.", "Calculates the Boundedness value to given confinement radius, diffusion coefficient, timlag and number of steps.\n@param D diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param confRadius Confinement radius\n@return Boundedness value" ]
public static <T extends Spin<?>> T S(Object input, DataFormat<T> format) { return SpinFactory.INSTANCE.createSpin(input, format); }
[ "Creates a spin wrapper for a data input of a given data format.\n\n@param input the input to wrap\n@param format the data format of the input\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')" ]
[ "In this method perform the actual override in runtime.\n\n@see org.apache.log4j.spi.HierarchyEventListener#addAppenderEvent(org.apache.log4j.Category, org.apache.log4j.Appender)", "This method displays the resource assignments for each task. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a task-by-task basis.\n\n@param file MPX file", "The connection timeout for making a connection to Twitter.", "If the user has not specified a project ID, this method\nretrieves the ID of the first project in the file.", "Get a project according to its full name.\n\n@param fullName The full name of the project.\n@return The project which answers the full name.", "Schedules the task with a fixed delay period and an initialDelay period. This functions\nlike the normal java Timer.\n@param task\n@param initialDelay\n@param fixedDelay", "Gets the visibility cache weight\n\n@param conf The FluoConfiguration\n@return The size of the cache value from the property value {@value #VISIBILITY_CACHE_WEIGHT}\nif it is set, else the value of the default value\n{@value #VISIBILITY_CACHE_WEIGHT_DEFAULT}", "Throws an IllegalStateException when the given value is not false.", "Updates the template with the specified id.\n\n@param id id of the template to update\n@param options a Map of options to update/add.\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." ]
public void updateLockingValues(Object obj) throws PersistenceBrokerException { FieldDescriptor[] fields = getLockingFields(); for (int i = 0; i < fields.length; i++) { FieldDescriptor fmd = fields[i]; if (fmd.isUpdateLock()) { PersistentField f = fmd.getPersistentField(); Object cv = f.get(obj); // int if ((f.getType() == int.class) || (f.getType() == Integer.class)) { int newCv = 0; if (cv != null) { newCv = ((Number) cv).intValue(); } newCv++; f.set(obj, new Integer(newCv)); } // long else if ((f.getType() == long.class) || (f.getType() == Long.class)) { long newCv = 0; if (cv != null) { newCv = ((Number) cv).longValue(); } newCv++; f.set(obj, new Long(newCv)); } // Timestamp else if (f.getType() == Timestamp.class) { long newCv = System.currentTimeMillis(); f.set(obj, new Timestamp(newCv)); } } } }
[ "updates the values for locking fields , BRJ\nhandles int, long, Timestamp\nrespects updateLock so locking field are only updated when updateLock is true\n@throws PersistenceBrokerException if there is an erros accessing obj field values" ]
[ "Returns a list that contains all the entries of the given iterator in the same order.\n\n@param iterator\nthe iterator. May not be <code>null</code>.\n@return a list with the same entries as the given iterator. Never <code>null</code>.", "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", "Retrieve a work field.\n\n@param type field type\n@return Duration instance", "Get the FieldDescriptor for the PathInfo\n\n@param aTableAlias\n@param aPathInfo\n@return FieldDescriptor", "Replace default values will null, allowing them to be ignored.\n\n@param value value to test\n@return filtered value", "Use this API to fetch auditsyslogpolicy_vpnglobal_binding resources of given name .", "Sets the width and height of the canvas the text is drawn to.\n\n@param width\nwidth of the new canvas.\n\n@param height\nhegiht of the new canvas.", "Handle value change event on the individual dates list.\n@param event the change event.", "Checks the foreignkeys of all references in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid" ]
public static base_response delete(nitro_service client, String serverip) throws Exception { ntpserver deleteresource = new ntpserver(); deleteresource.serverip = serverip; return deleteresource.delete_resource(client); }
[ "Use this API to delete ntpserver of given name." ]
[ "I pulled this out of internal store so that when doing multiple table\ninheritance, i can recurse this function.\n\n@param obj\n@param cld\n@param oid BRJ: what is it good for ???\n@param insert\n@param ignoreReferences", "Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds", "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", "returns a sorted array of nested classes and interfaces", "Ensure that the nodeList is either null or empty.\n\n@param nodeList the nodeList to ensure to be either null or empty\n@param expression the expression was used to fine the nodeList\n@throws SpinXPathException if the nodeList is either null or empty", "Produces a string identifying this half-edge by the point index values of\nits tail and head vertices.\n\n@return identifying string", "Process an individual UDF.\n\n@param udf UDF definition", "Re-initializes the shader texture used to fill in\nthe Circle upon drawing.", "Removes a watermark from the item.\nIf the item did not have a watermark applied to it, a 404 Not Found will be returned by API.\n@param itemUrl url template for the item." ]
public static CharSequence getAt(CharSequence text, IntRange range) { return getAt(text, (Range) range); }
[ "Support the range subscript operator for CharSequence with IntRange\n\n@param text a CharSequence\n@param range an IntRange\n@return the subsequence CharSequence\n@since 1.0" ]
[ "Stops download dispatchers.", "helper to calculate the navigationBar height\n\n@param context\n@return", "read data from channel to buffer\n\n@param channel readable channel\n@param buffer bytebuffer\n@return read size\n@throws IOException any io exception", "This method returns the mapped certificate for a hostname, or generates a \"standard\"\nSSL server certificate issued by the CA to the supplied subject if no mapping has been\ncreated. This is not a true duplication, just a shortcut method\nthat is adequate for web browsers.\n\n@param hostname\n@return\n@throws CertificateParsingException\n@throws InvalidKeyException\n@throws CertificateExpiredException\n@throws CertificateNotYetValidException\n@throws SignatureException\n@throws CertificateException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws KeyStoreException\n@throws UnrecoverableKeyException", "Retrieve an instance of the ConstraintField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ConstraintField instance", "Read custom fields for a GanttProject task.\n\n@param gpTask GanttProject task\n@param mpxjTask MPXJ Task instance", "Use this API to unset the properties of bridgetable resource.\nProperties that need to be unset are specified in args array.", "Enables lifecycle callbacks for Android devices\n@param application App's Application object", "Synchronize the geotools transaction with the platform transaction, if such a transaction is active.\n\n@param featureStore\n@param dataSource" ]
public static int read(ReadableByteChannel channel, ByteBuffer buffer) throws IOException { int count = channel.read(buffer); if (count == -1) throw new EOFException("Received -1 when reading from channel, socket has likely been closed."); return count; }
[ "read data from channel to buffer\n\n@param channel readable channel\n@param buffer bytebuffer\n@return read size\n@throws IOException any io exception" ]
[ "Creates a map between a calendar ID and a list of\nwork pattern assignment rows.\n\n@param rows work pattern assignment rows\n@return work pattern assignment map", "Adds Editor specific UI components to the toolbar.\n@param context The context that provides access to the toolbar.", "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", "Creates a db handling object.\n\n@return The db handling object\n@throws BuildException If the handling is invalid", "Adds the includes of the fileset to the handling.\n\n@param handling The handling\n@param fileSet The fileset", "Opens a new FileOutputStream for a file of the given name in the given\nresult directory. Any file of this name that exists already will be\nreplaced. The caller is responsible for eventually closing the stream.\n\n@param resultDirectory\nthe path to the result directory\n@param filename\nthe name of the file to write to\n@return FileOutputStream for the file\n@throws IOException\nif the file or example output directory could not be created", "Export data base contents to a directory using supplied connection.\n\n@param connection database connection\n@param directory target directory\n@throws Exception", "Deploys application reading resources from specified InputStream.\n\n@param inputStream where resources are read\n@throws IOException", "Retrieve multiple properties.\n\n@param method method definition\n@param object target object\n@param map parameter values" ]
public static Cluster dropZone(Cluster intermediateCluster, int dropZoneId) { // Filter out nodes that don't belong to the zone being dropped Set<Node> survivingNodes = new HashSet<Node>(); for(int nodeId: intermediateCluster.getNodeIds()) { if(intermediateCluster.getNodeById(nodeId).getZoneId() != dropZoneId) { survivingNodes.add(intermediateCluster.getNodeById(nodeId)); } } // Filter out dropZoneId from all zones Set<Zone> zones = new HashSet<Zone>(); for(int zoneId: intermediateCluster.getZoneIds()) { if(zoneId == dropZoneId) { continue; } List<Integer> proximityList = intermediateCluster.getZoneById(zoneId) .getProximityList(); proximityList.remove(new Integer(dropZoneId)); zones.add(new Zone(zoneId, proximityList)); } return new Cluster(intermediateCluster.getName(), Utils.asSortedList(survivingNodes), Utils.asSortedList(zones)); }
[ "Given a interim cluster with a previously vacated zone, constructs a new\ncluster object with the drop zone completely removed\n\n@param intermediateCluster\n@param dropZoneId\n@return adjusted cluster with the zone dropped" ]
[ "Add WSAddressing Interceptors to InterceptorProvider, in order to using\nAddressingProperties to get MessageID.\n\n@param provider the interceptor provider", "Start unmarshalling using the parser.\n@param parser\n@param preProcessingData\n@return the root element of a bpmn2 document.\n@throws java.io.IOException", "Return all option names that not already have a value\nand is enabled", "A specific, existing task can be updated by making a PUT request on the\nURL for that task. Only the fields provided in the `data` block will be\nupdated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated task record.\n\n@param task The task to update.\n@return Request object", "Creates the code mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param realOffsetStart\nthe real offset start\n@param realOffsetEnd\nthe real offset end\n@param codePositions\nthe code positions\n@throws IOException\nSignals that an I/O exception has occurred.", "Operators which affect the variables to its left and right", "Detects if the current device is a mobile device.\nThis method catches most of the popular modern devices.\nExcludes Apple iPads and other modern tablets.\n@return detection of any mobile device using the quicker method", "Method must be invoked upon completion of a rebalancing task. It is the\ntask's responsibility to do so.\n\n@param stealerId\n@param donorId", "add various getAt and setAt methods for primitive arrays\n@param receiver the receiver class\n@param name the name of the method\n@param args the argument classes" ]
public void setName(int pathId, String pathName) { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement( "UPDATE " + Constants.DB_TABLE_PATH + " SET " + Constants.PATH_PROFILE_PATHNAME + " = ?" + " WHERE " + Constants.GENERIC_ID + " = ?" ); statement.setString(1, pathName); statement.setInt(2, pathId); statement.executeUpdate(); statement.close(); } catch (SQLException e) { e.printStackTrace(); } finally { try { if (statement != null) { statement.close(); } } catch (Exception e) { } } }
[ "Sets the path name for this ID\n\n@param pathId ID of path\n@param pathName Name of path" ]
[ "This static method calculated the rho of a call 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 option", "Lookup the username for the specified User URL.\n\n@param url\nThe user profile URL\n@return The username\n@throws FlickrException", "Load the windows resize handler with initial view port detection.", "Print a work contour.\n\n@param value WorkContour instance\n@return work contour value", "Extracts a set of interceptor bindings from a collection of annotations.\n@param beanManager\n@param annotations\n@return", "Extracts the zip file to the output folder\n\n@param zipFile ZIP File to extract\n@param outputFolder Output Folder\n@return A Collection with the extracted files\n@throws IOException I/O Error", "Create a WebMBeanAdaptor for a specified MBean name.\n@param mBeanName the MBean name (can be URL-encoded).\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the created WebMBeanAdaptor.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.", "Internal method which performs the authenticated request by preparing the auth request with\nthe provided auth info and request.", "Add a dependency task group for this model.\n\n@param dependency the dependency.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependency task group" ]
@SuppressWarnings("boxing") public OAuth1Token getAccessToken(OAuth1RequestToken oAuthRequestToken, String verifier) { OAuth10aService service = new ServiceBuilder(apiKey) .apiSecret(sharedSecret) .build(FlickrApi.instance()); // Flickr seems to return invalid token sometimes so retry a few times. // See http://www.flickr.com/groups/api/discuss/72157628028927244/ OAuth1Token accessToken = null; boolean success = false; for (int i = 0; i < maxGetTokenRetries && !success; i++) { try { accessToken = service.getAccessToken(oAuthRequestToken, verifier); success = true; } catch (OAuthException | IOException | InterruptedException | ExecutionException e) { if (i == maxGetTokenRetries - 1) { logger.error(String.format("OAuthService.getAccessToken failing after %d tries, re-throwing exception", i), e); throw new FlickrRuntimeException(e); } else { logger.warn(String.format("OAuthService.getAccessToken failed, try number %d: %s", i, e.getMessage())); try { Thread.sleep(500); } catch (InterruptedException ie) { // Do nothing } } } } return accessToken; }
[ "Trade the request token for an access token, this is step three of authorization.\n@param oAuthRequestToken\nthis is the token returned by the {@link AuthInterface#getRequestToken} call.\n@param verifier" ]
[ "Use this API to fetch all the responderhtmlpage resources that are configured on netscaler.", "Return the most appropriate log type. This should _never_ return null.", "Get the default providers list to be used.\n\n@return the default provider list and ordering, not null.", "Set brightness to eg. darken the resulting image for use as background\n\n@param brightness default is 0, pos values increase brightness, neg. values decrease brightness\n.-100 is black, positive goes up to 1000+", "Gets the actual type arguments of a Type\n\n@param type The type to examine\n@return The type arguments", "Generate a currency format.\n\n@param position currency symbol position\n@return currency format", "Use this API to fetch sslciphersuite resource of given name .", "Generate a VideoCollection with random data obtained form VIDEO_INFO map. You don't need o\ncreate your own AdapteeCollections. Review ListAdapteeCollection if needed.\n\n@param videoCount size of the collection.\n@return VideoCollection generated.", "Set the individual dates where the event should take place.\n@param dates the dates to set." ]
public void editComment(String commentId, String commentText) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_EDIT_COMMENT); parameters.put("comment_id", commentId); parameters.put("comment_text", commentText); // 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. }
[ "Edit the text of a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to edit.\n@param commentText\nUpdate the comment to this text.\n@throws FlickrException" ]
[ "Checks that excess arguments match the vararg signature parameter.\n@param params\n@param args\n@return -1 if no match, 0 if all arguments matches the vararg type and >0 if one or more vararg argument is\nassignable to the vararg type, but still not an exact match", "Stops the emulator. Multiple calls are allowed.\n\n@throws DatastoreEmulatorException if the emulator cannot be stopped", "Counts the amount of 'ch' at the start of this line optionally ignoring\nspaces.\n\n@param ch\nThe char to count.\n@param allowSpaces\nWhether to allow spaces or not\n@return Number of characters found.\n@since 0.12", "Returns the bit at the specified index.\n@param index The index of the bit to look-up (0 is the least-significant bit).\n@return A boolean indicating whether the bit is set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string.", "Cancels all requests still waiting for a response.\n\n@return this {@link Searcher} for chaining.", "Return the number of arguments associated with the specified option.\nThe return value includes the actual option.\nWill return 0 if the option is not supported.", "Function to filter files based on defined rules.", "Populate time ranges.\n\n@param ranges time ranges from a Synchro table\n@param container time range container", "Returns the map from resourcetype names to default timestamp modes.\n@return the map from resourcetype names to default timestamp modes." ]
protected float transformLength(float w) { Matrix ctm = getGraphicsState().getCurrentTransformationMatrix(); Matrix m = new Matrix(); m.setValue(2, 0, w); return m.multiply(ctm).getTranslateX(); }
[ "Transforms a length according to the current transformation matrix." ]
[ "Returns the index of the segment containing the first byte outside the network prefix.\nWhen networkPrefixLength is null, or it matches or exceeds the bit length, returns the segment count.\n\n@param networkPrefixLength\n@param byteLength\n@return", "Returns the JSON datatype for the property datatype as represented by\nthe given WDTK datatype IRI string.\n\n@param datatypeIri\nthe WDTK datatype IRI string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known", "Processes text as a FreeMarker template. Usually used to process an inner body of a tag.\n\n@param text text of a template.\n@param params map with parameters for processing.\n@param writer writer to write output to.", "open a readable or writeable FileChannel\n\n@param file file object\n@param mutable writeable\n@return open the FileChannel\n@throws IOException any io exception", "Add an exact path to the routing table.\n\n@throws RouteAlreadyMappedException", "Decomposes the input matrix 'a' and makes sure it isn't modified.", "Read pattern information from the provided JSON object.\n@param patternJson the JSON object containing the pattern information.", "Internal utility to dump relationship lists in a structured format\nthat can easily be compared with the tabular data in MS Project.\n\n@param relations relation list", "Converts the passed list of inners to unmodifiable map of impls.\n@param innerList list of the inners.\n@return map of the impls" ]
public int create(DatabaseConnection databaseConnection, T data, ObjectCache objectCache) throws SQLException { if (mappedInsert == null) { mappedInsert = MappedCreate.build(dao, tableInfo); } int result = mappedInsert.insert(databaseType, databaseConnection, data, objectCache); if (dao != null && !localIsInBatchMode.get()) { dao.notifyChanges(); } return result; }
[ "Create a new entry in the database from an object." ]
[ "Read in the configuration properties.", "Sets all dates in the list.\n@param dates the dates to set\n@param checked flag, indicating if all should be checked or unchecked.", "Use this API to add snmpuser.", "Bessel function of the second kind, of order 0.\n\n@param x Value.\n@return Y0 value.", "Shuffle an array.\n\n@param array Array.\n@param seed Random seed.", "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", "No need to expose. Client side work.", "Return true only if the MethodCallExpression represents a method call for the specified method name\n@param methodCall - the AST MethodCallExpression\n@param methodNamePattern - the expected name of the method being called\n@param numArguments - The number of expected arguments\n@return true only if the method call name matches", "Cause the container to be cleaned up, including all registered bean\nmanagers, and all deployment services" ]
public static boolean isPackageOrClassName(String s) { if (S.blank(s)) { return false; } S.List parts = S.fastSplit(s, "."); if (parts.size() < 2) { return false; } for (String part: parts) { if (!Character.isJavaIdentifierStart(part.charAt(0))) { return false; } for (int i = 1, len = part.length(); i < len; ++i) { if (!Character.isJavaIdentifierPart(part.charAt(i))) { return false; } } } return true; }
[ "Check if a given string is a valid java package or class name.\n\nThis method use the technique documented in\n[this SO question](https://stackoverflow.com/questions/13557195/how-to-check-if-string-is-a-valid-class-identifier)\nwith the following extensions:\n\n* if the string does not contain `.` then assume it is not a valid package or class name\n\n@param s\nthe string to be checked\n@return\n`true` if `s` is a valid java package or class name" ]
[ "Use this API to delete onlinkipv6prefix of given name.", "Retrieve a UUID from an input stream.\n\n@param is input stream\n@return UUID instance", "Deselects all child items of the provided item.\n@param item the item for which all childs should be deselected.d", "If the file is compressed, handle this so that the stream is ready to read.\n\n@param stream input stream\n@return uncompressed input stream", "Send a mount update announcement to all registered listeners, and see if we can auto-attach a media cache file.\n\n@param slot the slot in which media has been mounted or unmounted\n@param mounted will be {@code true} if there is now media mounted in the specified slot", "Reads a \"flags\" argument from the request.", "Read custom fields for a GanttProject resource.\n\n@param gpResource GanttProject resource\n@param mpxjResource MPXJ Resource instance", "Returns the primary message codewords for mode 3.\n\n@param postcode the postal code\n@param country the country code\n@param service the service code\n@return the primary message, as codewords", "Get MultiJoined ClassDescriptors\n@param cld" ]
public static double getFloatingPointDateFromDate(LocalDateTime referenceDate, LocalDateTime date) { Duration duration = Duration.between(referenceDate, date); return ((double)duration.getSeconds()) / SECONDS_PER_DAY; }
[ "Convert a given date to a floating point date using a given reference date.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param date The given date to be associated with the return value \\( T \\).\n@return The value T measuring the distance of reference date and date by ACT/365 with SECONDS_PER_DAY seconds used as the smallest time unit and SECONDS_PER_DAY is a constant 365*24*60*60." ]
[ "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 Renderer instance as prototype.\n\n@param renderer to use as prototype.\n@return the current RendererBuilder instance.", "Add an index on the given collection and field\n\n@param collection the collection to use for the index\n@param field the field to use for the index\n@param asc the sorting direction. <code>true</code> to sort ascending; <code>false</code> to sort descending\n@param background iff <code>true</code> the index is created in the background", "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>", "Use this API to add dbdbprofile resources.", "Returns a String summarizing overall accuracy that will print nicely.", "Retrieves state and metrics information for all client connections across the cluster.\n\n@return list of connections across the cluster", "Set a custom response for this path\n\n@param pathName name of path\n@param customResponse value of custom response\n@return true if success, false otherwise\n@throws Exception exception", "Use this API to unset the properties of clusterinstance resources.\nProperties that need to be unset are specified in args array." ]
public static GridLabelFormat fromConfig(final GridParam param) { if (param.labelFormat != null) { return new GridLabelFormat.Simple(param.labelFormat); } else if (param.valueFormat != null) { return new GridLabelFormat.Detailed( param.valueFormat, param.unitFormat, param.formatDecimalSeparator, param.formatGroupingSeparator); } return null; }
[ "Create an instance from the given config.\n\n@param param Grid param from the request." ]
[ "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", "Write a set of fields from a field container to a JSON file.\n@param objectName name of the object, or null if no name required\n@param container field container\n@param fields fields to write", "Enables lifecycle callbacks for Android devices\n@param application App's Application object", "Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be XML.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')", "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns all the elements in the sorted set with a value in the given range.\nIf the elements in the sorted set have different scores, the returned elements are unspecified.\n@param lexRange\n@return the range of elements", "This method is used to associate a child task with the current\ntask instance. It has been designed to\nallow the hierarchical outline structure of tasks in an MPX\nfile to be updated once all of the task data has been read.\n\n@param child child task", "Adds all rows from the file specified, using the provided parser.\n\n@param file File to read the data from.\n@param fileParser Parser to be used to parse the file.\n@return {@code this}", "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", "Use this API to fetch all the nsconfig resources that are configured on netscaler." ]
private WmsLayer getLayer(String layerId) { RasterLayer layer = configurationService.getRasterLayer(layerId); if (layer instanceof WmsLayer) { return (WmsLayer) layer; } return null; }
[ "Given a layer ID, search for the WMS layer.\n\n@param layerId layer id\n@return WMS layer or null if layer is not a WMS layer" ]
[ "The test that checks if clipping is needed.\n\n@param f\nfeature to test\n@param scale\nscale\n@return true if clipping is needed", "Get a log file and last relevant date, and check if the log file is relevant\n@param currentLogFile The log file\n@param lastRelevantDate The last date which files should be keeping since\n@return false if the file should be deleted, true if it does not.", "Return the list of galleries created by a user. Sorted from newest to oldest.\n\n@param userId\nThe user you want to check for\n@param perPage\nNumber of galleries per page\n@param page\nThe page number\n@return gallery\n@throws FlickrException\n\n@see <a hrerf=\"http://www.flickr.com/services/api/flickr.galleries.getList.html\">flickr.galleries.getList</a>", "Sets the whole day flag.\n@param isWholeDay flag, indicating if the event lasts whole days.", "Remove a variable in the top variables layer.", "Retrieve a FieldType instance based on an ID value from\nan MPP9 or MPP12 file.\n\n@param fieldID field ID\n@return FieldType instance", "Check the given JWT\n\n@param jwtString the JSON Web Token\n@return the parsed and verified token or null if token is invalid\n@throws ParseException if the token cannot be parsed", "adds a CmsJspImageBean as hi-DPI variant to this image\n@param factor the variant multiplier, e.g. \"2x\" (the common retina multiplier)\n@param image the image to be used for this variant", "Generic method to extract Primavera fields and assign to MPXJ fields.\n\n@param map map of MPXJ field types and Primavera field names\n@param row Primavera data container\n@param container MPXJ data contain" ]
public static Map<Integer, Integer> getMapOfContiguousPartitionRunLengths(final Cluster cluster, int zoneId) { Map<Integer, Integer> idToRunLength = getMapOfContiguousPartitions(cluster, zoneId); Map<Integer, Integer> runLengthToCount = Maps.newHashMap(); if(idToRunLength.isEmpty()) { return runLengthToCount; } for(int runLength: idToRunLength.values()) { if(!runLengthToCount.containsKey(runLength)) { runLengthToCount.put(runLength, 0); } runLengthToCount.put(runLength, runLengthToCount.get(runLength) + 1); } return runLengthToCount; }
[ "Determines a histogram of contiguous runs of partitions within a zone.\nI.e., for each run length of contiguous partitions, how many such runs\nare there.\n\nDoes not correctly address \"wrap around\" of partition IDs (i.e., the fact\nthat partition ID 0 is \"next\" to partition ID 'max')\n\n@param cluster\n@param zoneId\n@return map of length of contiguous run of partitions to count of number\nof such runs." ]
[ "Use this API to fetch statistics of cmppolicylabel_stats resource of given name .", "This intro hides the system bars.", "Returns the master mode's editor state for editing a bundle with descriptor.\n@return the master mode's editor state for editing a bundle with descriptor.", "Updates the polling state from a PUT or PATCH operation.\n\n@param response the response from Retrofit REST call\n@throws CloudException thrown if the response is invalid\n@throws IOException thrown by deserialization", "Gets the listener classes to which dispatching should be prevented while\nthis event is being dispatched.\n\n@return The listener classes marked to prevent.\n@see #preventCascade(Class)", "Add a misc file.\n\n@param name the file name\n@param path the relative path\n@param newHash the new hash of the added content\n@param isDirectory whether the file is a directory or not\n@return the builder", "Possibly coalesces the newest change event to match the user's original intent. For example,\nan unsynchronized insert and update is still an insert.\n\n@param lastUncommittedChangeEvent the last change event known about for a document.\n@param newestChangeEvent the newest change event known about for a document.\n@return the possibly coalesced change event.", "Adds a corporate groupId to an organization\n\n@param organizationId String\n@param corporateGroupId String", "Cleans up the subsystem children for the deployment and each sub-deployment resource.\n\n@param resource the subsystem resource to clean up" ]
public static PasswordSpec parse(String spec) { char[] ca = spec.toCharArray(); int len = ca.length; illegalIf(0 == len, spec); Builder builder = new Builder(); StringBuilder minBuf = new StringBuilder(); StringBuilder maxBuf = new StringBuilder(); boolean lenSpecStart = false; boolean minPart = false; for (int i = 0; i < len; ++i) { char c = ca[i]; switch (c) { case SPEC_LOWERCASE: illegalIf(lenSpecStart, spec); builder.requireLowercase(); break; case SPEC_UPPERCASE: illegalIf(lenSpecStart, spec); builder.requireUppercase(); break; case SPEC_SPECIAL_CHAR: illegalIf(lenSpecStart, spec); builder.requireSpecialChar(); break; case SPEC_LENSPEC_START: lenSpecStart = true; minPart = true; break; case SPEC_LENSPEC_CLOSE: illegalIf(minPart, spec); lenSpecStart = false; break; case SPEC_LENSPEC_SEP: minPart = false; break; case SPEC_DIGIT: if (!lenSpecStart) { builder.requireDigit(); } else { if (minPart) { minBuf.append(c); } else { maxBuf.append(c); } } break; default: illegalIf(!lenSpecStart || !isDigit(c), spec); if (minPart) { minBuf.append(c); } else { maxBuf.append(c); } } } illegalIf(lenSpecStart, spec); if (minBuf.length() != 0) { builder.minLength(Integer.parseInt(minBuf.toString())); } if (maxBuf.length() != 0) { builder.maxLength(Integer.parseInt(maxBuf.toString())); } return builder; }
[ "Parse a string representation of password spec.\n\nA password spec string should be `<trait spec><length spec>`.\n\nWhere \"trait spec\" should be a composition of\n\n* `a` - indicate lowercase letter required\n* `A` - indicate uppercase letter required\n* `0` - indicate digit letter required\n* `#` - indicate special character required\n\n\"length spec\" should be `[min,max]` where `max` can be omitted.\n\nHere are examples of valid \"length spec\":\n\n* `[6,20]` // min length: 6, max length: 20\n* `[8,]` // min length: 8, max length: unlimited\n\nAnd examples of invalid \"length spec\":\n\n* `[8]` // \",\" required after min part\n* `[a,f]` // min and max part needs to be decimal digit(s)\n* `[3,9)` // length spec must be started with `[` and end with `]`\n\n@param spec a string representation of password spec\n@return a {@link PasswordSpec} instance" ]
[ "Return input mapper from processor.", "Creates a new Box Developer Edition connection with enterprise token leveraging an access token cache.\n@param enterpriseId the enterprise ID to use for requesting access token.\n@param clientId the client ID to use when exchanging the JWT assertion for an access token.\n@param clientSecret the client secret to use when exchanging the JWT assertion for an access token.\n@param encryptionPref the encryption preferences for signing the JWT.\n@param accessTokenCache the cache for storing access token information (to minimize fetching new tokens)\n@return a new instance of BoxAPIConnection.", "Sets the bottom padding character for all cells in the row.\n@param paddingBottomChar new padding character, ignored if null\n@return this to allow chaining", "waits for all async mutations that were added before this was called to be flushed. Does not\nwait for async mutations added after call.", "Reads data from the SP file.\n\n@return Project File instance", "List all apps for the current user's account.\n@param range The range of apps provided by {@link Range#getNextRange()}\n@return a list of apps", "Sets Idle max age.\n\nThe time, for a connection to remain unused before it is closed off. Do not use aggressive values here!\n@param idleMaxAge time after which a connection is closed off\n@param timeUnit idleMaxAge time granularity.", "Cause the container to be cleaned up, including all registered bean\nmanagers, and all deployment services", "calculate arc angle between point a and point b\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return" ]
private Date getDateTime(String value) throws MPXJException { try { Number year = m_fourDigitFormat.parse(value.substring(0, 4)); Number month = m_twoDigitFormat.parse(value.substring(4, 6)); Number day = m_twoDigitFormat.parse(value.substring(6, 8)); Number hours = m_twoDigitFormat.parse(value.substring(9, 11)); Number minutes = m_twoDigitFormat.parse(value.substring(11, 13)); Calendar cal = DateHelper.popCalendar(); cal.set(Calendar.YEAR, year.intValue()); cal.set(Calendar.MONTH, month.intValue() - 1); cal.set(Calendar.DAY_OF_MONTH, day.intValue()); cal.set(Calendar.HOUR_OF_DAY, hours.intValue()); cal.set(Calendar.MINUTE, minutes.intValue()); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); Date result = cal.getTime(); DateHelper.pushCalendar(cal); return result; } catch (ParseException ex) { throw new MPXJException("Failed to parse date-time " + value, ex); } }
[ "Convert a Planner date-time value into a Java date.\n\n20070222T080000Z\n\n@param value Planner date-time\n@return Java Date instance" ]
[ "Use this API to fetch appfwsignatures resource of given name .", "Creates a new Table instance from data extracted from an MPP file.\n\n@param file parent project file\n@param data fixed data\n@param varMeta var meta\n@param varData var data\n@return Table instance", "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\".", "Detects if the current device is a Nintendo game device.\n@return detection of Nintendo", "Format the message using the pattern and the arguments.\n\n@param pattern the pattern in the format of \"{1} this is a {2}\"\n@param arguments the arguments.\n@return the formatted result.", "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}", "Tokenizes lookup fields and returns all matching buckets in the\nindex.", "Renders in LI tags, Wraps with UL tags optionally.", "Obtains a local date in Accounting 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 Accounting local date, not null\n@throws DateTimeException if unable to create the date" ]
@SuppressWarnings({"deprecation", "WeakerAccess"}) protected void removeShutdownHook(ClassLoaderLeakPreventor preventor, Thread shutdownHook) { final String displayString = "'" + shutdownHook + "' of type " + shutdownHook.getClass().getName(); preventor.error("Removing shutdown hook: " + displayString); Runtime.getRuntime().removeShutdownHook(shutdownHook); if(executeShutdownHooks) { // Shutdown hooks should be executed preventor.info("Executing shutdown hook now: " + displayString); // Make sure it's from protected ClassLoader shutdownHook.start(); // Run cleanup immediately if(shutdownHookWaitMs > 0) { // Wait for shutdown hook to finish try { shutdownHook.join(shutdownHookWaitMs); // Wait for thread to run } catch (InterruptedException e) { // Do nothing } if(shutdownHook.isAlive()) { preventor.warn(shutdownHook + "still running after " + shutdownHookWaitMs + " ms - Stopping!"); shutdownHook.stop(); } } } }
[ "Deregister shutdown hook and execute it immediately" ]
[ "Computes the best fit set of polynomial coefficients to the provided observations.\n\n@param samplePoints where the observations were sampled.\n@param observations A set of observations.", "Creates an upload session to create a new version of a file in chunks.\nThis will first verify that the version can be created and then open a session for uploading pieces of the file.\n@param fileSize the size of the file that will be uploaded.\n@return the created upload session instance.", "Utility method to convert a String to an Integer, and\nhandles null values.\n\n@param value string representation of an integer\n@return int value", "Checks to see if all the diagonal elements in the matrix are positive.\n\n@param a A matrix. Not modified.\n@return true if all the diagonal elements are positive, false otherwise.", "Runs the shell script for committing and optionally pushing the changes in the module.\n@return exit code of the script.", "This method returns the string representation of an object. In most\ncases this will simply involve calling the normal toString method\non the object, but a couple of exceptions are handled here.\n\n@param o the object to formatted\n@return formatted string representing input Object", "Specifies the list of enrichers that will be used to enrich the container object.\n\n@param enrichers\nlist of enrichers that will be used to enrich the container object\n\n@return the current builder instance", "Update all the links of the DeclarationBinder.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder", "Transforms root paths to site paths.\n\n@return lazy map from root paths to site paths.\n\n@see CmsRequestContext#removeSiteRoot(String)" ]
protected void init(EnhancedAnnotation<T> annotatedAnnotation) { initType(annotatedAnnotation); initValid(annotatedAnnotation); check(annotatedAnnotation); }
[ "Initializes the type and validates it" ]
[ "Create a counter if one is not defined already, otherwise return the existing one.\n\n@param counterName unique name for the counter\n@param initialValue initial value for the counter\n@return a {@link StrongCounter}", "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", "Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag.", "Pseudo-Inverse of a matrix calculated in the least square sense.\n\n@param matrix The given matrix A.\n@return pseudoInverse The pseudo-inverse matrix P, such that A*P*A = A and P*A*P = P", "Count the number of working hours in a day, based in the\ninteger representation of the working hours.\n\n@param hours working hours\n@return number of hours", "If the not a bitmap itself, this will read the file's meta data.\n\n@param resources {@link android.content.Context#getResources()}\n@return Point where x = width and y = height", "Read activities.", "Remove the given pair into the map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param entry the entry (key, value) to remove from the map.\n@return {@code true} if the pair was removed.\n@since 2.15", "Evaluates the animation with the given index at the specified time.\n@param animIndex 0-based index of {@link GVRAnimator} to start\n@param timeInSec time to evaluate the animation at\n@see GVRAvatar#stop()\n@see #start(String)" ]
private Integer getNextOrdinalForMethodId(int methodId, String pathName) throws Exception { String pathInfo = doGet(BASE_PATH + uriEncode(pathName), new BasicNameValuePair[0]); JSONObject pathResponse = new JSONObject(pathInfo); JSONArray enabledEndpoints = pathResponse.getJSONArray("enabledEndpoints"); int lastOrdinal = 0; for (int x = 0; x < enabledEndpoints.length(); x++) { if (enabledEndpoints.getJSONObject(x).getInt("overrideId") == methodId) { lastOrdinal++; } } return lastOrdinal + 1; }
[ "Get the next available ordinal for a method ID\n\n@param methodId ID of method\n@return value of next ordinal\n@throws Exception exception" ]
[ "Use this API to update sslparameter.", "Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs.", "Copy all of the mappings from the specified map to this one, replacing\nany mappings with the same keys.\n\n@param in the map whose mappings are to be copied", "Returns a map of URIs to package name, as specified by the packageNames\nparameter.", "Visit this and all child nodes.\n\n@param visitor The visitor to use.", "The point that is the GOLDEN_SECTION along the way from a to b.\na may be less or greater than b, you find the point 60-odd percent\nof the way from a to b.\n\n@param a Interval minimum\n@param b Interval maximum\n@return The GOLDEN_SECTION along the way from a to b.", "Sets the fieldConversion.\n@param fieldConversionClassName The fieldConversion to set", "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.", "Use this API to fetch clusternodegroup resource of given name ." ]
public List<T> nextPermutationAsList() { List<T> permutation = new ArrayList<T>(elements.length); return nextPermutationAsList(permutation); }
[ "Generate the next permutation and return a list containing\nthe elements in the appropriate order.\n@see #nextPermutationAsList(java.util.List)\n@see #nextPermutationAsArray()\n@return The next permutation as a list." ]
[ "Physically close off the internal connection.\n@param conn", "Overwrites the underlying WebSocket session.\n\n@param newSession new session", "Test a given date for being easter sunday.\n\nThe method uses the algorithms sometimes cited as Meeus,Jones, Butcher Gregorian algorithm.\nTaken from http://en.wikipedia.org/wiki/Computus\n\n@param date The date to check.\n@return True, if date is easter sunday.", "Reads all text of the XML tag and returns it as a String.\nAssumes that a '<' character has already been read.\n\n@param r The reader to read from\n@return The String representing the tag, or null if one couldn't be read\n(i.e., EOF). The returned item is a complete tag including angle\nbrackets, such as <code>&lt;TXT&gt;</code>", "Use this API to fetch all the tmsessionparameter resources that are configured on netscaler.", "Build a Dataset from some data.\n\n@param oldData This {@link Dataset} represents data for which we which to\nsome features, specifically those features not in the {@link edu.stanford.nlp.util.Index}\ngoodFeatures.\n@param goodFeatures An {@link edu.stanford.nlp.util.Index} of features we wish to retain.\n@return A new {@link Dataset} wheres each datapoint contains only features\nwhich were in goodFeatures.", "Calls a function script associated with this component.\nThe function is called even if the component\nis not enabled and not attached to a scene object.\n@param funcName name of script function to call.\n@param args function parameters as an array of objects.\n@return true if function was called, false if no such function\n@see org.gearvrf.script.GVRScriptFile#invokeFunction(String, Object[]) invokeFunction", "Converts this IPv6 address segment into smaller segments,\ncopying them into the given array starting at the given index.\n\nIf a segment does not fit into the array because the segment index in the array is out of bounds of the array,\nthen it is not copied.\n\n@param segs\n@param index", "Encode a path segment, escaping characters not valid for a URL.\n\n<p>The following characters are not escaped:\n\n<ul>\n<li>{@code a..z, A..Z, 0..9}\n<li>{@code . - * _}\n</ul>\n\n<p>' ' (space) is encoded as '+'.\n\n<p>All other characters (including '/') are converted to the triplet \"%xy\" where \"xy\" is the\nhex representation of the character in UTF-8.\n\n@param component a string containing text to encode.\n@return a string with all invalid URL characters escaped." ]
private void readAssignments(Resource mpxjResource, net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource res) { for (Assignment assignment : res.getAssignment()) { readAssignment(mpxjResource, assignment); } }
[ "Reads Phoenix resource assignments.\n\n@param mpxjResource MPXJ resource\n@param res Phoenix resource" ]
[ "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.", "Append a Handler to every parent of the given class\n@param parent The class of the parents to add the child to\n@param child The Handler to add.", "Finds \"Y\" coordinate value in which more elements could be added in the band\n@param band\n@return", "Write throwable as attachment.\n\n@param throwable to write\n@param title title of attachment\n@return Created {@link ru.yandex.qatools.allure.model.Attachment}", "Execute a CLI command. This can be any command that you might execute on\nthe CLI command line, including both server-side operations and local\ncommands such as 'cd' or 'cn'.\n\n@param cliCommand A CLI command.\n@return A result object that provides all information about the execution\nof the command.", "Sets the seed for random number generator", "Use this API to fetch all the Interface resources that are configured on netscaler.", "Get all components of a specific class from this scene object and its descendants.\n@param type component type (as returned from getComponentType())\n@return ArrayList of components with the specified class.", "Create and register the declaration of class D with the given metadata.\n\n@param metadata the metadata to create the declaration\n@return the created declaration of class D" ]
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { final ServletRequest r1 = request; chain.doFilter(request, new HttpServletResponseWrapper((HttpServletResponse) response) { @SuppressWarnings("unchecked") public void setHeader(String name, String value) { ArrayList<String> headersToRemove = new ArrayList<String>(); if (r1.getAttribute("com.groupon.odo.removeHeaders") != null) headersToRemove = (ArrayList<String>) r1.getAttribute("com.groupon.odo.removeHeaders"); boolean removeHeader = false; // need to loop through removeHeaders to make things case insensitive for (String headerToRemove : headersToRemove) { if (headerToRemove.toLowerCase().equals(name.toLowerCase())) { removeHeader = true; break; } } if (! removeHeader) { super.setHeader(name, value); } } }); }
[ "This looks at the servlet attributes to get the list of response headers to remove while the response object gets created by the servlet" ]
[ "Add a column to be set to a value for UPDATE statements. This will generate something like 'columnName =\nexpression' where the expression is built by the caller.\n\n<p>\nThe expression should have any strings escaped using the {@link #escapeValue(String)} or\n{@link #escapeValue(StringBuilder, String)} methods and should have any column names escaped using the\n{@link #escapeColumnName(String)} or {@link #escapeColumnName(StringBuilder, String)} methods.\n</p>", "Verify that the given queues are all valid.\n\n@param queues the given queues", "refresh credentials if CredentialProvider set", "Update an existing feature. Made package private for testing purposes.\n\n@param feature feature to update\n@throws LayerException oops", "Extracts project properties from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file", "Sets the timeout used when connecting to the server.\n\n@param timeout the time out to use\n\n@return the builder", "Waits for a job V3 to complete\n\n@param cloudFoundryClient the client to use to request job status\n@param completionTimeout the amount of time to wait for the job to complete.\n@param jobId the id of the job\n@return {@code onComplete} once job has completed", "Obtains a local date in Ethiopic calendar system from the\nera, year-of-era, month-of-year and day-of-month fields.\n\n@param era the Ethiopic era, not null\n@param yearOfEra the year-of-era\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code EthiopicEra}", "Return all levels of moneyness for which data exists.\nMoneyness is returned as actual difference strike - par swap rate.\n\n@return The levels of moneyness as difference of strike to par swap rate." ]
private void modifyBeliefCount(int count){ introspector.setBeliefValue(getLocalName(), Definitions.RECEIVED_MESSAGE_COUNT, getBeliefCount()+count, null); }
[ "Modifies the \"msgCount\" belief\n\n@param int - the number to add or remove" ]
[ "Delete a module\n\n@param moduleId String", "performs an UPDATE operation against RDBMS.\n@param obj The Object to be updated in the underlying table.\n@param cld ClassDescriptor providing mapping information.", "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns all the elements in the sorted set with a value in the given range.\nIf the elements in the sorted set have different scores, the returned elements are unspecified.\n@param lexRange\n@return the range of elements", "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.", "Get a unique reference to the media slot on the network from which the specified data was loaded.\n\n@param dataReference the data whose media slot is of interest\n\n@return the instance that will always represent the slot associated with the specified data", "digest message with MD5\n\n@param source message\n@return 32 bit MD5 value (lower case)", "Deletes this BoxStoragePolicyAssignment.", "Returns all selected values of the list box, or empty array if none.\n\n@return the selected values of the list box", "Called when the scene object gets a new parent.\n\n@param parent New parent of this scene object." ]
public static void writeFlowId(Message message, String flowId) { if (!(message instanceof SoapMessage)) { return; } SoapMessage soapMessage = (SoapMessage)message; Header hdFlowId = soapMessage.getHeader(FLOW_ID_QNAME); if (hdFlowId != null) { LOG.warning("FlowId already existing in soap header, need not to write FlowId header."); return; } try { soapMessage.getHeaders().add( new Header(FLOW_ID_QNAME, flowId, new JAXBDataBinding(String.class))); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Stored flowId '" + flowId + "' in soap header: " + FLOW_ID_QNAME); } } catch (JAXBException e) { LOG.log(Level.SEVERE, "Couldn't create flowId header.", e); } }
[ "Write flow id to message.\n\n@param message the message\n@param flowId the flow id" ]
[ "Replies the elements of the left map without the pairs in the right map.\nIf the pair's values differ from\nthe value within the map, the map entry is not removed.\n\n<p>\nThe difference is an immutable\nsnapshot of the state of the maps at the time this method is called. It\nwill never change, even if the maps change at a later time.\n</p>\n\n<p>\nSince this method uses {@code HashMap} instances internally, the keys of\nthe supplied maps must be well-behaved with respect to\n{@link Object#equals} and {@link Object#hashCode}.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to update.\n@param right the pairs to remove.\n@return the map with the content of the left map except the pairs of the right map.\n@since 2.15", "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", "Use this API to restore appfwprofile.", "Translates the Fluo row, column, and value set into the persistent format that is stored in\nAccumulo.\n\n<p>\nThe objects returned by this method are reused each time its called. So each time this is\ncalled it invalidates what was returned by previous calls to this method.\n\n@return A an array of Accumulo key values in correct sorted order.", "Assign FK values and store entries in indirection table\nfor all objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation", "Returns all base types.\n\n@return An iterator of the base types", "LRN cross-channel backward computation. Double parameters cast to tensor data type", "Moves the given row down.\n\n@param row the row to move", "Specify the address of the SOCKS proxy the connection should\nuse.\n\n<p>Read the <a href=\"http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html\">\nJava Networking and Proxies</a> guide to understand the\nproxies complexity.\n\n<p>Be aware that this method only handles SOCKS proxies, not\nHTTPS proxies. Use {@link #withProxy(Proxy)} instead.\n\n@param host the hostname of the SOCKS proxy\n@param port the port of the SOCKS proxy server\n@return this" ]
private void ensurePKsFromHierarchy(ClassDescriptorDef classDef) throws ConstraintException { SequencedHashMap pks = new SequencedHashMap(); for (Iterator it = classDef.getAllExtentClasses(); it.hasNext();) { ClassDescriptorDef subTypeDef = (ClassDescriptorDef)it.next(); ArrayList subPKs = subTypeDef.getPrimaryKeys(); // check against already present PKs for (Iterator pkIt = subPKs.iterator(); pkIt.hasNext();) { FieldDescriptorDef fieldDef = (FieldDescriptorDef)pkIt.next(); FieldDescriptorDef foundPKDef = (FieldDescriptorDef)pks.get(fieldDef.getName()); if (foundPKDef != null) { if (!isEqual(fieldDef, foundPKDef)) { throw new ConstraintException("Cannot pull up the declaration of the required primary key "+fieldDef.getName()+ " because its definitions in "+fieldDef.getOwner().getName()+" and "+ foundPKDef.getOwner().getName()+" differ"); } } else { pks.put(fieldDef.getName(), fieldDef); } } } ensureFields(classDef, pks.values()); }
[ "Gathers the pk fields from the hierarchy of the given class, and copies them into the class.\n\n@param classDef The root of the hierarchy\n@throws ConstraintException If there is a conflict between the pk fields" ]
[ "Open a database and build a set of table names.\n\n@param url database URL\n@return set containing table names", "Rehashes the contents of the receiver into a new table\nwith a smaller or larger capacity.\nThis method is called automatically when the\nnumber of keys in the receiver exceeds the high water mark or falls below the low water mark.", "Removes elements from begin to end from the list, inclusive. Returns a new list which\nis composed of the removed elements", "Configures a worker pool for the converter.\n\n@param corePoolSize The core pool size of the worker pool.\n@param maximumPoolSize The maximum pool size of the worker pool.\n@param keepAliveTime The keep alive time of the worker pool.\n@param unit The time unit of the specified keep alive time.\n@return This builder instance.", "Retrieve from the parent pom the path to the modules of the project", "Remove a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param isDirectory whether the file is a directory or not\n@return the builder", "Deletes a redirect by id\n\n@param id redirect ID", "Hide keyboard from phoneEdit field", "Calculate start dates for a yearly absolute recurrence.\n\n@param calendar current date\n@param dates array of start dates" ]
public static int color(ColorHolder colorHolder, Context ctx) { if (colorHolder == null) { return 0; } else { return colorHolder.color(ctx); } }
[ "a small static helper class to get the color from the colorHolder\n\n@param colorHolder\n@param ctx\n@return" ]
[ "Checks given permissions are needed to show rationale.\n\n@return returns true if one of the permission is needed to show rationale.", "Builder method for specifying the stack an app should be created on.\n@param stack Stack to create the app on.\n@return A copy of the {@link App}", "Parse the XML for a collection as returned by getTree call.\n\n@param collectionElement\n@return", "Stops the compressor.", "Render json.\n\n@param o\nthe o\n@return the string", "Modify the transform's current rotation in quaternion terms, around a\npivot other than the origin.\n\n@param quatW\n'W' component of the rotation quaternion.\n@param quatX\n'X' component of the rotation quaternion.\n@param quatY\n'Y' component of the rotation quaternion.\n@param quatZ\n'Z' component of the rotation quaternion.\n@param pivotX\n'X' component of the pivot's location.\n@param pivotY\n'Y' component of the pivot's location.\n@param pivotZ\n'Z' component of the pivot's location.", "That is, of size 6, which become 8, since HashMaps are powers of 2. Still, it's half the size", "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", "Writes resource baseline data.\n\n@param xmlResource MSPDI resource\n@param mpxjResource MPXJ resource" ]
public static byte[] synchronizeSlaveHostController(ModelNode operation, final PathAddress address, HostFileRepository fileRepository, ContentRepository contentRepository, boolean backup, byte[] oldHash) { ModelNode operationContentItem = operation.get(DeploymentAttributes.CONTENT_RESOURCE_ALL.getName()).get(0); byte[] newHash = operationContentItem.require(CONTENT_HASH.getName()).asBytes(); if (needRemoteContent(fileRepository, contentRepository, backup, oldHash)) { // backup DC needs to pull the content fileRepository.getDeploymentFiles(ModelContentReference.fromModelAddress(address, newHash)); } return newHash; }
[ "Synchronize the required files to a slave HC from the master DC if this is required.\n@param fileRepository the HostFileRepository of the HC.\n@param contentRepository the ContentRepository of the HC.\n@param backup inidcates if this is a DC backup HC.\n@param oldHash the hash of the deployment to be replaced.\n@return true if the content should be pulled by the slave HC - false otherwise." ]
[ "Creates a collaboration whitelist for a Box User with a given ID.\n@param api the API connection to be used by the collaboration whitelist.\n@param userID the ID of the Box User to add to the collaboration whitelist.\n@return information about the collaboration whitelist created for user.", "Send a failed operation response.\n\n@param context the request context\n@param errorCode the error code\n@param message the operation message\n@throws IOException for any error", "Calculate the actual bit length of the proposed binary string.", "Look up a shaper by a short String name.\n\n@param name Shaper name. Known names have patterns along the lines of:\ndan[12](bio)?(UseLC)?, jenny1(useLC)?, chris[1234](useLC)?.\n@return An integer constant for the shaper", "find the middle point of two intersect points in circle,only one point will be correct\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return", "Check invariant.\n\n@param browser The browser.\n@return Whether the condition is satisfied or <code>false</code> when it it isn't or a\n{@link CrawljaxException} occurs.", "Detailed request to track additional data about PUT, GET and GET_ALL\n\n@param timeNS The time in nanoseconds that the operation took to complete\n@param numEmptyResponses For GET and GET_ALL, how many keys were no values found\n@param valueBytes Total number of bytes across all versions of values' bytes\n@param keyBytes Total number of bytes in the keys\n@param getAllAggregatedCount Total number of keys returned for getAll calls", "Parse request parameters and files.\n@param request\n@param response", "set custom response or request for a profile's default client, ensures profile and path are enabled\n\n@param profileName profileName to modift, default client is used\n@param pathName friendly name of path\n@param isResponse true if response, false for request\n@param customData custom response/request data\n@return true if success, false otherwise" ]
public PreparedStatement getSelectByPKStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException { try { return cds.getStatementsForClass(m_conMan).getSelectByPKStmt(m_conMan.getConnection()); } catch (SQLException e) { throw new PersistenceBrokerSQLException("Could not build statement ask for", e); } catch (LookupException e) { throw new PersistenceBrokerException("Used ConnectionManager instance could not obtain a connection", e); } }
[ "return a prepared Select Statement for the given ClassDescriptor" ]
[ "Write a single resource.\n\n@param mpxj Resource instance", "Creates and populates a new task relationship.\n\n@param field which task field source of data\n@param sourceTask relationship source task\n@param relationship relationship string\n@throws MPXJException", "Returns the list view of corporate groupIds of an organization\n\n@param organizationId String\n@return ListView", "Register an active operation with a specific operation id.\n\n@param id the operation id\n@param attachment the shared attachment\n@param callback the completed callback\n@return the created active operation\n\n@throws java.lang.IllegalStateException if an operation with the same id is already registered", "Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level", "Updates metadata versions on stores.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param oldStoreDefs List of old store definitions\n@param newStoreDefs List of new store definitions", "This method extracts byte arrays from the embedded object data\nand converts them into RTFEmbeddedObject instances, which\nit then adds to the supplied list.\n\n@param offset offset into the RTF document\n@param text RTF document\n@param objects destination for RTFEmbeddedObject instances\n@return new offset into the RTF document", "Create and serialize a JobFailure.\n\n@param thrwbl the Throwable that occurred\n@param queue the queue the job came from\n@param job the Job that failed\n@return the JSON representation of a new JobFailure\n@throws IOException if there was an error serializing the JobFailure", "Get the status of the upload session. It contains the number of parts that are processed so far,\nthe total number of parts required for the commit and expiration date and time of the upload session.\n@return the status." ]
public void rememberAndDisableQuota() { for(Integer nodeId: nodeIds) { boolean quotaEnforcement = Boolean.parseBoolean(adminClient.metadataMgmtOps.getRemoteMetadata(nodeId, MetadataStore.QUOTA_ENFORCEMENT_ENABLED_KEY) .getValue()); mapNodeToQuotaEnforcingEnabled.put(nodeId, quotaEnforcement); } adminClient.metadataMgmtOps.updateRemoteMetadata(nodeIds, MetadataStore.QUOTA_ENFORCEMENT_ENABLED_KEY, Boolean.toString(false)); }
[ "Before cluster management operations, i.e. remember and disable quota\nenforcement settings" ]
[ "Returns an identity matrix", "Read correlation id from message.\n\n@param message the message\n@return the CorrelationId as string", "Add a variable to the scripting context.\n\n@param varName The variable name.\n@param value The variable value.", "Old REST client uses old REST service", "Mojos perform different dependency resolution, so we add dependencies for each mojo.", "Create a new remote proxy controller.\n\n@param client the transactional protocol client\n@param pathAddress the path address\n@param addressTranslator the address translator\n@param targetKernelVersion the {@link ModelVersion} of the kernel management API exposed by the proxied process\n@return the proxy controller", "Get the configuration for a TMS layer by retrieving and parsing it's XML description file. The parsing is done\nusing JaxB.\n@param layer the tms layer to get capabilities for.\n@return Returns the description as a Java configuration object.\n@throws TmsLayerException\nIn case something went wrong trying to find or parse the XML description file.", "Build query string.\n@return Query string or null if query string contains no parameters at all.", "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." ]
public static DMatrixRMaj identity(int numRows , int numCols ) { DMatrixRMaj ret = new DMatrixRMaj(numRows,numCols); int small = numRows < numCols ? numRows : numCols; for( int i = 0; i < small; i++ ) { ret.set(i,i,1.0); } return ret; }
[ "Creates a rectangular matrix which is zero except along the diagonals.\n\n@param numRows Number of rows in the matrix.\n@param numCols NUmber of columns in the matrix.\n@return A matrix with diagonal elements equal to one." ]
[ "try to delegate the master to handle the response\n\n@param response\n@return true if the master accepted the response; false if the master\ndidn't accept", "Convert an ObjectName to a PathAddress.\n\nPatterns are supported: there may not be a resource at the returned PathAddress but a resource model <strong>MUST</strong>\nmust be registered.", "Check whether error handling works. If it works, you should see an\nok, otherwise, you might see the actual error message and then\nthe program exits.", "Provide array of String results from inputOutput MFString field named url.\n@array saved in valueDestination", "Convert this lattice to store data in the given convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param targetConvention The convention to store the data in.\n@param displacement The displacement to use, if applicable.\n@param model The model for context.\n\n@return The converted lattice.", "Returns new instance of OptionalValue with given key and value\n@param key resource key of the created value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue with given key", "Attaches the menu drawer to the content view.", "sorts are a bit more awkward and need a helper...", "Sets the segment reject as a string. This method is for convenience\nto be able to set percent reject type just by calling with '3%' and\notherwise it uses rows. All this assuming that parsing finds '%' characher\nand is able to parse a raw reject number.\n\n@param reject the new segment reject" ]
private static int calculateBeginLine(RuleViolation pmdViolation) { int minLine = Math.min(pmdViolation.getBeginLine(), pmdViolation.getEndLine()); return minLine > 0 ? minLine : calculateEndLine(pmdViolation); }
[ "Calculates the beginLine of a violation report.\n\n@param pmdViolation The violation for which the beginLine should be calculated.\n@return The beginLine is assumed to be the line with the smallest number. However, if the smallest number is\nout-of-range (non-positive), it takes the other number." ]
[ "Adds OPT_P | OPT_PARTITION option to OptionParser, with multiple\narguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Support the range subscript operator for CharSequence with IntRange\n\n@param text a CharSequence\n@param range an IntRange\n@return the subsequence CharSequence\n@since 1.0", "Returns true if this Bytes object equals another. This method doesn't check it's arguments.\n\n@since 1.2.0", "Get the waveform details available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the details associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the WaveformFinder is not running or requesting waveform details", "dispatch to gravity state", "The parameter must never be null\n\n@param queryParameters", "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", "Handler for month changes.\n@param event change event.", "Write a set of fields from a field container to a JSON file.\n@param objectName name of the object, or null if no name required\n@param container field container\n@param fields fields to write" ]
public static String join(final Collection<?> collection, final String separator) { StringBuffer buffer = new StringBuffer(); boolean first = true; Iterator<?> iter = collection.iterator(); while (iter.hasNext()) { Object next = iter.next(); if (first) { first = false; } else { buffer.append(separator); } buffer.append(next); } return buffer.toString(); }
[ "joins a collection of objects together as a String using a separator" ]
[ "returns true if the primary key fields are valid for delete, else false.\nPK fields are valid if each of them contains a valid non-null value\n@param cld the ClassDescriptor\n@param obj the object\n@return boolean", "Retrieve a boolean value.\n\n@param name column name\n@return boolean value", "Sets the alias. By default the entire attribute path participates in the alias\n@param alias The name of the alias to set", "Returns the count of all inbox messages for the user\n@return int - count of all inbox messages", "Returns true if the activity is a start milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone", "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", "Upload a file and attach it to a task\n\n@param task Globally unique identifier for the task.\n@param fileContent Content of the file to be uploaded\n@param fileName Name of the file to be uploaded\n@param fileType MIME type of the file to be uploaded\n@return Request object", "Get a property as a json array or default.\n\n@param key the property name\n@param defaultValue default", "Creates a template node for the given templateString and appends it to the given parent node.\n\nTemplates are translated to generator node trees and expressions in templates can be of type IGeneratorNode.\n\n@return the given parent node" ]
public void checkin(AdminClient client) { if (isClosed.get()) { throw new IllegalStateException("Pool is closing"); } if (client == null) { throw new IllegalArgumentException("client is null"); } boolean isCheckedIn = clientCache.offer(client); if (!isCheckedIn) { // Cache is already full, close this AdminClient client.close(); } }
[ "submit the adminClient after usage is completed.\nBehavior is undefined, if checkin is called with objects not retrieved\nfrom checkout.\n\n@param client AdminClient retrieved from checkout" ]
[ "Retrieve a node list based on an XPath expression.\n\n@param document XML document to process\n@param expression compiled XPath expression\n@return node list", "Writes the results of the processing to a CSV file.", "Backup the current configuration as part of the patch history.\n\n@throws IOException for any error", "Build the crosstab. Throws LayoutException if anything is wrong\n@return", "checkpoint the ObjectModification", "Initialize the key set for an xml bundle.", "Generate a uniform random number in the range [lo, hi)\n\n@param lo lower limit of range\n@param hi upper limit of range\n@return a uniform random real in the range [lo, hi)", "Use this API to fetch policydataset_value_binding resources of given name .", "Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"url\"\n@param jsonObject of Link\n@return String" ]
private Integer getReleaseId() { final String[] versionParts = stringVersion.split("-"); if(isBranch() && versionParts.length >= 3){ return Integer.valueOf(versionParts[2]); } else if(versionParts.length >= 2){ return Integer.valueOf(versionParts[1]); } return 0; }
[ "Return the releaseId\n\n@return releaseId" ]
[ "Remove all existing subscriptions", "Producers returned from this method are not validated. Internal use only.", "This method writes data for a single resource to a Planner file.\n\n@param mpxjResource MPXJ Resource instance\n@param plannerResource Planner Resource instance", "Adds the basic sentence.\n\n@param s the s\n@throws ParseException the parse exception", "Log long string using verbose tag\n\n@param TAG The tag.\n@param longString The long string.", "map a property id. Property id can only be an Integer or String", "Use this API to add dnspolicylabel resources.", "get the converted object corresponding to sourceObject as converted to\ndestination type by converter\n\n@param converter\n@param sourceObject\n@param destinationType\n@return", "Iterates over the elements of an iterable collection of items, starting from\na specified startIndex, and returns the index values of the items that match\nthe condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return a list of numbers corresponding to the index values of all matched objects\n@since 1.5.2" ]
private String getPropertyName(Method method) { String result = method.getName(); if (result.startsWith("get")) { result = result.substring(3); } return result; }
[ "Convert a method name into a property name.\n\n@param method target method\n@return property name" ]
[ "Read a list of fixed sized blocks from the input stream.\n\n@return List of MapRow instances representing the fixed size blocks", "Print an extended attribute date value.\n\n@param value date value\n@return string representation", "Instantiate Service Locator client. After successful instantiation\nestablish a connection to the Service Locator server. This method will be\ncalled if property locatorClient is null. For this purpose was defined\nadditional properties to instantiate ServiceLocatorImpl.\n\n@throws InterruptedException\n@throws ServiceLocatorException", "Initializes an annotation class\n\n@param name The name of the annotation class\n@return The instance of the annotation. Returns a dummy if the class was\nnot found", "If a text contains double quotes, escape them.\n\n@param text the text to escape\n@return Escaped text or {@code null} if the text is null", "Output the SQL type for the default value for the type.", "Use this API to delete dnssuffix of given name.", "Send a sync command to all registered listeners.\n\n@param command the byte which identifies the type of sync command we received", "Prepare our statement for the subclasses.\n\n@param limit\nLimit for queries. Can be null if none." ]
public void configure(@Observes(precedence = -10) ArquillianDescriptor arquillianDescriptor) { Map<String, String> config = arquillianDescriptor.extension(EXTENSION_NAME).getExtensionProperties(); CubeConfiguration cubeConfiguration = CubeConfiguration.fromMap(config); configurationProducer.set(cubeConfiguration); }
[ "Add precedence -10 because we need that ContainerRegistry is available in the Arquillian scope." ]
[ "Print the parameters of the parameterized type t", "Send message to socket's output stream.\n\n@param messageToSend message to send.\n\n@return {@code true} if message was sent successfully, {@code false} otherwise.", "Processes the template for all table definitions in the torque model.\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 delete dnspolicylabel of given name.", "Extracts project properties from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file", "Leave a group.\n\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.leave.html\">lickr.groups.leave</a> for a description of the various behaviors possible\nwhen a user leaves a group.\n\n@param groupId\n- the id of the group to leave\n@param deletePhotos\n- delete photos by this user from group", "Loads the favorite list.\n\n@return the list of favorites\n\n@throws CmsException if something goes wrong", "Removes all documents from the collection that match the given query filter. If no documents\nmatch, the collection is not modified.\n\n@param filter the query filter to apply the the delete operation\n@return the result of the remove many operation", "Compiles and fills the reports design.\n\n@param dr the DynamicReport\n@param layoutManager the object in charge of doing the layout\n@param ds The datasource\n@param _parameters Map with parameters that the report may need\n@return\n@throws JRException" ]
public void seekToHoliday(String holidayString, String direction, String seekAmount) { Holiday holiday = Holiday.valueOf(holidayString); assert(holiday != null); seekToIcsEvent(HOLIDAY_ICS_FILE, holiday.getSummary(), direction, seekAmount); }
[ "Seeks forward or backwards to a particular holiday based on the current date\n\n@param holidayString The holiday to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek" ]
[ "Do some magic to turn request parameters into a context object", "Determines if a token stream contains only numeric tokens\n@param stream\n@return true if all tokens in the given stream can be parsed as an integer", "Create the ResourceIgnoredTransformationRegistry when fetching missing content, only including relevant pieces\nto a server-config.\n\n@param rc the resolution context\n@param delegate the delegate ignored resource transformation registry for manually ignored resources\n@return", "Delete an object from the database by id.", "Requests the beat grid for a specific track ID, given a connection to a player that has already been set up.\n\n@param rekordboxId the track of interest\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved beat grid, or {@code null} if there was none available\n\n@throws IOException if there is a communication problem", "This method log given exception in specified listener", "Use this API to fetch lbvserver_auditnslogpolicy_binding resources of given name .", "Will prompt a user the \"Add to Homescreen\" feature\n\n@param callback A callback function after the method has been executed.", "caching is not supported for this method" ]
public Counter<K1> sumInnerCounter() { Counter<K1> summed = new ClassicCounter<K1>(); for (K1 key : this.firstKeySet()) { summed.incrementCount(key, this.getCounter(key).totalCount()); } return summed; }
[ "Returns the counters with keys as the first key and count as the\ntotal count of the inner counter for that key\n\n@return counter of type K1" ]
[ "Draw text in the center of the specified box.\n\n@param text text\n@param font font\n@param box box to put text int\n@param fontColor colour", "Extract the field types from the fieldConfigs if they have not already been configured.", "Print a percent complete value.\n\n@param value Double instance\n@return percent complete value", "The service name to be removed. Can be overridden for unusual service naming patterns\n@param name The name of the resource being removed\n@return The service name to remove. May return {@code null} if only removal based on {@code unavailableCapabilities}\npassed to the constructor are to be performed", "Bean types of a session bean.", "Propagates the names of all facets to each single facet.", "Execute a request through Odo processing\n\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@param history", "Gets whether the given server can be updated.\n\n@param server the id of the server. Cannot be <code>null</code>\n\n@return <code>true</code> if the server can be updated; <code>false</code>\nif the update should be cancelled\n\n@throws IllegalStateException if this policy is not expecting a request\nto update the given server", "Bessel function of the second kind, of order n.\n\n@param n Order.\n@param x Value.\n@return Y value." ]
private String getPropertyValue(String level, String name) { return getDefForLevel(level).getProperty(name); }
[ "Returns the value of the indicated property of the current object on the specified level.\n\n@param level The level\n@param name The name of the property\n@return The property value" ]
[ "On host controller reload, remove a not running server registered in the process controller declared as down.", "Performs MAC signing of the SMB. This is done as follows.\nThe signature field of the SMB is overwritted with the sequence number;\nThe MD5 digest of the MAC signing key + the entire SMB is taken;\nThe first 8 bytes of this are placed in the signature field.\n\n@param data The data.\n@param offset The starting offset at which the SMB header begins.\n@param length The length of the SMB data starting at offset.", "Maps a duration unit value from a recurring task record in an MPX file\nto a TimeUnit instance. Defaults to days if any problems are encountered.\n\n@param value integer duration units value\n@return TimeUnit instance", "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", "generate a message for loglevel ERROR\n\n@param pObject the message Object", "Expands all parents in a range of indices in the list of parents.\n\n@param startParentPosition The index at which to to start expanding parents\n@param parentCount The number of parents to expand", "Static factory method.\n\n@param targetVariable\nthe variable to find the effective {@code putfield} or\n{@code putstatic} instruction for.\n@param controlFlowBlocks\nall control flow blocks of an initialising constructor or\nmethod.\n@return a new instance of this class.", "Open the store with the version directory specified. If null is specified\nwe open the directory with the maximum version\n\n@param versionDir Version Directory to open. If null, we open the max\nversioned / latest directory", "Reads numBytes bytes, and returns the corresponding string" ]
public static void createUsers(GreenMailOperations greenMail, InternetAddress... addresses) { for (InternetAddress address : addresses) { greenMail.setUser(address.getAddress(), address.getAddress()); } }
[ "Create users for the given array of addresses. The passwords will be set to the email addresses.\n\n@param greenMail Greenmail instance to create users for\n@param addresses Addresses" ]
[ "Start a process using the given parameters.\n\n@param processId\n@param parameters\n@return", "Clean wait task queue.", "Receive some bytes from the player we are requesting metadata from.\n\n@param is the input stream associated with the player metadata socket.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response", "Returns the optional query modifier.\n@return the optional query modifier.", "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>.", "Returns status message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String", "Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion.\n\n@return all the properties whose system property keys were different in previous versions", "Send JSON representation of given data object to all connections of a user\n@param data the data object\n@param username the username", "Adds the class descriptor to this model.\n\n@param classDef The class descriptor\n@return The class descriptor or <code>null</code> if there is no such class in this model" ]
public void alias(DMatrixRMaj variable , String name ) { if( isReserved(name)) throw new RuntimeException("Reserved word or contains a reserved character"); VariableMatrix old = (VariableMatrix)variables.get(name); if( old == null ) { variables.put(name, new VariableMatrix(variable)); }else { old.matrix = variable; } }
[ "Adds a new Matrix variable. If one already has the same name it is written over.\n\nWhile more verbose for multiple variables, this function doesn't require new memory be declared\neach time it's called.\n\n@param variable Matrix which is to be assigned to name\n@param name The name of the variable" ]
[ "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", "Generate JSON format as result of the scan.\n\n@since 1.2", "Copies the given container page to the provided root path.\n@param originalPage the page to copy\n@param targetPageRootPath the root path of the copy target.\n@throws CmsException thrown if something goes wrong.\n@throws NoCustomReplacementException if a custom replacement is not found for a type which requires it.", "Returns iterable with all enterprise assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all enterprise assignments.", "returns a new segment masked by the given mask\n\nThis method applies the mask first to every address in the range, and it does not preserve any existing prefix.\nThe given prefix will be applied to the range of addresses after the mask.\nIf the combination of the two does not result in a contiguous range, then {@link IncompatibleAddressException} is thrown.", "Use this API to fetch vpntrafficpolicy_vpnglobal_binding resources of given name .", "Checks to make sure that pseudo scoped beans (i.e. @Dependent scoped beans) have no circular dependencies.", "Returns the number of key-value mappings in this map for the third key.\n\n@param firstKey\nthe first key\n@param secondKey\nthe second key\n@return Returns the number of key-value mappings in this map for the third key.", "Adds a new child widget to the panel, attaching its Element to the\nspecified container Element.\n\n@param child the child widget to be added\n@param container the element within which the child will be contained" ]
private void parseMetadataItem(Message item) { switch (item.getMenuItemType()) { case TRACK_TITLE: title = ((StringField) item.arguments.get(3)).getValue(); artworkId = (int) ((NumberField) item.arguments.get(8)).getValue(); break; case ARTIST: artist = buildSearchableItem(item); break; case ORIGINAL_ARTIST: originalArtist = buildSearchableItem(item); break; case REMIXER: remixer = buildSearchableItem(item); case ALBUM_TITLE: album = buildSearchableItem(item); break; case LABEL: label = buildSearchableItem(item); break; case DURATION: duration = (int) ((NumberField) item.arguments.get(1)).getValue(); break; case TEMPO: tempo = (int) ((NumberField) item.arguments.get(1)).getValue(); break; case COMMENT: comment = ((StringField) item.arguments.get(3)).getValue(); break; case KEY: key = buildSearchableItem(item); break; case RATING: rating = (int) ((NumberField)item.arguments.get(1)).getValue(); break; case COLOR_NONE: case COLOR_AQUA: case COLOR_BLUE: case COLOR_GREEN: case COLOR_ORANGE: case COLOR_PINK: case COLOR_PURPLE: case COLOR_RED: case COLOR_YELLOW: color = buildColorItem(item); break; case GENRE: genre = buildSearchableItem(item); break; case DATE_ADDED: dateAdded = ((StringField) item.arguments.get(3)).getValue(); break; case YEAR: year = (int) ((NumberField) item.arguments.get(1)).getValue(); break; case BIT_RATE: bitRate = (int) ((NumberField) item.arguments.get(1)).getValue(); break; default: logger.warn("Ignoring track metadata item with unknown type: {}", item); } }
[ "Processes one of the menu responses that jointly constitute the track metadata, updating our\nfields accordingly.\n\n@param item the menu response to be considered" ]
[ "Sets the position of a UIObject", "Use this API to fetch cachecontentgroup resource of given name .", "Get new vector clock based on this clock but incremented on index nodeId\n\n@param nodeId The id of the node to increment\n@return A vector clock equal on each element execept that indexed by\nnodeId", "Load all string recognize.", "Returns whether this address section represents a subnet block of addresses associated its prefix length.\n\nReturns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include\nthe entire subnet block for its prefix length.\n\nIf {@link AddressNetwork#getPrefixConfiguration} is set to consider all prefixes as subnets, this returns true for any grouping with prefix length.\n\n@return", "Retrieves an existing resource assignment if one is present,\nto prevent duplicate resource assignments being added.\n\n@param resource resource to test for\n@return existing resource assignment", "Calls the provided metric getter on all the tracked environments and\nobtains their values\n\n@param metricGetterName\n@return", "Creates a householder reflection.\n\n(I-gamma*v*v')*x = tau*e1\n\n<p>NOTE: Same as cs_house in csparse</p>\n@param x (Input) Vector x (Output) Vector v. Modified.\n@param xStart First index in X that is to be processed\n@param xEnd Last + 1 index in x that is to be processed.\n@param gamma (Output) Storage for computed gamma\n@return variable tau", "Calculates the next snapshot version based on the current release version\n\n@param fromVersion The version to bump to next development version\n@return The next calculated development (snapshot) version" ]
public DownloadRequest addCustomHeader(String key, String value) { mCustomHeader.put(key, value); return this; }
[ "Adds custom header to request\n\n@param key\n@param value" ]
[ "Gets the interpolated text of a query from cache. If key does not exist, an exception is thrown.\n\n@param key\nname of the query\n@return the query text", "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", "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.", "Returns all the pixels for the image\n\n@return an array of pixels for this image", "Returns a flag indicating if also unreleased resources should be found.\n@return A flag indicating if also unreleased resources should be found.", "Use this API to fetch dnspolicy_dnsglobal_binding resources of given name .", "Runs through the log removing segments older than a certain age\n\n@throws IOException", "Read in lines and execute them.\n\n@param reader the reader from which to get the groovy source to exec\n@param out the outputstream to use\n@throws java.io.IOException if something goes wrong", "Returns the \"msgCount\" belief\n\n@return int - the count" ]
public void setDateAttribute(String name, Date value) { ensureAttributes(); Attribute attribute = new DateAttribute(value); attribute.setEditable(isEditable(name)); getAllAttributes().put(name, attribute); }
[ "Sets the specified date 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" ]
[ "Classify stdin by senteces seperated by blank line\n@param readerWriter\n@return\n@throws IOException", "Read the header data for a single file.\n\n@param header header data\n@return SynchroTable instance", "Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries.", "Add additional source types", "Returns the complete record for a single status update.\n\n@param projectStatus The project status update to get.\n@return Request object", "Sets the replace var map to single target.\n\n@param replacementVarMapList\nthe replacement var map list\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder", "Use this API to fetch all the ipset resources that are configured on netscaler.", "Checks if the last argument matches the vararg type.\n@param params\n@param args\n@return -1 if no match, 0 if the last argument is exactly the vararg type and 1 if of an assignable type", "Removes all of the markers from the map." ]
public static Observable<Void> mapToVoid(Observable<?> fromObservable) { if (fromObservable != null) { return fromObservable.subscribeOn(Schedulers.io()) .map(new RXMapper<Void>()); } else { return Observable.empty(); } }
[ "Shortcut for mapping an arbitrary observable to void, using the IO scheduler.\n@param fromObservable the source observable\n@return a void-emitting observable" ]
[ "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", "Adds a new point.\n\n@param point a point\n@return this for chaining", "Get all components of a specific class from this scene object and its descendants.\n@param type component type (as returned from getComponentType())\n@return ArrayList of components with the specified class.", "Accesses a property from the DB configuration for the selected DB.\n\n@param name the name of the property\n@return the value of the property", "Commits the writes to the remote collection.", "if |a11-a22| >> |a12+a21| there might be a better way. see pg371", "Method to service public recording APIs\n\n@param op Operation being tracked\n@param timeNS Duration of operation\n@param numEmptyResponses Number of empty responses being sent back,\ni.e.: requested keys for which there were no values (GET and GET_ALL only)\n@param valueSize Size in bytes of the value\n@param keySize Size in bytes of the key\n@param getAllAggregateRequests Total of amount of keys requested in the operation (GET_ALL only)", "The default field facets.\n\n@param categoryConjunction flag, indicating if category selections in the facet should be \"AND\" combined.\n@return the default field facets.", "Retrieves state and metrics information for all channels on individual connection.\n@param connectionName the connection name to retrieve channels\n@return list of channels on the connection" ]
public static void doPublish(final Jedis jedis, final String namespace, final String channel, final String jobJson) { jedis.publish(JesqueUtils.createKey(namespace, CHANNEL, channel), jobJson); }
[ "Helper method that encapsulates the minimum logic for publishing a job to\na channel.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param channel\nthe channel name\n@param jobJson\nthe job serialized as JSON" ]
[ "This method writes task data to a Planner file.\n\n@throws JAXBException on xml creation errors", "Check if a dependency matches the filters\n\n@param dependency\n\n@return boolean", "Writes the given configuration to the given file.", "Subtract a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the subtract of specified complex number with a scalar value.", "Create all the links possible between the Declaration and all the ImporterService matching the.\nImporterServiceFilter of the Linker.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration", "Use this API to update nspbr6 resources.", "Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.", "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", "Ensures that the start and end dates for ranges fit within the\nworking times for a given day.\n\n@param calendar current calendar\n@param list assignment data" ]
public static Iterable<BoxUser.Info> getAllEnterpriseUsers(final BoxAPIConnection api, final String filterTerm, final String... fields) { return getUsersInfoForType(api, filterTerm, null, null, fields); }
[ "Returns an iterable containing all the enterprise users that matches the filter and specifies which child fields\nto retrieve from the API.\n@param api the API connection to be used when retrieving the users.\n@param filterTerm used to filter the results to only users starting with this string in either the name or the\nlogin. Can be null to not filter the results.\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing all the enterprise users that matches the filter." ]
[ "Look for the specified album art in both the hot cache of loaded tracks and the longer-lived LRU cache.\n\n@param artReference uniquely identifies the desired album art\n\n@return the art, if it was found in one of our caches, or {@code null}", "Save the values to the bundle descriptor.\n@throws CmsException thrown if saving fails.", "Reads a color value represented by three bytes, for R, G, and B\ncomponents, plus a flag byte indicating if this is an automatic color.\nReturns null if the color type is \"Automatic\".\n\n@param data byte array of data\n@param offset offset into array\n@return new Color instance", "Use this API to fetch dbdbprofile resource of given name .", "Log block data.\n\n@param blockIndex current block index\n@param startIndex start index\n@param blockLength length", "This should be called from a subclass constructor, if offset or length\nare unknown at a time when SubIIMInputStream constructor is called. This\nmethod shouldn't be called more than once.\n\n@param offset\nbyte offset\n@param length\nbyte length\n@throws IOException\nif underlying stream can't be read", "Merges the immutable container types of this Configuration with the given\nConfiguration.\n\nThe resultant immutable container types results will be the union of the two sets of\nimmutable container types. Where the type is found in both\nConfigurations, the result from otherConfiguration will replace the\nexisting result in this Configuration. This replacement behaviour will\noccur for subsequent calls to\n{@link #mergeImmutableContainerTypesFrom(Configuration)} .\n\n@param otherConfiguration - Configuration to merge immutable container types with.", "Validates the input parameters.", "Add a '&lt;&gt;' clause so the column must be not-equal-to the value." ]
public IntervalFrequency getRefreshFrequency() { switch (mRefreshInterval) { case REALTIME_REFRESH_INTERVAL: return IntervalFrequency.REALTIME; case HIGH_REFRESH_INTERVAL: return IntervalFrequency.HIGH; case LOW_REFRESH_INTERVAL: return IntervalFrequency.LOW; case MEDIUM_REFRESH_INTERVAL: return IntervalFrequency.MEDIUM; default: return IntervalFrequency.NONE; } }
[ "Get the refresh frequency of this scene object.\n\n@return The refresh frequency of this TextViewSceneObject." ]
[ "Returns an iterable containing the items in this folder and specifies which child fields to retrieve from the\nAPI.\n\n@param fields the fields to retrieve.\n@return an iterable containing the items in this folder.", "Reports a dependency of this node has been faulted.\n\n@param dependencyKey the id of the dependency node\n@param throwable the reason for unsuccessful resolution", "get bearer token returned by IAM in JSON format", "Changes to cluster OR store definition metadata results in routing\nstrategies changing. These changes need to be propagated to all the\nlisteners.\n\n@param cluster The updated cluster metadata\n@param storeDefs The updated list of store definition", "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", "Resets all override settings for the clientUUID and disables it\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@throws Exception exception", "Apply the necessary rotation to the transform so that it is in front of\nthe camera.\n\n@param transform The transform to modify.", "Returns all program element docs that have a visibility greater or\nequal than the specified level", "Draws the specified image with the first rectangle's bounds, clipping with the second one.\n\n@param img image\n@param rect rectangle\n@param clipRect clipping bounds\n@param opacity opacity of the image (1 = opaque, 0= transparent)" ]
public Response getBill(int month, int year) throws RequestException, LocalOperationException { Request request = new Request(this); return new Response(request.get("/bill/" + year + String.format("-%02d", month))); }
[ "Returns the bill for the month specified.\n\n@param month for which bill to retrieve.\n@param year for which bill 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." ]
[ "Converts a List to a Map using the elements of the nameMapping array as the keys of the Map.\n\n@param destinationMap\nthe destination Map (which is cleared before it's populated)\n@param nameMapping\nthe keys of the Map (corresponding with the elements in the sourceList). Cannot contain duplicates.\n@param sourceList\nthe List to convert\n@param <T>\nthe type of the values in the map\n@throws NullPointerException\nif destinationMap, nameMapping or sourceList are null\n@throws SuperCsvException\nif nameMapping and sourceList are not the same size", "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", "Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return", "Converts the permutation matrix into a vector\n@param P (Input) Permutation matrix\n@param vector (Output) Permutation vector", "Use this API to fetch tmtrafficaction resource of given name .", "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()}", "convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day", "Allows to access the names of the current defined roundings.\n\n@param providers the providers and ordering to be used. By default providers and ordering as defined in\n#getDefaultProviders is used.\n@return the set of custom rounding ids, never {@code null}.", "Sets the lower limits for the \"moving\" body rotation relative to joint point.\n\n@param limitX the X axis lower rotation limit (in radians)\n@param limitY the Y axis lower rotation limit (in radians)\n@param limitZ the Z axis lower rotation limit (in radians)" ]
public void fit( double samplePoints[] , double[] observations ) { // Create a copy of the observations and put it into a matrix y.reshape(observations.length,1,false); System.arraycopy(observations,0, y.data,0,observations.length); // reshape the matrix to avoid unnecessarily declaring new memory // save values is set to false since its old values don't matter A.reshape(y.numRows, coef.numRows,false); // set up the A matrix for( int i = 0; i < observations.length; i++ ) { double obs = 1; for( int j = 0; j < coef.numRows; j++ ) { A.set(i,j,obs); obs *= samplePoints[i]; } } // process the A matrix and see if it failed if( !solver.setA(A) ) throw new RuntimeException("Solver failed"); // solver the the coefficients solver.solve(y,coef); }
[ "Computes the best fit set of polynomial coefficients to the provided observations.\n\n@param samplePoints where the observations were sampled.\n@param observations A set of observations." ]
[ "Update which options are shown.\n@param showModeSwitch flag, indicating if the mode switch should be shown.\n@param showAddKeyOption flag, indicating if the \"Add key\" row should be shown.", "Obtain the destination hostname for a source host\n\n@param hostName\n@return", "Add a single header key-value pair. If one with the name already exists,\nit gets replaced.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself.", "Handles newlines by removing them and add new rows instead", "Boyer Moore scan that proceeds forwards from the end of the file looking for the first LOCSIG", "Get Rule\nGet a rule using the Rule ID\n@param ruleId Rule ID. (required)\n@return RuleEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "Use this API to export sslfipskey.", "Adds an index to the table for the given index descriptor.\n\n@param indexDescDef The index descriptor\n@param tableDef The table", "Convert an ObjectBank to corresponding collection of data features and\nlabels.\n\n@return A List of pairs, one for each document, where the first element is\nan int[][][] representing the data and the second element is an\nint[] representing the labels." ]
public static base_responses unset(nitro_service client, onlinkipv6prefix resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { onlinkipv6prefix unsetresources[] = new onlinkipv6prefix[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new onlinkipv6prefix(); unsetresources[i].ipv6prefix = resources[i].ipv6prefix; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "Use this API to unset the properties of onlinkipv6prefix resources.\nProperties that need to be unset are specified in args array." ]
[ "BuildInteractiveObjectFromAnchor is a special type of interactive object in that it does not get\nbuilt using ROUTE's.\n\n@param anchorSensor is the Sensor that describes the sensor set to an Anchor\n@param anchorDestination is either another Viewpoint, url to a web site or another x3d scene", "Set an enterprise cost value.\n\n@param index cost index (1-30)\n@param value cost value", "Return a named object associated with the specified key.", "Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name", "Retrieve all Collection attributes of a given instance, and make all of the Proxy Collections\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs", "Returns the Java executable command.\n\n@param javaHome the java home directory or {@code null} to use the default\n\n@return the java command to use", "Round the size of a rectangle with double values.\n\n@param rectangle The rectangle.\n@return", "Return a string representation of the object.", "Assembles the exception message when the value received by a CellProcessor isn't of the correct type.\n\n@param expectedType\nthe expected type\n@param actualValue\nthe value received by the CellProcessor\n@return the message\n@throws NullPointerException\nif expectedType is null" ]