query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public String getCsv() { StringWriter writer = new StringWriter(); try (CSVWriter csv = new CSVWriter(writer)) { List<String> headers = new ArrayList<>(); for (String col : m_columns) { headers.add(col); } csv.writeNext(headers.toArray(new String[] {})); for (List<Object> row : m_data) { List<String> colCsv = new ArrayList<>(); for (Object col : row) { colCsv.add(String.valueOf(col)); } csv.writeNext(colCsv.toArray(new String[] {})); } return writer.toString(); } catch (IOException e) { return null; } }
[ "Converts the results to CSV data.\n\n@return the CSV data" ]
[ "Pump events from event stream.", "Confirms that both clusters have the same set of zones defined.\n\n@param lhs\n@param rhs", "Answer the FieldConversions for the PkFields\n@param cld\n@return the pk FieldConversions", "Prepare our statement for the subclasses.\n\n@param limit\nLimit for queries. Can be null if none.", "Returns information for a specific path id\n\n@param pathId ID of path\n@param clientUUID client UUID\n@param filters filters to set on endpoint\n@return EndpointOverride\n@throws Exception exception", "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.", "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.", "The specified interface must not contain methods, that changes the state of this object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@param settings\nsettings to generate code\n@return generated source code as string in a result wrapper", "Examines the error data returned from Facebook and throws the most applicable exception.\n@param errorDetails a Map containing a \"type\" and a \"message\" corresponding to the Graph API's error response structure." ]
public void writeObject(Object o, GraphicsDocument document, boolean asChild) throws RenderException { document.writeElement("vml:shape", asChild); Point p = (Point) o; String adj = document.getFormatter().format(p.getX()) + "," + document.getFormatter().format(p.getY()); document.writeAttribute("adj", adj); }
[ "Writes the object to the specified document, optionally creating a child\nelement. The object in this case should be a point.\n\n@param o the object (of type Point).\n@param document the document to write to.\n@param asChild create child element if true.\n@throws RenderException" ]
[ "Extracts location result from intent object\n\n@param intent valid intent object\n@return location result.\n@since 1.1.0", "Use this API to unset the properties of onlinkipv6prefix resource.\nProperties that need to be unset are specified in args array.", "Use picasso to render the video thumbnail into the thumbnail widget using a temporal\nplaceholder.\n\n@param video to get the rendered thumbnail.", "Use this API to add dospolicy resources.", "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", "Use this API to unset the properties of sslservice resource.\nProperties that need to be unset are specified in args array.", "Main method of this class related to RecyclerView widget. This method is the responsible of\ncreate a new Renderer instance with all the needed information to implement the rendering.\nThis method will validate all the attributes passed in the builder constructor and will create\na RendererViewHolder instance.\n\nThis method is used with RecyclerView because the view recycling mechanism is implemented out\nof this class and we only have to return new RendererViewHolder instances.\n\n@return ready to use RendererViewHolder instance.", "Scans given archive for files passing given filter, adds the results into given list.", "Send parallel task to execution manager.\n\n@param task\nthe parallel task\n@return the batch response from manager" ]
private String getIntegerString(Number value) { return (value == null ? null : Integer.toString(value.intValue())); }
[ "Convert an Integer value into a String.\n\n@param value Integer value\n@return String value" ]
[ "Deletes this collaboration.", "Decode long from byte array at offset\n\n@param ba byte array\n@param offset Offset\n@return long value", "Finds out which dump files of the given type are available for download.\nThe result is a list of objects that describe the available dump files,\nin descending order by their date. Not all of the dumps included might be\nactually available.\n\n@return list of objects that provide information on available full dumps", "Parse currency.\n\n@param value currency value\n@return currency value", "Remove all children that have been added to the owner object of this camera rig; except the\ncamera objects.", "Compute a singular-value decomposition of A.\n\n@return A DoubleMatrix[3] array of U, S, V such that A = U * diag(S) * V'", "Remove a tag from a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param tagId\nThe tag ID\n@throws FlickrException", "Parses command-line and synchronizes metadata versions across all\nnodes.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "This private method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions. It assumes\nthat the caller has already calculated the day of the week on which\nthe given day falls.\n\n@param date Date to be tested\n@param day Day of the week for the date under test\n@return boolean flag" ]
protected String escapeApostrophes(String text) { String resultString; if (text.contains("'")) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("concat('"); stringBuilder.append(text.replace("'", "',\"'\",'")); stringBuilder.append("')"); resultString = stringBuilder.toString(); } else { resultString = "'" + text + "'"; } return resultString; }
[ "Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string" ]
[ "Use this API to unset the properties of clusterinstance resources.\nProperties that need to be unset are specified in args array.", "Executes the rebalance plan. Does so batch-by-batch. Between each batch,\nstatus is dumped to logger.info.\n\n@param rebalancePlan", "Gen job id.\n\n@return the string", "Remove any mapping for this key, and return any previously\nmapped value.\n\n@param key the key whose mapping is to be removed\n@return the value removed, or null", "Converts the results to CSV data.\n\n@return the CSV data", "Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise.", "Aliases variables with an unknown type.\n@param variable The variable being aliased\n@param name Name of the variable", "Call when you are done with the client\n\n@throws Exception", "Use this API to fetch authenticationtacacspolicy_systemglobal_binding resources of given name ." ]
private String quoteFormatCharacters(String literal) { StringBuilder sb = new StringBuilder(); int length = literal.length(); char c; for (int loop = 0; loop < length; loop++) { c = literal.charAt(loop); switch (c) { case '0': case '#': case '.': case '-': case ',': case 'E': case ';': case '%': { sb.append("'"); sb.append(c); sb.append("'"); break; } default: { sb.append(c); break; } } } return (sb.toString()); }
[ "This method is used to quote any special characters that appear in\nliteral text that is required as part of the currency format.\n\n@param literal Literal text\n@return literal text with special characters in quotes" ]
[ "MPP14 files seem to exhibit some occasional weirdness\nwith duplicate ID values which leads to the task structure\nbeing reported incorrectly. The following method attempts to correct this.\nThe method uses ordering data embedded in the file to reconstruct\nthe correct ID order of the tasks.", "Updates a metadata classification on the specified file.\n\n@param classificationType the metadata classification type.\n@return the new metadata classification type updated on the file.", "Returns a specific profile\n\n@param profileId ID of profile\n@return Selected profile if found, null if not found\n@throws Exception exception", "Use this API to fetch all the tmsessionparameter resources that are configured on netscaler.", "Extract resource group from a resource ID string.\n@param id the resource ID string\n@return the resource group name", "Creates a clone using java serialization\n\n@param from Object to be cloned\n@param <T> type of the cloned object\n@return Clone of the object", "Returns iterable with all non-deleted file version legal holds for this legal hold 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 file version legal holds info.", "generate a message for loglevel ERROR\n\n@param pObject the message Object", "Returns the full workspace record for a single workspace.\n\n@param workspace Globally unique identifier for the workspace or organization.\n@return Request object" ]
public static base_response clear(nitro_service client, bridgetable resource) throws Exception { bridgetable clearresource = new bridgetable(); clearresource.vlan = resource.vlan; clearresource.ifnum = resource.ifnum; return clearresource.perform_operation(client,"clear"); }
[ "Use this API to clear bridgetable." ]
[ "returns the values of the orientation tag", "Construct an InterestRateSwapProductDescriptor from a node in a FpML file.\n\n@param trade The node containing the swap.\n@return Descriptor of the swap.", "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", "Create a document that parses the tile's labelFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@param labelStyleInfo\nlabel style info\n@return graphics document\n@throws RenderException\ncannot render", "Sorts the specified list itself according to the order induced by applying a key function to each element which\nyields a comparable criteria.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)", "Fetches a list of available photo licenses for Flickr.\n\nThis method does not require authentication.\n\n@return A collection of License objects\n@throws FlickrException", "This method is used to parse a string representation of a time\nunit, and return the appropriate constant value.\n\n@param units string representation of a time unit\n@param locale target locale\n@return numeric constant\n@throws MPXJException normally thrown when parsing fails", "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", "Obtain the master partition for a given key\n\n@param key\n@return master partition id" ]
public static DMatrixRMaj extractColumn(DMatrixRMaj a , int column , DMatrixRMaj out ) { if( out == null) out = new DMatrixRMaj(a.numRows,1); else if( !MatrixFeatures_DDRM.isVector(out) || out.getNumElements() != a.numRows ) throw new MatrixDimensionException("Output must be a vector of length "+a.numRows); int index = column; for (int i = 0; i < a.numRows; i++, index += a.numCols ) { out.data[i] = a.data[index]; } return out; }
[ "Extracts the column from a matrix.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column." ]
[ "Retrieve multiple properties.\n\n@param method method definition\n@param object target object\n@param map parameter values", "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.", "True if deleted, false if not found.", "Returns the configured page size, or the default page size if it is not configured.\n@return The configured page size, or the default page size if it is not configured.", "Inserts a CharSequence array value into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a CharSequence array object, or null\n@return this bundler instance to chain method calls", "Replace default values will null, allowing them to be ignored.\n\n@param value value to test\n@return filtered value", "Creates a random Hermitian matrix with elements from min to max value.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.", "allow extension only for testing", "As we merge several operations into one operation, we need to be sure the write concern applied to the aggregated\noperation respects all the requirements expressed for each separate operation.\n\nThus, for each parameter of the write concern, we keep the stricter one for the resulting merged write concern." ]
public LatLong getDestinationPoint(double bearing, double distance) { double brng = Math.toRadians(bearing); double lat1 = latToRadians(); double lon1 = longToRadians(); double lat2 = Math.asin(Math.sin(lat1) * Math.cos(distance / EarthRadiusMeters) + Math.cos(lat1) * Math.sin(distance / EarthRadiusMeters) * Math.cos(brng)); double lon2 = lon1 + Math.atan2(Math.sin(brng) * Math.sin(distance / EarthRadiusMeters) * Math.cos(lat1), Math.cos(distance / EarthRadiusMeters) - Math.sin(lat1) * Math.sin(lat2)); return new LatLong(Math.toDegrees(lat2), Math.toDegrees(lon2)); }
[ "Calculates the LatLong position of the end point of a line the specified\ndistance from this LatLong, along the provided bearing, where North is 0,\nEast is 90 etc.\n\n@param bearing The bearing, in degrees, with North as 0, East as 90 etc.\n@param distance The distance in metres.\n@return A new LatLong indicating the end point." ]
[ "Use this API to update snmpuser.", "Adds a symbol to the end of the token list\n@param symbol Symbol which is to be added\n@return The new Token created around symbol", "Returns the key of the entity targeted by the represented association, retrieved from the given tuple.\n\n@param tuple the tuple from which to retrieve the referenced entity key\n@return the key of the entity targeted by the represented association", "Returns true if the given candidate is a group that is filtered due to rule parameters in the current call graph.", "Use this API to fetch a tmglobal_tmsessionpolicy_binding resources.", "Returns a new client id for the profileIdentifier\n\n@param model\n@param profileIdentifier\n@return json with a new client_id\n@throws Exception", "Use this API to fetch cmppolicylabel_cmppolicy_binding resources of given name .", "Check if a given string is a template path or template content\n\nIf the string contains anyone the following characters then we assume it\nis content, otherwise it is path:\n\n* space characters\n* non numeric-alphabetic characters except:\n** dot \".\"\n** dollar: \"$\"\n\n@param string\nthe string to be tested\n@return `true` if the string literal is template content or `false` otherwise", "Will spawn a thread for each type in rootEntities, they will all re-join\non endAllSignal when finished.\n\n@param backend\n\n@throws InterruptedException\nif interrupted while waiting for endAllSignal." ]
public static int cudnnSoftmaxForward( cudnnHandle handle, int algo, int mode, Pointer alpha, cudnnTensorDescriptor xDesc, Pointer x, Pointer beta, cudnnTensorDescriptor yDesc, Pointer y) { return checkResult(cudnnSoftmaxForwardNative(handle, algo, mode, alpha, xDesc, x, beta, yDesc, y)); }
[ "Function to perform forward softmax" ]
[ "Creates a jrxml file\n\n@param dr\n@param layoutManager\n@param _parameters\n@param xmlEncoding (default is UTF-8 )\n@param outputStream\n@throws JRException", "Read an array of bytes of a specified size.\n\n@param size number of bytes to read\n@return ByteArray instance", "Use this API to delete route6 resources.", "Convert a Java LinkedList to a Scala Iterable.\n@param linkedList Java LinkedList to convert\n@return Scala Iterable", "Returns the modules paths used on the command line.\n\n@return the paths separated by the {@link File#pathSeparator path separator}", "used for encoding queries or form data", "Use this API to fetch appfwprofile_excluderescontenttype_binding resources of given name .", "Returns the default privacy level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@throws FlickrException\n@return privacyLevel", "Create the index and associate it with all project models in the Application" ]
@SuppressWarnings("unchecked") protected String addeDependency(Appliable<? extends Indexable> appliable) { TaskGroup.HasTaskGroup dependency = (TaskGroup.HasTaskGroup) appliable; return this.addDependency(dependency); }
[ "Add an appliable dependency for this task item.\n\n@param appliable the appliable dependency.\n@return the key to be used as parameter to taskResult(string) method to retrieve updated dependency" ]
[ "Retrieve the index of the table entry valid for the supplied date.\n\n@param date required date\n@return cost rate table entry index", "Split string of comma-delimited ints into an a int array\n\n@param str\n@return\n@throws IllegalArgumentException", "Registers annotations which will be considered as bean defining annotations.\n\nNOTE - If used along with {@code <trim/>} bean archives and/or with Weld configuration key\n{@code org.jboss.weld.bootstrap.vetoTypesWithoutBeanDefiningAnnotation}, these annotations will be ignored.\n\n@param annotations annotations which will be considered as Bean Defining Annotations.\n@return self", "Returns a List of all of the values in the Map whose key matches an entry in the nameMapping array.\n\n@param map\nthe map\n@param nameMapping\nthe keys of the Map values to add to the List\n@return a List of all of the values in the Map whose key matches an entry in the nameMapping array\n@throws NullPointerException\nif map or nameMapping is null", "Convenience method which locates the first P3 database in a directory\nand opens it.\n\n@param directory directory containing a P3 database\n@return ProjectFile instance", "Deletes a specific client id for a profile\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return returns the table of the remaining clients or an exception if deletion failed for some reason\n@throws Exception", "Mark content as obsolete. If content was already marked for obsolescenceTimeout ms then it is removed.\n\n@param ref the content refrence to be marked as obsolete.\n\n@return true if the content refrence is removed, fale otherwise.", "Use this API to fetch sslcertkey_sslvserver_binding resources of given name .", "Get the list of store names from a list of store definitions\n\n@param list\n@param ignoreViews\n@return list of store names" ]
private void processPredecessor(Task task, MapRow row) { Task predecessor = m_taskMap.get(row.getUUID("PREDECESSOR_UUID")); if (predecessor != null) { task.addPredecessor(predecessor, row.getRelationType("RELATION_TYPE"), row.getDuration("LAG")); } }
[ "Extract data for a single predecessor.\n\n@param task parent task\n@param row Synchro predecessor data" ]
[ "Close all JDBC objects related to this connection.", "Return an instance of this class.\n\n@param container Solr CoreContainer container object in order to create a server object.\n\n@return instance of CmsSolrSpellchecker", "Pops the top of the stack of active elements if the current position in the call stack corresponds to the one\nthat pushed the active elements.\n\n<p>This method does not do any type checks, so take care to retrieve the elements with the same types used to push\nto them onto the stack.\n\n@param <T> the type of the elements\n\n@return the active elements or null if the current call stack did not push any active elements onto the stack", "Retrieve timephased baseline cost. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present", "provides a safe toString", "Send ourselves \"updates\" about any tracks that were loaded before we started, since we missed them.", "Returns iterable containing assignments for this single legal hold policy.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy.", "Merge the contents of the given plugin.xml into this one.", "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\"" ]
public void addHeader(String key, String value) { if (key.equals("As-User")) { for (int i = 0; i < this.headers.size(); i++) { if (this.headers.get(i).getKey().equals("As-User")) { this.headers.remove(i); } } } if (key.equals("X-Box-UA")) { throw new IllegalArgumentException("Altering the X-Box-UA header is not permitted"); } this.headers.add(new RequestHeader(key, value)); }
[ "Adds an HTTP header to this request.\n@param key the header key.\n@param value the header value." ]
[ "Changes to a new sub-view and stores a report to be displayed by that subview.<p<\n\n@param newState the new state\n@param thread the report thread which should be displayed in the sub view\n@param label the label to display for the report", "Read a single weekday from the provided JSON value.\n@param val the value to read the week day from.\n@return the week day read\n@throws IllegalArgumentException thrown if the provided JSON value is not the representation of a week day.", "This method prints goal information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return goals the IGoal[] with all the information, so the tester can\nlook for information", "Pushes a class type onto the stack from the string representation This can\nalso handle primitives\n\n@param b the bytecode\n@param classType the type descriptor for the class or primitive to push.\nThis will accept both the java.lang.Object form and the\nLjava/lang/Object; form", "return request is success by JsonRtn object\n\n@param jsonRtn\n@return", "performs a SQL UPDTE, INSERT or DELETE statement against RDBMS.\n@param sqlStatement the query string.\n@param cld ClassDescriptor providing meta-information.\n@return int returncode", "Check if zone count policy is satisfied\n\n@return whether zone is satisfied", "Copy a patch element\n\n@param entry the patch entry\n@param patchId the patch id for the element\n@param modifications the element modifications\n@return the new patch element", "Returns with a view of all scopes known by this manager." ]
public static int rank(DMatrixRMaj A , double threshold ) { SingularValueDecomposition_F64<DMatrixRMaj> svd = DecompositionFactory_DDRM.svd(A.numRows,A.numCols,false,false,true); if( svd.inputModified() ) A = A.copy(); if( !svd.decompose(A) ) throw new RuntimeException("Decomposition failed"); return SingularOps_DDRM.rank(svd, threshold); }
[ "Computes the rank of a matrix using the specified tolerance.\n\n@param A Matrix whose rank is to be calculated. Not modified.\n@param threshold The numerical threshold used to determine a singular value.\n@return The matrix's rank." ]
[ "Update database schema\n\n@param migrationPath path to migrations", "Retrieve and validate vector clock value from the REST request.\n\"X_VOLD_VECTOR_CLOCK\" is the vector clock header.\n\n@return true if present, false if missing", "Attaches the menu drawer to the content view.", "Generates the body of a toString method that uses a StringBuilder and a separator variable.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\noptional, we have no choice but to track the separators at runtime, as apart from the first\none, all properties will need to have a comma prepended. We could do this with a boolean,\nmaybe called \"separatorNeeded\", or \"firstValueOutput\", but then we need either a ternary\noperator or an extra nested if block. More readable is to use an initially-empty \"separator\"\nstring, which has a comma placed in it once the first value is written.\n\n<p>For extra tidiness, we note that the first if block need not try writing the separator\n(it is always empty), and the last one need not update it (it will not be used again).", "Given a date represented by a Date instance, set the time\ncomponent of the date based on the hours and minutes of the\ntime supplied by the Date instance.\n\n@param date Date instance representing the date\n@param canonicalTime Date instance representing the time of day\n@return new Date instance with the required time set", "Set the current playback position. This method can only be used in situations where the component is\ntied to a single player, and therefore always has a single playback position.\n\nWill cause part of the component to be redrawn if the position has\nchanged. This will be quickly overruled if a player is being monitored, but\ncan be used in other contexts.\n\n@param milliseconds how far into the track has been played\n\n@see #setPlaybackState", "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", "Return the trimmed source line corresponding to the specified AST node\n\n@param node - the Groovy AST node", "Gets the favorite entries corresponding to the currently displayed favorite widgets.\n\n@return the list of favorite entries" ]
@SuppressWarnings("WeakerAccess") public String formatCueCountdown() { int count = getCueCountdown(); if (count == 511) { return "--.-"; } if ((count >= 1) && (count <= 256)) { int bars = (count - 1) / 4; int beats = ((count - 1) % 4) + 1; return String.format("%02d.%d", bars, beats); } if (count == 0) { return "00.0"; } return "??.?"; }
[ "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()" ]
[ "Randomize the gradient.", "Creates a code location URL from a URL\n\n@param url the URL external form\n@return A URL created from URL\n@throws InvalidCodeLocation if URL creation fails", "Harvest any values that may have been returned during the execution\nof a procedure.\n\n@param proc the procedure descriptor that provides info about the procedure\nthat was invoked.\n@param obj the object that was persisted\n@param stmt the statement that was used to persist the object.\n\n@throws PersistenceBrokerSQLException if a problem occurs.", "Returns all program element docs that have a visibility greater or\nequal than the specified level", "Replace HTML entities\n@param content Content\n@param map Map\n@return Replaced content", "You can register styles object for later reference them directly. Parent\nstyles should be registered this way\n\n@param style\n@return\n@throws DJBuilderException", "Set the timeout for idle connections. Voldemort client caches all\nconnections to the Voldemort server. This setting allows the a connection\nto be dropped, if it is idle for more than this time.\n\nThis could be useful in the following cases 1) Voldemort client is not\ndirectly connected to the server and is connected via a proxy or\nfirewall. The Proxy or firewall could drop the connection silently. If\nthe connection is dropped, then client will see operations fail with a\ntimeout. Setting this property enables the Voldemort client to tear down\nthe connection before a firewall could drop it. 2) Voldemort server\ncaches the connection and each connection has an associated memory cost.\nSetting this property on all clients, enable the clients to prune the\nconnections and there by freeing up the server connections.\n\nthrows IllegalArgumentException if the timeout is less than 10 minutes.\n\nCurrently it can't be set below 10 minutes to avoid the racing risk of\ncontention between connection checkout and selector trying to close it.\nThis is intended for low throughput scenarios.\n\n@param idleConnectionTimeout\nzero or negative number to disable the feature ( default -1)\ntimeout\n@param unit {@link TimeUnit}\n@return ClientConfig object for chained set\n\nthrows {@link IllegalArgumentException} if the timeout is greater\nthan 0, but less than 10 minutes.", "Restore authentications from persisted state.\n\n@param savedAuthorization saved authorizations", "Gets the value of the project property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the project property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetProject().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ProjectListType.Project }" ]
public static DoubleMatrix absi(DoubleMatrix x) { /*# mapfct('Math.abs') #*/ //RJPP-BEGIN------------------------------------------------------------ for (int i = 0; i < x.length; i++) x.put(i, (double) Math.abs(x.get(i))); return x; //RJPP-END-------------------------------------------------------------- }
[ "Sets all elements in this matrix to their absolute values. Note\nthat this operation is in-place.\n@see MatrixFunctions#abs(DoubleMatrix)\n@return this matrix" ]
[ "Returns the ending used by the Wikimedia-provided dumpfile names of the\ngiven type.\n\n@param dumpContentType\nthe type of dump\n@return postfix of the dumpfile name\n@throws IllegalArgumentException\nif the given dump file type is not known", "To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!", "returns the bytesize of the give bitmap", "Promote a module in the Grapes server\n\n@param name\n@param version\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Old SOAP client uses new SOAP service with the\nredirection to the new endpoint and transformation\non the server side", "Execute the transactional flow - catch all exceptions\n\n@param input Initial data input\n@return Try that represents either success (with result) or failure (with errors)", "Computes the inner product of A times A and stores the results in B. The inner product is symmetric and this\nfunction will only store the lower triangle. The value of the upper triangular matrix is undefined.\n\n<p>B = A<sup>T</sup>*A</sup>\n\n@param A (Input) Matrix\n@param B (Output) Storage for output.", "Request a scoped transactional token.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@return a BoxAPIConnection which can be used to perform transactional requests.", "Adds the given entity to the inverse associations it manages." ]
public static int brightnessNTSC(int rgb) { int r = (rgb >> 16) & 0xff; int g = (rgb >> 8) & 0xff; int b = rgb & 0xff; return (int)(r*0.299f + g*0.587f + b*0.114f); }
[ "Return the NTSC gray level of an RGB value.\n@param rgb1 the input pixel\n@return the gray level (0-255)" ]
[ "check if MessageID exists in the message, if not, only generate new MessageID for outbound message.\n@param message", "Return all valid tenors for a given moneyness and maturity.\n\n@param moneynessBP The moneyness in bp for which to get the tenors.\n@param maturityInMonths The maturities in months for which to get the tenors.\n@return The tenors in months.", "Reads a string from input stream saved as a sequence of UTF chunks.\n\n@param stream stream to read from.\n@return output string\n@throws IOException if something went wrong", "Return the numeraire at a given time.\nThe numeraire is provided for interpolated points. If requested on points which are not\npart of the tenor discretization, the numeraire uses a linear interpolation of the reciprocal\nvalue. See ISBN 0470047224 for details.\n\n@param time Time time <i>t</i> for which the numeraire should be returned <i>N(t)</i>.\n@return The numeraire at the specified time as <code>RandomVariableFromDoubleArray</code>\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Convert from a DTO to an internal Spring bean definition.\n\n@param beanDefinitionDto The DTO object.\n@return Returns a Spring bean definition.", "Calculates the legend positions and which legend title should be displayed or not.\n\nImportant: the LegendBounds in the _Models should be set and correctly calculated before this\nfunction is called!\n@param _Models The graph data which should have the BaseModel class as parent class.\n@param _StartX Left starting point on the screen. Should be the absolute pixel value!\n@param _Paint The correctly set Paint which will be used for the text painting in the later process", "Return the class of one of the properties of another class from which the Hibernate metadata is given.\n\n@param meta\nThe parent class to search a property in.\n@param propertyName\nThe name of the property in the parent class (provided by meta)\n@return Returns the class of the property in question.\n@throws HibernateLayerException\nThrows an exception if the property name could not be retrieved.", "Demonstrates how to add an override to an existing path", "Handle http worker response.\n\n@param respOnSingleReq\nthe my response\n@throws Exception\nthe exception" ]
public ItemRequest<Task> removeProject(String task) { String path = String.format("/tasks/%s/removeProject", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "Removes the task from the specified project. The task will still exist\nin the system, but it will not be in the project anymore.\n\nReturns an empty data block.\n\n@param task The task to remove from a project.\n@return Request object" ]
[ "Generate a new check box with the provided date and check state.\n@param date date for the check box.\n@param checkState the initial check state.\n@return the created check box", "Get the metadata of all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the track information reported by all current players, including any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the MetadataFinder is not running", "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", "Stop finding waveforms for all active players.", "Utility function that copies a string array and add another string to\nfirst\n\n@param arr Original array of strings\n@param add\n@return Copied array of strings", "resolves any lazy cross references in this resource, adding Issues for unresolvable elements to this resource.\nThis resource might still contain resolvable proxies after this method has been called.\n\n@param mon a {@link CancelIndicator} can be used to stop the resolution.", "The way calendars are stored in an MPP14 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects", "Send JSON representation of given data object to all connections of a user\n@param data the data object\n@param username the username", "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" ]
@Nullable public Import find(@Nonnull final String typeName) { Check.notEmpty(typeName, "typeName"); Import ret = null; final Type type = new Type(typeName); for (final Import imp : imports) { if (imp.getType().getName().equals(type.getName())) { ret = imp; break; } } if (ret == null) { final Type javaLangType = Type.evaluateJavaLangType(typeName); if (javaLangType != null) { ret = Import.of(javaLangType); } } return ret; }
[ "Searches the set of imports to find a matching import by type name.\n\n@param typeName\nname of type (qualified or simple name allowed)\n@return found import or {@code null}" ]
[ "Store the char in the internal buffer", "Reads data sets from a passed reader.\n\n@param reader\ndata sets source\n@param recover\nmax number of errors reading process will try to recover from.\nSet to 0 to fail immediately\n@throws IOException\nif reader can't read underlying stream\n@throws InvalidDataSetException\nif invalid/undefined data set is encountered", "Create a structured Record instance from the flat text data.\nNull is returned if errors are encountered during parse.\n\n@param text flat text data\n@return Record instance", "Displays a localized warning.\n@param caption the caption of the warning.\n@param description the description of the warning.", "Delete the given file in a separate thread\n\n@param file The file to delete", "Generates and writes the sql for inserting the currently contained data objects.\n\n@param model The database model\n@param platform The platform\n@param writer The output stream", "Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges", "Sets the size of the matrix being decomposed, declares new memory if needed,\nand sets all helper functions to their initial value.", "apply the base fields to other views if configured to do so." ]
@RequestMapping(value = "/api/plugins", method = RequestMethod.GET) public @ResponseBody HashMap<String, Object> getPluginInformation() { return pluginInformation(); }
[ "Obtain plugin information\n\n@return" ]
[ "Check whether we have diverged from what we would predict from the last update that was sent to a particular\ntrack position listener.\n\n@param lastUpdate the last update that was sent to the listener\n@param currentUpdate the latest update available for the same player\n\n@return {@code true }if the listener will have diverged by more than our permitted amount of slack, and so\nshould be updated", "Scales the weights of this crfclassifier by the specified weight\n\n@param scale", "Merge two ExecutionStatistics into one. This method is private in order not to be synchronized (merging.\n@param otherStatistics", "select a use case.", "Delete a license from the repository\n\n@param licName The name of the license to remove", "Create an IPv6 mixed address using the given ipv6 segments and using this address for the embedded IPv4 segments\n\n@param segs\n@return", "Sends the JSON-formatted spellchecking results to the client.\n\n@param res The HttpServletResponse object.\n@param request The spellchecking request object.\n\n@throws IOException in case writing the response fails", "Dump timephased work for an assignment.\n\n@param assignment resource assignment", "Use this API to update dbdbprofile resources." ]
public static responderpolicylabel_responderpolicy_binding[] get(nitro_service service, String labelname) throws Exception{ responderpolicylabel_responderpolicy_binding obj = new responderpolicylabel_responderpolicy_binding(); obj.set_labelname(labelname); responderpolicylabel_responderpolicy_binding response[] = (responderpolicylabel_responderpolicy_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch responderpolicylabel_responderpolicy_binding resources of given name ." ]
[ "Parse the XML for a collection as returned by getInfo call.\n\n@param collectionElement\n@return", "Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid", "Return tabular data\n@param labels Labels array\n@param data Data bidimensional array\n@param padding Total space between fields\n@return String", "Get the collection of the server groups\n\n@return Collection of active server groups", "Returns the expression string required\n\n@param ds\n@return", "Remove an write lock.", "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)", "Restores a trashed folder to a new location with a new name.\n@param folderID the ID of the trashed folder.\n@param newName an optional new name to give the folder. This can be null to use the folder's original name.\n@param newParentID an optional new parent ID for the folder. This can be null to use the folder's original\nparent.\n@return info about the restored folder.", "Returns all visble sets and pools the photo belongs to.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo to return information for.\n@return a list of {@link PhotoContext} objects\n@throws FlickrException" ]
public void setBREE(String bree) { String old = mainAttributes.get(BUNDLE_REQUIREDEXECUTIONENVIRONMENT); if (!bree.equals(old)) { this.mainAttributes.put(BUNDLE_REQUIREDEXECUTIONENVIRONMENT, bree); this.modified = true; this.bree = bree; } }
[ "Set the main attribute \"Bundle-RequiredExecutionEnvironment\" to the given\nvalue.\n\n@param bree The new value" ]
[ "Transposes a block matrix.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.", "Get a bean value from the context.\n\n@param name bean name\n@return bean value or null", "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", "For internal use, don't call the public API internally", "This method allows a pre-existing resource calendar to be attached to a\nresource.\n\n@param calendar resource calendar", "Use this API to fetch nsacl6 resource of given name .", "Explode the deployment contents and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException", "Resolve the server registry.\n\n@param mgmtVersion the mgmt version\n@param subsystems the subsystems\n@return the transformer registry", "Returns the JRDesignGroup for the DJGroup passed\n@param jd\n@param layoutManager\n@param group\n@return" ]
@Override public final PObject getObject(final String key) { PObject result = optObject(key); if (result == null) { throw new ObjectMissingException(this, key); } return result; }
[ "Get a property as a object or throw exception.\n\n@param key the property name" ]
[ "Use this API to unset the properties of callhome resource.\nProperties that need to be unset are specified in args array.", "Delete the proxy history for the active profile\n\n@throws Exception exception", "Use this API to fetch authenticationvserver_authenticationnegotiatepolicy_binding resources of given name .", "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.", "Return a logger associated with a particular class name.", "The primary run loop of the event processor.", "Launch Application Setting to grant permission.", "Retrieve a work field.\n\n@param type field type\n@return Duration instance", "Takes the specified object and converts the argument to a String.\n\n@param arg The object to convert\n@return A String representation of the argument." ]
public static String constructResourceId( final String subscriptionId, final String resourceGroupName, final String resourceProviderNamespace, final String resourceType, final String resourceName, final String parentResourcePath) { String prefixedParentPath = parentResourcePath; if (parentResourcePath != null && !parentResourcePath.isEmpty()) { prefixedParentPath = "/" + parentResourcePath; } return String.format( "/subscriptions/%s/resourcegroups/%s/providers/%s%s/%s/%s", subscriptionId, resourceGroupName, resourceProviderNamespace, prefixedParentPath, resourceType, resourceName); }
[ "Creates a resource ID from information of a generic resource.\n\n@param subscriptionId the subscription UUID\n@param resourceGroupName the resource group name\n@param resourceProviderNamespace the resource provider namespace\n@param resourceType the type of the resource or nested resource\n@param resourceName name of the resource or nested resource\n@param parentResourcePath parent resource's relative path to the provider,\nif the resource is a generic resource\n@return the resource ID string" ]
[ "Read the relationships for an individual GanttProject task.\n\n@param gpTask GanttProject task", "Process task dependencies.", "Use this API to fetch netbridge_vlan_binding resources of given name .", "Get the Query Paramaters to be used for search request.\n@return this.QueryStringBuilder.", "Copy the specified bytes into a new array\n\n@param array The array to copy from\n@param from The index in the array to begin copying from\n@param to The least index not copied\n@return A new byte[] containing the copied bytes", "Removes all elems in the given Collection that aren't accepted by the given Filter.", "add some validation to see if this miss anything.\n\n@return true, if successful\n@throws ParallelTaskInvalidException\nthe parallel task invalid exception", "Set RGB input range.\n\n@param inRGB Range.", "Assign arguments to the statement.\n\n@return The statement passed in or null if it had to be closed on error." ]
public Set<String> rangeByRank(final long start, final long end) { return doWithJedis(new JedisCallable<Set<String>>() { @Override public Set<String> call(Jedis jedis) { return jedis.zrange(getKey(), start, end); } }); }
[ "Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the lowest to the highest score.\nLexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements" ]
[ "Sends a user a password reset email for the given email.\n\n@param email the email of the user.\n@return A {@link Task} that completes when the reqest request completes/fails.", "Deletes the concrete representation of the specified object in the underlying\npersistence system. This method is intended for use in top-level api or\nby internal calls.\n\n@param obj The object to delete.\n@param ignoreReferences With this flag the automatic deletion/unlinking\nof references can be suppressed (independent of the used auto-delete setting in metadata),\nexcept {@link org.apache.ojb.broker.metadata.SuperReferenceDescriptor}\nthese kind of reference (descriptor) will always be performed. If <em>true</em>\nall \"normal\" referenced objects will be ignored, only the specified object is handled.\n@throws PersistenceBrokerException", "Write an int to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The int to write\n@param offset The offset to begin writing at", "Use this API to add appfwjsoncontenttype resources.", "Returns whether this is a valid address string format.\n\nThe accepted IP address formats are:\nan IPv4 address, an IPv6 address, a network prefix alone, the address representing all addresses of all types, or an empty string.\nIf this method returns false, and you want more details, call validate() and examine the thrown exception.\n\n@return whether this is a valid address string format", "Returns a map from a category path to the wrapper of all the sub-categories of the category with the path given as key.\n\n@return a map from a category path to all sub-categories of the path's category.", "Check if the given color string can be parsed.\n\n@param colorString The color to parse.", "Use this API to fetch vpnvserver_vpnsessionpolicy_binding resources of given name .", "Checks if the provided organization is valid and could be stored into the database\n\n@param organization Organization\n@throws WebApplicationException if the data is corrupted" ]
public double distanceFrom(LatLong end) { double dLat = (end.getLatitude() - getLatitude()) * Math.PI / 180; double dLon = (end.getLongitude() - getLongitude()) * Math.PI / 180; double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(getLatitude() * Math.PI / 180) * Math.cos(end.getLatitude() * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2); double c = 2.0 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); double d = EarthRadiusMeters * c; return d; }
[ "From v3_epoly.js, calculates the distance between this LatLong point and\nanother.\n\n@param end The end point to calculate the distance to.\n@return The distance, in metres, to the end point." ]
[ "Set the dither matrix.\n@param matrix the dither matrix\n@see #getMatrix", "Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance", "Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader.", "Writes a number to the specified byte array field, breaking it into its component bytes in big-endian order.\nIf the number is too large to fit in the specified number of bytes, only the low-order bytes are written.\n\n@param number the number to be written to the array\n@param buffer the buffer to which the number should be written\n@param start where the high-order byte should be written\n@param length how many bytes of the number should be written", "Converts a time represented as an integer to a Date instance.\n\n@param time integer time\n@return Date instance", "Required to close the connection reading on the terminal, otherwise\nit can't be interrupted.\n\n@throws InterruptedException", "Converts this address to a prefix length\n\n@return the prefix of the indicated IP type represented by this address or null if this address is valid but cannot be represented by a network prefix length\n@throws AddressStringException if the address is invalid", "Set the week day the events should occur.\n@param weekDay the week day to set.", "Delete a server group by id\n\n@param id server group ID" ]
public EventBus emitSync(Enum<?> event, Object... args) { return _emitWithOnceBus(eventContextSync(event, args)); }
[ "Emit an enum 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(Enum, Object...)" ]
[ "Adds a JSON string to the DB.\n\n@param obj the JSON to record\n@param table the table to insert into\n@return the number of rows in the table, or DB_OUT_OF_MEMORY_ERROR/DB_UPDATE_ERROR", "Returns first resolver that accepts the given resolverId.\nIn case none is found null is returned.\n@param resolverId identifier of the resolver\n@return found resolver or null otherwise", "Removes the task from wait q.\n\n@param taskTobeRemoved\nthe task tobe removed\n@return true, if successful", "Compares two annotated parameters and returns true if they are equal", "Use this API to unset the properties of snmpoption resource.\nProperties that need to be unset are specified in args array.", "Initialize that Foundation Logging library.", "Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"copy\"\n@param jsonObject of Link\n@return String", "Restore the recorded state from the rollback xml.\n\n@param target the patchable target\n@param rollbackPatchId the rollback patch id\n@param patchType the the current patch type\n@param history the recorded history\n@throws PatchingException", "Searches the type and its sub types for the nearest ojb-persistent type and returns its name.\n\n@param type The type to search\n@return The qualified name of the found type or <code>null</code> if no type has been found" ]
private void readCalendars(Project project) throws MPXJException { Calendars calendars = project.getCalendars(); if (calendars != null) { for (net.sf.mpxj.planner.schema.Calendar cal : calendars.getCalendar()) { readCalendar(cal, null); } Integer defaultCalendarID = getInteger(project.getCalendar()); m_defaultCalendar = m_projectFile.getCalendarByUniqueID(defaultCalendarID); if (m_defaultCalendar != null) { m_projectFile.getProjectProperties().setDefaultCalendarName(m_defaultCalendar.getName()); } } }
[ "This method extracts calendar data from a Planner file.\n\n@param project Root node of the Planner file" ]
[ "Use this API to unset the properties of protocolhttpband resource.\nProperties that need to be unset are specified in args array.", "Checks the preconditions for creating a new ParseDateTimeAbstract processor with date format and locale.\n\n@param dateFormat\nthe date format to use\n@param locale\nthe Locale used to parse the date\n@throws NullPointerException\nif dateFormat or locale is null", "Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message.", "Add the string representation of the given object to this sequence immediately. That is, all the trailing\nwhitespace of this sequence will be ignored and the string is appended directly after the last segment that\ncontains something besides whitespace. The given indentation will be prepended to each line except the first one\nif the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.", "Performs a matrix inversion operations that takes advantage of the special\nproperties of a covariance matrix.\n\n@param cov A covariance matrix. Not modified.\n@param cov_inv The inverse of cov. Modified.\n@return true if it could invert the matrix false if it could not.", "Print all relations for a given's class's tag\n@param tagname the tag containing the given relation\n@param from the source class\n@param edgetype the dot edge specification", "get string from post stream\n\n@param is\n@param encoding\n@return", "Returns a raw handle to the SQLite database connection. Do not close!\n@param context A context, which is used to (when needed) set up a connection to the database\n@return The single, unique connection to the database, as is (also) used by our Cupboard instance", "Base64 encodes a byte array.\n\n@param bytes Bytes to encode.\n@return Encoded string.\n@throws IllegalArgumentException if {@code bytes} is null or exceeds 3/4ths of {@code\nInteger.MAX_VALUE}." ]
public static final Bytes of(ByteBuffer bb) { Objects.requireNonNull(bb); if (bb.remaining() == 0) { return EMPTY; } byte[] data; if (bb.hasArray()) { data = Arrays.copyOfRange(bb.array(), bb.position() + bb.arrayOffset(), bb.limit() + bb.arrayOffset()); } else { data = new byte[bb.remaining()]; // duplicate so that it does not change position bb.duplicate().get(data); } return new Bytes(data); }
[ "Creates a Bytes object by copying the data of the given ByteBuffer.\n\n@param bb Data will be read from this ByteBuffer in such a way that its position is not\nchanged." ]
[ "Removes the observation that fits the model the worst and recomputes the coefficients.\nThis is done efficiently by using an adjustable solver. Often times the elements with\nthe largest errors are outliers and not part of the system being modeled. By removing them\na more accurate set of coefficients can be computed.", "Use this API to update vpnclientlessaccesspolicy.", "Called when a drawer has settled in a completely open state.", "Adds to this set all of the elements in the specified map of members and their score.\n@param scoredMember the members to add together with their scores\n@return the number of members actually added", "Add a row to the table. We have a limited understanding of the way\nBtrieve handles outdated rows, so we use what we think is a version number\nto try to ensure that we only have the latest rows.\n\n@param primaryKeyColumnName primary key column name\n@param map Map containing row data", "Returns a string representation of the receiver, containing\nthe String representation of each key-value pair, sorted ascending by value.", "Set the repeat count of an override at ordinal index\n\n@param pathName Path name\n@param methodName Fully qualified method name\n@param ordinal 1-based index of the override within the overrides of type methodName\n@param repeatCount new repeat count to set\n@return true if success, false otherwise", "Initializes the alarm sensor command class. Requests the supported alarm types.", "Use this API to delete dnspolicylabel of given name." ]
public ItemRequest<Project> update(String project) { String path = String.format("/projects/%s", project); return new ItemRequest<Project>(this, Project.class, path, "PUT"); }
[ "A specific, existing project can be updated by making a PUT request on the\nURL for that project. Only the fields provided in the `data` block will be\nupdated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated project record.\n\n@param project The project to update.\n@return Request object" ]
[ "Read an optional string value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the string value in the provided JSON object.\n@param defaultValue the default value, to be returned if the string can not be read from the JSON object.\n@return the string or the default value if reading the string fails.", "Reads a string from input stream saved as a sequence of UTF chunks.\n\n@param stream stream to read from.\n@return output string\n@throws IOException if something went wrong", "Return the knot at a given position.\n@param x the position\n@return the knot number, or 1 if no knot found", "This method writes resource data to a Planner file.", "Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate", "Invokes the exit logger if and only if no ExitLogger was previously invoked.\n@param logger the logger. Cannot be {@code null}", "Method to build Integration flow for IMAP Idle configuration.\n@param urlName Mail source URL.\n@return Integration Flow object IMAP IDLE.", "Get the JSON representation of the metadata field filter.\n@return the JSON object representing the filter.", "Get the PropertyDescriptor for aClass and aPropertyName" ]
public void logout() throws IOException { if (this.loggedIn) { Map<String, String> params = new HashMap<>(); params.put("action", "logout"); params.put("format", "json"); // reduce the output try { sendJsonRequest("POST", params); } catch (MediaWikiApiErrorException e) { throw new IOException(e.getMessage(), e); //TODO: we should throw a better exception } this.loggedIn = false; this.username = ""; this.password = ""; } }
[ "Logs the current user out.\n\n@throws IOException" ]
[ "Retrieve list of task extended attributes.\n\n@return list of extended attributes", "Get the values for a particular configuration property\n\n@param name - name of the property\n@return All values encountered or null", "Used internally to find the solution to a single column vector.", "Use this API to add vpnclientlessaccesspolicy.", "Prints the error message as log message.\n\n@param level the log level", "Calls beforeMaterialization on all registered listeners in the reverse\norder of registration.", "Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value.", "Returns an entry with the given proposal and prefix, or null if the proposal is not valid.\nIf it is valid, the initializer function is applied to it.", "Use this API to fetch aaagroup_aaauser_binding resources of given name ." ]
@JmxGetter(name = "getChunkIdToNumChunks", description = "Returns a string representation of the map of chunk id to number of chunks") public String getChunkIdToNumChunks() { StringBuilder builder = new StringBuilder(); for(Entry<Object, Integer> entry: fileSet.getChunkIdToNumChunks().entrySet()) { builder.append(entry.getKey().toString() + " - " + entry.getValue().toString() + ", "); } return builder.toString(); }
[ "Returns a string representation of map of chunk id to number of chunks\n\n@return String of map of chunk id to number of chunks" ]
[ "SuppressWarnings I really want to return HazeltaskTasks instead of Runnable", "Updates LetsEncrypt configuration.", "Build call for postUiAutopilotWaypoint\n\n@param addToBeginning\nWhether this solar system should be added to the beginning of\nall waypoints (required)\n@param clearOtherWaypoints\nWhether clean other waypoints beforing adding this one\n(required)\n@param destinationId\nThe destination to travel to, can be solar system, station or\nstructure&#39;s id (required)\n@param datasource\nThe server name you would like data from (optional, default to\ntranquility)\n@param token\nAccess token to use if unable to set a header (optional)\n@param callback\nCallback for upload/download progress\n@return Call to execute\n@throws ApiException\nIf fail to serialize the request body object", "Sets the hostname and port to connect to.\n\n@param hostname the host name\n@param port the port\n\n@return the builder", "Set a knot blend type.\n@param n the knot index\n@param type the knot blend type\n@see #getKnotBlend", "Returns all headers with the headers from the Payload\n\n@return All the headers", "Emit a string event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)", "Initializes the components.\n\n@param components the components", "Answer the counted size\n\n@return int" ]
private static <T, ID> void addDropTableStatements(DatabaseType databaseType, TableInfo<T, ID> tableInfo, List<String> statements, boolean logDetails) { List<String> statementsBefore = new ArrayList<String>(); List<String> statementsAfter = new ArrayList<String>(); for (FieldType fieldType : tableInfo.getFieldTypes()) { databaseType.dropColumnArg(fieldType, statementsBefore, statementsAfter); } StringBuilder sb = new StringBuilder(64); if (logDetails) { logger.info("dropping table '{}'", tableInfo.getTableName()); } sb.append("DROP TABLE "); databaseType.appendEscapedEntityName(sb, tableInfo.getTableName()); sb.append(' '); statements.addAll(statementsBefore); statements.add(sb.toString()); statements.addAll(statementsAfter); }
[ "Generate and return the list of statements to drop a database table." ]
[ "Gets the thread dump.\n\n@return the thread dump", "Parse parameters from this request using HTTP.\n\n@param req The ServletRequest containing all request parameters.\n@param cms The OpenCms object.\n@return CmsSpellcheckingRequest object that contains parsed parameters.", "Checks that a field exists and contains a non-null value.\n@param fieldName the name of the field to check existence/value of.\n@return true if the field exists in the result set and has a non-null value; false otherwise.", "Facade method for operating the Unix-like terminal supporting line editing and command\nhistory.\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Main command handler\n@param input Input stream.\n@param output Output stream.\n@return Shell that can be either further customized or run directly by calling commandLoop().", "Calculate start dates for a yearly absolute recurrence.\n\n@param calendar current date\n@param dates array of start dates", "Utility function to validate if the given store name exists in the store\nname list managed by MetadataStore. This is used by the Admin service for\nvalidation before serving a get-metadata request.\n\n@param name Name of the store to validate\n@return True if the store name exists in the 'storeNames' list. False\notherwise.", "Put object to session cache.\n\n@param oid The {@link org.apache.ojb.broker.Identity} of the object to cache\n@param entry The {@link org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.CacheEntry} of the object\n@param onlyIfNew Flag, if set <em>true</em> only new objects (not already in session cache) be cached.", "Print the given values after displaying the provided message.", "Filter the URI based on a regular expression.\nCan be combined with an additional file-extension filter." ]
static void populateFileCreationRecord(Record record, ProjectProperties properties) { properties.setMpxProgramName(record.getString(0)); properties.setMpxFileVersion(FileVersion.getInstance(record.getString(1))); properties.setMpxCodePage(record.getCodePage(2)); }
[ "Populate a file creation record.\n\n@param record MPX record\n@param properties project properties" ]
[ "Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value", "Removes all elements in the sorted set with a score in the given range.\n@param scoreRange\n@return the number of elements removed.", "performs a primary key lookup operation against RDBMS and materializes\nan object from the resulting row. Only skalar attributes are filled from\nthe row, references are not resolved.\n@param oid contains the primary key info.\n@param cld ClassDescriptor providing mapping information.\n@return the materialized object, null if no matching row was found or if\nany error occured.", "Overrides the superclass implementation to allow the AttributeDefinition for each field in the\nobject to in turn resolve that field.\n\n{@inheritDoc}", "Performs the conversion from standard XPath to xpath with parameterization support.", "Pushes a class type onto the stack from the string representation This can\nalso handle primitives\n\n@param b the bytecode\n@param classType the type descriptor for the class or primitive to push.\nThis will accept both the java.lang.Object form and the\nLjava/lang/Object; form", "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", "Use this API to convert sslpkcs12.", "Set the specific device class of the node.\n@param specificDeviceClass the specificDeviceClass to set\n@exception IllegalArgumentException thrown when the specific device class does not match\nthe generic device class." ]
public String checkIn(byte[] data) { String id = UUID.randomUUID().toString(); dataMap.put(id, data); return id; }
[ "Store the given data and return a uuid for later retrieval of the data\n\n@param data\n@return unique id for the stored data" ]
[ "Prepare a batch api request using list of individual reuests.\n@param requests list of api requests that has to be executed in batch.", "Add precedence -10 because we need that ContainerRegistry is available in the Arquillian scope.", "Use this API to update route6 resources.", "create a path structure representing the object graph", "Stops and clears all transitions", "Read a nested table whose contents we don't understand.\n\n@param rowSize fixed row size\n@param rowMagicNumber row magic number\n@return table rows", "Convert event type.\n\n@param eventType the event type\n@return the event enum type", "Convert given value to given target\n\n@param fromValue\nthe value to convert\n@param toType\ntarget target\n@param <T>\ntarget of the result\n@return the value converted to given target\n@throws TypeCastException\nif conversion was not possible", "This method determines whether the given date falls in the range of\ndates covered by this exception. Note that this method assumes that both\nthe start and end date of this exception have been set.\n\n@param date Date to be tested\n@return Boolean value" ]
public static BoxUser.Info createAppUser(BoxAPIConnection api, String name) { return createAppUser(api, name, new CreateUserParams()); }
[ "Provisions a new app user in an enterprise using Box Developer Edition.\n@param api the API connection to be used by the created user.\n@param name the name of the user.\n@return the created user's info." ]
[ "Check if the provided date or any date after it are part of the series.\n@param nextDate the current date to check.\n@param previousOccurrences the number of events of the series that took place before the date to check.\n@return <code>true</code> if more dates (including the provided one) could be in the series, <code>false</code> otherwise.", "Determine if a CharSequence can be parsed as a Long.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isLong(String)\n@since 1.8.2", "Notifies that a content item is inserted.\n\n@param position the position of the content item.", "Use this API to fetch tmtrafficpolicy_lbvserver_binding resources of given name .", "Validates a favorite entry.\n\n<p>If the favorite entry references a resource or project that can't be read, this will return false.\n\n@param entry the favorite entry\n@return the", "Use this API to fetch authorizationpolicylabel_binding resource of given name .", "Returns the compact task records for all tasks with the given tag.\nTasks can have more than one tag at a time.\n\n@param tag The tag to fetch tasks from.\n@return Request object", "Whether the address is IPv4-compatible\n\n@see java.net.Inet6Address#isIPv4CompatibleAddress()", "running in App Engine" ]
private String swapStore(String storeName, String directory) throws VoldemortException { ReadOnlyStorageEngine store = getReadOnlyStorageEngine(metadataStore, storeRepository, storeName); if(!Utils.isReadableDir(directory)) throw new VoldemortException("Store directory '" + directory + "' is not a readable directory."); String currentDirPath = store.getCurrentDirPath(); logger.info("Swapping RO store '" + storeName + "' to version directory '" + directory + "'"); store.swapFiles(directory); logger.info("Swapping swapped RO store '" + storeName + "' to version directory '" + directory + "'"); return currentDirPath; }
[ "Given a read-only store name and a directory, swaps it in while returning\nthe directory path being swapped out\n\n@param storeName The name of the read-only store\n@param directory The directory being swapped in\n@return The directory path which was swapped out\n@throws VoldemortException" ]
[ "Concatenate the arrays.\n\n@param array First array.\n@param array2 Second array.\n@return Concatenate between first and second array.", "Write to a context. Uses NullWritable for key so that only value of output string is ultimately written\n\n@param cr the DataPipe to write to", "Use this API to delete nsip6.", "Deserialize an `AppDescriptor` from byte array\n\n@param bytes\nthe byte array\n@return\nan `AppDescriptor` instance", "Sets the texture this render target will render to.\nIf no texture is provided, the render target will\nnot render anything.\n@param texture GVRRenderTexture to render to.", "Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided", "Reads the configuration of a field facet.\n@param pathPrefix The XML Path that leads to the field facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.", "Gets the numeric codes. Setting it to -1 search for currencies that have no numeric code.\n\n@return the query for chaining.", "Create an object of the given type using a constructor that matches the\nsupplied arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception" ]
public final static String process(final File file, final Configuration configuration) throws IOException { final FileInputStream input = new FileInputStream(file); final String ret = process(input, configuration); input.close(); return ret; }
[ "Transforms an input file into HTML using the given Configuration.\n\n@param file\nThe File to process.\n@param configuration\nthe Configuration\n@return The processed String.\n@throws IOException\nif an IO error occurs\n@since 0.7\n@see Configuration" ]
[ "Loads a CRF classifier from a filepath, and returns it.\n\n@param file\nFile to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data", "Sets in-place the right child with the same first byte.\n\n@param b next byte of child suffix.\n@param child child node.", "Returns the flag, indicating if the characters in the query string that are commands to Solr should be escaped.\n@return the flag, indicating if the characters in the query string that are commands to Solr should be escaped.", "Gets information about the device pin.\n@param fields the fields to retrieve.\n@return info about the device pin.", "Transfer the ownership of an application to another user.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param to Username of the person to transfer the app to. This is usually in the form of \"[email protected]\".", "Get the FieldDescriptors of the extent based on the FieldDescriptors of the parent.", "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", "Set up the services to create a channel listener and operation handler service.\n@param serviceTarget the service target to install the services into\n@param endpointName the endpoint name to install the services into\n@param channelName the name of the channel\n@param executorServiceName service name of the executor service to use in the operation handler service\n@param scheduledExecutorServiceName service name of the scheduled executor service to use in the operation handler service", "Called by determineHead and may be overridden in subclasses\nif special treatment is necessary for particular categories." ]
private String getProjectName() { String pName = Strings.emptyToNull(projectName); if (pName == null) { pName = Strings.emptyToNull(junit4.getProject().getName()); } if (pName == null) { pName = "(unnamed project)"; } return pName; }
[ "Return the project name or the default project name." ]
[ "Inject external stylesheets.", "Stop the service and end the program", "Put everything smaller than days at 0\n@param cal calendar to be cleaned", "This method returns the value it is passed, or null if the value\nmatches the nullValue argument.\n\n@param value value under test\n@param nullValue return null if value under test matches this value\n@return value or null", "Retrieve the index of the table entry valid for the supplied date.\n\n@param date required date\n@return cost rate table entry index", "Helper to generate the common configuration part for client-side and server-side widget.\n@return the common configuration options as map", "Modify a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@param isDirectory whether the file is a directory or not\n@return the builder", "Overridden method always creating a new instance\n\n@param contextual The bean to create\n@param creationalContext The creation context", "response simple String\n\n@param response\n@param obj" ]
private PatternPathRouterWithGroups.RoutableDestination<HttpResourceModel> getMatchedDestination(List<PatternPathRouterWithGroups.RoutableDestination<HttpResourceModel>> routableDestinations, HttpMethod targetHttpMethod, String requestUri) { LOG.trace("Routable destinations for request {}: {}", requestUri, routableDestinations); Iterable<String> requestUriParts = splitAndOmitEmpty(requestUri, '/'); List<PatternPathRouterWithGroups.RoutableDestination<HttpResourceModel>> matchedDestinations = new ArrayList<>(); long maxScore = 0; for (PatternPathRouterWithGroups.RoutableDestination<HttpResourceModel> destination : routableDestinations) { HttpResourceModel resourceModel = destination.getDestination(); for (HttpMethod httpMethod : resourceModel.getHttpMethod()) { if (targetHttpMethod.equals(httpMethod)) { long score = getWeightedMatchScore(requestUriParts, splitAndOmitEmpty(resourceModel.getPath(), '/')); LOG.trace("Max score = {}. Weighted score for {} is {}. ", maxScore, destination, score); if (score > maxScore) { maxScore = score; matchedDestinations.clear(); matchedDestinations.add(destination); } else if (score == maxScore) { matchedDestinations.add(destination); } } } } if (matchedDestinations.size() > 1) { throw new IllegalStateException(String.format("Multiple matched handlers found for request uri %s: %s", requestUri, matchedDestinations)); } else if (matchedDestinations.size() == 1) { return matchedDestinations.get(0); } return null; }
[ "Get HttpResourceModel which matches the HttpMethod of the request.\n\n@param routableDestinations List of ResourceModels.\n@param targetHttpMethod HttpMethod.\n@param requestUri request URI.\n@return RoutableDestination that matches httpMethod that needs to be handled. null if there are no matches." ]
[ "Utility function that fetches node ids.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return Node ids in cluster", "Hide the following channels.\n@param channels The names of the channels to hide.\n@return this", "Count the number of occurrences of a sub CharSequence.\n\n@param self a CharSequence\n@param text a sub CharSequence\n@return the number of occurrences of the given CharSequence inside this CharSequence\n@see #count(String, String)\n@since 1.8.2", "On key down we assume the key will go at the end. It's the most\ncommon case and not that distracting if that's not true.", "Iterates over all the documents, adding each to the given target.\n\n@param target the collection to insert into\n@param <A> the collection type\n@return the target", "Changes the volume of an existing sound.\n@param volume volume value. Should range from 0 (mute) to 1 (max)", "Process data for an individual calendar.\n\n@param row calendar data", "Requests the cue list for a specific track ID, given a dbserver connection to a player that has already\nbeen 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 cue list, or {@code null} if none was available\n@throws IOException if there is a communication problem", "Add a photo to the user's favorites.\n\n@param photoId\nThe photo ID\n@throws FlickrException" ]
public void applyXMLDSigAsFirstChild (@Nonnull final PrivateKey aPrivateKey, @Nonnull final X509Certificate aCertificate, @Nonnull final Document aDocument) throws Exception { ValueEnforcer.notNull (aPrivateKey, "privateKey"); ValueEnforcer.notNull (aCertificate, "certificate"); ValueEnforcer.notNull (aDocument, "document"); ValueEnforcer.notNull (aDocument.getDocumentElement (), "Document is missing a document element"); if (aDocument.getDocumentElement ().getChildNodes ().getLength () == 0) throw new IllegalArgumentException ("Document element has no children!"); // Check that the document does not contain another Signature element final NodeList aNodeList = aDocument.getElementsByTagNameNS (XMLSignature.XMLNS, XMLDSigSetup.ELEMENT_SIGNATURE); if (aNodeList.getLength () > 0) throw new IllegalArgumentException ("Document already contains an XMLDSig Signature element!"); // Create the XMLSignature, but don't sign it yet. final XMLSignature aXMLSignature = createXMLSignature (aCertificate); // Create a DOMSignContext and specify the RSA PrivateKey and // location of the resulting XMLSignature's parent element. // -> The signature is always the first child element of the document // element for ebInterface final DOMSignContext aDOMSignContext = new DOMSignContext (aPrivateKey, aDocument.getDocumentElement (), aDocument.getDocumentElement ().getFirstChild ()); // The namespace prefix to be used for the signed XML aDOMSignContext.setDefaultNamespacePrefix (DEFAULT_NS_PREFIX); // Marshal, generate, and sign the enveloped signature. aXMLSignature.sign (aDOMSignContext); }
[ "Apply an XMLDSig onto the passed document.\n\n@param aPrivateKey\nThe private key used for signing. May not be <code>null</code>.\n@param aCertificate\nThe certificate to be used. May not be <code>null</code>.\n@param aDocument\nThe document to be signed. The signature will always be the first\nchild element of the document element. The document may not contains\nany disg:Signature element. This element is inserted manually.\n@throws Exception\nIn case something goes wrong\n@see #createXMLSignature(X509Certificate)" ]
[ "Create and add model controller handler to an existing management channel handler.\n\n@param handler the channel handler\n@return the created client", "If the Artifact does not exist, it will add it to the database. Nothing if it already exit.\n\n@param fromClient DbArtifact", "Use this API to fetch all the inat resources that are configured on netscaler.", "Returns a factory that vends DelimitRegExIterators that reads the contents of the\ngiven Reader, splits on the specified delimiter, applies op, then returns the result.", "Asynchronous call that begins execution of the task\nand returns immediately.", "Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass", "Specifies the maximum capacity of the counter.\n\n@param capacity\n<code>long</code>\n@throws IllegalArgumentException\nif windowMillis is less than 1.", "Capture stdout and route them through Redwood\n@return this", "Process dump file data from the given input stream. The method can\nrecover from an errors that occurred while processing an input stream,\nwhich is assumed to contain the JSON serialization of a list of JSON\nentities, with each entity serialization in one line. To recover from the\nprevious error, the first line is skipped.\n\n@param inputStream\nthe stream to read from\n@throws IOException\nif there is a problem reading the stream" ]
public static float smoothStep(float a, float b, float x) { if (x < a) return 0; if (x >= b) return 1; x = (x - a) / (b - a); return x*x * (3 - 2*x); }
[ "A smoothed step function. A cubic function is used to smooth the step between two thresholds.\n@param a the lower threshold position\n@param b the upper threshold position\n@param x the input parameter\n@return the output value" ]
[ "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)", "Determines whether the object is a materialized object, i.e. no proxy or a\nproxy that has already been loaded from the database.\n\n@param object The object to test\n@return <code>true</code> if the object is materialized", "Returns a SimpleConfiguration clientConfig with properties set from this configuration\n\n@return SimpleConfiguration", "Go through all nodes and determine how many partition Ids each node\nhosts.\n\n@param cluster\n@return map of nodeId to number of primary partitions hosted on node.", "Gets all checked widget indexes in the group. The indexes are counted from 0 to size -1,\nwhere size is the number of Checkable widgets in the group. It does not take into account\nany non-Checkable widgets added to the group widget.\n\n@return list of checked widget indexes", "Finds the maximum abs in each column of A and stores it into values\n@param A (Input) Matrix\n@param values (Output) storage for column max abs", "Create an executable jar to generate the report. Created jar contains only\nallure configuration file.", "When creating image columns\n@return", "return the workspace size needed for ctc" ]
public void editMeta(String photosetId, String title, String description) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_EDIT_META); parameters.put("photoset_id", photosetId); parameters.put("title", title); if (description != null) { parameters.put("description", description); } Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } }
[ "Modify the meta-data for a photoset.\n\n@param photosetId\nThe photoset ID\n@param title\nA new title\n@param description\nA new description (can be null)\n@throws FlickrException" ]
[ "Add the given query parameters.\n@param params the params\n@return this UriComponentsBuilder", "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}", "Process calendar days of the week.\n\n@param calendar project calendar\n@param root calendar data", "Build query string.\n@return Query string or null if query string contains no parameters at all.", "Return any feedback messages and errors that were generated - but\nsuppressed - during the interpolation process. Since unresolvable\nexpressions will be left in the source string as-is, this feedback is\noptional, and will only be useful for debugging interpolation problems.\n\n@return a {@link List} that may be interspersed with {@link String} and\n{@link Throwable} instances.", "Answer the FieldConversions for the PkFields\n@param cld\n@return the pk FieldConversions", "Add an appender to Logback logging framework that will track the types of log messages made.", "Format a calendar instance that is parseable from JavaScript, according to ISO-8601.\n\n@param cal the calendar to format to a JSON string\n@return a formatted date in the form of a string", "Triggers collapse of the parent." ]
public static ipset_nsip_binding[] get(nitro_service service, String name) throws Exception{ ipset_nsip_binding obj = new ipset_nsip_binding(); obj.set_name(name); ipset_nsip_binding response[] = (ipset_nsip_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch ipset_nsip_binding resources of given name ." ]
[ "Get the SuggestionsInterface.\n\n@return The SuggestionsInterface", "Record the resource request wait time in us\n\n@param dest Destination of the socket for which the resource was\nrequested. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param resourceRequestTimeUs The number of us to wait before getting a\nsocket", "Generates a toString method using concatenation or a StringBuilder.", "Sets the class loader to be used on serialization operations, for data\nstored in the specified fqn and child nodes. Note that if another class\nloader is set for a specific child node tree, the cache will use instead\nthat class loader.\n\n@param regionFqn\n@param classLoader", "Sets the permissions associated with this shared link.\n@param permissions the new permissions for this shared link.", "Read metadata by populating an instance of the target class\nusing SAXParser.", "Use this API to delete onlinkipv6prefix of given name.", "Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object", "Specifies the ARM resource id of the user assigned managed service identity resource that\nshould be used to retrieve the access token.\n\n@param identityId the ARM resource id of the user assigned identity resource\n@return MSICredentials" ]
public Iterable<BoxItem.Info> getChildren(final String... fields) { return new Iterable<BoxItem.Info>() { @Override public Iterator<BoxItem.Info> iterator() { String queryString = new QueryStringBuilder().appendParam("fields", fields).toString(); URL url = GET_ITEMS_URL.buildWithQuery(getAPI().getBaseURL(), queryString, getID()); return new BoxItemIterator(getAPI(), url); } }; }
[ "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." ]
[ "Create a new Violation for the AST node.\n@param sourceCode - the SourceCode\n@param node - the Groovy AST Node\n@param message - the message for the violation; defaults to null", "This method reads a four byte integer from the input stream.\n\n@param is the input stream\n@return byte value\n@throws IOException on file read error or EOF", "Extract resource data.", "Get the schema for the Avro Record from the object container file", "k\nReturns a list of artifact regarding the filters\n\n@return List<DbArtifact>", "Creates the name of the .story file to be wrote with the testcase. The\nname of the scenario must be given with spaces.\n\n@param scenarioName\n- The scenario name, with spaces\n@return the .story file name.", "Helper to read a line from the config file.\n@param propValue the property value\n@return the value of the variable set at this line.", "Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder", "Convert weekly recurrence days into a bit field.\n\n@param task recurring task\n@return bit field as a string" ]
public static nsdiameter get(nitro_service service) throws Exception{ nsdiameter obj = new nsdiameter(); nsdiameter[] response = (nsdiameter[])obj.get_resources(service); return response[0]; }
[ "Use this API to fetch all the nsdiameter resources that are configured on netscaler." ]
[ "Helper to read an optional String value.\n@param path The XML path of the element to read.\n@return The String value stored in the XML, or <code>null</code> if the value could not be read.", "Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException", "Try Oracle update batching and call setExecuteBatch or revert to\nJDBC update batching. See 12-2 Update Batching in the Oracle9i\nJDBC Developer's Guide and Reference.\n@param stmt the prepared statement to be used for batching\n@throws PlatformException upon JDBC failure", "Delivers the correct JSON Object for the stencilId\n\n@param stencilId\n@throws org.json.JSONException", "Calculate the duration percent complete.\n\n@param row task data\n@return percent complete", "Creates the udpClient with proper handler.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception", "Designate the vertex attribute and shader variable for the texture coordinates\nassociated with the named texture.\n\n@param texName name of texture\n@param texCoordAttr name of vertex attribute with texture coordinates.\n@param shaderVarName name of shader variable to get texture coordinates.", "Replace error msg.\n\n@param origMsg\nthe orig msg\n@return the string", "Use this API to fetch all the gslbservice resources that are configured on netscaler." ]
private OAuth1RequestToken constructToken(Response response) { Element authElement = response.getPayload(); String oauthToken = XMLUtilities.getChildValue(authElement, "oauth_token"); String oauthTokenSecret = XMLUtilities.getChildValue(authElement, "oauth_token_secret"); OAuth1RequestToken token = new OAuth1RequestToken(oauthToken, oauthTokenSecret); return token; }
[ "Construct a Access Token from a Flickr Response.\n\n@param response" ]
[ "Renames the current base log file to the roll file name.\n\n@param from\nThe current base log file.\n@param to\nThe backup file.", "This main method provides an easy command line tool to compare two\nschemas.", "Use this API to add systemuser.", "This method can be called to ensure that the IDs of all\nentities are sequential, and start from an\nappropriate point. If entities are added to and removed from\nthis list, then the project is loaded into Microsoft\nproject, if the ID values have gaps in the sequence, there will\nbe blank rows shown.", "Add an accessory to be handled and advertised by this root. Any existing Homekit connections\nwill be terminated to allow the clients to reconnect and see the updated accessory list. When\nusing this for a bridge, the ID of the accessory must be greater than 1, as that ID is reserved\nfor the Bridge itself.\n\n@param accessory to advertise and handle.", "return a prepared Insert Statement fitting for the given ClassDescriptor", "Update artifact download url of an artifact\n\n@param gavc String\n@param downLoadUrl String", "Recursively read a task, and any sub tasks.\n\n@param mpxjParent Parent for the MPXJ tasks\n@param gpTask GanttProject task", "Scan a network interface to find if it has an address space which matches the device we are trying to reach.\nIf so, return the address specification.\n\n@param aDevice the DJ Link device we are trying to communicate with\n@param networkInterface the network interface we are testing\n@return the address which can be used to communicate with the device on the interface, or null" ]
public void applyPatterns(String[] patterns) { m_formats = new SimpleDateFormat[patterns.length]; for (int index = 0; index < patterns.length; index++) { m_formats[index] = new SimpleDateFormat(patterns[index]); } }
[ "This method is used to configure the format pattern.\n\n@param patterns new format patterns" ]
[ "Tells you if the date part of a datetime is in a certain time range.", "This is private because the execute is the only method that should be called here.", "Check if there is an attribute which tells us which concrete class is to be instantiated.", "Pushes a class type onto the stack from the string representation This can\nalso handle primitives\n\n@param b the bytecode\n@param classType the type descriptor for the class or primitive to push.\nThis will accept both the java.lang.Object form and the\nLjava/lang/Object; form", "Ensure that the node is not null.\n\n@param node the node to ensure to be not null\n@param expression the expression was used to find the node\n@throws SpinXPathException if the node is null", "Returns the count of total number of unread inbox messages for the user\n@return int - count of all unread messages", "Magnitude of complex number.\n\n@param z Complex number.\n@return Magnitude of complex number.", "Create a new Time, with no date component.", "compare between two points." ]
public final void reset() { for (int i = 0; i < permutationIndices.length; i++) { permutationIndices[i] = i; } remainingPermutations = totalPermutations; }
[ "Resets the generator state." ]
[ "Fills the week panel with checkboxes.", "Generates a diagonal matrix with the input vector on its diagonal\n\n@param vector The given matrix A.\n@return diagonalMatrix The matrix with the vectors entries on its diagonal", "Reduce the given value to the nearest smaller 1 significant digit number starting with 1, 2 or 5.\n\n@param value the value to find a nice number for.\n@param scaleUnit the unit of the value.\n@param lockUnits if set, the values are not scaled to a \"nicer\" unit.", "Read JaCoCo report determining the format to be used.\n@param executionDataVisitor visitor to store execution data.\n@param sessionInfoStore visitor to store info session.\n@return true if binary format is the latest one.\n@throws IOException in case of error or binary format not supported.", "This is a very ugly workaround to get the method arguments from the JUnit 5 context via reflection.", "selects either a synchronous or an asynchronous producer, for the\nspecified broker id and calls the send API on the selected producer\nto publish the data to the specified broker partition\n\n@param ppd the producer pool request object", "Convert one project file format to another.\n\n@param inputFile input file\n@param outputFile output file\n@throws Exception", "Add the list with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The list of all packages to add.", "Use this API to update clusternodegroup resources." ]
protected TableFontStyle getColumnFontStyle(byte[] data, int offset, Map<Integer, FontBase> fontBases) { int uniqueID = MPPUtility.getInt(data, offset); FieldType fieldType = MPPTaskField.getInstance(MPPUtility.getShort(data, offset + 4)); Integer index = Integer.valueOf(MPPUtility.getByte(data, offset + 8)); int style = MPPUtility.getByte(data, offset + 9); ColorType color = ColorType.getInstance(MPPUtility.getByte(data, offset + 10)); int change = MPPUtility.getByte(data, offset + 12); FontBase fontBase = fontBases.get(index); boolean bold = ((style & 0x01) != 0); boolean italic = ((style & 0x02) != 0); boolean underline = ((style & 0x04) != 0); boolean boldChanged = ((change & 0x01) != 0); boolean underlineChanged = ((change & 0x02) != 0); boolean italicChanged = ((change & 0x04) != 0); boolean colorChanged = ((change & 0x08) != 0); boolean fontChanged = ((change & 0x10) != 0); boolean backgroundColorChanged = (uniqueID == -1); boolean backgroundPatternChanged = (uniqueID == -1); return (new TableFontStyle(uniqueID, fieldType, fontBase, italic, bold, underline, false, color.getColor(), Color.BLACK, BackgroundPattern.TRANSPARENT, italicChanged, boldChanged, underlineChanged, false, colorChanged, fontChanged, backgroundColorChanged, backgroundPatternChanged)); }
[ "Retrieve column font details from a block of property data.\n\n@param data property data\n@param offset offset into property data\n@param fontBases map of font bases\n@return ColumnFontStyle instance" ]
[ "Handle the given response, return the deserialized object when the response is successful.\n\n@param <T> Type\n@param response Response\n@param returnType Return type\n@throws ApiException If the response has a unsuccessful status code or\nfail to deserialize the response body\n@return Type", "Gets a list of split keys given a desired number of splits.\n\n<p>This list will contain multiple split keys for each split. Only a single split key\nwill be chosen as the split point, however providing multiple keys allows for more uniform\nsharding.\n\n@param numSplits the number of desired splits.\n@param query the user query.\n@param partition the partition to run the query in.\n@param datastore the datastore containing the data.\n@throws DatastoreException if there was an error when executing the datastore query.", "Use this API to add dnsaaaarec.", "The primary run loop of the kqueue event processor.", "Init the headers of the table regarding the filters\n\n@return String[]", "Extracts baseline work from the MPP file for a specific baseline.\nReturns null if no baseline work is present, otherwise returns\na list of timephased work items.\n\n@param assignment parent assignment\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work", "Discard the changes.", "Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus", "Returns the length of the message in bytes as it is encoded on the wire.\n\nApple require the message to be of length 255 bytes or less.\n\n@return length of encoded message in bytes" ]
public static String join(Collection<String> s, String delimiter, boolean doQuote) { StringBuffer buffer = new StringBuffer(); Iterator<String> iter = s.iterator(); while (iter.hasNext()) { if (doQuote) { buffer.append("\"" + iter.next() + "\""); } else { buffer.append(iter.next()); } if (iter.hasNext()) { buffer.append(delimiter); } } return buffer.toString(); }
[ "Join the Collection of Strings using the specified delimter and optionally quoting each\n\n@param s\nThe String collection\n@param delimiter\nthe delimiter String\n@param doQuote\nwhether or not to quote the Strings\n@return The joined String" ]
[ "Make sure that the Identity objects of garbage collected cached\nobjects are removed too.", "Invokes a function defined in the script.\n\n@param funcName\nThe function name.\n@param params\nThe parameter array.\n@return\nA boolean value representing whether the function is\nexecuted correctly. If the function cannot be found, or\nparameters don't match, {@code false} is returned.", "Get PhoneNumber object\n\n@return PhonenUmber | null on error", "Updates the R matrix to take in account the removed row.", "Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found", "Gets the txinfo cache weight\n\n@param conf The FluoConfiguration\n@return The size of the cache value from the property value {@value #TX_INFO_CACHE_WEIGHT} if\nit is set, else the value of the default value {@value #TX_INFO_CACHE_WEIGHT_DEFAULT}", "Sets the day of the month that matches the condition, i.e., the day of month of the 2nd Saturday.\nIf the day does not exist in the current month, the last possible date is set, i.e.,\ninstead of the fifth Saturday, the fourth is chosen.\n\n@param date date that has the correct year and month already set.\n@param week the number of the week to choose.", "Closes the outbound socket binding connection.\n\n@throws IOException", "Convenience method which locates the first P3 database in a directory\nand opens it.\n\n@param directory directory containing a P3 database\n@return ProjectFile instance" ]
public void setShiftOrientation(OrientedLayout.Orientation orientation) { if (mShiftLayout.getOrientation() != orientation && orientation != OrientedLayout.Orientation.STACK) { mShiftLayout.setOrientation(orientation); requestLayout(); } }
[ "Sets page shift orientation. The pages might be shifted horizontally or vertically relative\nto each other to make the content of each page on the screen at least partially visible\n@param orientation" ]
[ "Creates a new deployment for the URL. The target server will require access to the URL.\n\n@param url the URL representing the content\n\n@return the deployment", "Flushes this output stream and forces any buffered output bytes to be written out to the stream. If propagate is\ntrue, the wrapped stream will also be flushed.\n\n@param propagate\nboolean flag to indicate whether the wrapped OutputStream should also be flushed.\n@throws IOException\nif an I/O error occurs.", "Parses and removes embedded gallery configuration strings.\n\n@param configuration the configuration string to parse\n\n@return a map containing both the string resulting from removing the embedded configurations, and the embedded configurations as a a map", "Processes the template for all collection definitions of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Do post exam of child inside the layout after it has been positioned in parent\n@param dataIndex data index", "Use this API to fetch filtered set of sslglobal_sslpolicy_binding resources.\nset the filter parameter values in filtervalue object.", "Set the name of the schema containing the schedule tables.\n\n@param schema schema name.", "Turns a series of strings into their corresponding license entities\nby using regular expressions\n\n@param licStrings The list of license strings\n@return A set of license entities", "Allocate a timestamp" ]
public static DMatrixRMaj[] span(int dimen, int numVectors , Random rand ) { if( dimen < numVectors ) throw new IllegalArgumentException("The number of vectors must be less than or equal to the dimension"); DMatrixRMaj u[] = new DMatrixRMaj[numVectors]; u[0] = RandomMatrices_DDRM.rectangle(dimen,1,-1,1,rand); NormOps_DDRM.normalizeF(u[0]); for( int i = 1; i < numVectors; i++ ) { // System.out.println(" i = "+i); DMatrixRMaj a = new DMatrixRMaj(dimen,1); DMatrixRMaj r=null; for( int j = 0; j < i; j++ ) { // System.out.println("j = "+j); if( j == 0 ) r = RandomMatrices_DDRM.rectangle(dimen,1,-1,1,rand); // find a vector that is normal to vector j // u[i] = (1/2)*(r + Q[j]*r) a.set(r); VectorVectorMult_DDRM.householder(-2.0,u[j],r,a); CommonOps_DDRM.add(r,a,a); CommonOps_DDRM.scale(0.5,a); // UtilEjml.print(a); DMatrixRMaj t = a; a = r; r = t; // normalize it so it doesn't get too small double val = NormOps_DDRM.normF(r); if( val == 0 || Double.isNaN(val) || Double.isInfinite(val)) throw new RuntimeException("Failed sanity check"); CommonOps_DDRM.divide(r,val); } u[i] = r; } return u; }
[ "is there a faster algorithm out there? This one is a bit sluggish" ]
[ "Return a list of unique namespace and predicate pairs, optionally limited by predicate or namespace, in alphabetical order.\n\nThis method does not require authentication.\n\n@param namespace\noptional, can be null\n@param predicate\noptional, can be null\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return NamespacesList containing Pair-objects\n@throws FlickrException", "This is generally only useful for extensions that delegate some of their functionality to other \"internal\"\nextensions of their own that they need to configure.\n\n@param configuration the configuration to be supplied with the returned analysis context.\n@return an analysis context that is a clone of this instance but its configuration is replaced with the provided\none.", "Send a tempo changed announcement to all registered master listeners.\n\n@param tempo the new master tempo", "Use this API to fetch authenticationlocalpolicy_authenticationvserver_binding resources of given name .", "Insert syntax for our special table\n@param sequenceName\n@param maxKey\n@return sequence insert statement", "create a broker with given broker info\n\n@param id broker id\n@param brokerInfoString broker info format: <b>creatorId:host:port:autocreated</b>\n@return broker instance with connection config\n@see #getZKString()", "Throws an exception if at least one results directory is missing.", "Adds a collection of listeners to the current project.\n\n@param listeners collection of listeners", "Use this API to Import appfwsignatures." ]
void close() { mIODevice = null; GVRSceneObject owner = getOwnerObject(); if (owner.getParent() != null) { owner.getParent().removeChildObject(owner); } }
[ "Perform all Cursor cleanup here." ]
[ "Create a forward curve from forwards given by a LIBORMonteCarloModel.\n\n@param name name of the forward curve.\n@param model Monte Carlo model providing the forwards.\n@param startTime time at which the curve starts, i.e. zero time for the curve\n@return a forward curve from forwards given by a LIBORMonteCarloModel.\n@throws CalculationException Thrown if the model failed to provide the forward rates.", "Update the content of the tables.", "SuppressWarnings I really want to return HazeltaskTasks instead of Runnable", "Merges a list of local and online dumps. For dumps available both online\nand locally, only the local version is included. The list is order with\nmost recent dump date first.\n\n@return a merged list of dump files", "Append the given path segments to the existing path of this builder.\nEach given path segment may contain URI template variables.\n@param pathSegments the URI path segments\n@return this UriComponentsBuilder", "Map the EventType.\n\n@param eventType the event type\n@return the event", "Helper method that encapsulates the minimum logic for adding a job to a\nqueue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJson\nthe job serialized as JSON", "This method is called when the locale of the parent file is updated.\nIt resets the locale specific date attributes to the default values\nfor the new locale.\n\n@param locale new locale", "Process dump file data from the given input stream. The method can\nrecover from an errors that occurred while processing an input stream,\nwhich is assumed to contain the JSON serialization of a list of JSON\nentities, with each entity serialization in one line. To recover from the\nprevious error, the first line is skipped.\n\n@param inputStream\nthe stream to read from\n@throws IOException\nif there is a problem reading the stream" ]
public static URI createRestURI( final String matrixId, final int row, final int col, final WMTSLayerParam layerParam) throws URISyntaxException { String path = layerParam.baseURL; if (layerParam.dimensions != null) { for (int i = 0; i < layerParam.dimensions.length; i++) { String dimension = layerParam.dimensions[i]; String value = layerParam.dimensionParams.optString(dimension); if (value == null) { value = layerParam.dimensionParams.getString(dimension.toUpperCase()); } path = path.replace("{" + dimension + "}", value); } } path = path.replace("{TileMatrixSet}", layerParam.matrixSet); path = path.replace("{TileMatrix}", matrixId); path = path.replace("{TileRow}", String.valueOf(row)); path = path.replace("{TileCol}", String.valueOf(col)); path = path.replace("{style}", layerParam.style); path = path.replace("{Layer}", layerParam.layer); return new URI(path); }
[ "Prepare the baseURL to make a request.\n\n@param matrixId matrixId\n@param row row\n@param col cold\n@param layerParam layerParam" ]
[ "Determines whether or not two axially aligned bounding boxes in\nthe same coordinate space intersect.\n@param bv1 first bounding volume to test.\n@param bv2 second bounding volume to test.\n@return true if the boxes intersect, false if not.", "Converts the permutation matrix into a vector\n@param P (Input) Permutation matrix\n@param vector (Output) Permutation vector", "Checks whether the given class maps to a different table but also has the given collection.\n\n@param origCollDef The original collection to search for\n@param origTableDef The original table\n@param classDef The class descriptor to test\n@return <code>true</code> if the class maps to a different table and has the collection", "Sort and order steps to avoid unwanted generation", "helper to calculate the statusBar height\n\n@param context\n@param force pass true to get the height even if the device has no translucent statusBar\n@return", "Lookup a PortComponentMetaData by wsdl-port local part\n\n@param name - the wsdl-port local part\n@return PortComponentMetaData if found, null otherwise", "Adds is Null criteria,\ncustomer_id is Null\nThe attribute will NOT be translated into column name\n\n@param column The column name to be used without translation", "Shutdown the connection manager.", "Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by applying a key function to each element which yields a comparable criteria.\n\n@param iterable\nthe elements to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return a sorted list as a shallow copy of the given iterable.\n@see #sort(Iterable)\n@see #sort(Iterable, Comparator)\n@see ListExtensions#sortInplaceBy(List, org.eclipse.xtext.xbase.lib.Functions.Function1)" ]
public ParsedWord pollParsedWord() { if(hasNextWord()) { //set correct next char if(parsedLine.words().size() > (word+1)) character = parsedLine.words().get(word+1).lineIndex(); else character = -1; return parsedLine.words().get(word++); } else return new ParsedWord(null, -1); }
[ "Polls the next ParsedWord from the stack.\n\n@return next ParsedWord" ]
[ "When the JRField needs properties, use this method.\n@param propertyName\n@param value\n@return", "Run a task periodically, for a set number of times.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@param repetitions\nRepeat count\n@return {@code null} if {@code repetitions < 1}; otherwise, an interface\nthat lets you query the status; cancel; or reschedule the event.", "Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard", "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", "Creates a new ongoing Legal Hold Policy.\n@param api the API connection to be used by the resource.\n@param name the name of Legal Hold Policy.\n@param description the description of Legal Hold Policy.\n@return information about the Legal Hold Policy created.", "Returns a new client id for the profileIdentifier\n\n@param model\n@param profileIdentifier\n@return json with a new client_id\n@throws Exception", "Sets the specified float attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.", "Returns true if templates are to be instantiated synchronously and false if\nasynchronously." ]
public List<String> getPropertyPaths() { List<String> result = new ArrayList<String>(); for (String property : this.values.names()) { if (!property.startsWith("$")) { result.add(this.propertyToPath(property)); } } return result; }
[ "Returns a list of metadata property paths.\n@return the list of metdata property paths." ]
[ "Helper method that searches an object array for the occurence of a\nspecific object based on reference equality\n@param searchFor the object to search for\n@param searchIn the array to search in\n@return true if the object is found, otherwise false", "Checks whether the specified event name is restricted. If it is,\nthen create a pending error, and abort.\n\n@param name The event name\n@return Boolean indication whether the event name is restricted", "Vend a SessionVar with the default value", "Parse work units.\n\n@param value work units value\n@return TimeUnit instance", "Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n@throws Exception", "Update an existing feature. Made package private for testing purposes.\n\n@param feature feature to update\n@throws LayerException oops", "Sets the real offset.\n\n@param start the start\n@param end the end", "Finds the beat in which the specified track position falls.\n\n@param milliseconds how long the track has been playing\n\n@return the beat number represented by that time, or -1 if the time is before the first beat", "Runs Crawljax with the given configuration.\n\n@return The {@link CrawlSession} once the Crawl is done." ]
public int[] getPositions() { int[] list; if (assumeSinglePosition) { list = new int[1]; list[0] = super.startPosition(); return list; } else { try { processEncodedPayload(); list = mtasPosition.getPositions(); if (list != null) { return mtasPosition.getPositions(); } } catch (IOException e) { log.debug(e); // do nothing } int start = super.startPosition(); int end = super.endPosition(); list = new int[end - start]; for (int i = start; i < end; i++) list[i - start] = i; return list; } }
[ "Gets the positions.\n\n@return the positions" ]
[ "Method used to write the name of the scenarios\n\n@param word\n@return the same word starting with capital letter", "Get the axis along the orientation\n@return", "Retrieves the parent task for a Phoenix activity.\n\n@param activity Phoenix activity\n@return parent task", "Use this API to clear gslbldnsentries.", "Returns the portion of the field name after the last dot, as field names\nmay actually be paths.", "Load the properties from the resource file if one is specified", "Creates a metadata cache archive file of all tracks in the specified slot on the specified player. Any\nprevious contents of the specified file will be replaced.\n\n@param slot the slot in which the media to be cached can be found\n@param playlistId the id of playlist to be cached, or 0 of all tracks should be cached\n@param cache the file into which the metadata cache should be written\n\n@throws Exception if there is a problem communicating with the player or writing the cache file.", "just as facade but we keep the qualifiers so that we can recognize Bean from @Intercepted Bean.", "Starts the scenario with the given method and arguments.\nDerives the description from the method name.\n@param method the method that started the scenario\n@param arguments the test arguments with their parameter names" ]
int query(int downloadId) { synchronized (mCurrentRequests) { for (DownloadRequest request : mCurrentRequests) { if (request.getDownloadId() == downloadId) { return request.getDownloadState(); } } } return DownloadManager.STATUS_NOT_FOUND; }
[ "Returns the current download state for a download request.\n\n@param downloadId\n@return" ]
[ "Retrieve a duration in the form required by Phoenix.\n\n@param duration Duration instance\n@return formatted duration", "This only gets half of the EnabledEndpoint from a JDBC ResultSet\nGetting the method for the override id requires an additional SQL query and needs to be called after\nthe SQL connection is released\n\n@param result result to scan for endpoint\n@return EnabledEndpoint\n@throws Exception exception", "Sets in-place the right child with the same first byte.\n\n@param b next byte of child suffix.\n@param child child node.", "This function is intended to detect the subset of IOException which are not\nconsidered recoverable, in which case we want to bubble up the exception, instead\nof retrying.\n\n@throws VoldemortException", "Curries a procedure that takes five 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 four arguments. Never <code>null</code>.", "Get path ID for a given profileId and pathName\n\n@param pathName Name of path\n@param profileId ID of profile\n@return ID of path", "Returns a name for the principal based upon one of the attributes\nof the main CommonProfile. The attribute name used to query the CommonProfile\nis specified in the constructor.\n\n@return a name for the Principal or null if the attribute is not populated.", "Get the element at the index as an integer.\n\n@param i the index of the element to access", "Add a new download. The download will start automatically once the download manager is\nready to execute it and connectivity is available.\n\n@param request the parameters specifying this download\n@return an ID for the download, unique across the application. This ID is used to make future\ncalls related to this download.\n@throws IllegalArgumentException" ]
public static base_response add(nitro_service client, cachepolicylabel resource) throws Exception { cachepolicylabel addresource = new cachepolicylabel(); addresource.labelname = resource.labelname; addresource.evaluates = resource.evaluates; return addresource.add_resource(client); }
[ "Use this API to add cachepolicylabel." ]
[ "Creates a CSS rgb specification from a PDF color\n@param pdcolor\n@return the rgb() string", "Handles week day changes.\n@param event the change event.", "Overrides the superclass implementation to allow the AttributeDefinition for each field in the\nobject to in turn resolve that field.\n\n{@inheritDoc}", "Checks the preconditions for creating a new ForbidSubStr processor with a List of forbidden substrings.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif forbiddenSubStrings is null\n@throws IllegalArgumentException\nif forbiddenSubStrings is empty", "Creates a new empty HTML document tree.\n@throws ParserConfigurationException", "Get a list of people in a given photo.\n\n@param photoId\n@throws FlickrException", "Post a license to the server\n\n@param license\n@param user\n@param password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Check if the current version match the last release or the last snapshot one\n\n@param artifact\n@return boolean", "Log a info message with a throwable." ]
public ActionContext applyContentType(Result result) { if (!result.status().isError()) { return applyContentType(); } return applyContentType(contentTypeForErrorResult(req())); }
[ "Apply content type to response with result provided.\n\nIf `result` is an error then it might not apply content type as requested:\n* If request is not ajax request, then use `text/html`\n* If request is ajax request then apply requested content type only when `json` or `xml` is requested\n* otherwise use `text/html`\n\n@param result\nthe result used to check if it is error result\n@return this `ActionContext`." ]
[ "This is a generic function for retrieving any config value. The returned value\nis the one the server is operating with, no matter whether it comes from defaults\nor from the user-supplied configuration.\n\nThis function only provides access to configs which are deemed safe to share\npublicly (i.e.: not security-related configs). The list of configs which are\nconsidered off-limit can itself be configured via '{@value #RESTRICTED_CONFIGS}'.\n\n@param key config key for which to retrieve the value.\n@return the value for the requested config key, in String format.\nMay return null if the key exists and its value is explicitly set to null.\n@throws UndefinedPropertyException if the requested key does not exist in the config.\n@throws ConfigurationException if the requested key is not publicly available.", "Main method of this class related to RecyclerView widget. This method is the responsible of\ncreate a new Renderer instance with all the needed information to implement the rendering.\nThis method will validate all the attributes passed in the builder constructor and will create\na RendererViewHolder instance.\n\nThis method is used with RecyclerView because the view recycling mechanism is implemented out\nof this class and we only have to return new RendererViewHolder instances.\n\n@return ready to use RendererViewHolder instance.", "Used to create a new retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param type the type of the retention policy. Can be \"finite\" or \"indefinite\".\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info.", "Returns the tags that were root in the definition files. These serve as entry point shortcuts when browsing the graph. We could reduce this to\njust fewer as the root tags may be connected through parents=\"...\".", "Checks to see within the flags if a reload, i.e. not a full restart, is required.\n\n@param flags the flags to check\n\n@return {@code true} if a reload is required, otherwise {@code false}", "Converts an object to an XML file.\n\n@param object The object to convert.\n@param fileName The filename where to save it to.\n@throws FileNotFoundException On error.", "Generate the next available field for a user defined field.\n\n@param <E> field type class\n@param clazz class of the desired field enum\n@param type user defined field type.\n@return field of specified type", "Helper to read a line from the config file.\n@param propValue the property value\n@return the value of the variable set at this line.", "Perform the given work with a Jedis connection from the given pool.\nWraps any thrown checked exceptions in a RuntimeException.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work" ]
private void resetStoreDefinitions(Set<String> storeNamesToDelete) { // Clear entries in the metadata cache for(String storeName: storeNamesToDelete) { this.metadataCache.remove(storeName); this.storeDefinitionsStorageEngine.delete(storeName, null); this.storeNames.remove(storeName); } }
[ "Function to clear all the metadata related to the given store\ndefinitions. This is needed when a put on 'stores.xml' is called, thus\nreplacing the existing state.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will handle concurrency related issues.\n\n@param storeNamesToDelete" ]
[ "Returns true if the provided matrix is has a value of 1 along the diagonal\nelements and zero along all the other elements.\n\n@param a Matrix being inspected.\n@param tol How close to zero or one each element needs to be.\n@return If it is within tolerance to an identity matrix.", "Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Compute costs.", "Multiply scalar value to a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the multiply of specified complex number with the scalar value.", "See if a range for assignment is specified. If so return the range, otherwise return null\n\nExample of assign range:\na(0:3,4:5) = blah\na((0+2):3,4:5) = blah", "Returns the Set of entities recognized by this Classifier.\n\n@return The Set of entities recognized by this Classifier.", "Given a list of store definitions, find out and return a map of similar\nstore definitions + count of them\n\n@param storeDefs All store definitions\n@return Map of a unique store definition + counts", "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", "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" ]
protected void checkVariableName(GraphRewrite event, EvaluationContext context) { if (variableName == null) { setVariableName(Iteration.getPayloadVariableName(event, context)); } }
[ "Check the variable name and if not set, set it with the singleton variable name being on the top of the stack." ]
[ "Use this API to create sslfipskey.", "Returns a list of the rekordbox IDs of the tracks contained in the cache.\n\n@return a list containing the rekordbox ID for each track present in the cache, in the order they appear", "Given a list of store definitions, find out and return a map of similar\nstore definitions + count of them\n\n@param storeDefs All store definitions\n@return Map of a unique store definition + counts", "Template method for verification of lazy initialisation.", "Return configuration tweaks in a format appropriate for ness-jdbc DatabaseModule.", "Clones a BufferedImage.\n@param image the image to clone\n@return the cloned image", "append normal text\n\n@param text normal text\n@return SimplifySpanBuild", "For internal use, don't call the public API internally", "Resize the key data area.\nThis function will truncate the keys if the\ninitial setting was too large.\n\n@oaran numKeys the desired number of keys" ]
public static String strip(String text) { String result = text; if (text != null && !text.isEmpty()) { try { boolean formalRTF = isFormalRTF(text); StringTextConverter stc = new StringTextConverter(); stc.convert(new RtfStringSource(text)); result = stripExtraLineEnd(stc.getText(), formalRTF); } catch (IOException ex) { result = ""; } } return result; }
[ "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" ]
[ "This method generates a list of lists. Each list represents the data\nfor an embedded object, and contains set set of RTFEmbeddedObject instances\nthat make up the embedded object. This method will return null\nif there are no embedded objects in the RTF document.\n\n@param text RTF document\n@return list of lists of RTFEmbeddedObject instances", "Use this API to fetch bridgegroup_vlan_binding resources of given name .", "Use this API to update snmpalarm resources.", "Read calendar data from a PEP file.", "Choose from three numbers based on version.", "Template method responsible for file compression checks, file creation, and\ndelegation to specific strategy implementations.\n\n@param backupFile\nThe file to be compressed.\n@param properties\nThe appender's configuration.", "Sets the global. Does not add the global to the ExecutionResults.\n\n@param identifier\nThe identifier of the global\n@param object\nThe instance to be set as the global.\n@return", "Run a query on the datastore.\n\n@return The entities returned by the query.\n@throws DatastoreException on error", "Sets the invalid values for the TextBox\n@param invalidValues\n@param isCaseSensitive\n@param invalidValueErrorMessage" ]
public static <T, C extends Comparable<? super C>> List<T> sortBy(Iterable<T> iterable, final Functions.Function1<? super T, C> key) { return ListExtensions.sortInplaceBy(Lists.newArrayList(iterable), key); }
[ "Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by applying a key function to each element which yields a comparable criteria.\n\n@param iterable\nthe elements to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return a sorted list as a shallow copy of the given iterable.\n@see #sort(Iterable)\n@see #sort(Iterable, Comparator)\n@see ListExtensions#sortInplaceBy(List, org.eclipse.xtext.xbase.lib.Functions.Function1)" ]
[ "Retrieve the correct index for the supplied Table instance.\n\n@param table Table instance\n@return index", "this remove the linebreak.\n\n@param input\nthe input\n@param patternStr\nthe pattern str\n@return the string", "Set the visibility of the object.\n\n@see Visibility\n@param visibility\nThe visibility of the object.\n@return {@code true} if the visibility was changed, {@code false} if it\nwasn't.", "Returns all resources that belong to the bundle\nThis includes the descriptor if one exists.\n\n@return List of the bundle resources, including the descriptor.", "Returns the chunk id for the file name\n\n@param fileName The file name\n@return Chunk id", "Gets the filename from a path or URL.\n@param path or url.\n@return the file name.", "To populate the dropdown list from the jelly", "Loads the script from a text string.\n@param scriptText text string containing script to execute.\n@param language language (\"js\" or \"lua\")", "Retrieve the relative path to the pom of the module" ]
public static Authentication build(String crypt) throws IllegalArgumentException { if(crypt == null) { return new PlainAuth(null); } String[] value = crypt.split(":"); if(value.length == 2 ) { String type = value[0].trim(); String password = value[1].trim(); if(password!=null&&password.length()>0) { if("plain".equals(type)) { return new PlainAuth(password); } if("md5".equals(type)) { return new Md5Auth(password); } if("crc32".equals(type)) { return new Crc32Auth(Long.parseLong(password)); } } } throw new IllegalArgumentException("error password: "+crypt); }
[ "build an Authentication.\n\nTypes:\n<ul>\n<li>plain:jafka</li>\n<li>md5:77be29f6d71ec4e310766ddf881ae6a0</li>\n<li>crc32:1725717671</li>\n</ul>\n@param crypt password style\n@return an authentication\n@throws IllegalArgumentException password error" ]
[ "Pretty prints the output of getMapOfContiguousPartitionRunLengths\n\n@param cluster\n@param zoneId\n@return pretty string of contiguous run lengths", "Returns the number of key-value mappings in this map for the second key.\n\n@param firstKey\nthe first key\n@return Returns the number of key-value mappings in this map for the second key.", "Performs all actions that have been configured.", "Returns all program element docs that have a visibility greater or\nequal than the specified level", "Use this API to link sslcertkey.", "Update the BinderDescriptor of the declarationBinderRef.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder", "Removes top of thread-local shell stack.", "Get result report.\n\n@param reportURI the URI of the report\n@return the result report.", "Apply the necessary rotation to the transform so that it is in front of\nthe camera. The actual rotation is performed not using the yaw angle but\nusing equivalent quaternion values for better accuracy. But the yaw angle\nis still returned for backward compatibility.\n\n@param widget The transform to modify.\n@return The camera's yaw in degrees." ]
public ModelNode buildRequest() throws OperationFormatException { ModelNode address = request.get(Util.ADDRESS); if(prefix.isEmpty()) { address.setEmptyList(); } else { Iterator<Node> iterator = prefix.iterator(); while (iterator.hasNext()) { OperationRequestAddress.Node node = iterator.next(); if (node.getName() != null) { address.add(node.getType(), node.getName()); } else if (iterator.hasNext()) { throw new OperationFormatException( "The node name is not specified for type '" + node.getType() + "'"); } } } if(!request.hasDefined(Util.OPERATION)) { throw new OperationFormatException("The operation name is missing or the format of the operation request is wrong."); } return request; }
[ "Makes sure that the operation name and the address have been set and returns a ModelNode\nrepresenting the operation request." ]
[ "This method writes calendar data to an MSPDI file.\n\n@param project Root node of the MSPDI file", "Adds methods requiring special implementations rather than just\ndelegation.\n\n@param proxyClassType the Javassist class description for the proxy type", "Helper xml end tag writer\n\n@param value the output stream to use in writing", "Performs a matrix multiplication between inner block matrices.\n\n(m , o) += (m , n) * (n , o)", "Loads configuration from File. Later loads have lower priority.\n\n@param file File to load from\n@since 1.2.0", "Use this API to update protocolhttpband.", "Ensures that a String argument is a number.\n\n@param condition\ncondition must be {@code true}^ so that the check will be performed\n@param value\nvalue which must be a number\n@throws IllegalNumberArgumentException\nif the given argument {@code value} is not a number", "Returns the base URL of the print servlet.\n\n@param httpServletRequest the request", "Find the the qualfied container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback." ]
public static int wavelengthToRGB(float wavelength) { float gamma = 0.80f; float r, g, b, factor; int w = (int)wavelength; if (w < 380) { r = 0.0f; g = 0.0f; b = 0.0f; } else if (w < 440) { r = -(wavelength - 440) / (440 - 380); g = 0.0f; b = 1.0f; } else if (w < 490) { r = 0.0f; g = (wavelength - 440) / (490 - 440); b = 1.0f; } else if (w < 510) { r = 0.0f; g = 1.0f; b = -(wavelength - 510) / (510 - 490); } else if (w < 580) { r = (wavelength - 510) / (580 - 510); g = 1.0f; b = 0.0f; } else if (w < 645) { r = 1.0f; g = -(wavelength - 645) / (645 - 580); b = 0.0f; } else if (w <= 780) { r = 1.0f; g = 0.0f; b = 0.0f; } else { r = 0.0f; g = 0.0f; b = 0.0f; } // Let the intensity fall off near the vision limits if (380 <= w && w <= 419) factor = 0.3f + 0.7f*(wavelength - 380) / (420 - 380); else if (420 <= w && w <= 700) factor = 1.0f; else if (701 <= w && w <= 780) factor = 0.3f + 0.7f*(780 - wavelength) / (780 - 700); else factor = 0.0f; int ir = adjust(r, factor, gamma); int ig = adjust(g, factor, gamma); int ib = adjust(b, factor, gamma); return 0xff000000 | (ir << 16) | (ig << 8) | ib; }
[ "Convert a wavelength to an RGB value.\n@param wavelength wavelength in nanometres\n@return the RGB value" ]
[ "Indicates if a set of types are all proxyable\n\n@param types The types to test\n@return True if proxyable, false otherwise", "Read a long int from an input stream.\n\n@param is input stream\n@return long value", "EAP 7.1", "Execute a set of API calls as batch request.\n@param requests list of api requests that has to be executed in batch.\n@return list of BoxAPIResponses", "Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream", "Extract all operations and attributes from the given object that have\nbeen annotated with the Jmx annotation. Operations are all methods that\nare marked with the JmxOperation annotation.\n\n@param object The object to process\n@return An array of operations taken from the object", "Set the classpath for loading the driver using the classpath reference.\n\n@param r reference to the classpath", "Heat Equation Boundary Conditions", "Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed." ]
public int getCount(Class target) { PersistenceBroker broker = ((HasBroker) odmg.currentTransaction()).getBroker(); int result = broker.getCount(new QueryByCriteria(target)); return result; }
[ "Return the count of all objects found\nfor given class, using the PB-api within\nODMG - this may change in further versions." ]
[ "Read calendar data from a PEP file.", "Sets the left padding character for all cells in the table.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining", "Puts strings inside quotes and numerics are left as they are.\n@param str\n@return", "Saves changes in properties file. It reads the property file into memory, modifies it and saves it back to the file.\n\n@throws IOException", "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", "Method to build Integration flow for IMAP Idle configuration.\n@param urlName Mail source URL.\n@return Integration Flow object IMAP IDLE.", "Gets the property by key converted to lowercase if requested\n@param key property key\n@param lowerCase convert property to lowercase if it is true, keep the original one if it is\nfalse\n@return node property", "Adds a JSON string to the DB.\n\n@param obj the JSON to record\n@param table the table to insert into\n@return the number of rows in the table, or DB_OUT_OF_MEMORY_ERROR/DB_UPDATE_ERROR", "Parses btch api response to create a list of BoxAPIResponse objects.\n@param batchResponse response of a batch api request\n@return list of BoxAPIResponses" ]
public List<CmsUser> getVisibleUser() { if (!m_fullyLoaded) { return m_users; } if (size() == m_users.size()) { return m_users; } List<CmsUser> directs = new ArrayList<CmsUser>(); for (CmsUser user : m_users) { if (!m_indirects.contains(user)) { directs.add(user); } } return directs; }
[ "Gets currently visible user.\n\n@return List of user" ]
[ "Find the path to use .\nUses java annotations first and if not found, uses kubernetes annotations on the service object.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved path of '/' as a fallback.", "Find the path.\n\n@param start key of first node in the path\n@param end key of last node in the path\n@return string containing the nodes keys in the path separated by arrow symbol", "Use this API to fetch appfwprofile resource of given name .", "Adds each required length, ensuring it isn't negative.\n\n@param requiredLengths\none or more required lengths\n@throws IllegalArgumentException\nif a supplied length is negative", "Returns the name of the bone.\n\n@return the name", "So we will follow rfc 1035 and in addition allow the underscore.", "Get the known locations where the secure keyring can be located.\nLooks through known locations of the GNU PG secure keyring.\n\n@return The location of the PGP secure keyring if it was found,\nnull otherwise", "Use this API to restore appfwprofile resources.", "Get the layer ID out of the request URL.\n\n@param request servlet request\n@return layer id" ]
List<MwDumpFile> mergeDumpLists(List<MwDumpFile> localDumps, List<MwDumpFile> onlineDumps) { List<MwDumpFile> result = new ArrayList<>(localDumps); HashSet<String> localDateStamps = new HashSet<>(); for (MwDumpFile dumpFile : localDumps) { localDateStamps.add(dumpFile.getDateStamp()); } for (MwDumpFile dumpFile : onlineDumps) { if (!localDateStamps.contains(dumpFile.getDateStamp())) { result.add(dumpFile); } } result.sort(Collections.reverseOrder(new MwDumpFile.DateComparator())); return result; }
[ "Merges a list of local and online dumps. For dumps available both online\nand locally, only the local version is included. The list is order with\nmost recent dump date first.\n\n@return a merged list of dump files" ]
[ "Determine the enum value corresponding to the track type found in the packet.\n\n@return the proper value", "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>", "Calculate a shift value that can be used to create a power-of-two value between\nthe specified maximum and minimum values.\n@param minimumValue the minimum value\n@param maximumValue the maximum value\n@return the calculated shift (use {@code 1 << shift} to obtain a value)", "Processes a runtime procedure argument 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 procedure as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the procedure\"\[email protected] name=\"field-ref\" optional=\"true\" description=\"Identifies the field that provides the value\nif a runtime argument; if not set, then null is used\"\[email protected] name=\"name\" optional=\"false\" description=\"The identifier of the argument tag\"\[email protected] name=\"return\" optional=\"true\" description=\"Whether this is a return value (if a runtime argument)\"\nvalues=\"true,false\"\[email protected] name=\"value\" optional=\"false\" description=\"The value if a constant argument\"", "Log long string using verbose tag\n\n@param TAG The tag.\n@param longString The long string.", "Shortcut for mapping an arbitrary observable to void, using the IO scheduler.\n@param fromObservable the source observable\n@return a void-emitting observable", "Use this API to update responderpolicy resources.", "Returns a flag indicating if also expired resources should be found.\n@return A flag indicating if also expired resources should be found.", "Sets the response context.\n\n@param responseContext\nthe response context\n@return the parallel task builder" ]
private String getParentOutlineNumber(String outlineNumber) { String result; int index = outlineNumber.lastIndexOf('.'); if (index == -1) { result = ""; } else { result = outlineNumber.substring(0, index); } return result; }
[ "Return the parent outline number, or an empty string if\nwe have a root task.\n\n@param outlineNumber child outline number\n@return parent outline number" ]
[ "Given a list of store definitions return a list of store names\n\n@param storeDefList The list of store definitions\n@return Returns a list of store names", "Use this API to update clusternodegroup resources.", "Shut down the input manager.\n\nAfter this call, GearVRf will not be able to access IO devices.", "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.", "Retrieve and validate the zone id value from the REST request.\n\"X-VOLD-Zone-Id\" is the zone id header.\n\n@return valid zone id or -1 if there is no/invalid zone id", "Try to fire a given event on the Browser.\n\n@param eventable the eventable to fire\n@return true iff the event is fired", "Handles the response of the SerialApiGetInitData request.\n@param incomingMlivessage the response message to process.", "Writes a presentable version of the given PTB-tokenized text.\nPTB tokenization splits up punctuation and does various other things\nthat makes simply joining the tokens with spaces look bad. So join\nthe tokens with space and run it through this method to produce nice\nlooking text. It's not perfect, but it works pretty well.", "This method returns the value random variable of the product within the specified model,\nevaluated at a given evalutationTime.\nCash-flows prior evaluationTime are not considered.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model The model used to price the product.\n@return The random variable representing the value of the product discounted to evaluation time.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method." ]
private static void tryWritePreferenceOnDisk(Preferences preference) throws BackingStoreException { final String DUMMY_PROP="dummywrite"; instance.put(DUMMY_PROP,"test"); instance.flush(); instance.remove(DUMMY_PROP); instance.flush(); }
[ "This ensures that we are able to use the default preference from JSDK, to check basically if we are in Android or Not\n@param preference\n@throws BackingStoreException" ]
[ "Gets the list of failed invocations that has been collected by this collector.\n\n@return The failed invocations.", "A Maven stub is a Maven Project for which we have found information, but the project has not yet been located\nwithin the input application. If we have found an application of the same GAV within the input app, we should\nfill out this stub instead of creating a new one.", "Returns a projection object for specifying the fields to retrieve during a specific find operation.", "Inserts a String array value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a String array object, or null\n@return this bundler instance to chain method calls", "Create a JsonParser for a given json node.\n@param jsonNode the json node\n@return the json parser\n@throws IOException", "Checks to see if the token is an integer scalar\n\n@return true if integer or false if not", "Returns a new instance of the class with the given qualified name using the default or\nor a no-arg constructor.\n\n@param className The qualified name of the class to instantiate", "Notification that the process has become unstable.\n\n@return {@code true} if this is a change in status", "Store a comment based on comment text, gavc and user information\n\n@param gavc - entity id\n@param commentText - comment text\n@param credential - user credentials\n@param entityType - type of the entity" ]
protected static void main(String args[]) { int from = Integer.parseInt(args[0]); int to = Integer.parseInt(args[1]); statistics(from,to); }
[ "Tests correctness. Try\nfrom=1000, to=10000\nfrom=200, to=1000\nfrom=16, to=1000\nfrom=1000, to=Integer.MAX_VALUE" ]
[ "Get bean manager from portlet context.\n\n@param ctx the portlet context\n@return bean manager if found", "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", "Deletes a vertex from this list.", "Adds the dependencies typical for particular deployment types.\nThis is not accurate and doesn't cover the real needs of the project.\nBasically it's just to have \"something\" for the initial implementation.", "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", "Return the array of field objects pulled from the data object.", "Adds a row to the internal storage, indexed by primary key.\n\n@param uniqueID unique ID of the row\n@param map row data as a simpe map", "Find the earliest start time of the specified methods.\n@param methods A list of test methods.\n@return The earliest start time.", "Updates the polling state from a DELETE or POST operation.\n\n@param response the response from Retrofit REST call\n@throws IOException thrown by deserialization" ]
private void countCoordinates(int xCoord, int yCoord, ItemDocument itemDocument) { for (String siteKey : itemDocument.getSiteLinks().keySet()) { Integer count = this.siteCounts.get(siteKey); if (count == null) { this.siteCounts.put(siteKey, 1); } else { this.siteCounts.put(siteKey, count + 1); } } for (ValueMap vm : this.valueMaps) { vm.countCoordinates(xCoord, yCoord, itemDocument); } }
[ "Counts a single pair of coordinates in all datasets.\n\n@param xCoord\n@param yCoord\n@param itemDocument" ]
[ "Use this API to fetch a aaaglobal_binding resource .", "Store a comment based on comment text, gavc and user information\n\n@param gavc - entity id\n@param commentText - comment text\n@param credential - user credentials\n@param entityType - type of the entity", "Sets the color for the big total between the column and row\n@param row row index (starting from 1)\n@param column column index (starting from 1)\n@param color", "Return a new File object based on the baseDir and the segments.\n\nThis method does not perform any operation on the file system.", "Internal used method to retrieve object based on Identity.\n\n@param id\n@return\n@throws PersistenceBrokerException", "Try Oracle update batching and call sendBatch or revert to\nJDBC update batching.\n@param stmt the batched prepared statement about to be executed\n@return always <code>null</code> if Oracle update batching is used,\nsince it is impossible to dissolve total row count into distinct\nstatement counts. If JDBC update batching is used, an int array is\nreturned containing number of updated rows for each batched statement.\n@throws PlatformException upon JDBC failure", "sorts are a bit more awkward and need a helper...", "Notifies that an existing header item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.", "Internal method that adds a metadata provider to the set associated with a particular hash key, creating the\nset if needed.\n\n@param key the hashKey identifying the media for which this provider can offer metadata (or the empty string if\nit can offer metadata for all media)\n@param provider the metadata provider to be added to the active set" ]
public Clob toClob(String stringName, Connection sqlConnection) { Clob clobName = null; try { clobName = sqlConnection.createClob(); clobName.setString(1, stringName); } catch (SQLException e) { // TODO Auto-generated catch block logger.info("Unable to create clob object"); e.printStackTrace(); } return clobName; }
[ "Converts the given string to a clob object\n\n@param stringName string name to clob\n@param sqlConnection Connection object\n@return Clob object or NULL" ]
[ "Sets the provided filters.\n@param filters a map \"column id -> filter\".", "Retrieve a duration in the form required by Phoenix.\n\n@param duration Duration instance\n@return formatted duration", "Builds a batch-fetch capable loader based on the given persister, lock-options, etc.\n\n@param persister The entity persister\n@param batchSize The maximum number of ids to batch-fetch at once\n@param lockOptions The lock options\n@param factory The SessionFactory\n@param influencers Any influencers that should affect the built query\n@param innerEntityLoaderBuilder Builder of the entity loader receiving the subset of batches\n\n@return The loader.", "This method takes an array of data and uses this to populate the\nfield map.\n\n@param defaultData field map default data", "Return the current working directory\n\n@return the current working directory", "Delivers the correct JSON Object for outgoings\n\n@param outgoings\n@throws org.json.JSONException", "Print channels to the left of log messages\n@param width The width (in characters) to print the channels\n@return this", "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", "These exact lines are shared between three different tools, so\nthey have been moved here to reduce code duplication.\n@return The parsed command-line, with options removed." ]
public History[] filterHistory(String... filters) throws Exception { BasicNameValuePair[] params; if (filters.length > 0) { params = new BasicNameValuePair[filters.length]; for (int i = 0; i < filters.length; i++) { params[i] = new BasicNameValuePair("source_uri[]", filters[i]); } } else { return refreshHistory(); } return constructHistory(params); }
[ "Retrieve the request History based on the specified filters.\nIf no filter is specified, return the default size history.\n\n@param filters filters to be applied\n@return array of History items\n@throws Exception exception" ]
[ "Lookup an object instance from JNDI context.\n\n@param jndiName JNDI lookup name\n@return Matching object or <em>null</em> if none found.", "Use this API to fetch linkset_interface_binding resources of given name .", "Evaluates the filter, returns true if the supplied Task or Resource\ninstance matches the filter criteria.\n\n@param container Task or Resource instance\n@param promptValues respose to prompts\n@return boolean flag", "Determine if the buffer, when expressed as text, matches a fingerprint regular expression.\n\n@param buffer bytes from file\n@param fingerprint fingerprint regular expression\n@return true if the file matches the fingerprint", "Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n@throws Exception", "A map of the header key value pairs. Keys are strings and values are either list of strings or a\nstring.\n\n@param headers the header map", "Sets the location value as string.\n\n@param value the string representation of the location value (JSON)", "For a given activity, retrieve a map of the activity code values which have been assigned to it.\n\n@param activity target activity\n@return map of activity code value UUIDs", "Navigate to, and remove, this address in the given model node.\n\n@param model the model node\n@return the submodel\n@throws NoSuchElementException if the model contains no such element\n\n@deprecated manipulating a deep DMR node tree via PathAddress is no longer how the management layer works\ninternally, so this method has become legacy cruft. Management operation handlers would\nuse {@link org.jboss.as.controller.OperationContext#removeResource(PathAddress)} to\nremove resources." ]
public static long count(nitro_service service, Long id) throws Exception{ bridgegroup_vlan_binding obj = new bridgegroup_vlan_binding(); obj.set_id(id); options option = new options(); option.set_count(true); bridgegroup_vlan_binding response[] = (bridgegroup_vlan_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
[ "Use this API to count bridgegroup_vlan_binding resources configued on NetScaler." ]
[ "Prints a few aspects of the TreebankLanguagePack, just for debugging.", "Concatenates the trajectory a and b\n@param a The end of this trajectory will be connected to the start of trajectory b\n@param b The start of this trajectory will be connected to the end of trajectory a\n@return Concatenated trajectory", "Notification that a connection was closed.\n\n@param closed the closed connection", "Finish initialization of the configuration.", "Updates the polling state from a DELETE or POST operation.\n\n@param response the response from Retrofit REST call\n@throws IOException thrown by deserialization", "Used by Pipeline jobs only", "With this impl, it only returns the same credentials once. Otherwise it's possible that a loop will occur.\nWhen server returns status code 401, the HTTP client provides the same credentials forever.\nSince we create a new HTTP client for every request, we can handle it this way.", "Adds a word to the end of the token list\n@param word word which is to be added\n@return The new Token created around symbol", "Returns the negative of the input variable" ]
private void addDefaults() { this.issueCategories.putIfAbsent(MANDATORY, new IssueCategory(MANDATORY, IssueCategoryRegistry.class.getCanonicalName(), "Mandatory", MANDATORY, 1000, true)); this.issueCategories.putIfAbsent(OPTIONAL, new IssueCategory(OPTIONAL, IssueCategoryRegistry.class.getCanonicalName(), "Optional", OPTIONAL, 1000, true)); this.issueCategories.putIfAbsent(POTENTIAL, new IssueCategory(POTENTIAL, IssueCategoryRegistry.class.getCanonicalName(), "Potential Issues", POTENTIAL, 1000, true)); this.issueCategories.putIfAbsent(CLOUD_MANDATORY, new IssueCategory(CLOUD_MANDATORY, IssueCategoryRegistry.class.getCanonicalName(), "Cloud Mandatory", CLOUD_MANDATORY, 1000, true)); this.issueCategories.putIfAbsent(INFORMATION, new IssueCategory(INFORMATION, IssueCategoryRegistry.class.getCanonicalName(), "Information", INFORMATION, 1000, true)); }
[ "Make sure that we have some reasonable defaults available. These would typically be provided by the rulesets\nin the real world." ]
[ "Checks to see if every value in the matrix is the specified value.\n\n@param mat The matrix being tested. Not modified.\n@param val Checks to see if every element in the matrix has this value.\n@param tol True if all the elements are within this tolerance.\n@return true if the test passes.", "Use this API to fetch all the snmpoption resources that are configured on netscaler.", "Returns the right string representation of the effort level based on given number of points.", "Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x and y.", "Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference", "Executed read-resource-description and returns access-control info.\nReturns null in case there was any kind of problem.\n\n@param client\n@param address\n@return", "Gets container with alls groups of a certain user.\n\n@param cms cmsobject\n@param user to find groups for\n@param caption caption property\n@param iconProp property\n@param ou ou\n@param propStatus status property\n@param iconProvider the icon provider\n@return Indexed Container", "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", "Register the entity as batch loadable, if enabled\n\nCopied from {@link org.hibernate.type.ManyToOneType#scheduleBatchLoadIfNeeded}" ]
public static protocoludp_stats get(nitro_service service) throws Exception{ protocoludp_stats obj = new protocoludp_stats(); protocoludp_stats[] response = (protocoludp_stats[])obj.stat_resources(service); return response[0]; }
[ "Use this API to fetch the statistics of all protocoludp_stats resources that are configured on netscaler." ]
[ "A connection to the database. Should be short-lived. No transaction active by default.\n\n@return a new open connection.", "Returns the currently scheduled job description identified by the given id.\n\n@param id the job id\n\n@return a job or <code>null</code> if not found", "Returns the number of days from the given weekday to the next weekday the event should occur.\n@param weekDay the current weekday.\n@return the number of days to the next weekday an event could occur.", "Returns angle in degrees between two points\n\n@param ax x of the point 1\n@param ay y of the point 1\n@param bx x of the point 2\n@param by y of the point 2\n@return angle in degrees between two points", "region Override Methods", "Generates a full list of all parents and their children, in order. Uses Map to preserve\nlast expanded state.\n\n@param parentList A list of the parents from\nthe {@link ExpandableRecyclerAdapter}\n@param savedLastExpansionState A map of the last expanded state for a given parent key.\n@return A list of all parents and their children, expanded accordingly", "Adds a new email alias to this user's account and confirms it without user interaction.\nThis functionality is only available for enterprise admins.\n@param email the email address to add as an alias.\n@param isConfirmed whether or not the email alias should be automatically confirmed.\n@return the newly created email alias.", "Generate a groupId tree regarding the filters\n\n@param moduleId\n@return TreeNode", "lookup current maximum value for a single field in\ntable the given class descriptor was associated." ]
public void dispatchKeyEvent(int code, int action) { int keyCode = 0; int keyAction = 0; if (code == BUTTON_1) { keyCode = KeyEvent.KEYCODE_BUTTON_1; } else if (code == BUTTON_2) { keyCode = KeyEvent.KEYCODE_BUTTON_2; } if (action == ACTION_DOWN) { keyAction = KeyEvent.ACTION_DOWN; } else if (action == ACTION_UP) { keyAction = KeyEvent.ACTION_UP; } KeyEvent keyEvent = new KeyEvent(keyAction, keyCode); setKeyEvent(keyEvent); }
[ "Synthesize and forward a KeyEvent to the library.\n\nThis call is made from the native layer.\n\n@param code id of the button\n@param action integer representing the action taken on the button" ]
[ "We have obtained a beat grid for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this beat grid\n@param beatGrid the beat grid which we retrieved", "Configure the mapping between a database column and a field, including definition of\nan alias.\n\n@param container column to field map\n@param name column name\n@param type field type\n@param alias field alias", "Determine if a task field contains data.\n\n@param task task instance\n@param field target field\n@return true if the field contains data", "Returns a projection object for specifying the fields to retrieve during a specific find operation.", "Returns the connection that has been saved or null if none.", "Use this API to update systemuser.", "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", "Updates the path_order column in the table, loops though the pathOrder array, and changes the value to the loop\nindex+1 for the specified pathId\n\n@param profileId ID of profile\n@param pathOrder array containing new order of paths", "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" ]
private void sortFields() { HashMap fields = new HashMap(); ArrayList fieldsWithId = new ArrayList(); ArrayList fieldsWithoutId = new ArrayList(); FieldDescriptorDef fieldDef; for (Iterator it = getFields(); it.hasNext(); ) { fieldDef = (FieldDescriptorDef)it.next(); fields.put(fieldDef.getName(), fieldDef); if (fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_ID)) { fieldsWithId.add(fieldDef.getName()); } else { fieldsWithoutId.add(fieldDef.getName()); } } Collections.sort(fieldsWithId, new FieldWithIdComparator(fields)); ArrayList result = new ArrayList(); for (Iterator it = fieldsWithId.iterator(); it.hasNext();) { result.add(getField((String)it.next())); } for (Iterator it = fieldsWithoutId.iterator(); it.hasNext();) { result.add(getField((String)it.next())); } _fields = result; }
[ "Sorts the fields." ]
[ "This method is called to alert project listeners to the fact that\na calendar has been written to a project file.\n\n@param calendar calendar instance", "Creates a descriptor for the bundle in the same folder where the bundle files are located.\n@throws CmsException thrown if creation fails.", "Constructs a relative path between this path and a given path.\n\n<p> Relativization is the inverse of {@link #getAbsolutePath(Path) resolution}.\nThis method attempts to construct a {@link #isAbsolute relative} path\nthat when {@link #getAbsolutePath(Path) resolved} against this path, yields a\npath that locates the same file as the given path. For example, on UNIX,\nif this path is {@code \"/a/b\"} and the given path is {@code \"/a/b/c/d\"}\nthen the resulting relative path would be {@code \"c/d\"}.\nBoth paths must be absolute and and either this path or the given path must be a\n{@link #startsWith(Path) prefix} of the other.\n\n@param other\nthe path to relativize against this path\n\n@return the resulting relative path or null if neither of the given paths is a prefix of the other\n\n@throws IllegalArgumentException\nif this path and {@code other} are not both absolute or relative", "Samples with replacement from a collection\n\n@param c\nThe collection to be sampled from\n@param n\nThe number of samples to take\n@return a new collection with the sample", "Update the id field of the object in the database.", "key function. first validate if the ACM has adequate data; then execute\nit after the validation. the new ParallelTask task guareetee to have the\ntargethost meta and command meta not null\n\n@param handler\nthe handler\n@return the parallel task", "Get the available sizes of a Photo.\n\nThe boolean toggle allows to (api-)sign the call.\n\nThis way the calling user can retrieve sizes for <b>his own</b> private photos.\n\n@param photoId\nThe photo ID\n@param sign\ntoggle to allow optionally signing the call (Authenticate)\n@return A collection of {@link Size}\n@throws FlickrException", "Returns an iterator equivalent to this iterator with all duplicated items removed\nby using the default comparator. The original iterator will become\nexhausted of elements after determining the unique values. A new iterator\nfor the unique values will be returned.\n\n@param self an Iterator\n@return the modified Iterator\n@since 1.5.5", "Gets the value of the callout property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the callout property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetCallout().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link Callouts.Callout }" ]
@SafeVarargs public static <T> Set<T> asSet(T... ts) { if ( ts == null ) { return null; } else if ( ts.length == 0 ) { return Collections.emptySet(); } else { Set<T> set = new HashSet<T>( getInitialCapacityFromExpectedSize( ts.length ) ); Collections.addAll( set, ts ); return Collections.unmodifiableSet( set ); } }
[ "Returns an unmodifiable set containing the given elements.\n\n@param ts the elements from which to create a set\n@param <T> the type of the element in the set\n@return an unmodifiable set containing the given elements or {@code null} in case the given element array is\n{@code null}." ]
[ "Returns the port as configured by the system variables, fallback is the default port value\n\n@param portIdentifier - SYS_*_PORT defined in Constants\n@return", "Returns the connection count in this registry.\n\nNote it might count connections that are closed but not removed from registry yet\n\n@return the connection count", "Set an unknown field.\n@param name the unknown property name\n@param value the unknown property value", "Handles an initial response from a PUT or PATCH operation response by polling the status of the operation\nasynchronously, once the operation finishes emits the final response.\n\n@param observable the initial observable from the PUT or PATCH operation.\n@param resourceType the java.lang.reflect.Type of the resource.\n@param <T> the return type of the caller.\n@return the observable of which a subscription will lead to a final response.", "Check the given resource back into the pool\n\n@param key The key for the resource\n@param resource The resource", "Normalizes the name so it can be used as Maven artifactId or groupId.", "A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged\n\nWhen using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.\n\nA custom field's `type` cannot be updated.\n\nAn enum custom field's `enum_options` cannot be updated with this endpoint. Instead see \"Work With Enum Options\" for information on how to update `enum_options`.\n\nReturns the complete updated custom field record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object", "Unlinks a set of dependencies from this task.\n\n@param task The task to remove dependencies from.\n@return Request object", "Legacy conversion.\n@param map\n@return Properties" ]
private void lockDescriptor() throws CmsException { if ((null == m_descFile) && (null != m_desc)) { m_descFile = LockedFile.lockResource(m_cms, m_desc); } }
[ "Locks the bundle descriptor.\n@throws CmsException thrown if locking fails." ]
[ "Set the menu's width in pixels.", "Set up the ThreadContext and delegate.", "Constructs a camera rig with cameras attached. An owner scene object is automatically\ncreated for the camera rig.\n\nDo not try to change the owner object of the camera rig - not supported currently and will\nlead to native crashes.", "Validate the configuration.\n\n@param validationErrors where to put the errors.", "Start the first inner table of a class.", "Get a compatible constructor\n\n@param type\nClass to look for constructor in\n@param argumentType\nArgument type for constructor\n@return the compatible constructor or null if none found", "Old REST client uses new REST service", "Copied from original SeleniumProxyHandler\nChanged SslRelay to SslListener and getSslRelayOrCreateNew to getSslRelayOrCreateNewOdo\nNo other changes to the function\n\n@param pathInContext\n@param pathParams\n@param request\n@param response\n@throws HttpException\n@throws IOException", "Lists the formation info for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used." ]
public byte[] encrypt(byte[] plainData) { checkArgument(plainData.length >= OVERHEAD_SIZE, "Invalid plainData, %s bytes", plainData.length); // workBytes := initVector || payload || zeros:4 byte[] workBytes = plainData.clone(); ByteBuffer workBuffer = ByteBuffer.wrap(workBytes); boolean success = false; try { // workBytes := initVector || payload || I(signature) int signature = hmacSignature(workBytes); workBuffer.putInt(workBytes.length - SIGNATURE_SIZE, signature); // workBytes := initVector || E(payload) || I(signature) xorPayloadToHmacPad(workBytes); if (logger.isDebugEnabled()) { logger.debug(dump("Encrypted", plainData, workBytes)); } success = true; return workBytes; } finally { if (!success && logger.isDebugEnabled()) { logger.debug(dump("Encrypted (failed)", plainData, workBytes)); } } }
[ "Encrypts data.\n\n@param plainData {@code initVector || payload || zeros:4}\n@return {@code initVector || E(payload) || I(signature)}" ]
[ "Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields.", "Set an unknown field.\n@param name the unknown property name\n@param value the unknown property value", "Returns the association row with the given key.\n\n@param key the key of the row to return.\n@return the association row with the given key or {@code null} if no row with that key is contained in this\nassociation", "Builds the table for the database results.\n\n@param results the database results\n@return the table", "Utility function that fetches node ids.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return Node ids in cluster", "Use this API to delete appfwlearningdata.", "Removes all pending broadcasts\n\n@param sessionIds to remove broadcast for (or null for all sessions)", "Extracts warnings that are returned in an API response.\n\n@param root\nroot node of the JSON result", "Scales the weights of this crfclassifier by the specified weight\n\n@param scale" ]
private String getStringPredicate(String fieldName, List<String> filterValues, List<Object> prms) { if (filterValues != null && !filterValues.isEmpty()) { String res = ""; for (String filterValue : filterValues) { if (filterValue == null) { continue; } if (!filterValue.isEmpty()) { prms.add(filterValue); if (filterValue.contains("%")) { res += String.format("(%s LIKE ?) OR ", fieldName); } else { res += String.format("(%s = ?) OR ", fieldName); } } else { res += String.format("(%s IS NULL OR %s = '') OR ", fieldName, fieldName); } } if (!res.isEmpty()) { res = "AND (" + res.substring(0, res.length() - 4) + ") "; return res; } } return ""; }
[ "GetJob helper - String predicates are all created the same way, so this factors some code." ]
[ "Given the initial and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@param filePrefix String to prepend to the initial & final cluster\nmetadata files\n@throws IOException", "Find the index of this animation if it is in this animator.\n\n@param findme {@link GVRAnimation} to find.\n@returns 0 based index of animation or -1 if not found\n@see GVRAnimator#addAnimation(GVRAnimation)", "Locks the bundle file that contains the translation for the provided locale.\n@param l the locale for which the bundle file should be locked.\n@throws CmsException thrown if locking fails.", "marks the message as read", "Create a set 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 set.\n@return A set consisting of the items from the Iterable.", "Send JSON representation of given data object to all connections of a user\n@param data the data object\n@param username the username", "Writes the results of the processing to a CSV file.", "This method extracts resource data from a Phoenix file.\n\n@param phoenixProject parent node for resources", "This is generally only useful for extensions that delegate some of their functionality to other \"internal\"\nextensions of their own that they need to configure.\n\n@param configuration the configuration to be supplied with the returned analysis context.\n@return an analysis context that is a clone of this instance but its configuration is replaced with the provided\none." ]
public static base_responses update(nitro_service client, bridgetable resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { bridgetable updateresources[] = new bridgetable[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new bridgetable(); updateresources[i].bridgeage = resources[i].bridgeage; } result = update_bulk_request(client, updateresources); } return result; }
[ "Use this API to update bridgetable resources." ]
[ "Checks to see if either the diagonal element or off diagonal element is zero. If one is\nthen it performs a split or pushes it off the matrix.\n\n@return True if there was a zero.", "Send a tempo changed announcement to all registered master listeners.\n\n@param tempo the new master tempo", "Obtains a local date in Coptic 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 Coptic local date, not null\n@throws DateTimeException if unable to create the date", "Checks that native primarykey fields have readonly access, and warns if not.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)", "Option check, forwards options to the standard doclet, if that one refuses them,\nthey are sent to UmlGraph", "Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail", "Tests that the area is valid geojson, the style ref is valid or null and the display is non-null.", "Convert an integer to a RelationType instance.\n\n@param type integer value\n@return RelationType instance", "Get the values of the fields for an obj\nAutoincrement values are automatically set.\n@param fields\n@param obj\n@throws PersistenceBrokerException" ]
public void strokeRoundRectangle(Rectangle rect, Color color, float linewidth, float r) { template.saveState(); setStroke(color, linewidth, null); template.roundRectangle(origX + rect.getLeft(), origY + rect.getBottom(), rect.getWidth(), rect.getHeight(), r); template.stroke(); template.restoreState(); }
[ "Draw a rounded rectangular boundary.\n\n@param rect rectangle\n@param color colour\n@param linewidth line width\n@param r radius for rounded corners" ]
[ "Sets a client option per-request\n\n@param key Option name\n@param value Option value\n@return The request itself", "Removes obsolete elements from names and shared elements.\n\n@param names Shared element names.\n@param sharedElements Shared elements.\n@param elementsToRemove The elements that should be removed.", "Maps an integer field ID to a field type.\n\n@param field field ID\n@return field type", "Returns a list of objects for each line in the spreadsheet, of the specified type.\n\n<p>\nIf the class is a view model then the objects will be properly instantiated (that is, using\n{@link DomainObjectContainer#newViewModelInstance(Class, String)}, with the correct\nview model memento); otherwise the objects will be simple transient objects (that is, using\n{@link DomainObjectContainer#newTransientInstance(Class)}).\n</p>", "Detect what has changed in the store definition and rewire BDB\nenvironments accordingly.\n\n@param storeDef updated store definition", "Read a Synchro string from an input stream.\n\n@param is input stream\n@return String instance", "Sets the value for the API's \"languages\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters", "Prepares this DAG for node enumeration using getNext method, each call to getNext returns next node\nin the DAG with no dependencies.", "Read a text stream into a single string.\n\n@param inputStream\nStream containing text. Will be closed on exit.\n@return The contents, or null on error." ]
private void readCalendar(net.sf.mpxj.planner.schema.Calendar plannerCalendar, ProjectCalendar parentMpxjCalendar) throws MPXJException { // // Create a calendar instance // ProjectCalendar mpxjCalendar = m_projectFile.addCalendar(); // // Populate basic details // mpxjCalendar.setUniqueID(getInteger(plannerCalendar.getId())); mpxjCalendar.setName(plannerCalendar.getName()); mpxjCalendar.setParent(parentMpxjCalendar); // // Set working and non working days // DefaultWeek dw = plannerCalendar.getDefaultWeek(); setWorkingDay(mpxjCalendar, Day.MONDAY, dw.getMon()); setWorkingDay(mpxjCalendar, Day.TUESDAY, dw.getTue()); setWorkingDay(mpxjCalendar, Day.WEDNESDAY, dw.getWed()); setWorkingDay(mpxjCalendar, Day.THURSDAY, dw.getThu()); setWorkingDay(mpxjCalendar, Day.FRIDAY, dw.getFri()); setWorkingDay(mpxjCalendar, Day.SATURDAY, dw.getSat()); setWorkingDay(mpxjCalendar, Day.SUNDAY, dw.getSun()); // // Set working hours // processWorkingHours(mpxjCalendar, plannerCalendar); // // Process exception days // processExceptionDays(mpxjCalendar, plannerCalendar); m_eventManager.fireCalendarReadEvent(mpxjCalendar); // // Process any derived calendars // List<net.sf.mpxj.planner.schema.Calendar> calendarList = plannerCalendar.getCalendar(); for (net.sf.mpxj.planner.schema.Calendar cal : calendarList) { readCalendar(cal, mpxjCalendar); } }
[ "This method extracts data for a single calendar from a Planner file.\n\n@param plannerCalendar Calendar data\n@param parentMpxjCalendar parent of derived calendar" ]
[ "Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together", "Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registry", "Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return", "A property tied to the map, updated when the idle state event is fired.\n\n@return", "If the specified value is not greater than or equal to the specified minimum and\nless than or equal to the specified maximum, adjust it so that it is.\n@param value The value to check.\n@param min The minimum permitted value.\n@param max The maximum permitted value.\n@return {@code value} if it is between the specified limits, {@code min} if the value\nis too low, or {@code max} if the value is too high.\n@since 1.2", "Filter everything until we found the first NL character.", "Get an extent aware Iterator based on the Query\n\n@param query\n@param cld the ClassDescriptor\n@return OJBIterator", "Adds a corporate groupId to an organization\n\n@param organizationId String\n@param corporateGroupId String", "Get the Query Paramaters to be used for search request.\n@return this.QueryStringBuilder." ]
public static dnssuffix get(nitro_service service, String Dnssuffix) throws Exception{ dnssuffix obj = new dnssuffix(); obj.set_Dnssuffix(Dnssuffix); dnssuffix response = (dnssuffix) obj.get_resource(service); return response; }
[ "Use this API to fetch dnssuffix resource of given name ." ]
[ "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", "Mapping message info.\n\n@param messageInfo the message info\n@return the message info type", "The transaction will be executed. While it is running, any semantic state change\nin the given resource will be ignored and the cache will not be cleared.", "Parse a filter expression.\n\n@param filter the filter expression\n@return compiled nodes", "Send an event to other applications\n\n@param context context in which to send the broadcast\n@param event event to send", "Add a single header key-value pair. If one with the name already exists,\nboth stay in the header map.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself.", "Returns the meta-data for the inverse side of the association represented by the given property on the given\npersister in case it represents the main side of a bi-directional one-to-many or many-to-many association.\n\n@param mainSidePersister persister of the entity hosting the property of interest\n@param propertyIndex index of the property of interest\n@return the meta-data of the inverse side of the specified association or {@code null} if no such meta-data\nexists", "Initializes class data structures and parameters", "Returns the default table name for this class which is the unqualified class name.\n\n@return The default table name" ]
public void validateOperations(final List<ModelNode> operations) { if (operations == null) { return; } for (ModelNode operation : operations) { try { validateOperation(operation); } catch (RuntimeException e) { if (exitOnError) { throw e; } else { System.out.println("---- Operation validation error:"); System.out.println(e.getMessage()); } } } }
[ "Validates operations against their description providers\n\n@param operations The operations to validate\n@throws IllegalArgumentException if any operation is not valid" ]
[ "Convert the Primavera string representation of a UUID into a Java UUID instance.\n\n@param value Primavera UUID\n@return Java UUID instance", "Maps a story if it is allowed by the meta filter\n\n@param story\nthe Story\n@param metaFilter\nthe meta filter", "Check real offset.\n\n@return the boolean", "Use this API to fetch the statistics of all service_stats resources that are configured on netscaler.", "The Total Slack field contains the amount of time a task can be\ndelayed without delaying the project's finish date.\n\n@return string representing duration", "Writes no-value restriction.\n\n@param rdfWriter\nthe writer to write the restrictions to\n@param propertyUri\nURI of the property to which the restriction applies\n@param rangeUri\nURI of the class or datatype to which the restriction applies\n@param subject\nnode representing the restriction\n@throws RDFHandlerException\nif there was a problem writing the RDF triples", "Read metadata by populating an instance of the target class\nusing SAXParser.", "Walk project references recursively, building up a list of thrift files they provide, starting\nwith an empty file list.", "Retrieve a UUID from an input stream.\n\n@param is input stream\n@return UUID instance" ]
@Override public boolean isKeyColumn(String columnName) { for ( String keyColumName : getColumnNames() ) { if ( keyColumName.equals( columnName ) ) { return true; } } return false; }
[ "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." ]
[ "Retrieves a list of Terms of Service that belong to your Enterprise as an Iterable.\n@param api api the API connection to be used by the resource.\n@param termsOfServiceType the type of terms of service to be retrieved. Can be set to \"managed\" or \"external\"\n@return the Iterable of Terms of Service in an Enterprise that match the filter parameters.", "This method writes extended attribute data for a resource.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource", "Returns a collection of all profiles\n\n@return Collection of all Profiles\n@throws Exception exception", "Returns true if the given item document lacks a label for at least one of\nthe languages covered.\n\n@param itemDocument\n@return true if some label is missing", "Starts all streams.", "Returns a JSONObject keyed with the lastId retrieved and a value of a JSONArray of the retrieved JSONObject events\n\n@param table the table to read from\n@return JSONObject containing the max row ID and a JSONArray of the JSONObject events or null", "Set child components.\n\n@param children\nchildren", "Get the default providers list to be used.\n\n@return the default provider list and ordering, not null.", "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" ]
protected static boolean isOperatorLR( Symbol s ) { if( s == null ) return false; switch( s ) { case ELEMENT_DIVIDE: case ELEMENT_TIMES: case ELEMENT_POWER: case RDIVIDE: case LDIVIDE: case TIMES: case POWER: case PLUS: case MINUS: case ASSIGN: return true; } return false; }
[ "Operators which affect the variables to its left and right" ]
[ "Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array.", "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.", "Get the object responsible for printing to the correct output format.\n\n@param specJson the request json from the client", "Find and read the cache format entry in a metadata cache file.\n\n@return the content of the format entry, or {@code null} if none was found\n\n@throws IOException if there is a problem reading the file", "Returns a copy of the given document.\n@param document the document to copy.\n@return a copy of the given document.", "If requested, adjust the bounds to the nearest scale and the map size.\n\n@param mapValues Map parameters.\n@param paintArea The size of the painting area.\n@param bounds The map bounds.\n@param dpi the DPI.", "Verify JUnit presence and version.", "returns a comparator that allows to sort a Vector of FieldMappingDecriptors\naccording to their m_Order entries.", "Creates the style definition used for a rectangle element based on the given properties of the rectangle\n@param x The X coordinate of the rectangle.\n@param y The Y coordinate of the rectangle.\n@param width The width of the rectangle.\n@param height The height of the rectangle.\n@param stroke Should there be a stroke around?\n@param fill Should the rectangle be filled?\n@return The resulting element style definition." ]
public void addAttribute(String attributeName, String attributeValue) { if (attributeName != null && attributeName.startsWith(JDBC_PROPERTY_NAME_PREFIX)) { final String jdbcPropertyName = attributeName.substring(JDBC_PROPERTY_NAME_LENGTH); jdbcProperties.setProperty(jdbcPropertyName, attributeValue); } else if (attributeName != null && attributeName.startsWith(DBCP_PROPERTY_NAME_PREFIX)) { final String dbcpPropertyName = attributeName.substring(DBCP_PROPERTY_NAME_LENGTH); dbcpProperties.setProperty(dbcpPropertyName, attributeValue); } else { super.addAttribute(attributeName, attributeValue); } }
[ "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" ]
[ "Obtain collection of headers to remove\n\n@return\n@throws Exception", "Parse work units.\n\n@param value work units value\n@return TimeUnit instance", "Use this API to save cacheobject resources.", "Throw fault.\n\n@param code the fault code\n@param message the message\n@param t the throwable type\n@throws PutEventsFault", "Use this API to fetch a filterglobal_filterpolicy_binding resources.", "Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded.", "Write a string attribute.\n\n@param name attribute name\n@param value attribute value", "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", "Rewrites the file passed to 'this' constructor so that the actual line numbers match the recipe passed to 'this'\nconstructor." ]
public static Map<String, IDiagramPlugin> getLocalPluginsRegistry(ServletContext context) { if (LOCAL == null) { LOCAL = initializeLocalPlugins(context); } return LOCAL; }
[ "Initialize the local plugins registry\n@param context the servlet context necessary to grab\nthe files inside the servlet.\n@return the set of local plugins organized by name" ]
[ "Returns the full path of the resource file with extension.\n\n@return path of the GVRAndroidResource. May return null if the\nresource is not associated with any file", "This main method provides an easy command line tool to compare two\nschemas.", "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", "Moves the drawer to the position passed.\n\n@param position The position the content is moved to.\n@param velocity Optional velocity if called by releasing a drag event.\n@param animate Whether the move is animated.", "This method retrieves a double of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required double data", "Sets the RDF serialization tasks based on the given string value.\n\n@param tasks\na space-free, comma-separated list of task names", "Creates a new empty HTML document tree.\n@throws ParserConfigurationException", "1-D Forward Discrete Cosine Transform.\n\n@param data Data.", "Returns a canonical type for a given class.\n\nIf the class is a raw type of a parameterized class, the matching {@link ParameterizedType} (with unresolved type\nvariables) is resolved.\n\nIf the class is an array then the component type of the array is canonicalized\n\nOtherwise, the class is returned.\n\n@return" ]
public SqlStatement getPreparedUpdateStatement(ClassDescriptor cld) { SqlForClass sfc = getSqlForClass(cld); SqlStatement result = sfc.getUpdateSql(); if(result == null) { ProcedureDescriptor pd = cld.getUpdateProcedure(); if(pd == null) { result = new SqlUpdateStatement(cld, logger); } else { result = new SqlProcedureStatement(pd, logger); } // set the sql string sfc.setUpdateSql(result); if(logger.isDebugEnabled()) { logger.debug("SQL:" + result.getStatement()); } } return result; }
[ "generate a prepared UPDATE-Statement for the Class\ndescribed by cld\n@param cld the ClassDescriptor" ]
[ "Gets the numeric codes. Setting it to -1 search for currencies that have no numeric code.\n\n@return the query for chaining.", "Factory method that builds the appropriate matcher for @match tags", "Creates a file logger in the current thread. The file is in XML format, suitable for interpretation by Eclipse's Drools Audit View\nor other tools. Note that while events are written as they happen, the file will not be flushed until it is closed or the underlying\nfile buffer is filled. If you need real time logging then use a Console Logger or a Threaded File Logger.\n\n@param session\n@param fileName - .log is appended to this.\n@return", "Removes an element from the observation matrix.\n\n@param index which element is to be removed", "In the case where the prefix sits at a segment boundary, and the prefix sequence is null - null - 0, this changes to prefix sequence of null - x - 0, where x is segment bit length.\n\nNote: We allow both [null, null, 0] and [null, x, 0] where x is segment length. However, to avoid inconsistencies when doing segment replacements,\nand when getting subsections, in the calling constructor we normalize [null, null, 0] to become [null, x, 0].\nWe need to support [null, x, 0] so that we can create subsections and full addresses ending with [null, x] where x is bit length.\nSo we defer to that when constructing addresses and sections.\nAlso note that in our append/appendNetowrk/insert/replace we have special handling for cases like inserting [null] into [null, 8, 0] at index 2.\nThe straight replace would give [null, 8, null, 0] which is wrong.\nIn that code we end up with [null, null, 8, 0] by doing a special trick:\nWe remove the end of [null, 8, 0] and do an append [null, 0] and we'd remove prefix from [null, 8] to get [null, null] and then we'd do another append to get [null, null, null, 0]\nThe final step is this normalization here that gives [null, null, 8, 0]\n\nHowever, when users construct AddressDivisionGrouping or IPAddressDivisionGrouping, either one is allowed: [null, null, 0] and [null, x, 0].\nSince those objects cannot be further subdivided with getSection/getNetworkSection/getHostSection or grown with appended/inserted/replaced,\nthere are no inconsistencies introduced, we are simply more user-friendly.\nAlso note that normalization of AddressDivisionGrouping or IPAddressDivisionGrouping is really not possible without the address creator objects we use for addresses and sections,\nthat allow us to recreate new segments of the correct type.\n\n@param sectionPrefixBits\n@param segments\n@param segmentBitCount\n@param segmentByteCount\n@param segProducer", "Method used to instantiate the appropriate input stream reader,\na standard one, or one which can deal with \"encrypted\" data.\n\n@param directory directory entry\n@param name file name\n@return new input stream\n@throws IOException", "Retrieve a specific row by index number, creating a blank row if this row does not exist.\n\n@param index index number\n@return MapRow instance", "Generate a PageMetadata object for the page represented by the specified pagination token.\n\n@param paginationToken opaque pagination token\n@param initialParameters the initial view query parameters (i.e. for the page 1 request).\n@param <K> the view key type\n@param <V> the view value type\n@return PageMetadata object for the given page", "Create a new path address by appending more elements to the end of this address.\n\n@param additionalElements the elements to append\n@return the new path address" ]
public List<MapRow> readTableConditional(Class<? extends TableReader> readerClass) throws IOException { List<MapRow> result; if (DatatypeConverter.getBoolean(m_stream)) { result = readTable(readerClass); } else { result = Collections.emptyList(); } return result; }
[ "Conditionally read a nested table based in the value of a boolean flag which precedes the table data.\n\n@param readerClass reader class\n@return table rows or empty list if table not present" ]
[ "Populates the project header.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException", "Returns the version of Jenkins Artifactory Plugin or empty string if not found\n\n@return the version of Jenkins Artifactory Plugin or empty string if not found", "Extract a Class from the given Type.", "creates a shape list containing all child shapes and set it to the\ncurrent shape new shape get added to the shape array\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException", "Send parallel task to execution manager.\n\n@param task\nthe parallel task\n@return the batch response from manager", "Convert a floating point date to a LocalDate.\n\nNote: This method currently performs a rounding to the next day.\nIn a future extension intra-day time offsets may be considered.\n\nIf referenceDate is null, the method returns null.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param floatingPointDate The value to the time offset \\( t \\).\n@return The date resulting from adding Math.round(fixingTime*365.0) days to referenceDate.", "Use this API to fetch dnssuffix resource of given name .", "Use this API to add dnsaaaarec.", "Populate the model with the object's properties.\n\n@param object object whose properties we're displaying\n@param excludedMethods method names to exclude" ]
protected int compare(MethodDesc o1, MethodDesc o2) { final Class<?>[] paramTypes1 = o1.getParameterTypes(); final Class<?>[] paramTypes2 = o2.getParameterTypes(); // sort by parameter types from left to right for (int i = 0; i < paramTypes1.length; i++) { final Class<?> class1 = paramTypes1[i]; final Class<?> class2 = paramTypes2[i]; if (class1.equals(class2)) continue; if (class1.isAssignableFrom(class2) || Void.class.equals(class2)) return -1; if (class2.isAssignableFrom(class1) || Void.class.equals(class1)) return 1; } // sort by declaring class (more specific comes first). if (!o1.getDeclaringClass().equals(o2.getDeclaringClass())) { if (o1.getDeclaringClass().isAssignableFrom(o2.getDeclaringClass())) return 1; if (o2.getDeclaringClass().isAssignableFrom(o1.getDeclaringClass())) return -1; } // sort by target final int compareTo = ((Integer) targets.indexOf(o2.target)).compareTo(targets.indexOf(o1.target)); return compareTo; }
[ "returns &gt; 0 when o1 is more specific than o2,\n\nreturns == 0 when o1 and o2 are equal or unrelated,\n\nreturns &lt; 0 when o2 is more specific than o1," ]
[ "Return a copy of the new fragment and set the variable above.", "Creates a resource key with id defined as enumeration value name and bundle specified by given class.\n@param clazz the class owning the bundle\n@param value enumeration value used to define key id\n@return the resource key", "Sets selected page implicitly\n@param page new selected page\n@return true if the page has been selected successfully", "Gets currently visible user.\n\n@return List of user", "StartMain passes in the command line args here.\n\n@param args The command line arguments. If null is given then an empty\narray will be used instead.", "Gets a string attribute from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attribute as a {@link String}, or null if it was not found.", "Read a text file from assets into a single string\n\n@param context\nA non-null Android Context\n@param asset\nThe asset file to read\n@return The contents or null on error.", "Returns a TypeConverter for a given class.\n\n@param cls The class for which the TypeConverter should be fetched.", "Cleans a multi-value property key.\n\n@param name Name of the property key\n@return The {@link ValidationResult} object containing the key,\nand the error code(if any)\n<p/>\nFirst calls cleanObjectKey\nKnown property keys are reserved for multi-value properties, subsequent validation is done for those" ]
private void onClickAdd() { if (m_currentLocation.isPresent()) { CmsFavoriteEntry entry = m_currentLocation.get(); List<CmsFavoriteEntry> entries = getEntries(); entries.add(entry); try { m_favDao.saveFavorites(entries); } catch (Exception e) { CmsErrorDialog.showErrorDialog(e); } m_context.close(); } }
[ "The click handler for the add button." ]
[ "Builds a string that serializes a list of objects separated by the pipe\ncharacter. The toString methods are used to turn objects into strings.\nThis operation is commonly used to build parameter lists for API\nrequests.\n\n@param objects\nthe objects to implode\n@return string of imploded objects", "Send a media details response to all registered listeners.\n\n@param details the response that has just arrived", "Update the server group's name\n\n@param serverGroupId ID of server group\n@param name new name of server group\n@return updated ServerGroup", "Parse a date time value.\n\n@param value String representation\n@return Date instance", "Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.", "Normalizes the matrix such that the Frobenius norm is equal to one.\n\n@param A The matrix that is to be normalized.", "Use this API to update tmtrafficaction.", "Scans a set of classes for both ReaderListeners and Swagger annotations. All found listeners will\nbe instantiated before any of the classes are scanned for Swagger annotations - so they can be invoked\naccordingly.\n\n@param classes a set of classes to scan\n@return the generated Swagger definition", "Get the configured hive.execution.engine. If not set it will default to the default value of HiveConf" ]
public void printProbs(String filename, DocumentReaderAndWriter<IN> readerAndWriter) { // only for the OCR data does this matter flags.ocrTrain = false; ObjectBank<List<IN>> docs = makeObjectBankFromFile(filename, readerAndWriter); printProbsDocuments(docs); }
[ "Takes the file, reads it in, and prints out the likelihood of each possible\nlabel at each point.\n\n@param filename\nThe path to the specified file" ]
[ "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.", "Port forward missing module changes for each layer.\n\n@param patch the current patch\n@param context the patch context\n@throws PatchingException\n@throws IOException\n@throws XMLStreamException", "Use this API to delete snmpmanager.", "Returns the compact task records for all tasks within the given project,\nordered by their priority within the project. Tasks can exist in more than one project at a time.\n\n@param project The project in which to search for tasks.\n@return Request object", "Looks up a variable given its name. If none is found then return null.", "Compares two columns given by their names.\n\n@param objA The name of the first column\n@param objB The name of the second column\n@return\n@see java.util.Comparator#compare(java.lang.Object, java.lang.Object)", "Writes this address as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix.", "Warning emitter. Uses whatever alternative non-event communication channel is.", "Retrieves the class object for the class with the given name.\n\n@param name The class name\n@return The class object\n@throws ClassNotFoundException If the class is not on the classpath (the exception message contains the class name)" ]
public static ProctorLoadResult verify( @Nonnull final TestMatrixArtifact testMatrix, final String matrixSource, @Nonnull final Map<String, TestSpecification> requiredTests, @Nonnull final FunctionMapper functionMapper, final ProvidedContext providedContext, @Nonnull final Set<String> dynamicTests ) { final ProctorLoadResult.Builder resultBuilder = ProctorLoadResult.newBuilder(); final Map<String, Map<Integer, String>> allTestsKnownBuckets = Maps.newHashMapWithExpectedSize(requiredTests.size()); for (final Entry<String, TestSpecification> entry : requiredTests.entrySet()) { final Map<Integer, String> bucketValueToName = Maps.newHashMap(); for (final Entry<String, Integer> bucket : entry.getValue().getBuckets().entrySet()) { bucketValueToName.put(bucket.getValue(), bucket.getKey()); } allTestsKnownBuckets.put(entry.getKey(), bucketValueToName); } final Map<String, ConsumableTestDefinition> definedTests = testMatrix.getTests(); final SetView<String> missingTests = Sets.difference(requiredTests.keySet(), definedTests.keySet()); resultBuilder.recordAllMissing(missingTests); for (final Entry<String, ConsumableTestDefinition> entry : definedTests.entrySet()) { final String testName = entry.getKey(); final Map<Integer, String> knownBuckets; final TestSpecification specification; final boolean isRequired; if (allTestsKnownBuckets.containsKey(testName)) { // required in specification isRequired = true; knownBuckets = allTestsKnownBuckets.remove(testName); specification = requiredTests.get(testName); } else if (dynamicTests.contains(testName)) { // resolved by dynamic filter isRequired = false; knownBuckets = Collections.emptyMap(); specification = new TestSpecification(); } else { // we don't care about this test continue; } final ConsumableTestDefinition testDefinition = entry.getValue(); try { verifyTest(testName, testDefinition, specification, knownBuckets, matrixSource, functionMapper, providedContext); } catch (IncompatibleTestMatrixException e) { if (isRequired) { LOGGER.error(String.format("Unable to load test matrix for a required test %s", testName), e); resultBuilder.recordError(testName, e); } else { LOGGER.info(String.format("Unable to load test matrix for a dynamic test %s", testName), e); resultBuilder.recordIncompatibleDynamicTest(testName, e); } } } // TODO mjs - is this check additive? resultBuilder.recordAllMissing(allTestsKnownBuckets.keySet()); resultBuilder.recordVerifiedRules(providedContext.shouldEvaluate()); final ProctorLoadResult loadResult = resultBuilder.build(); return loadResult; }
[ "Does not mutate the TestMatrix.\nVerifies that the test matrix contains all the required tests and that\neach required test is valid.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@param requiredTests a {@link Map} of required test. The {@link TestSpecification} would be verified\n@param functionMapper a given el {@link FunctionMapper}\n@param providedContext a {@link Map} containing variables describing the context in which the request is executing. These will be supplied to verifying all rules.\n@param dynamicTests a {@link Set} of dynamic tests determined by filters.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test." ]
[ "JSObject will return the String \"undefined\" at certain times, so we\nneed to make sure we're not getting a value that looks valid, but isn't.\n\n@param val The value from Javascript to be checked.\n@return Either null or the value passed in.", "Transforms an input String into HTML using the given Configuration.\n\n@param input\nThe String to process.\n@param configuration\nThe Configuration.\n@return The processed String.\n@since 0.7\n@see Configuration", "Click handler for bottom drawer items.", "Process dump file data from the given input stream. The method can\nrecover from an errors that occurred while processing an input stream,\nwhich is assumed to contain the JSON serialization of a list of JSON\nentities, with each entity serialization in one line. To recover from the\nprevious error, the first line is skipped.\n\n@param inputStream\nthe stream to read from\n@throws IOException\nif there is a problem reading the stream", "This method returns the duplicated certificate mapped to the passed in cert, or\ncreates and returns one if no mapping has yet been performed. If a naked public\nkey has already been mapped that matches the key in the cert, the already mapped\nkeypair will be reused for the mapped cert.\n@param cert\n@return\n@throws CertificateEncodingException\n@throws InvalidKeyException\n@throws CertificateException\n@throws CertificateNotYetValidException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws SignatureException\n@throws KeyStoreException\n@throws UnrecoverableKeyException", "Takes a date, and retrieves the next business day\n\n@param dateString the date\n@param onlyBusinessDays only business days\n@return a string containing the next business day", "Given a list of partition plans and a set of stores, copies the store\nnames to every individual plan and creates a new list\n\n@param existingPlanList Existing partition plan list\n@param storeDefs List of store names we are rebalancing\n@return List of updated partition plan", "Get the values for a particular configuration property\n\n@param name - name of the property\n@return All values encountered or null", "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" ]