query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public String toText() { StringBuilder sb = new StringBuilder(); if (!description.isEmpty()) { sb.append(description.toText()); sb.append(EOL); } if (!blockTags.isEmpty()) { sb.append(EOL); } for (JavadocBlockTag tag : blockTags) { sb.append(tag.toText()).append(EOL); } return sb.toString(); }
[ "Return the text content of the document. It does not containing trailing spaces and asterisks\nat the start of the line." ]
[ "Sets up and declares internal data structures.\n\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@param numCols number of columns (and rows) in the matrix.", "Looks up and returns the value of the given key in the properties file of\nthe currently-selected theme.\n\n@param code Key to look up in the theme properties file.\n@return The value of the code in the current theme properties file, or an\nempty string if the code could not be resolved.", "Convert the continuous values into discrete values by chopping up\nthe distribution into several equally-sized intervals.", "Use this API to fetch the statistics of all cmppolicy_stats resources that are configured on netscaler.", "Registers the transformers for JBoss EAP 7.0.0.\n\n@param subsystemRegistration contains data about the subsystem registration", "Returns the name of the operation.\n\n@param op the operation\n\n@return the name of the operation\n\n@throws IllegalArgumentException if the operation was not defined.", "The type descriptor for a method node is a string containing the name of the method, its return type,\nand its parameter types in a canonical form. For simplicity, I'm using the format of a Java declaration\nwithout parameter names.\n\n@return the type descriptor", "Inserts a marshalled endpoint reference to a given DOM tree rooted by parent.\n@param wsAddr\n@param parent\n@throws ServiceLocatorException", "Calculate delta with another vector\n@param v another vector\n@return delta vector" ]
private void transform(File file, Source transformSource) throws TransformerConfigurationException, IOException, SAXException, TransformerException, ParserConfigurationException { Transformer transformer = m_transformerFactory.newTransformer(transformSource); transformer.setOutputProperty(OutputKeys.ENCODING, "us-ascii"); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); String configDirPath = m_configDir.getAbsolutePath(); configDirPath = configDirPath.replaceFirst("[/\\\\]$", ""); transformer.setParameter("configDir", configDirPath); XMLReader reader = m_parserFactory.newSAXParser().getXMLReader(); reader.setEntityResolver(NO_ENTITY_RESOLVER); Source source; if (file.exists()) { source = new SAXSource(reader, new InputSource(file.getCanonicalPath())); } else { source = new SAXSource(reader, new InputSource(new ByteArrayInputStream(DEFAULT_XML.getBytes("UTF-8")))); } ByteArrayOutputStream baos = new ByteArrayOutputStream(); Result target = new StreamResult(baos); transformer.transform(source, target); byte[] transformedConfig = baos.toByteArray(); try (FileOutputStream output = new FileOutputStream(file)) { output.write(transformedConfig); } }
[ "Transforms a single configuration file using the given transformation source.\n\n@param file the configuration file\n@param transformSource the transform soruce\n\n@throws TransformerConfigurationException -\n@throws IOException -\n@throws SAXException -\n@throws TransformerException -\n@throws ParserConfigurationException -" ]
[ "Start a managed server.\n\n@param factory the boot command factory", "Select the specific vertex and fragment shader to use with this material.\n\nThe shader template is used to generate the sources for the vertex and\nfragment shader based on the material properties only.\nIt will ignore the mesh attributes and all lights.\n\n@param context\nGVRContext\n@param material\nmaterial to use with the shader\n@return ID of vertex/fragment shader set", "Create a JsonParser for a given json node.\n@param jsonNode the json node\n@return the json parser\n@throws IOException", "Set an attribute of this node as Object. This method is backed by\na HashMap, so all rules of HashMap apply to this method.\nFires a PropertyChangeEvent.", "Use this API to update tmtrafficaction.", "Print the class's constructors m", "Use this API to update responderpolicy.", "Entry point for processing filter definitions.\n\n@param properties project properties\n@param filters project filters\n@param fixedData filter fixed data\n@param varData filter var data", "Returns true if the request should continue.\n\n@return" ]
private List<String> processAllListeners(View rootView) { List<String> refinementAttributes = new ArrayList<>(); // Register any AlgoliaResultsListener (unless it has a different variant than searcher) final List<AlgoliaResultsListener> resultListeners = LayoutViews.findByClass((ViewGroup) rootView, AlgoliaResultsListener.class); if (resultListeners.isEmpty()) { throw new IllegalStateException(Errors.LAYOUT_MISSING_RESULT_LISTENER); } for (AlgoliaResultsListener listener : resultListeners) { if (!this.resultListeners.contains(listener)) { final String variant = BindingHelper.getVariantForView((View) listener); if (variant == null || searcher.variant.equals(variant)) { this.resultListeners.add(listener); searcher.registerResultListener(listener); prepareWidget(listener, refinementAttributes); } } } // Register any AlgoliaErrorListener (unless it has a different variant than searcher) final List<AlgoliaErrorListener> errorListeners = LayoutViews.findByClass((ViewGroup) rootView, AlgoliaErrorListener.class); for (AlgoliaErrorListener listener : errorListeners) { if (!this.errorListeners.contains(listener)) { final String variant = BindingHelper.getVariantForView((View) listener); if (variant == null || searcher.variant.equals(variant)) { this.errorListeners.add(listener); } } searcher.registerErrorListener(listener); prepareWidget(listener, refinementAttributes); } // Register any AlgoliaSearcherListener (unless it has a different variant than searcher) final List<AlgoliaSearcherListener> searcherListeners = LayoutViews.findByClass((ViewGroup) rootView, AlgoliaSearcherListener.class); for (AlgoliaSearcherListener listener : searcherListeners) { final String variant = BindingHelper.getVariantForView((View) listener); if (variant == null || searcher.variant.equals(variant)) { listener.initWithSearcher(searcher); prepareWidget(listener, refinementAttributes); } } return refinementAttributes; }
[ "Finds and sets up the Listeners in the given rootView.\n\n@param rootView a View to traverse looking for listeners.\n@return the list of refinement attributes found on listeners." ]
[ "Extracts the words from a string. Words are seperated by a space character.\n\n@param line The line that is being parsed.\n@return A list of words contained on the line.", "Use this API to link sslcertkey resources.", "Goes through the first buckets, picking out candidate records and\ntallying up their scores.\n@return the index of the first bucket we did not process", "Print the visibility adornment of element e prefixed by\nany stereotypes", "Given a GanttProject priority value, turn this into an MPXJ Priority instance.\n\n@param gpPriority GanttProject priority\n@return Priority instance", "This method extracts the XML header comment if available.\n\n@param xmlFile is the XML {@link File} to parse.\n@return the XML comment between the XML header declaration and the root tag or <code>null</code> if NOT\navailable.\n@throws MojoExecutionException if anything goes wrong.", "Resolves line alpha based on distance comparing to max distance.\nWhere alpha is close to 0 for maxDistance, and close to 1 to 0 distance.\n\n@param distance line length\n@param maxDistance max line length\n@return line alpha", "The timeout which we block for when a resource is not available\n\n@param timeout The timeout\n@param unit The units of the timeout", "Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates" ]
public static Property getChildAddress(final ModelNode address) { if (address.getType() != ModelType.LIST) { throw new IllegalArgumentException("The address type must be a list."); } final List<Property> addressParts = address.asPropertyList(); if (addressParts.isEmpty()) { throw new IllegalArgumentException("The address is empty."); } return addressParts.get(addressParts.size() - 1); }
[ "Finds the last entry of the address list and returns it as a property.\n\n@param address the address to get the last part of\n\n@return the last part of the address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty" ]
[ "Use this API to Import sslfipskey.", "Finds an entity given its primary key.\n\n@throws RowNotFoundException\nIf no such object was found.\n@throws TooManyRowsException\nIf more that one object was returned for the given ID.", "This loads plugin file information into a hash for lazy loading later on\n\n@param pluginDirectory path of plugin\n@throws Exception exception", "Dumps the partition IDs per node in terms of zone n-ary type.\n\n@param cluster\n@param storeRoutingPlan\n@return pretty printed string of detailed zone n-ary type.", "Give next index i where i and i+timelag is valid", "Delete an index with the specified name and type in the given design document.\n\n@param indexName name of the index\n@param designDocId ID of the design doc (the _design prefix will be added if not present)\n@param type type of the index, valid values or \"text\" or \"json\"", "Makes the scene object pickable by eyes. However, the object has to be touchable to process\nthe touch events.\n\n@param sceneObject", "This method returns the value of the product using a Black-Scholes model for the swap rate with the Hunt-Kennedy convexity adjustment.\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve from which the swap rate is calculated. The discount curve, associated with this forward curve is used for discounting this option.\n@param swaprateVolatility The volatility of the log-swaprate.\n@return Value of this product", "Performs a put operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key and\nvalue\n@return Version of the value for the successful put" ]
public String getHostName() { if( addr instanceof NbtAddress ) { return ((NbtAddress)addr).getHostName(); } return ((InetAddress)addr).getHostName(); }
[ "Return the hostname of this address such as \"MYCOMPUTER\"." ]
[ "We have received an update that invalidates the waveform detail for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no waveform preview for the associated player", "Sets the day of the month.\n@param day the day to set.", "Accessor method used to retrieve an Duration object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails", "Sets the ssh priv key relative path wtih passphrase.\n\n@param privKeyRelativePath the priv key relative path\n@param passphrase the passphrase\n@return the parallel task builder", "Adds a new row after the given one.\n\n@param row the row after which a new one should be added", "Add properties to 'properties' map on transaction start\n@param type - of transaction", "Iterate through dependencies", "Get the configuration for a TMS layer by retrieving and parsing it's XML description file. The parsing is done\nusing JaxB.\n@param layer the tms layer to get capabilities for.\n@return Returns the description as a Java configuration object.\n@throws TmsLayerException\nIn case something went wrong trying to find or parse the XML description file.", "Sets the occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception" ]
public BoxComment.Info reply(String message) { JsonObject itemJSON = new JsonObject(); itemJSON.add("type", "comment"); itemJSON.add("id", this.getID()); JsonObject requestJSON = new JsonObject(); requestJSON.add("item", itemJSON); if (BoxComment.messageContainsMention(message)) { requestJSON.add("tagged_message", message); } else { requestJSON.add("message", message); } URL url = ADD_COMMENT_URL_TEMPLATE.build(this.getAPI().getBaseURL()); BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST"); request.setBody(requestJSON.toString()); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject responseJSON = JsonObject.readFrom(response.getJSON()); BoxComment addedComment = new BoxComment(this.getAPI(), responseJSON.get("id").asString()); return addedComment.new Info(responseJSON); }
[ "Replies to this comment with another message.\n@param message the message for the reply.\n@return info about the newly created reply comment." ]
[ "Expands the directories from the given list and and returns a list of subfiles.\nFiles from the original list are kept as is.", "Determines if still WRITING or COMPLETE.\n\n@param itemTag mad libs style string to insert into progress message.\n@return state of stream request handler", "Creates a general purpose solver. Use this if you are not sure what you need.\n\n@param numRows The number of rows that the decomposition is optimized for.\n@param numCols The number of columns that the decomposition is optimized for.", "If there are any observer methods, they must be static or business\nmethods.", "Fancy print without a space added to positive numbers", "Call the Yahoo! PlaceFinder service for a result.\n\n@param q\nsearch string\n@param maxRows\nmax number of rows in result, or 0 for all\n@param locale\nlocale for strings\n@return list of found results\n@throws Exception\noops\n@see <a\nhref=\"http://developer.yahoo.com/boss/geo/docs/free_YQL.html#table_pf\">Yahoo!\nBoss Geo PlaceFinder</a>", "Checks whether the compilation has been canceled and reports the given work increment to the compiler progress.", "Sets the timewarp setting from a numeric string\n\n@param timewarp a numeric string containing the number of milliseconds since the epoch", "Adds a boolean refinement for the next queries.\n\n@param attribute the attribute to refine on.\n@param value the value to refine with.\n@return this {@link Searcher} for chaining." ]
public static void addToMediaStore(Context context, File file) { String[] path = new String[]{file.getPath()}; MediaScannerConnection.scanFile(context, path, null, null); }
[ "another media scan way" ]
[ "Read exactly buffer.length bytes from the stream into the buffer\n\n@param stream The stream to read from\n@param buffer The buffer to read into", "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.", "This method returns the value of the product under the specified model and other information in a key-value map.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model A model used to evaluate the product.\n@return The values of the product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Adds the HIBC prefix and check digit to the specified data, returning the resultant data string.\n\n@see <a href=\"https://sourceforge.net/p/zint/code/ci/master/tree/backend/library.c\">Corresponding Zint code</a>", "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", "create partitions in the broker\n\n@param topic topic name\n@param partitionNum partition numbers\n@param enlarge enlarge partition number if broker configuration has\nsetted\n@return partition number in the broker\n@throws IOException if an I/O error occurs", "Adds a JSON string representing to the DB.\n\n@param obj the JSON to record\n@return the number of rows in the table, or DB_OUT_OF_MEMORY_ERROR/DB_UPDATE_ERROR", "If the resource has ordered child types, those child types will be stored in the attachment. If there are no\nordered child types, this method is a no-op.\n\n@param resourceAddress the address of the resource\n@param resource the resource which may or may not have ordered children.", "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" ]
public String getDynamicValue(String attribute) { return null == m_dynamicValues ? null : m_dynamicValues.get(attribute); }
[ "Get cached value that is dynamically loaded by the Acacia content editor.\n\n@param attribute the attribute to load the value to\n@return the cached value" ]
[ "Checks if the provided duration information is valid.\n@return <code>null</code> if the information is valid, the key of the suitable error message otherwise.", "Attaches the menu drawer to the window.", "Creates an immutable list that consists of the elements in the given collection. If the given collection is already an immutable list,\nit is returned directly.\n\n@param source the given collection\n@return an immutable list", "Post-configure retreival of server engine.", "sets the class object described by this descriptor.\n@param c the class to describe", "Use this API to add dnspolicylabel resources.", "Puts a new document in the service. The generate key is globally unique.\n\n@param document document\n@return key unique key to reference the document", "Checks if the categoryfolder setting needs to be updated.\n\n@return true if the categoryfolder setting needs to be updated", "Checks to see if the two matrices are inverses of each other.\n\n@param a A matrix. Not modified.\n@param b A matrix. Not modified." ]
public List<GetLocationResult> search(String q, int maxRows, Locale locale) throws Exception { List<GetLocationResult> searchResult = new ArrayList<GetLocationResult>(); String url = URLEncoder.encode(q, "UTF8"); url = "q=select%20*%20from%20geo.placefinder%20where%20text%3D%22" + url + "%22"; if (maxRows > 0) { url = url + "&count=" + maxRows; } url = url + "&flags=GX"; if (null != locale) { url = url + "&locale=" + locale; } if (appId != null) { url = url + "&appid=" + appId; } InputStream inputStream = connect(url); if (null != inputStream) { SAXBuilder parser = new SAXBuilder(); Document doc = parser.build(inputStream); Element root = doc.getRootElement(); // check code for exception String message = root.getChildText("Error"); // Integer errorCode = Integer.parseInt(message); if (message != null && Integer.parseInt(message) != 0) { throw new Exception(root.getChildText("ErrorMessage")); } Element results = root.getChild("results"); for (Object obj : results.getChildren("Result")) { Element toponymElement = (Element) obj; GetLocationResult location = getLocationFromElement(toponymElement); searchResult.add(location); } } return searchResult; }
[ "Call the Yahoo! PlaceFinder service for a result.\n\n@param q\nsearch string\n@param maxRows\nmax number of rows in result, or 0 for all\n@param locale\nlocale for strings\n@return list of found results\n@throws Exception\noops\n@see <a\nhref=\"http://developer.yahoo.com/boss/geo/docs/free_YQL.html#table_pf\">Yahoo!\nBoss Geo PlaceFinder</a>" ]
[ "Use this API to update Interface.", "Returns an HTML table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.", "Process the given batch of files and pass the results back to the listener as each file is processed.", "Get a property as a double or throw an exception.\n\n@param key the property name", "This method extracts predecessor data from an MSPDI file.\n\n@param task Task data", "Sets the search scope.\n\n@param cms The current CmsObject object.", "gets the first non annotation line number of a node, taking into account annotations.", "Helper function to bind script bundler to various targets", "Set the HomeAsUpIndicator that is visible when user navigate to a fragment child\n@param indicator the resource drawable to use as indicator" ]
public AsciiTable setPaddingLeftChar(Character paddingLeftChar) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingLeftChar(paddingLeftChar); } } return this; }
[ "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" ]
[ "Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater than\n1/3 the length of <code>coords</code>, or the points appear\nto be coincident, colinear, or coplanar.", "Use this API to add gslbsite.", "Total count of partition-stores moved in this task.\n\n@return number of partition stores moved in this task.", "Use this API to fetch statistics of gslbdomain_stats resource of given name .", "Waits until all pending operations are complete and closes this repository.\n\n@param failureCauseSupplier the {@link Supplier} that creates a new {@link CentralDogmaException}\nwhich will be used to fail the operations issued after this method is called", "Returns true if the context has access to any given permissions.", "Makes an spatial shape representing the time range defined by the two specified dates.\n\n@param from the start {@link Date}\n@param to the end {@link Date}\n@return a shape", "Invoke an HTTP GET request on a remote host. You must close the InputStream after you are done with.\n\n@param path The request path\n@param parameters The parameters (collection of Parameter objects)\n@return The Response", "Return the build string of this instance of finmath-lib.\nCurrently this is the Git commit hash.\n\n@return The build string of this instance of finmath-lib." ]
public static MapBounds adjustBoundsToScaleAndMapSize( final GenericMapAttributeValues mapValues, final Rectangle paintArea, final MapBounds bounds, final double dpi) { MapBounds newBounds = bounds; if (mapValues.isUseNearestScale()) { newBounds = newBounds.adjustBoundsToNearestScale( mapValues.getZoomLevels(), mapValues.getZoomSnapTolerance(), mapValues.getZoomLevelSnapStrategy(), mapValues.getZoomSnapGeodetic(), paintArea, dpi); } newBounds = new BBoxMapBounds(newBounds.toReferencedEnvelope(paintArea)); if (mapValues.isUseAdjustBounds()) { newBounds = newBounds.adjustedEnvelope(paintArea); } return newBounds; }
[ "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." ]
[ "Adds a new role to the list of defined roles.\n\n@param roleName - The name of the role being added.", "Use this API to rename a gslbservice resource.", "Determines if this value is the default value for the given field type.\n\n@param type field type\n@param value value\n@return true if the value is not default", "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", "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.", "Convert an Object to a Date.", "Sets the matrix 'inv' equal to the inverse of the matrix that was decomposed.\n\n@param inv Where the value of the inverse will be stored. Modified.", "Support the range subscript operator for GString\n\n@param text a GString\n@param range a Range\n@return the String of characters corresponding to the provided range\n@since 2.3.7", "Send the started notification" ]
public Date dateTime(ImapRequestLineReader request) throws ProtocolException { char next = request.nextWordChar(); String dateString; // From https://tools.ietf.org/html/rfc3501 : // date-time = DQUOTE date-day-fixed "-" date-month "-" date-year // SP time SP zone DQUOTE // zone = ("+" / "-") 4DIGIT if (next == '"') { dateString = consumeQuoted(request); } else { throw new ProtocolException("DateTime values must be quoted."); } try { // You can use Z or zzzz return new SimpleDateFormat("dd-MMM-yyyy hh:mm:ss Z", Locale.US).parse(dateString); } catch (ParseException e) { throw new ProtocolException("Invalid date format <" + dateString + ">, should comply to dd-MMM-yyyy hh:mm:ss Z"); } }
[ "Reads a \"date-time\" argument from the request." ]
[ "This method is called to format a units value.\n\n@param value numeric value\n@return currency value", "Handle an end time change.\n@param event the change event.", "Log a warning for the resource at the provided address and a single attribute. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attribute attribute we are warning about", "Use this API to fetch nsrpcnode resources of given names .", "Sort by time bucket, then backup count, and by compression state.", "Login the user and redirect back to original URL. If no\noriginal URL found then redirect to `defaultLandingUrl`.\n\n@param userIdentifier\nthe user identifier, could be either userId or username\n@param defaultLandingUrl\nthe URL to be redirected if original URL not found", "Update the selection state of the item\n@param dataIndex data set index\n@param select if it is true the item is marked as selected, otherwise - unselected\n@return true if the selection state has been changed successfully, otherwise - false", "Read custom fields for a GanttProject resource.\n\n@param gpResource GanttProject resource\n@param mpxjResource MPXJ Resource instance", "Create a function that will create the style on demand. This is called later in a separate thread so\nany blocking calls will not block the parsing of the layer attributes.\n\n@param template the template for this map\n@param styleString a string that identifies a style." ]
public void declareInternalData(int maxRows, int maxCols) { this.maxRows = maxRows; this.maxCols = maxCols; U_tran = new DMatrixRMaj(maxRows,maxRows); Qm = new DMatrixRMaj(maxRows,maxRows); r_row = new double[ maxCols ]; }
[ "Declares the internal data structures so that it can process matrices up to the specified size.\n\n@param maxRows\n@param maxCols" ]
[ "Add profile to database, return collection of profile data. Called when 'enter' is hit in the UI\ninstead of 'submit' button\n\n@param model\n@param name\n@return\n@throws Exception", "Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.", "This method retrieves all security permissions contained within the specified node.\n\n@param context the {@link OperationContext} used to resolve the permission attributes.\n@param node the {@link ModelNode} that might contain security permissions metadata.\n@return a {@link List} containing the retrieved permissions. They are wrapped as {@link PermissionFactory} instances.\n@throws OperationFailedException if an error occurs while retrieving the security permissions.", "Get the property name of a method name. For example the property name of\nsetSomeValue would be someValue. Names not beginning with set or get are\nnot changed.\n\n@param name The name to process\n@return The property name", "Checks the id value.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "Build a URL with Query String and URL Parameters.\n@param base base URL\n@param queryString query string\n@param values URL Parameters\n@return URL", "Defines how messages should be logged. This method can be modified to\nrestrict the logging messages that are shown on the console or to change\ntheir formatting. See the documentation of Log4J for details on how to do\nthis.", "private int numCalls = 0;", "Removes 'original' and places 'target' at the same location" ]
public static String getPublicIPAddress() throws Exception { final String IPV4_REGEX = "\\A(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}\\z"; String ipAddr = null; Enumeration e = NetworkInterface.getNetworkInterfaces(); while (e.hasMoreElements()) { NetworkInterface n = (NetworkInterface) e.nextElement(); Enumeration ee = n.getInetAddresses(); while (ee.hasMoreElements()) { InetAddress i = (InetAddress) ee.nextElement(); // Pick the first non loop back address if ((!i.isLoopbackAddress() && i.isSiteLocalAddress()) || i.getHostAddress().matches(IPV4_REGEX)) { ipAddr = i.getHostAddress(); break; } } if (ipAddr != null) { break; } } return ipAddr; }
[ "This function returns the first external IP address encountered\n\n@return IP address or null\n@throws Exception" ]
[ "Start a timer of the given string name for the current thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked", "Set the position of the given Matcher to the given index.\n\n@param matcher a Matcher\n@param idx the index number\n@since 1.0", "Adds the allowed values. Override for attributes who should not use the allowed values.\n\n@param result the node to add the allowed values to\n@param validator the validator to get the allowed values from", "Try to get an attribute value from two elements.\n\n@param firstElement\n@param secondElement\n@return attribute value", "Return a String with linefeeds and carriage returns normalized to linefeeds.\n\n@param self a CharSequence object\n@return the normalized toString() for the CharSequence\n@see #normalize(String)\n@since 1.8.2", "Stops the playback of a sound and destroys the corresponding Sound Object or Soundfield.", "Finds the first mesh in the given model.\n@param model root of a model loaded by the asset loader.\n@return GVRMesh found or null if model does not contain meshes\n@see #loadMesh(GVRAndroidResource.MeshCallback, GVRAndroidResource, int)", "This function is responsible for starting the actual async rebalance\noperation. This is run if this node is the stealer node\n\n<br>\n\nWe also assume that the check that this server is in rebalancing state\nhas been done at a higher level\n\n@param stealInfo Partition info to steal\n@return Returns a id identifying the async operation", "Returns a flag, indicating if the current event is a multi-day event.\nThe method is only called if the single event has an explicitely set end date\nor an explicitely changed whole day option.\n\n@return a flag, indicating if the current event takes lasts over more than one day." ]
@SuppressWarnings({"OverlyLongMethod"}) public void clearProperties(@NotNull final PersistentStoreTransaction txn, @NotNull final Entity entity) { final Transaction envTxn = txn.getEnvironmentTransaction(); final PersistentEntityId id = (PersistentEntityId) entity.getId(); final int entityTypeId = id.getTypeId(); final long entityLocalId = id.getLocalId(); final PropertiesTable properties = getPropertiesTable(txn, entityTypeId); final PropertyKey propertyKey = new PropertyKey(entityLocalId, 0); try (Cursor cursor = getPrimaryPropertyIndexCursor(txn, properties)) { for (boolean success = cursor.getSearchKeyRange(PropertyKey.propertyKeyToEntry(propertyKey)) != null; success; success = cursor.getNext()) { ByteIterable keyEntry = cursor.getKey(); final PropertyKey key = PropertyKey.entryToPropertyKey(keyEntry); if (key.getEntityLocalId() != entityLocalId) { break; } final int propertyId = key.getPropertyId(); final ByteIterable value = cursor.getValue(); final PropertyValue propValue = propertyTypes.entryToPropertyValue(value); txn.propertyChanged(id, propertyId, propValue.getData(), null); properties.deleteNoFail(txn, entityLocalId, value, propertyId, propValue.getType()); } } }
[ "Clears all properties of specified entity.\n\n@param entity to clear." ]
[ "in truth we probably only need the types as injected by the metadata binder", "Use this API to expire cacheobject.", "Finish configuration.", "Convolve with a 2D kernel.\n@param kernel the kernel\n@param inPixels the input pixels\n@param outPixels the output pixels\n@param width the width\n@param height the height\n@param alpha include alpha channel\n@param edgeAction what to do at the edges", "Add a range to an exception, ensure that we don't try to add null ranges.\n\n@param exception target exception\n@param start exception start\n@param finish exception finish", "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", "Open the connection to the server.\n\n@param url the url to connect to\n@return returns the input stream for the connection\n@throws IOException cannot get result", "Loops through all resource roots that have been made available transitively via Class-Path entries, and\nadds them to the list of roots to be processed.", "Starts the named animation.\n@see GVRAvatar#stop(String)\n@see GVRAnimationEngine#start(GVRAnimation)" ]
public By getWebDriverBy() { switch (how) { case name: return By.name(this.value); case xpath: // Work around HLWK driver bug return By.xpath(this.value.replaceAll("/BODY\\[1\\]/", "/BODY/")); case id: return By.id(this.value); case tag: return By.tagName(this.value); case text: return By.linkText(this.value); case partialText: return By.partialLinkText(this.value); default: return null; } }
[ "Convert a Identification to a By used in WebDriver Drivers.\n\n@return the correct By specification of the current Identification." ]
[ "Implements getAll by delegating to get.", "Decode long from byte array at offset\n\n@param ba byte array\n@param offset Offset\n@return long value", "Reverse Engineers an XPath Expression of a given Node in the DOM.\n\n@param node the given node.\n@return string xpath expression (e.g., \"/html[1]/body[1]/div[3]\").", "Get image Id from imageTag using DockerBuildInfoHelper client.\n\n@param imageTag\n@param host\n@return", "Creates a new indirection handler instance.\n\n@param brokerKey The associated {@link PBKey}.\n@param id The subject's ids\n@return The new instance", "Method called when the renderer is going to be created. This method has the responsibility of\ninflate the xml layout using the layoutInflater and the parent ViewGroup, set itself to the\ntag and call setUpView and hookListeners methods.\n\n@param content to render. If you are using Renderers with RecyclerView widget the content will\nbe null in this method.\n@param layoutInflater used to inflate the view.\n@param parent used to inflate the view.", "Function to go through all the store definitions contained in the STORES\ndirectory and\n\n1. Update metadata cache.\n\n2. Update STORES_KEY by stitching together all these keys.\n\n3. Update 'storeNames' list.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will correctly handle concurrency issues. Currently this is not an\nissue since its invoked by init, put, add and delete store all of which\nuse locks to deal with any concurrency related issues.", "Get the multicast socket address.\n\n@return the multicast address", "Modifies the belief referenced by bName parameter.\n\n@param bName\n- the name of the belief to update.\n@param value\n- the new value for the belief" ]
public static String replaceHtmlEntities(String content, Map<String, Character> map) { for (Entry<String, Character> entry : escapeStrings.entrySet()) { if (content.indexOf(entry.getKey()) != -1) { content = content.replace(entry.getKey(), String.valueOf(entry.getValue())); } } return content; }
[ "Replace HTML entities\n@param content Content\n@param map Map\n@return Replaced content" ]
[ "Filter that's either negated or normal as specified.", "Obtains a database connection, retrying if necessary.\n@param connectionHandle\n@return A DB connection.\n@throws SQLException", "Tries to guess location of the user secure keyring using various\nheuristics.\n\n@return path to the keyring file\n@throws FileNotFoundException if no keyring file found", "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", "Finds for the given project.\n\n@param name project name\n@return given project or an empty {@code Optional} if project does not exist\n@throws IllegalArgumentException", "Retrieve an activity status.\n\n@param mpxj MPXJ Task instance\n@return activity status", "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.", "Create a Vendor from a Func0", "Restore backup data\n\n@param fileData - json file with restore data\n@return\n@throws Exception" ]
public void updateExceptions(SortedSet<Date> exceptions) { SortedSet<Date> e = null == exceptions ? new TreeSet<Date>() : exceptions; if (!m_model.getExceptions().equals(e)) { m_model.setExceptions(e); m_view.updateExceptions(); valueChanged(); sizeChanged(); } }
[ "Updates the exceptions.\n@param exceptions the exceptions to set" ]
[ "Convert string to qname.\n\n@param str the string\n@return the qname", "Main database initialization. To be called only when _ds is a valid DataSource.", "Use this API to unset the properties of clusterinstance resources.\nProperties that need to be unset are specified in args array.", "A henson navigator is a class that helps a consumer to consume the navigation api that it\ndeclares in its dependencies. The henson navigator will wrap the intent builders. Thus, a\nhenson navigator, is driven by consumption of intent builders, whereas the henson classes are\ndriven by the production of an intent builder.\n\n<p>This task is created per android variant:\n\n<ul>\n<li>we scan the variant compile configuration for navigation api dependencies\n<li>we generate a henson navigator class for this variant that wraps the intent builders\n</ul>\n\n@param variant the variant for which to create a builder.\n@param hensonNavigatorPackageName the package name in which we create the class.", "Sets Idle max age.\n\nThe time, for a connection to remain unused before it is closed off. Do not use aggressive values here!\n@param idleMaxAge time after which a connection is closed off\n@param timeUnit idleMaxAge time granularity.", "Get the upload parameters.\n@return", "Start ssh session and obtain session.\n\n@return the session", "Maps a field index to a ResourceField instance.\n\n@param fields array of fields used as the basis for the mapping.\n@param index required field index\n@return ResourceField instance", "Adds a listener to this collection.\n\n@param listener The listener to add" ]
@JavaScriptMethod @SuppressWarnings({"UnusedDeclaration"}) public LoadBuildsResponse loadBuild(String buildId) { LoadBuildsResponse response = new LoadBuildsResponse(); // When we load a new build we need also to reset the promotion plugin. // The null plugin is related to 'None' plugin. setPromotionPlugin(null); try { this.currentPromotionCandidate = promotionCandidates.get(buildId); if (this.currentPromotionCandidate == null) { throw new IllegalArgumentException("Can't find build by ID: " + buildId); } List<String> repositoryKeys = getRepositoryKeys(); List<UserPluginInfo> plugins = getPromotionsUserPluginInfo(); PromotionConfig promotionConfig = getPromotionConfig(); String defaultTargetRepository = getDefaultPromotionTargetRepository(); if (StringUtils.isNotBlank(defaultTargetRepository) && repositoryKeys.contains(defaultTargetRepository)) { promotionConfig.setTargetRepo(defaultTargetRepository); } response.addRepositories(repositoryKeys); response.setPlugins(plugins); response.setPromotionConfig(promotionConfig); response.setSuccess(true); } catch (Exception e) { response.setResponseMessage(e.getMessage()); } return response; }
[ "Load the related repositories, plugins and a promotion config associated to the buildId.\nCalled from the UI.\n\n@param buildId - The unique build id.\n@return LoadBuildsResponse e.g. list of repositories, plugins and a promotion config." ]
[ "Sets the scale vector of the keyframe.", "Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid", "performs a DELETE operation against RDBMS.\n@param cld ClassDescriptor providing mapping information.\n@param obj The object to be deleted.", "Method to build Integration flow for IMAP Idle configuration.\n@param urlName Mail source URL.\n@return Integration Flow object IMAP IDLE.", "Sets the character translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator\n@return this to allow chaining", "Uploads chunk of a stream to an open upload session.\n@param stream the stream that is used to read the chunck using the offset and part size.\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.", "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns the number of elements in the sorted set with a value in the given range.\n@param lexRange\n@return the number of elements in the specified range.", "Calculate the summed conditional likelihood of this data by summing\nconditional estimates.", "Creates a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\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." ]
public static DMatrixRMaj triangularUpper(int dimen , int hessenberg , double min , double max , Random rand ) { if( hessenberg < 0 ) throw new RuntimeException("hessenberg must be more than or equal to 0"); double range = max-min; DMatrixRMaj A = new DMatrixRMaj(dimen,dimen); for( int i = 0; i < dimen; i++ ) { int start = i <= hessenberg ? 0 : i-hessenberg; for( int j = start; j < dimen; j++ ) { A.set(i,j, rand.nextDouble()*range+min); } } return A; }
[ "Creates an upper triangular matrix whose values are selected from a uniform distribution. If hessenberg\nis greater than zero then a hessenberg matrix of the specified degree is created instead.\n\n@param dimen Number of rows and columns in the matrix..\n@param hessenberg 0 for triangular matrix and &gt; 0 for hessenberg matrix.\n@param min minimum value an element can be.\n@param max maximum value an element can be.\n@param rand random number generator used.\n@return The randomly generated matrix." ]
[ "all objects in list1 that are not in list2\n\n@param <T>\n@param list1\nFirst collection\n@param list2\nSecond collection\n@return The collection difference list1 - list2", "Checks the foreignkeys of all references in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid", "Returns 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", "Adds OPT_N | OPT_NODE option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Convert a Identification to a By used in WebDriver Drivers.\n\n@return the correct By specification of the current Identification.", "Retrieve any resource field aliases defined in the MPP file.\n\n@param map index to field map\n@param data resource field name alias data", "A modified version of abs that always returns a non-negative value.\nMath.abs returns Integer.MIN_VALUE if a == Integer.MIN_VALUE and this\nmethod returns Integer.MAX_VALUE in that case.", "Show books.\n\n@param booksList the books list", "Generate a VideoCollection with random data obtained form VIDEO_INFO map. You don't need o\ncreate your own AdapteeCollections. Review ListAdapteeCollection if needed.\n\n@param videoCount size of the collection.\n@return VideoCollection generated." ]
private static String createImageStreamRequest(String name, String version, String image, boolean insecure) { JSONObject imageStream = new JSONObject(); JSONObject metadata = new JSONObject(); JSONObject annotations = new JSONObject(); metadata.put("name", name); annotations.put("openshift.io/image.insecureRepository", insecure); metadata.put("annotations", annotations); // Definition of the image JSONObject from = new JSONObject(); from.put("kind", "DockerImage"); from.put("name", image); JSONObject importPolicy = new JSONObject(); importPolicy.put("insecure", insecure); JSONObject tag = new JSONObject(); tag.put("name", version); tag.put("from", from); tag.put("importPolicy", importPolicy); JSONObject tagAnnotations = new JSONObject(); tagAnnotations.put("version", version); tag.put("annotations", tagAnnotations); JSONArray tags = new JSONArray(); tags.add(tag); // Add image definition to image stream JSONObject spec = new JSONObject(); spec.put("tags", tags); imageStream.put("kind", "ImageStream"); imageStream.put("apiVersion", "v1"); imageStream.put("metadata", metadata); imageStream.put("spec", spec); return imageStream.toJSONString(); }
[ "Creates image stream request and returns it in JSON formatted string.\n\n@param name Name of the image stream\n@param insecure If the registry where the image is stored is insecure\n@param image Image name, includes registry information and tag\n@param version Image stream version.\n@return JSON formatted string" ]
[ "Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived", "Use this API to fetch aaauser_intranetip_binding resources of given name .", "Use this API to fetch ipset resource of given name .", "Validates for non-conflicting roles", "Return true if this rule should be applied for the specified ClassNode, based on the\nconfiguration of this rule.\n@param classNode - the ClassNode\n@return true if this rule should be applied for the specified ClassNode", "Determines if we need to calculate more dates.\nIf we do not have a finish date, this method falls back on using the\noccurrences attribute. If we have a finish date, we'll use that instead.\nWe're assuming that the recurring data has one or other of those values.\n\n@param calendar current date\n@param dates dates generated so far\n@return true if we should calculate another date", "Set the attributes of a feature.\n\n@param feature the feature\n@param attributes the attributes\n@throws LayerException oops", "Use this API to fetch all the autoscaleaction resources that are configured on netscaler.", "Use this API to fetch vpnvserver_auditnslogpolicy_binding resources of given name ." ]
@UiHandler("m_atDay") void onWeekDayChange(ValueChangeEvent<String> event) { if (handleChange()) { m_controller.setWeekDay(event.getValue()); } }
[ "Handles week day changes.\n@param event the change event." ]
[ "Use this API to fetch wisite_binding resource of given name .", "Gets whether this registration has an alternative wildcard registration", "Chooses a single segment to be compressed, or null if no segment could be chosen.\n@param options\n@param createMixed\n@return", "iteration not synchronized", "Get the processor graph to use for executing all the processors for the template.\n\n@return the processor graph.", "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 method must be called on the start of the component. Initialize and start the directory monitor.\n\n@param monitoredDirectory\n@param pollingTime", "Add another store destination to an existing streaming session\n\n\n@param store the name of the store to stream to", "Simply appends the given parameters and returns it to obtain a cache key\n@param sql\n@param resultSetConcurrency\n@param resultSetHoldability\n@param resultSetType\n@return cache key to use" ]
public @Nullable ChangeEvent<BsonDocument> getUnprocessedEventForDocumentId( final BsonValue documentId ) { final ChangeEvent<BsonDocument> event; nsLock.readLock().lock(); try { event = this.events.get(documentId); } finally { nsLock.readLock().unlock(); } nsLock.writeLock().lock(); try { this.events.remove(documentId); return event; } finally { nsLock.writeLock().unlock(); } }
[ "If there is an unprocessed change event for a particular document ID, fetch it from the\nchange stream listener, and remove it. By reading the event here, we are assuming it will be\nprocessed by the consumer.\n\n@return the latest unprocessed change event for the given document ID, or null if none exists." ]
[ "Perform all Cursor cleanup here.", "Determines whether the given documentation part contains the specified tag with the given parameter having the\ngiven value.\n\n@param doc The documentation part\n@param tagName The tag to be searched for\n@param paramName The parameter that the tag is required to have\n@param paramValue The value of the parameter\n@return boolean Whether the documentation part has the tag and parameter", "Ask the specified player for the album art in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param artReference uniquely identifies the desired album art\n@param trackType the kind of track that owns the art\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nartwork updates will use available caches only\n\n@return the album art found, if any", "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 value of the product using a Black-Scholes model for the swap rate with the Hunt-Kennedy convexity adjustment.\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve from which the swap rate is calculated. The discount curve, associated with this forward curve is used for discounting this option.\n@param swaprateVolatility The volatility of the log-swaprate.\n@return Value of this product", "Get minimum gray value in the image.\n\n@param fastBitmap Image to be processed.\n@param startX Initial X axis coordinate.\n@param startY Initial Y axis coordinate.\n@param width Width.\n@param height Height.\n@return Minimum gray.", "Retrieves a constant value.\n\n@param type field type\n@param block criteria data block\n@return constant value", "Should be called after new data is inserted. Will be automatically called, when the view dimensions\nhas changed.\n\nCalculates the start- and end-angles for every PieSlice.", "Read a single field alias from an extended attribute.\n\n@param attribute extended attribute" ]
public static boolean setCustomResponseForDefaultClient(String profileName, String pathName, String customData) { try { return setCustomForDefaultClient(profileName, pathName, true, customData); } catch (Exception e) { e.printStackTrace(); } return false; }
[ "set custom response for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise" ]
[ "Create a new Time, with no date component.", "Set the background color.\n\nIf you don't set the background color, the default is an opaque black:\n{@link Color#BLACK}, 0xff000000.\n\n@param color\nAn Android 32-bit (ARGB) {@link Color}, such as you get from\n{@link Resources#getColor(int)}", "Deletes an organization\n\n@param organizationId String", "Creates an upper triangular matrix whose values are selected from a uniform distribution. If hessenberg\nis greater than zero then a hessenberg matrix of the specified degree is created instead.\n\n@param dimen Number of rows and columns in the matrix..\n@param hessenberg 0 for triangular matrix and &gt; 0 for hessenberg matrix.\n@param min minimum value an element can be.\n@param max maximum value an element can be.\n@param rand random number generator used.\n@return The randomly generated matrix.", "sorts are a bit more awkward and need a helper...", "Returns the compact representations of all of the dependencies of a task.\n\n@param task The task to get dependencies on.\n@return Request object", "Sets the stream for a resource.\nThis function allows you to provide a stream that is already open to\nan existing resource. It will throw an exception if that resource\nalready has an open stream.\n@param s InputStream currently open stream to use for I/O.", "Hashes a path, if the path points to a directory then hashes the contents recursively.\n@param messageDigest the digest used to hash.\n@param path the file/directory we want to hash.\n@return the resulting hash.\n@throws IOException", "Sets the value for the API's \"languages\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters" ]
public static CRFClassifier getClassifier(InputStream in) throws IOException, ClassCastException, ClassNotFoundException { CRFClassifier crf = new CRFClassifier(); crf.loadClassifier(in); return crf; }
[ "Loads a CRF classifier from an InputStream, and returns it. This method\ndoes not buffer the InputStream, so you should have buffered it before\ncalling this method.\n\n@param in\nInputStream 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" ]
[ "User-initiated commands use this method.\n\n@param command The CLI command\n@return A Response object containing the command line, DMR request, and DMR response\n@throws CommandFormatException\n@throws IOException", "Add server redirect to a profile\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@param groupId group ID\n@return ID of added ServerRedirect\n@throws Exception exception", "Examines the list of variables for any unknown variables and throws an exception if one is found", "Notifies that an existing header item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.", "Check if a dependency matches the filters\n\n@param dependency\n\n@return boolean", "Uploads bytes to an open upload session.\n@param data data\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.", "Sets the specified short attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Use this API to fetch dnspolicy_dnsglobal_binding resources of given name .", "Gets the current Stack. If the stack is not set, a new empty instance is created and set.\n@return" ]
public static route6[] get(nitro_service service) throws Exception{ route6 obj = new route6(); route6[] response = (route6[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the route6 resources that are configured on netscaler." ]
[ "resolves a Field or Property node generics by using the current class and\nthe declaring class to extract the right meaning of the generics symbols\n@param an a FieldNode or PropertyNode\n@param type the origin type\n@return the new ClassNode with corrected generics", "Compares two sets of snaks, given by iterators. The method is optimised\nfor short lists of snaks, as they are typically found in claims and\nreferences.\n\n@param snaks1\n@param snaks2\n@return true if the lists are equal", "Consumes the version field from the given input and raises an exception if the record is in a newer version,\nwritten by a newer version of Hibernate OGM.\n\n@param input the input to read from\n@param supportedVersion the type version supported by this version of OGM\n@param externalizedType the type to be unmarshalled\n\n@throws IOException if an error occurs while reading the input", "Creates a new pagination configuration if at least one of the provided parameters is not null.\nOtherwise returns null.\n@param pageParam The request parameter used to send the current page number.\n@param pageSizes The page sizes for the first pages. The last provided size is the size of all following pages.\n@param pageNavLength The length of the \"Google\"-like page navigation. Should be an odd number.\n@return the pagination configuration, or <code>null</code> if none of the provided parameters is not null.", "Append the bounding volume particle positions, times and velocities to the existing mesh\nbefore creating a new scene object with this mesh attached to it.\nAlso, append every created scene object and its creation time to corresponding array lists.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps", "Get the PropertyDescriptor for aClass and aPropertyName", "Delete old jobs.\n\n@param checkTimeThreshold threshold for last check time\n@return the number of jobs deleted", "Arbitrarily resolve the inconsistency by choosing the first object if\nthere is one.\n\n@param values The list of objects\n@return A single value, if one exists, taken from the input list.", "Return key Values of an Identity\n@param cld\n@param oid\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException" ]
protected void setRandom(double lower, double upper, Random generator) { double range = upper - lower; x = generator.nextDouble() * range + lower; y = generator.nextDouble() * range + lower; z = generator.nextDouble() * range + lower; }
[ "Sets the elements of this vector to uniformly distributed random values\nin a specified range, using a supplied random number generator.\n\n@param lower\nlower random value (inclusive)\n@param upper\nupper random value (exclusive)\n@param generator\nrandom number generator" ]
[ "Unkink FK fields of target object.\n\n@param targetObject real (non-proxy) target object\n@param cld {@link ClassDescriptor} of the real target object\n@param rds An {@link ObjectReferenceDescriptor} or {@link CollectionDescriptor}\nassociated with the real object.", "Use this API to update nsacl6.", "If converters are set on a table, this function tests if these can convert a cell value. The first\nconverter, which claims that it can convert, will be used to do the conversion.", "Gets the current Stack. If the stack is not set, a new empty instance is created and set.\n@return", "Sets the frame pointer to a specific frame\n\n@return boolean true if the move was successful", "Appends a formatted line of code to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>", "Returns true if the activity is a milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone", "Find Flickr Places information by Place ID.\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link #getInfo(String, String)} instead.\n@param placeId\n@return A Location\n@throws FlickrException", "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" ]
public boolean exists() { // Try file existence: can we find the file in the file system? try { return getFile().exists(); } catch (IOException ex) { // Fall back to stream existence: can we open the stream? try { InputStream is = getInputStream(); is.close(); return true; } catch (Throwable isEx) { return false; } } }
[ "This implementation checks whether a File can be opened,\nfalling back to whether an InputStream can be opened.\nThis will cover both directories and content resources." ]
[ "Process class properties.\n\n@param writer output stream\n@param methodSet set of methods processed\n@param aClass class being processed\n@throws IntrospectionException\n@throws XMLStreamException", "Use this API to fetch lbmonbindings_servicegroup_binding resources of given name .", "Gets all of the column names for a result meta data\n\n@param rsmd Resultset metadata\n@return Array of column names\n@throws Exception exception", "Get information about this database.\n\n@return DbInfo encapsulating the database info\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/database.html#getting-database-details\"\ntarget=\"_blank\">Databases - read</a>", "Wrap connection with a proxy.\n@param target connection handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a connection.", "returns a sorted array of fields", "Sets the fieldConversion.\n@param fieldConversionClassName The fieldConversion to set", "and class as property", "Orders first by word, then by lemma, then by tag.\n\n@param wordLemmaTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)" ]
private void processOperandValue(int index, FieldType type, GraphicalIndicatorCriteria criteria) { boolean valueFlag = (MPPUtility.getInt(m_data, m_dataOffset) == 1); m_dataOffset += 4; if (valueFlag == false) { int fieldID = MPPUtility.getInt(m_data, m_dataOffset); criteria.setRightValue(index, FieldTypeHelper.getInstance(fieldID)); m_dataOffset += 4; } else { //int dataTypeValue = MPPUtility.getShort(m_data, m_dataOffset); m_dataOffset += 2; switch (type.getDataType()) { case DURATION: // 0x03 { Duration value = MPPUtility.getAdjustedDuration(m_properties, MPPUtility.getInt(m_data, m_dataOffset), MPPUtility.getDurationTimeUnits(MPPUtility.getShort(m_data, m_dataOffset + 4))); m_dataOffset += 6; criteria.setRightValue(index, value); break; } case NUMERIC: // 0x05 { Double value = Double.valueOf(MPPUtility.getDouble(m_data, m_dataOffset)); m_dataOffset += 8; criteria.setRightValue(index, value); break; } case CURRENCY: // 0x06 { Double value = Double.valueOf(MPPUtility.getDouble(m_data, m_dataOffset) / 100); m_dataOffset += 8; criteria.setRightValue(index, value); break; } case STRING: // 0x08 { String value = MPPUtility.getUnicodeString(m_data, m_dataOffset); m_dataOffset += ((value.length() + 1) * 2); criteria.setRightValue(index, value); break; } case BOOLEAN: // 0x0B { int value = MPPUtility.getShort(m_data, m_dataOffset); m_dataOffset += 2; criteria.setRightValue(index, value == 1 ? Boolean.TRUE : Boolean.FALSE); break; } case DATE: // 0x13 { Date value = MPPUtility.getTimestamp(m_data, m_dataOffset); m_dataOffset += 4; criteria.setRightValue(index, value); break; } default: { break; } } } }
[ "Process an operand value used in the definition of the graphical\nindicator criteria.\n\n@param index position in operand list\n@param type field type\n@param criteria indicator criteria" ]
[ "Get all the names of inputs that are required to be in the Values object when this graph is executed.", "Compute the proportional padding for all items in the cache\n@param cache Cache data set\n@return the uniform padding amount", "Get the default providers list to be used.\n\n@return the default provider list and ordering, not null.", "Use this API to fetch all the dnssuffix resources that are configured on netscaler.", "Add image in the document.\n\n@param context\nPDF context\n@param imageResult\nimage\n@throws BadElementException\nPDF construction problem\n@throws IOException\nPDF construction problem", "Start the operation by instantiating the first job instance in a separate Thread.\n\n@param arguments {@inheritDoc}", "Adds an artifact to the module.\n\n<P>\nINFO: If the module is promoted, all added artifacts will be promoted.\n\n@param artifact Artifact", "Read all top level tasks.", "Convert this path address to its model node representation.\n\n@return the model node list of properties" ]
ResultAction executeOperation() { assert isControllingThread(); try { /** Execution has begun */ executing = true; processStages(); if (resultAction == ResultAction.KEEP) { report(MessageSeverity.INFO, ControllerLogger.ROOT_LOGGER.operationSucceeded()); } else { report(MessageSeverity.INFO, ControllerLogger.ROOT_LOGGER.operationRollingBack()); } } catch (RuntimeException e) { handleUncaughtException(e); ControllerLogger.MGMT_OP_LOGGER.unexpectedOperationExecutionException(e, controllerOperations); } finally { // On failure close any attached response streams if (resultAction != ResultAction.KEEP && !isBooting()) { synchronized (this) { if (responseStreams != null) { int i = 0; for (OperationResponse.StreamEntry is : responseStreams.values()) { try { is.getStream().close(); } catch (Exception e) { ControllerLogger.MGMT_OP_LOGGER.debugf(e, "Failed closing stream at index %d", i); } i++; } responseStreams.clear(); } } } } return resultAction; }
[ "Package-protected method used to initiate operation execution.\n@return the result action" ]
[ "Get a list of path transformers for a given address.\n\n@param address the path address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return a list of path transformations", "List the slack values for each task.\n\n@param file ProjectFile instance", "Retrieve the number of minutes per year for this calendar.\n\n@return minutes per year", "Writes an activity to a PM XML file.\n\n@param mpxj MPXJ Task instance", "Unzip a file or a folder\n@param zipFile\n@param unzippedFolder optional, if null the file/folder will be extracted in the same folder as zipFile\n@return", "Get result report.\n\n@param reportURI the URI of the report\n@return the result report.", "Calls the specified Stitch function, and decodes the response into an instance of the specified\ntype. The response will be decoded using the codec registry given.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pass to the Stitch function.\n@param requestTimeout the number of milliseconds the client should wait for a response from the\nserver before failing with an error.\n@param resultClass the class that the Stitch response should be decoded as.\n@param <T> the type into which the Stitch response will be decoded.\n@param codecRegistry the codec registry that will be used to encode/decode the function call.\n@return the decoded value.", "Loads the currently known phases from Furnace to the map.", "Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler." ]
public static base_response disable(nitro_service client, String name) throws Exception { vserver disableresource = new vserver(); disableresource.name = name; return disableresource.perform_operation(client,"disable"); }
[ "Use this API to disable vserver of given name." ]
[ "Find a column by its name\n\n@param columnName the name of the column\n@return the given Column, or <code>null</code> if not found", "Uniformly random numbers", "This is pretty ugly. We end up mimicking the request logic here, so this\nneeds to stay in sync with handleRequest.", "Tells you if the expression is the false expression, either literal or constant.\n@param expression\nexpression\n@return\nas described", "Shuts down a standalone server.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server", "Validates a String to be a valid name to be used in MongoDB for a collection name.\n\n@param collectionName", "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.", "Cleans the object key.\n\n@param name Name of the object key\n@return The {@link ValidationResult} object containing the object,\nand the error code(if any)", "To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!" ]
public static java.sql.Date rollYears(java.util.Date startDate, int years) { return rollDate(startDate, Calendar.YEAR, years); }
[ "Roll the years forward or backward.\n\n@param startDate - The start date\n@param years - Negative to rollbackwards." ]
[ "The default User-Agent header. Override this method to override the user agent.\n\n@return the user agent string.", "Returns a compact representation of all of the stories on the task.\n\n@param task The task containing the stories to get.\n@return Request object", "Use this API to fetch aaapreauthenticationpolicy_aaaglobal_binding resources of given name .", "This intro hides the system bars.", "Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name .", "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", "Load an animation for the current avatar.\n@param animResource resource with the animation\n@param boneMap optional bone map to map animation skeleton to avatar", "Create a new server group\n\n@param groupName name of server group\n@return Created ServerGroup", "Print a work contour.\n\n@param value WorkContour instance\n@return work contour value" ]
public long[] append(MessageSet messages) throws IOException { checkMutable(); long written = 0L; while (written < messages.getSizeInBytes()) written += messages.writeTo(channel, 0, messages.getSizeInBytes()); long beforeOffset = setSize.getAndAdd(written); return new long[]{written, beforeOffset}; }
[ "Append this message to the message set\n@param messages message to append\n@return the written size and first offset\n@throws IOException file write exception" ]
[ "Use this API to enable clusterinstance resources of given names.", "Add the final assignment of the property to the partial value object's source code.", "Use this API to update dospolicy resources.", "Create a new DirectByteBuffer from a given address and size.\nThe returned DirectByteBuffer does not release the memory by itself.\n\n@param addr\n@param size\n@param att object holding the underlying memory to attach to the buffer.\nThis will prevent the garbage collection of the memory area that's\nassociated with the new <code>DirectByteBuffer</code>\n@return", "Gets information about this collaboration.\n\n@return info about this collaboration.", "Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value", "Stop offering shared dbserver sessions.", "Initializes a type\n\n@param name The name of the class\n@return The instance of the class. Returns a dummy if the class was not\nfound.", "Display web page, but no user interface - close" ]
public InetSocketAddress getMulticastSocketAddress() { if (multicastAddress == null) { throw MESSAGES.noMulticastBinding(name); } return new InetSocketAddress(multicastAddress, multicastPort); }
[ "Get the multicast socket address.\n\n@return the multicast address" ]
[ "A disposer method is bound to a producer if the producer is assignable to the disposed parameter.\n\n@param enhancedDisposedParameter\n@return the set of required qualifiers for the given disposed parameter", "Given a list of keys and a number of splits find the keys to split on.\n\n@param keys the list of keys.\n@param numSplits the number of splits.", "Get a signature for a list of parameters using the given shared secret.\n\n@param sharedSecret\nThe shared secret\n@param params\nThe parameters\n@return The signature String", "Detach a scope from its parent, this will trigger the garbage collection of this scope and it's\nsub-scopes\nif they are not referenced outside of Toothpick.\n\n@param name the name of the scope to close.", "If a and b are not null, returns a new duration of a + b.\nIf a is null and b is not null, returns b.\nIf a is not null and b is null, returns a.\nIf a and b are null, returns null.\nIf needed, b is converted to a's time unit using the project properties.\n\n@param a first duration\n@param b second duration\n@param defaults project properties containing default values\n@return a + b", "Print a task UID.\n\n@param value task UID\n@return task UID string", "Obtain a connection asynchronously by queueing a request to obtain a connection in a separate thread.\n\nUse as follows:<p>\nFuture&lt;Connection&gt; result = pool.getAsyncConnection();<p>\n... do something else in your application here ...<p>\nConnection connection = result.get(); // get the connection<p>\n\n@return A Future task returning a connection.", "Use this API to fetch the statistics of all servicegroup_stats resources that are configured on netscaler.", "Finds out which dump files of the given type have been downloaded\nalready. The result is a list of objects that describe the available dump\nfiles, in descending order by their date. Not all of the dumps included\nmight be actually available.\n\n@param dumpContentType\nthe type of dump to consider\n@return list of objects that provide information on available dumps" ]
public static Constructor<?> getConstructor(final Class<?> clazz, final Class<?>... argumentTypes) throws NoSuchMethodException { try { return AccessController .doPrivileged(new PrivilegedExceptionAction<Constructor<?>>() { public Constructor<?> run() throws NoSuchMethodException { return clazz.getConstructor(argumentTypes); } }); } // Unwrap catch (final PrivilegedActionException pae) { final Throwable t = pae.getCause(); // Rethrow if (t instanceof NoSuchMethodException) { throw (NoSuchMethodException) t; } else { // No other checked Exception thrown by Class.getConstructor try { throw (RuntimeException) t; } // Just in case we've really messed up catch (final ClassCastException cce) { throw new RuntimeException( "Obtained unchecked Exception; this code should never be reached", t); } } } }
[ "Obtains the Constructor specified from the given Class and argument types\n\n@throws NoSuchMethodException" ]
[ "Builds the table for the database results.\n\n@param results the database results\n@return the table", "Register the given mbean with the server\n\n@param server The server to register with\n@param mbean The mbean to register\n@param name The name to register under", "Add the currentSceneObject to an active Level-of-Detail", "Checks the preconditions for creating a new RequireSubStr processor with a List of Strings.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif requiredSubStrings or one of its elements is null\n@throws IllegalArgumentException\nif requiredSubStrings is empty", "Check if the an operation is done or not.\n\n@param requestId Id of the request\n@param remove Whether remove the request out of the list if it is done.\n@return True if request is complete, false otherwise", "Initialize the pattern controllers.", "Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nmetadata updates will use available caches only\n\n@return the metadata found, if any", "Returns the service id with the propertype.\n\n@param serviceReference\n@return long value for the service id", "Get a loader that lists the Files in the current path,\nand monitors changes." ]
private void convertJdkPath(Launcher launcher, EnvVars extendedEnv) { String separator = launcher.isUnix() ? "/" : "\\"; String java_home = extendedEnv.get("JAVA_HOME"); if (StringUtils.isNotEmpty(java_home)) { if (!StringUtils.endsWith(java_home, separator)) { java_home += separator; } extendedEnv.put("PATH+JDK", java_home + "bin"); } }
[ "The Maven3Builder class is looking for the PATH+JDK environment variable due to legacy code.\nIn The pipeline flow we need to convert the JAVA_HOME to PATH+JDK in order to reuse the code." ]
[ "this method mimics EMC behavior", "Makes http DELETE request\n@param url url to makes request to\n@param params data to add to params field\n@return {@link okhttp3.Response}\n@throws RequestException\n@throws LocalOperationException", "Utility function to find the first index of a value in a\nListBox.", "Keep a cache of items files associated with classification in order to improve performance.", "Removes the key and its associated value from this map.\n\n@param key the key to remove\n@return the value associated with that key, or null if\nthe key was not in the map", "Counts additional occurrences of a property as the main property of\nstatements.\n\n@param usageStatistics\nstatistics object where count is stored\n@param property\nthe property to count\n@param count\nthe number of times to count the property", "Parse a duration in minutes form a number of hours.\n\n@param value String representation\n@return Integer instance", "Convert an Object to a Timestamp.", "Register the agent in the platform\n\n@param agent_name\nThe name of the agent to be registered\n@param agent\nThe agent to register.\n@throws FIPAException" ]
public static int getPercentage(String percentage) { if (isNotEmpty(percentage) && isNumeric(percentage)) { int p = Integer.parseInt(percentage); return p; } else { return 0; } }
[ "Takes a numeric string value and converts it to a integer between 0 and 100.\n\nreturns 0 if the string is not numeric.\n\n@param percentage - A numeric string value\n@return a integer between 0 and 100" ]
[ "Helper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry.", "Adds a redeploy step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment being redeployed", "Recursively read the WBS structure from a PEP file.\n\n@param parent parent container for tasks\n@param id initial WBS ID", "Get User application properties\nGet application properties of a user\n@param userId User Id (required)\n@param aid Application ID (optional)\n@return PropertiesEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "Creates the container for a bundle without descriptor.\n@return the container for a bundle without descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails.", "Unlock all edited resources.", "Return the version string of this instance of finmath-lib.\n\n@return The version string of this instance of finmath-lib.", "Accesses a property from the DB configuration for the selected DB.\n\n@param name the name of the property\n@return the value of the property", "Checks a returned Javascript value where we expect a boolean but could\nget null.\n\n@param val The value from Javascript to be checked.\n@param def The default return value, which can be null.\n@return The actual value, or if null, returns false." ]
public void beforeClose(PBStateEvent event) { /* arminw: this is a workaround for use in managed environments. When a PB instance is used within a container a PB.close call is done when leave the container method. This close the PB handle (but the real instance is still in use) and the PB listener are notified. But the JTA tx was not committed at this point in time and the session cache should not be cleared, because the updated/new objects will be pushed to the real cache on commit call (if we clear, nothing to push). So we check if the real broker is in a local tx (in this case we are in a JTA tx and the handle is closed), if true we don't reset the session cache. */ if(!broker.isInTransaction()) { if(log.isDebugEnabled()) log.debug("Clearing the session cache"); resetSessionCache(); } }
[ "Before closing the PersistenceBroker ensure that the session\ncache is cleared" ]
[ "Pump events from event stream.", "Forceful cleanup the logs", "Adds vector v1 to v2 and places the result in this vector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector", "Open the store with the version directory specified. If null is specified\nwe open the directory with the maximum version\n\n@param versionDir Version Directory to open. If null, we open the max\nversioned / latest directory", "Returns the error correction codewords for the specified data codewords.\n\n@param codewords the codewords that we need error correction codewords for\n@param ecclen the number of error correction codewords needed\n@return the error correction codewords for the specified data codewords", "Use this API to fetch authenticationvserver_binding resource of given name .", "Retrieves an existing resource assignment if one is present,\nto prevent duplicate resource assignments being added.\n\n@param resource resource to test for\n@return existing resource assignment", "Create and serialize a WorkerStatus for a pause event.\n\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus", "Create new logging action\nThis method check if there is an old instance for this thread-local\nIf not - Initialize new instance and set it as this thread-local's instance\n@param logger\n@param auditor\n@param instance\n@return whether new instance was set to thread-local" ]
public double computeLikelihoodP() { double ret = 1.0; for( int i = 0; i < r.numRows; i++ ) { double a = r.get(i,0); ret *= Math.exp(-a*a/2.0); } return ret; }
[ "Computes the likelihood of the random draw\n\n@return The likelihood." ]
[ "Computes the power of a complex number in polar notation\n\n@param a Complex number\n@param N Power it is to be multiplied by\n@param result Result", "Return true only if the MethodCallExpression represents a method call for the specified method name\n@param methodCall - the AST MethodCallExpression\n@param methodNamePattern - the expected name of the method being called\n@param numArguments - The number of expected arguments\n@return true only if the method call name matches", "Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.\nThis uses nsrollbackcmd_args which is a way to provide additional arguments while fetching the resources.", "Add the given entries of the input map into the output map.\n\n<p>\nIf a key in the inputMap already exists in the outputMap, its value is\nreplaced in the outputMap by the value from the inputMap.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param outputMap the map to update.\n@param inputMap the entries to add.\n@since 2.15", "Send a get module request\n\n@param name\n@param version\n@return the targeted module\n@throws GrapesCommunicationException", "Create and bind a server socket\n\n@return the server socket\n@throws IOException", "Creates a date from the equivalent long value. This conversion\ntakes account of the time zone.\n\n@param date date expressed as a long integer\n@return new Date instance", "Performs validation of the observer method for compliance with the specifications.", "Dump the contents of a row from an MPD file.\n\n@param row row data" ]
private void readBitFields(MppBitFlag[] flags, FieldContainer container, byte[] data) { for (MppBitFlag flag : flags) { flag.setValue(container, data); } }
[ "Iterate through a set of bit field flags and set the value for each one\nin the supplied container.\n\n@param flags bit field flags\n@param container field container\n@param data source data" ]
[ "Creates updateable version of capability registry that on publish pushes all changes to main registry\nthis is used to create context local registry that only on completion commits changes to main registry\n\n@return writable registry", "Adds an additional interface that the proxy should implement. The default\nimplementation will be to forward invocations to the bean instance.\n\n@param newInterface an interface", "Returns true if this Bytes object equals another. This method doesn't check it's arguments.\n\n@since 1.2.0", "Use this API to fetch all the sslfipskey resources that are configured on netscaler.", "binds the Identities Primary key values to the statement", "decodes the uriFragment\n\n@param res the resource that contains the feature holder\n@param uriFragment the fragment that should be decoded\n@return the decoded information\n@see LazyURIEncoder#encode(EObject, EReference, INode)", "Create a plan. The plan consists of batches. Each batch involves the\nmovement of no more than batchSize primary partitions. The movement of a\nsingle primary partition may require migration of other n-ary replicas,\nand potentially deletions. Migrating a primary or n-ary partition\nrequires migrating one partition-store for every store hosted at that\npartition.", "Adds OPT_Z | OPT_ZONE option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Sets the request body to the contents of a String.\n\n<p>If the contents of the body are large, then it may be more efficient to use an {@link InputStream} instead of\na String. Using a String requires that the entire body be in memory before sending the request.</p>\n\n@param body a String containing the contents of the body." ]
public void characters(char ch[], int start, int length) { if (m_CurrentString == null) m_CurrentString = new String(ch, start, length); else m_CurrentString += new String(ch, start, length); }
[ "characters callback." ]
[ "Use this API to unset the properties of responderpolicy resource.\nProperties that need to be unset are specified in args array.", "Collects all the fields from columns and also the fields not bounds to columns\n@return List<ColumnProperty>", "Checks the foreignkeys of all references in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid", "Extracts out a matrix from source given a sub matrix with arbitrary rows and columns specified in\ntwo array lists\n\n@param src Source matrix. Not modified.\n@param rows array of row indexes\n@param rowsSize maximum element in row array\n@param cols array of column indexes\n@param colsSize maximum element in column array\n@param dst output matrix. Must be correct shape.", "Get bean manager from portlet context.\n\n@param ctx the portlet context\n@return bean manager if found", "Use this API to unset the properties of nsacl6 resource.\nProperties that need to be unset are specified in args array.", "This is the main entry point used to convert the internal representation\nof timephased work into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param work timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range", "Inserts a single document locally and being to synchronize it based on its _id. Inserting\na document with the same _id twice will result in a duplicate key exception.\n\n@param namespace the namespace to put the document in.\n@param document the document to insert.", "Main entry point when called to process constraint data.\n\n@param projectDir project directory\n@param file parent project file\n@param inputStreamFactory factory to create input stream" ]
private void initXmlBundle() throws CmsException { CmsFile file = m_cms.readFile(m_resource); m_bundleFiles.put(null, m_resource); m_xmlBundle = CmsXmlContentFactory.unmarshal(m_cms, file); initKeySetForXmlBundle(); }
[ "Unmarshals the XML content and adds the file to the bundle files.\n@throws CmsException thrown if reading the file or unmarshaling fails." ]
[ "Makes the object unpickable and removes the touch handler for it\n@param sceneObject\n@return true if the handler has been successfully removed", "Start a task. The id is needed to end the task\n\n@param id\n@param taskName", "Singleton of MetaClassRegistry.\n\n@param includeExtension\n@return the registry", "Returns all migrations starting from and excluding the given version. Usually you want to provide the version of\nthe database here to get all migrations that need to be executed. In case there is no script with a newer\nversion than the one given, an empty list is returned.\n\n@param version the version that is currently in the database\n@return all versions since the given version or an empty list if no newer script is available. Never null.\nDoes not include the given version.", "should not be public", "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.", "Delete with retry.\n\n@param file\n@return <tt>true</tt> if the file was successfully deleted.", "Gets an item that was shared with a shared link.\n@param api the API connection to be used by the shared item.\n@param sharedLink the shared link to the item.\n@return info about the shared item.", "Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource" ]
public static List<Sentence> splitSentences(CharSequence text) { return JavaConversions.seqAsJavaList( TwitterKoreanProcessor.splitSentences(text) ); }
[ "Split input text into sentences.\n\n@param text Input text.\n@return List of Sentence objects." ]
[ "This looks at the servlet attributes to get the list of response headers to remove while the response object gets created by the servlet", "Dumps a texture coordinate set of a mesh to stdout.\n\n@param mesh the mesh\n@param coords the coordinates", "Closes the transactor node by removing its node in Zookeeper", "Use this API to count sslvserver_sslciphersuite_binding resources configued on NetScaler.", "Gets the node list from string line seperate or space seperate.\n\n@param listStr\nthe list str\n@param removeDuplicate\nthe remove duplicate\n@return the node list from string line seperate or space seperate", "Retrieve the frequency of an exception.\n\n@param exception XML calendar exception\n@return frequency", "Converts the transpose of a row major matrix into a row major block matrix.\n\n@param src Original DMatrixRMaj. Not modified.\n@param dst Equivalent DMatrixRBlock. Modified.", "Support the range subscript operator for CharSequence with IntRange\n\n@param text a CharSequence\n@param range an IntRange\n@return the subsequence CharSequence\n@since 1.0", "Returns the Map value of the field.\n\n@return the Map value of the field. It returns a reference of the value both for <code>MAP</code> and\n<code>LIST_MAP</code>.\n@throws IllegalArgumentException if the value cannot be converted to Map." ]
public static PersistenceStrategy<?, ?, ?> getInstance( CacheMappingType cacheMapping, EmbeddedCacheManager externalCacheManager, URL configurationUrl, JtaPlatform jtaPlatform, Set<EntityKeyMetadata> entityTypes, Set<AssociationKeyMetadata> associationTypes, Set<IdSourceKeyMetadata> idSourceTypes ) { if ( cacheMapping == CacheMappingType.CACHE_PER_KIND ) { return getPerKindStrategy( externalCacheManager, configurationUrl, jtaPlatform ); } else { return getPerTableStrategy( externalCacheManager, configurationUrl, jtaPlatform, entityTypes, associationTypes, idSourceTypes ); } }
[ "Returns a persistence strategy based on the passed configuration.\n\n@param cacheMapping the selected {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType}\n@param externalCacheManager the infinispan cache manager\n@param configurationUrl the location of the configuration file\n@param jtaPlatform the {@link JtaPlatform}\n@param entityTypes the meta-data of the entities\n@param associationTypes the meta-data of the associations\n@param idSourceTypes the meta-data of the id generators\n@return the persistence strategy" ]
[ "This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementation used to write the\nrequest and read the response\n@param operationName Simple string representing the type of request\n\n@return Data returned by the individual requests", "Get or create the log context based on the logging profile.\n\n@param loggingProfile the logging profile to get or create the log context for\n\n@return the log context that was found or a new log context", "Registers the deployment resources needed.\n\n@param deploymentResourceSupport the deployment resource support\n@param service the service, which may be {@code null}, used to find the resource names that need to be registered", "Removes all commas from the token list", "Use this API to fetch authenticationradiuspolicy_vpnvserver_binding resources of given name .", "Add the given query parameters.\n@param params the params\n@return this UriComponentsBuilder", "Sets the current class definition derived from the current class, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"accept-locks\" optional=\"true\" description=\"The accept locks setting\" values=\"true,false\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the class as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"determine-extents\" optional=\"true\" description=\"Whether to determine\npersistent direct sub types automatically\" values=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a no-argument factory method that is\nused to create instances (not yet implemented !)\"\[email protected] name=\"factory-class\" optional=\"true\" description=\"Specifies a factory class to be used for creating\nobjects of this class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a static no-argument method in the factory class\"\[email protected] name=\"generate-repository-info\" optional=\"true\" description=\"Whether repository data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"generate-table-info\" optional=\"true\" description=\"Whether table data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"include-inherited\" optional=\"true\" description=\"Whether to include\nfields/references/collections of supertypes\" values=\"true,false\"\[email protected] name=\"initialization-method\" optional=\"true\" description=\"Specifies a no-argument instance method that is\ncalled right after an instance has been read from the database\"\[email protected] name=\"isolation-level\" optional=\"true\" description=\"The isolation level setting\"\[email protected] name=\"proxy\" optional=\"true\" description=\"The proxy setting for this class\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects of\nobjects of this class to prefetch in collections\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Can be set to force OJB to refresh instances when\nloaded from the cache\" values=\"true,false\"\[email protected] name=\"row-reader\" optional=\"true\" description=\"The row reader for the class\"\[email protected] name=\"schema\" optional=\"true\" description=\"The schema for the type\"\[email protected] name=\"table\" optional=\"true\" description=\"The table for the class\"\[email protected] name=\"table-documentation\" optional=\"true\" description=\"Documentation on the table\"", "Reorder the objects in the table to resolve referential integrity dependencies.", "Pause between cluster change in metadata and starting server rebalancing\nwork." ]
public static <X, Y> Pair<X, Y> makePair(X x, Y y) { return new Pair<X, Y>(x, y); }
[ "Returns a Pair constructed from X and Y. Convenience method; the\ncompiler will disambiguate the classes used for you so that you\ndon't have to write out potentially long class names." ]
[ "Stops the compressor.", "Validate an RIBean. This includes validating whether two beans specialize\nthe same bean\n\n@param bean the bean to validate\n@param beanManager the current manager\n@param specializedBeans the existing specialized beans", "Unregister all MBeans", "Remove a server mapping from current profile by ID\n\n@param serverMappingId server mapping ID\n@return Collection of updated ServerRedirects", "Checks whether a user account can be locked because of inactivity.\n\n@param cms the CMS context\n@param user the user to check\n@return true if the user may be locked after being inactive for too long", "Scales a process type\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param processType type of process to maintain\n@param quantity number of processes to maintain", "Saves messages to a propertyvfsbundle file.\n\n@throws CmsException thrown if writing to the file fails.", "Retrieves a ProjectReader instance which can read a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectReader instance", "Get the multicast socket address.\n\n@return the multicast address" ]
protected LogContext getOrCreate(final String loggingProfile) { LogContext result = profileContexts.get(loggingProfile); if (result == null) { result = LogContext.create(); final LogContext current = profileContexts.putIfAbsent(loggingProfile, result); if (current != null) { result = current; } } return result; }
[ "Get or create the log context based on the logging profile.\n\n@param loggingProfile the logging profile to get or create the log context for\n\n@return the log context that was found or a new log context" ]
[ "Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order", "Resize the image passing the new height and width\n\n@param height\n@param width\n@return", "Associate the specified value with the specified key in this map.\nIf the map previously contained a mapping for this key, the old\nvalue is replaced and returned.\n\n@param key the key with which the value is to be associated\n@param value the value to be associated with this key\n@return the value previously mapped to the key, or null", "Performs a similar transform on A-pI", "Parses server section of Zookeeper connection string", "Detach any script file from a scriptable target.\n\n@param target The scriptable target.", "Get a property as a string or defaultValue.\n\n@param key the property name\n@param defaultValue the default value", "Adds a collection of listeners to the current project.\n\n@param listeners collection of listeners", "Performs all actions that have been configured." ]
public void sendJsonToTagged(Object data, String ... labels) { for (String label : labels) { sendJsonToTagged(data, label); } }
[ "Send JSON representation of given data object to all connections tagged with all give tag labels\n@param data the data object\n@param labels the tag labels" ]
[ "Reads a PEP file from the input stream.\n\n@param is input stream representing a PEP file", "Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler.", "Throws an IllegalStateException when the given value is null.\n@return the value", "Create the ResourceIgnoredTransformationRegistry when fetching missing content, only including relevant pieces\nto a server-config.\n\n@param rc the resolution context\n@param delegate the delegate ignored resource transformation registry for manually ignored resources\n@return", "Print a resource type.\n\n@param value ResourceType instance\n@return resource type value", "Get the art available for all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the album art associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the ArtFinder is not running", "Set the group name\n\n@param name new name of server group\n@param id ID of group", "Extract predecessor data.", "Returns a query filter for the given document _id and version. The version is allowed to be\nnull. The query will match only if there is either no version on the document in the database\nin question if we have no reference of the version or if the version matches the database's\nversion.\n\n@param documentId the _id of the document.\n@param version the expected version of the document, if any.\n@return a query filter for the given document _id and version for a remote operation." ]
@SuppressWarnings("deprecation") public ResponseFromManager sendTaskToExecutionManager(ParallelTask task) { ResponseFromManager commandResponseFromManager = null; ActorRef executionManager = null; try { // Start new job logger.info("!!STARTED sendAgentCommandToManager : " + task.getTaskId() + " at " + PcDateUtils.getNowDateTimeStr()); executionManager = ActorConfig.createAndGetActorSystem().actorOf( Props.create(ExecutionManager.class, task), "ExecutionManager-" + task.getTaskId()); final FiniteDuration duration = Duration.create(task.getConfig() .getTimeoutAskManagerSec(), TimeUnit.SECONDS); // Timeout timeout = new // Timeout(FiniteDuration.parse("300 seconds")); Future<Object> future = Patterns.ask(executionManager, new InitialRequestToManager(task), new Timeout(duration)); // set ref task.executionManager = executionManager; commandResponseFromManager = (ResponseFromManager) Await.result( future, duration); logger.info("!!COMPLETED sendTaskToExecutionManager : " + task.getTaskId() + " at " + PcDateUtils.getNowDateTimeStr() + " \t\t GenericResponseMap in future size: " + commandResponseFromManager.getResponseCount()); } catch (Exception ex) { logger.error("Exception in sendTaskToExecutionManager {} details {}: ", ex, ex); } finally { // stop the manager if (executionManager != null && !executionManager.isTerminated()) { ActorConfig.createAndGetActorSystem().stop(executionManager); } if (task.getConfig().isAutoSaveLogToLocal()) { task.saveLogToLocal(); } } return commandResponseFromManager; }
[ "Send parallel task to execution manager.\n\n@param task\nthe parallel task\n@return the batch response from manager" ]
[ "Update the BinderDescriptor of the declarationBinderRef.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder", "Get a property of type java.util.Properties or return the default if\nno such property is defined\n@param props properties\n@param name the key\n@param defaultProperties default property if empty\n@return value from the property", "end class SAXErrorHandler", "Parses command-line and gets read-only metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "Use this API to unset the properties of filterhtmlinjectionparameter resource.\nProperties that need to be unset are specified in args array.", "prefetch defined relationships requires JDBC level 2.0, does not work\nwith Arrays", "Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost.", "Unmarshal the XML content with auto-correction.\n@param file the file that contains the XML\n@return the XML read from the file\n@throws CmsXmlException thrown if the XML can't be read.", "Confirms that both clusters have the same number of nodes by comparing\nset of node Ids between clusters.\n\n@param lhs\n@param rhs" ]
public void rename(String newName) { URL url = FOLDER_INFO_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID()); BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT"); JsonObject updateInfo = new JsonObject(); updateInfo.add("name", newName); request.setBody(updateInfo.toString()); BoxJSONResponse response = (BoxJSONResponse) request.send(); response.getJSON(); }
[ "Renames this folder.\n\n@param newName the new name of the folder." ]
[ "Get all registration points associated with this registration.\n\n@return all registration points. Will not be {@code null} but may be empty", "Use this API to fetch sslcertkey resource of given name .", "Constraint that ensures that the field has a length if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)", "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.", "Use this API to delete systementitydata.", "Retrieves a ProjectWriter instance which can write a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectWriter instance", "Stops all servers linked with the current camel context\n\n@param camelContext", "Called to reset current sensor data.\n\n@param timeStamp\ncurrent time stamp\n@param rotationW\nQuaternion rotation W\n@param rotationX\nQuaternion rotation X\n@param rotationY\nQuaternion rotation Y\n@param rotationZ\nQuaternion rotation Z\n@param gyroX\nGyro rotation X\n@param gyroY\nGyro rotation Y\n@param gyroZ\nGyro rotation Z", "Creates a new broker instance.\n\n@param jcdAlias The jdbc connection descriptor name as defined in the repository\n@param user The user name to be used for connecting to the database\n@param password The password to be used for connecting to the database\n@return The persistence broker\n@see org.apache.ojb.broker.core.PersistenceBrokerFactoryIF#createPersistenceBroker(java.lang.String, java.lang.String, java.lang.String)" ]
public Collection<Argument> getArguments(final String key) { final Collection<Argument> args = map.get(key); if (args != null) { return new ArrayList<>(args); } return Collections.emptyList(); }
[ "Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set" ]
[ "Returns the real key object.", "Main entry point used to determine the format used to write\ncalendar exceptions.\n\n@param calendar parent calendar\n@param dayList list of calendar days\n@param exceptions list of exceptions", "Returns the connection that has been saved or null if none.", "Return true if the values of the two vectors are equal when cast as ints.\n\n@param a first vector to compare\n@param b second vector to compare\n@return true if the values of the two vectors are equal when cast as ints", "Add the string representation of the given object to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param object\nthe appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.", "Make log segment file name from offset bytes. All this does is pad out the offset number\nwith zeros so that ls sorts the files numerically\n@param offset offset value (padding with zero)\n@return filename with offset", "Write each predecessor for a task.\n\n@param record Task instance", "Two stage promotion, dry run and actual promotion to verify correctness.\n\n@param promotion\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException", "Map custom info.\n\n@param ciType the custom info type\n@return the map" ]
private Component createConvertToPropertyBundleButton() { Button addDescriptorButton = CmsToolBar.createButton( FontOpenCms.SETTINGS, m_messages.key(Messages.GUI_CONVERT_TO_PROPERTY_BUNDLE_0)); addDescriptorButton.setDisableOnClick(true); addDescriptorButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; public void buttonClick(ClickEvent event) { try { m_model.saveAsPropertyBundle(); Notification.show("Conversion successful."); } catch (CmsException | IOException e) { CmsVaadinUtils.showAlert("Conversion failed", e.getLocalizedMessage(), null); } } }); addDescriptorButton.setDisableOnClick(true); return addDescriptorButton; }
[ "Creates the button for converting an XML bundle in a property bundle.\n@return the created button." ]
[ "Estimate excluded volume fraction by monte carlo method\n@return excluded volume fraction", "Verifies a provided signature.\n\n@param key\nfor which signature key\n@param actualAlgorithm\ncurrent signature algorithm\n@param actualSignature\ncurrent signature\n@param webHookPayload\nfor signing\n@param deliveryTimestamp\nfor signing\n@return true if verification passed", "Creates the server bootstrap.", "Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference.", "Returns true if the string is a valid Java full qualified class name.\n\n@param str the string to be examined\n@return true if str is a valid Java Fqcn", "This method is called to ensure that after a project file has been\nread, the cached unique ID values used to generate new unique IDs\nstart after the end of the existing set of unique IDs.", "Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website.", "Use this API to update tmtrafficaction.", "Add groups to the tree.\n\n@param parentNode parent tree node\n@param file group container" ]
public Story storyOfText(Configuration configuration, String storyAsText, String storyId) { return configuration.storyParser().parseStory(storyAsText, storyId); }
[ "Returns the parsed story from the given text\n\n@param configuration the Configuration used to run story\n@param storyAsText the story text\n@param storyId the story Id, which will be returned as story path\n@return The parsed Story" ]
[ "Remove all controllers but leave input manager running.\n@return number of controllers removed", "Creates an temporary directory. The created directory will be deleted when\ncommand will ended.", "Adds a perspective camera constructed from the designated\nperspective camera to describe the shadow projection.\nThis type of camera is used for shadows generated by spot lights.\n@param centerCam GVRPerspectiveCamera to derive shadow projection from\n@param coneAngle spot light cone angle\n@return Perspective camera to use for shadow casting\n@see GVRSpotLight", "Set the view frustum to pick against from the given projection matrix.\n\nIf the projection matrix is null, the picker will revert to picking\nobjects that are visible from the viewpoint of the scene's current camera.\nIf a matrix is given, the picker will pick objects that are visible\nfrom the viewpoint of it's owner the given projection matrix.\n\n@param projMatrix 4x4 projection matrix or null\n@see GVRScene#setPickVisible(boolean)", "This method reads a byte array from the input stream.\n\n@param is the input stream\n@param size number of bytes to read\n@return byte array\n@throws IOException on file read error or EOF", "Authenticate with the target database using OAuth.\n\n@param consumerSecret consumer secret\n@param consumerKey consumer key\n@param tokenSecret token secret\n@param token token\n@return this Replication instance to set more options\n@deprecated OAuth 1.0 implementation has been <a href=\"http://docs.couchdb.org/en/stable/whatsnew/2.1.html?highlight=oauth#upgrade-notes\"\ntarget=\"_blank\">removed in CouchDB 2.1</a>", "Check that each group is satisfied by one and only one field.\n\n@param currentPath the json path to the element being checked", "Expand a macro.\n\nThis will look up the macro definition from {@link #macros} map.\nIf not found then return passed in `macro` itself, otherwise return\nthe macro definition found.\n\n**note** if macro definition is not found and the string\n{@link #isMacro(String) comply to macro name convention}, then a\nwarn level message will be logged.\n\n@param macro the macro name\n@return macro definition or macro itself if no definition found.", "This method is a sync parse to the JSON stream of atlas information.\n\n@return List of atlas information." ]
public void addConverter(int index, IConverter converter) { converterList.add(index, converter); if (converter instanceof IContainerConverter) { IContainerConverter containerConverter = (IContainerConverter) converter; if (containerConverter.getElementConverter() == null) { containerConverter.setElementConverter(elementConverter); } } }
[ "add converter at given index. The index can be changed during conversion\nif canReorder is true\n\n@param index\n@param converter" ]
[ "Converts the passed list of inners to unmodifiable map of impls.\n@param innerList list of the inners.\n@return map of the impls", "Determines the component type for a given array type.\n\n@param type the given array type\n@return the component type of a given array type", "Update properties for a specific client id\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@param active - true false depending on if the client should be active\n@param reset - true to reset the state of a client(clears settings for all paths and disables the client)\n@return\n@throws Exception", "Print an earned value method.\n\n@param value EarnedValueMethod instance\n@return earned value method value", "Starts given docker machine.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n@param machineName\nto be started.", "Parse a string.\n\n@param value string representation\n@return String value", "read the file as a list of text lines", "Convert a collection of objects to a JSON array with the string representations of that objects.\n@param collection the collection of objects.\n@return the JSON array with the string representations.", "Create an ephemeral node with the given path and data. Create parents if necessary.\n@param zkClient client of zookeeper\n@param path node path of zookeeper\n@param data node data" ]
public static final int getShort(InputStream is) throws IOException { byte[] data = new byte[2]; is.read(data); return getShort(data, 0); }
[ "Read a short int from an input stream.\n\n@param is input stream\n@return int value" ]
[ "Checks if data set is mandatory but missing or non repeatable but having\nmultiple values in this IIM instance.\n\n@param info\nIIM data set to check\n@return list of constraint violations, empty set if data set is valid", "Reports a dependency of this node has been faulted.\n\n@param dependencyKey the id of the dependency node\n@param throwable the reason for unsuccessful resolution", "URL-encodes a given string using ISO-8859-1, which may work better with web pages and umlauts compared to UTF-8.\nNo UnsupportedEncodingException to handle as it is dealt with in this method.", "response simple String\n\n@param response\n@param obj", "Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException", "Use this API to fetch a vpnglobal_appcontroller_binding resources.", "Checks all data sets in a given record for constraint violations.\n\n@param record\nIIM record (1,2,3, ...) to check\n\n@return list of constraint violations, empty set if IIM file is valid", "Vend a SessionVar with the function to create the default value", "splits a string into a list of strings, ignoring the empty string" ]
private int getClosingParenthesisPosition(String text, int opening) { if (text.charAt(opening) != '(') { return -1; } int count = 0; for (int i = opening; i < text.length(); i++) { char c = text.charAt(i); switch (c) { case '(': { ++count; break; } case ')': { --count; if (count == 0) { return i; } break; } } } return -1; }
[ "Look for the closing parenthesis corresponding to the one at position\nrepresented by the opening index.\n\n@param text input expression\n@param opening opening parenthesis index\n@return closing parenthesis index" ]
[ "Get the names of all current registered providers.\n\n@return the names of all current registered providers, never null.", "On complete.\nSave response headers when needed.\n\n@param response\nthe response\n@return the response on single request", "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.", "Adds the deploy operation as a step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment to deploy", "This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will not block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementation used to write the\nrequest and read the response\n@param operationName Simple string representing the type of request\n\n@return Data returned by the individual requests", "Formats the supplied value using the specified DateTimeFormat.\n\n@return \"\" if the value is null", "Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by the specified comparator.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@param comparator\nthe comparator to be used. May be <code>null</code> to indicate that the natural ordering of the\nelements should be used.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List, Comparator)\n@see #sort(Iterable)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List, Comparator)\n@since 2.7", "Command-line version of the classifier. See the class\ncomments for examples of use, and SeqClassifierFlags\nfor more information on supported flags.", "Handles incoming Send Data Request. Send Data request are used\nto acknowledge or cancel failed messages.\n@param incomingMessage the request message to process." ]
public void addRequiredBundles(Set<String> requiredBundles) { addRequiredBundles(requiredBundles.toArray(new String[requiredBundles.size()])); }
[ "Add the set with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The set with all bundles to add." ]
[ "Checks to see if the token is in the list of allowed character operations. Used to apply order of operations\n@param token Token being checked\n@param ops List of allowed character operations\n@return true for it being in the list and false for it not being in the list", "Retrieve a node list based on an XPath expression.\n\n@param document XML document to process\n@param expression compiled XPath expression\n@return node list", "Adds a class entry to this JAR.\n\n@param clazz the class to add to the JAR.\n@return {@code this}", "Use this API to update clusternodegroup resources.", "Use this API to fetch vpnsessionpolicy_aaauser_binding resources of given name .", "Returns the configuration value with the specified name.", "Find and return the appropriate getter method for field.\n\n@return Get method or null (or throws IllegalArgumentException) if none found.", "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.", "Layout which gets displayed if table is empty.\n\n@see org.opencms.ui.apps.user.I_CmsFilterableTable#getEmptyLayout()" ]
public AT_Context setFrameLeftRightMargin(int frameLeft, int frameRight){ if(frameRight>-1 && frameLeft>-1){ this.frameLeftMargin = frameLeft; this.frameRightMargin = frameRight; } return this; }
[ "Sets the left and right frame margin.\n@param frameLeft margin\n@param frameRight margin\n@return this to allow chaining" ]
[ "Counts a single page of the specified gender. If this is the first page\nof that gender on this site, a suitable key is added to the list of the\nsite's genders.\n\n@param gender\nthe gender to count\n@param siteRecord\nthe site record to count it for", "Write the criteria elements, extracting the information of the sub-model.\n\n@param writer the xml stream writer\n@param subModel the interface model\n@param nested whether it the criteria elements are nested as part of <not /> or <any />\n@throws XMLStreamException", "Extract WOEID after XML loads", "Queries a Search Index and returns grouped results in a map where key\nof the map is the groupName. In case the query didnt use grouping,\nan empty map is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the grouped search query as a ordered {@code Map<String,T> }", "Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise", "Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager", "Returns an iterable containing the items in this folder sorted by name and direction.\n@param sort the field to sort by, can be set as `name`, `id`, and `date`.\n@param direction the direction to display the item results.\n@param fields the fields to retrieve.\n@return an iterable containing the items in this folder.", "Retrieves state and metrics information for all client connections across the cluster.\n\n@return list of connections across the cluster", "Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened" ]
private void processAnalytics() throws SQLException { allocateConnection(); try { DatabaseMetaData meta = m_connection.getMetaData(); String productName = meta.getDatabaseProductName(); if (productName == null || productName.isEmpty()) { productName = "DATABASE"; } else { productName = productName.toUpperCase(); } ProjectProperties properties = m_reader.getProject().getProjectProperties(); properties.setFileApplication("Primavera"); properties.setFileType(productName); } finally { releaseConnection(); } }
[ "Populate data for analytics." ]
[ "Stop listening for beats.", "Declares the internal data structures so that it can process matrices up to the specified size.\n\n@param maxRows\n@param maxCols", "Set the group name\n\n@param name new name of server group\n@param id ID of group", "Compute 1-dimensional Perlin noise.\n@param x the x value\n@return noise value at x in the range -1..1", "Copy the contents of the given InputStream into a String.\nLeaves the stream open when done.\n@param in the InputStream to copy from\n@return the String that has been copied to\n@throws IOException in case of I/O errors", "Retrieve a boolean field.\n\n@param type field type\n@return field data", "Marks inbox message as read for given messageId\n@param messageId String messageId\n@return boolean value depending on success of operation", "Return the AnnotationNode for the named annotation, or else null.\nSupports Groovy 1.5 and Groovy 1.6.\n@param node - the AnnotatedNode\n@param name - the name of the annotation\n@return the AnnotationNode or else null", "Use this API to Import appfwsignatures." ]
public static final <T> T getSingle( Iterable<T> it ) { if( ! it.iterator().hasNext() ) return null; final Iterator<T> iterator = it.iterator(); T o = iterator.next(); if(iterator.hasNext()) throw new IllegalStateException("Found multiple items in iterator over " + o.getClass().getName() ); return o; }
[ "Returns a single item from the Iterator.\nIf there's none, returns null.\nIf there are more, throws an IllegalStateException.\n\n@throws IllegalStateException" ]
[ "Begin building a url for this host with the specified image.", "Removes the specified list of members from the project. Returns the updated project record.\n\n@param project The project to remove members from.\n@return Request object", "Converts a standard optimizer to one which the given amount of l1 or l2 regularization.", "Displays a localized warning.\n@param caption the caption of the warning.\n@param description the description of the warning.", "Triggers a replication request, blocks while the replication is in progress.\n@return ReplicationResult encapsulating the result", "Create an import declaration and delegates its registration for an upper class.", "Check if the gravity and orientation are not in conflict one with other.\n@param gravity\n@param orientation\n@return true if orientation and gravity can be applied together, false - otherwise", "If the layer transformer has not been prepared yet, do it.\n\n@param transformer the transformer", "create a HTTP POST request.\n\n@return {@link HttpConnection}" ]
public void removeAllChildren() { for (final GVRSceneObject so : headTransformObject.getChildren()) { final boolean notCamera = (so != leftCameraObject && so != rightCameraObject && so != centerCameraObject); if (notCamera) { headTransformObject.removeChildObject(so); } } }
[ "Remove all children that have been added to the owner object of this camera rig; except the\ncamera objects." ]
[ "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.", "Start listening for device announcements and keeping track of the DJ Link devices visible on the network.\nIf already listening, has no effect.\n\n@throws SocketException if the socket to listen on port 50000 cannot be created", "Print out the configuration that the client needs to make a request.\n\n@param json the output writer.\n@throws JSONException", "Sets a string that will be prepended to the JAR file's data.\n\n@param value the prefix, or {@code null} for none.\n@return {@code this}", "Returns the path to java executable.", "Get a property as a array or throw exception.\n\n@param key the property name", "Authenticate with the target database using OAuth.\n\n@param consumerSecret consumer secret\n@param consumerKey consumer key\n@param tokenSecret token secret\n@param token token\n@return this Replication instance to set more options\n@deprecated OAuth 1.0 implementation has been <a href=\"http://docs.couchdb.org/en/stable/whatsnew/2.1.html?highlight=oauth#upgrade-notes\"\ntarget=\"_blank\">removed in CouchDB 2.1</a>", "Get a property as a json array or default.\n\n@param key the property name\n@param defaultValue default", "Delete old jobs.\n\n@param checkTimeThreshold threshold for last check time\n@return the number of jobs deleted" ]
public AT_Row setPadding(int padding){ if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPadding(padding); } } return this; }
[ "Sets all padding for all cells in the row to the same value.\n@param padding new padding for top, bottom, left, and right, ignored if smaller than 0\n@return this to allow chaining" ]
[ "Process normal calendar working and non-working days.\n\n@param calendar parent calendar", "The grammar elements that may occur at the given offset.", "Update an object in the database to change its id to the newId parameter.", "Uses getResult to get the final Result and executes it\n\n@throws ConfigurationException\nIf not result can be found with the returned code", "Register a data type with the manager.", "GetJob helper - String predicates are all created the same way, so this factors some code.", "Scans given directory for files passing given filter, adds the results into given list.", "Parses a type annotation table to find the labels, and to visit the try\ncatch block annotations.\n\n@param u\nthe start offset of a type annotation table.\n@param mv\nthe method visitor to be used to visit the try catch block\nannotations.\n@param context\ninformation about the class being parsed.\n@param visible\nif the type annotation table to parse contains runtime visible\nannotations.\n@return the start offset of each type annotation in the parsed table.", "Generates a module regarding the parameters.\n\n@param name String\n@param version String\n@return Module" ]
private void handleGlobalArguments(CommandLine cmd) { if (cmd.hasOption(CMD_OPTION_DUMP_LOCATION)) { this.dumpDirectoryLocation = cmd .getOptionValue(CMD_OPTION_DUMP_LOCATION); } if (cmd.hasOption(CMD_OPTION_OFFLINE_MODE)) { this.offlineMode = true; } if (cmd.hasOption(CMD_OPTION_QUIET)) { this.quiet = true; } if (cmd.hasOption(CMD_OPTION_CREATE_REPORT)) { this.reportFilename = cmd.getOptionValue(CMD_OPTION_CREATE_REPORT); } if (cmd.hasOption(OPTION_FILTER_LANGUAGES)) { setLanguageFilters(cmd.getOptionValue(OPTION_FILTER_LANGUAGES)); } if (cmd.hasOption(OPTION_FILTER_SITES)) { setSiteFilters(cmd.getOptionValue(OPTION_FILTER_SITES)); } if (cmd.hasOption(OPTION_FILTER_PROPERTIES)) { setPropertyFilters(cmd.getOptionValue(OPTION_FILTER_PROPERTIES)); } if (cmd.hasOption(CMD_OPTION_LOCAL_DUMPFILE)) { this.inputDumpLocation = cmd.getOptionValue(OPTION_LOCAL_DUMPFILE); } }
[ "Analyses the command-line arguments which are relevant for the\nserialization process in general. It fills out the class arguments with\nthis data.\n\n@param cmd\n{@link CommandLine} objects; contains the command line\narguments parsed by a {@link CommandLineParser}" ]
[ "Return the list of licenses attached to an artifact\n\n@param gavc String\n@param filters FiltersHolder\n@return List<DbLicense>", "Finds properties of datatype string on test.wikidata.org. Since the test\nsite changes all the time, we cannot hardcode a specific property here.\nInstead, we just look through all properties starting from P1 to find the\nfirst few properties of type string that have an English label. These\nproperties are used for testing in this code.\n\n@param connection\n@throws MediaWikiApiErrorException\n@throws IOException", "Get the directory where the compiled jasper reports should be put.\n\n@param configuration the configuration for the current app.", "Use this API to fetch vpntrafficpolicy_aaagroup_binding resources of given name .", "Use this API to fetch all the dnsaaaarec resources that are configured on netscaler.\nThis uses dnsaaaarec_args which is a way to provide additional arguments while fetching the resources.", "Send a device lost announcement to all registered listeners.\n\n@param announcement the last message received from the vanished device", "Make a timestamp value given a date.", "Get the element as a boolean.\n\n@param i the index of the element to access", "the transaction id are generated as unique timestamps\n\n@param timeMs in milliseconds\n@return a unique transactionId" ]
public static void convert(DMatrixD1 input , ZMatrixD1 output ) { if( input.numCols != output.numCols || input.numRows != output.numRows ) { throw new IllegalArgumentException("The matrices are not all the same dimension."); } Arrays.fill(output.data, 0, output.getDataLength(), 0); final int length = output.getDataLength(); for( int i = 0; i < length; i += 2 ) { output.data[i] = input.data[i/2]; } }
[ "Converts the real matrix into a complex matrix.\n\n@param input Real matrix. Not modified.\n@param output Complex matrix. Modified." ]
[ "Records the list of backedup files into a text file\n\n@param filesInEnv\n@param backupDir", "Calls the specified Stitch function, and decodes the response into an instance of the specified\ntype. The response will be decoded using the codec registry given.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pass to the Stitch function.\n@param requestTimeout the number of milliseconds the client should wait for a response from the\nserver before failing with an error.\n@param resultClass the class that the Stitch response should be decoded as.\n@param <T> the type into which the Stitch response will be decoded.\n@param codecRegistry the codec registry that will be used to encode/decode the function call.\n@return the decoded value.", "Gets the node meta data.\n\n@param key - the meta data key\n@return the node meta data value for this key", "Puts a single byte if the buffer is not yet full.\n\n@return true if the byte was put, or false if the buffer is full", "Retrieve the result produced by a task with the given id in the group.\n\nThis method can be used to retrieve the result of invocation of both dependency\nand \"post-run\" dependent tasks. If task with the given id does not exists then\nIllegalArgumentException exception will be thrown.\n\n@param taskId the task item id\n@return the task result, null will be returned if task has not yet been invoked", "Refresh children using read-resource operation.", "Use this API to fetch all the sslciphersuite resources that are configured on netscaler.", "Process a graphical indicator definition for a known type.\n\n@param type field type", "Insert entity object. The caller must first initialize the primary key\nfield." ]
public Constructor<?> getCompatibleConstructor(Class<?> type, Class<?> argumentType) { try { return type.getConstructor(new Class[] { argumentType }); } catch (Exception e) { // get public classes and interfaces Class<?>[] types = type.getClasses(); for (int i = 0; i < types.length; i++) { try { return type.getConstructor(new Class[] { types[i] }); } catch (Exception e1) { } } } return null; }
[ "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" ]
[ "Convert a Java String instance into the equivalent array of single or\ndouble bytes.\n\n@param value Java String instance representing text\n@param unicode true if double byte characters are required\n@return byte array representing the supplied text", "Arrange to become the tempo master. Starts a sequence of interactions with the other players that should end\nup with us in charge of the group tempo and beat alignment.\n\n@throws IllegalStateException if we are not sending status updates\n@throws IOException if there is a problem sending the master yield request", "Returns the complete task record for a single task.\n\n@param task The task to get.\n@return Request object", "Throws an IllegalArgumentException when the given value is null.\n@param value the value to assert if not null\n@param name the name of the argument\n@param <T> The generic type of the value to assert if not null\n@return the value", "Setter for the file format.\n@param fileFormat File format the configuration file is in.", "Obtain collection of Parameters from request\n\n@param dataArray request parameters\n@return Map of parameters\n@throws Exception exception", "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.", "Returns the value stored for the given key at the point of call.\n@param key a non null key\n@return the value stored in the map for the given key", "Convert from Hadoop Text to Bytes" ]
public static base_responses update(nitro_service client, snmpalarm resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { snmpalarm updateresources[] = new snmpalarm[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new snmpalarm(); updateresources[i].trapname = resources[i].trapname; updateresources[i].thresholdvalue = resources[i].thresholdvalue; updateresources[i].normalvalue = resources[i].normalvalue; updateresources[i].time = resources[i].time; updateresources[i].state = resources[i].state; updateresources[i].severity = resources[i].severity; updateresources[i].logging = resources[i].logging; } result = update_bulk_request(client, updateresources); } return result; }
[ "Use this API to update snmpalarm resources." ]
[ "Calculate the value of a swaption assuming the Black'76 model.\n\n@param forwardSwaprate The forward (spot)\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity.\n@param optionStrike The option strike.\n@param swapAnnuity The swap annuity corresponding to the underlying swap.\n@return Returns the value of a Swaption under the Black'76 model", "Closes the window containing the given component.\n\n@param component a component", "Use this API to rename a responderpolicy resource.", "Use this API to update sslocspresponder resources.", "Gets an array of of all registered ConstantMetaClassListener instances.", "Retrieve the document with the specified ID from the database and deserialize to an\ninstance of the POJO of type T.\n\n@param <T> object type\n@param classType the class of type T\n@param id the document id\n@return an object of type T\n@throws NoDocumentException if the document is not found in the database\n@see #find(Class, String, String)\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/document.html#read\"\ntarget=\"_blank\">Documents - read</a>", "Finds the most recent dump of the given type that is actually available.\n\n@param dumpContentType\nthe type of the dump to look for\n@return most recent main dump or null if no such dump exists", "Samples without 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", "Get the cached entry or null if no valid cached entry is found." ]
synchronized void bulkRegisterSingleton() { for (Map.Entry<Class<? extends AppService>, AppService> entry : registry.entrySet()) { if (isSingletonService(entry.getKey())) { app.registerSingleton(entry.getKey(), entry.getValue()); } } }
[ "Called when app's singleton registry has been initialized" ]
[ "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'", "Sets up and declares internal data structures.\n\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@param numCols number of columns (and rows) in the matrix.", "Returns the target locales.\n\n@return the target locales, never null.", "Log original incoming request\n\n@param requestType\n@param request\n@param history", "This method is called to format a rate.\n\n@param value rate value\n@return formatted rate", "Go through all node IDs and determine which node\n\n@param cluster\n@param storeRoutingPlan\n@return", "Retrieve a byte array of containing the data starting at the supplied\noffset in the FixDeferFix file. Note that this method will return null\nif the requested data is not found for some reason.\n\n@param offset Offset into the file\n@return Byte array containing the requested data", "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.", "Here we start a intern odmg-Transaction to hide transaction demarcation\nThis method could be invoked several times within a transaction, but only\nthe first call begin a intern odmg transaction" ]
public static String encodeAuthority(String authority, String encoding) throws UnsupportedEncodingException { return HierarchicalUriComponents.encodeUriComponent(authority, encoding, HierarchicalUriComponents.Type.AUTHORITY); }
[ "Encodes the given URI authority with the given encoding.\n@param authority the authority to be encoded\n@param encoding the character encoding to encode to\n@return the encoded authority\n@throws UnsupportedEncodingException when the given encoding parameter is not supported" ]
[ "Send a mount update announcement to all registered listeners, and see if we can auto-attach a media cache file.\n\n@param slot the slot in which media has been mounted or unmounted\n@param mounted will be {@code true} if there is now media mounted in the specified slot", "Load resource content from given path into variable with\ntype specified by `spec`.\n\n@param resourcePath the resource path\n@param spec {@link BeanSpec} specifies the return value type\n@return the resource content in a specified type or `null` if resource not found\n@throws UnexpectedException if return value type not supported", "Removes all the given tags from the document.\n\n@param dom the document object.\n@param tagName the tag name, examples: script, style, meta\n@return the changed dom.", "Remove a role from the list of defined roles.\n\n@param roleName - The name of the role to be removed.\n@return A key that can be used to undo the removal.", "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", "Part of the endOfRun process that needs the database. May be deferred if the database is not available.", "Use this API to fetch dnstxtrec resource of given name .", "Returns only the leaf categories of the wrapped categories.\n\nThe method assumes that categories are ordered in the list, i.e., parents are directly followed by their children.\n\nNOTE: In the complete category tree a leaf of the wrapped tree part may not be a leaf.\n\n@return only the leaf categories of the wrapped categories.", "Format a date that is parseable from JavaScript, according to ISO-8601.\n\n@param date the date to format to a JSON string\n@return a formatted date in the form of a string" ]
public List<File> getAutoAttachCacheFiles() { ArrayList<File> currentFiles = new ArrayList<File>(autoAttachCacheFiles); Collections.sort(currentFiles, new Comparator<File>() { @Override public int compare(File o1, File o2) { return o1.getName().compareTo(o2.getName()); } }); return Collections.unmodifiableList(currentFiles); }
[ "Get the metadata cache files that are currently configured to be automatically attached when matching media is\nmounted in a player on the network.\n\n@return the current auto-attache cache files, sorted by name" ]
[ "Retrieve a single field value.\n\n@param id parent entity ID\n@param type field type\n@param fixedData fixed data block\n@param varData var data block\n@return field value", "Wrap Statement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a statement.", "Retrieve the next available field.\n\n@return FieldType instance for the next available field", "Create a discount curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this discount curve.\n@param times Array of times as doubles.\n@param givenDiscountFactors Array of corresponding discount factors.\n@return A new discount factor object.", "Find the user by their email address.\n\nThis method does not require authentication.\n\n@param email\nThe email address\n@return The User\n@throws FlickrException", "return the squared area of the triangle defined by the half edge hedge0\nand the point at the head of hedge1.\n\n@param hedge0\n@param hedge1\n@return", "Create an index of base font numbers and their associated base\nfont instances.\n@param data property data", "Compares two vectors and determines if they are numeric equals,\nindependent of its type.\n\n@param vector1\nthe first vector\n@param vector2\nthe second vector\n@return true if the vectors are numeric equals", "Used when setting the \"visible\" field in the response. See the \"List Conversations\" docs for details\n@param filters Filter strings to be applied to the visibility of conversations\n@return this to continue building options" ]
@SuppressWarnings("SameParameterValue") private void sendField(Field field) throws IOException { if (isConnected()) { try { field.write(channel); } catch (IOException e) { logger.warn("Problem trying to write field to dbserver, closing connection", e); close(); throw e; } return; } throw new IOException("sendField() called after dbserver connection was closed"); }
[ "Attempt to send the specified field to the dbserver.\nThis low-level function is available only to the package itself for use in setting up the connection. It was\npreviously also used for sending parts of larger-scale messages, but because that sometimes led to them being\nfragmented into multiple network packets, and Windows rekordbox cannot handle that, full message sending no\nlonger uses this method.\n\n@param field the field to be sent\n\n@throws IOException if the field cannot be sent" ]
[ "If UPDATE, INSERT or DELETE, return BatchPreparedStatement,\notherwise return null.", "Checks to see if the matrix is symmetric to within tolerance.\n\n@param A Matrix being tested. Not modified.\n@param tol Tolerance that defines how similar two values must be to be considered identical\n@return true if symmetric or false if not", "Add the set with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The set of all packages to add.", "Called when app's singleton registry has been initialized", "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", "Unlink the specified reference from this object.\nMore info see OJB doc.\n\n@param obj Object with reference\n@param ord the ObjectReferenceDescriptor of the reference\n@param insert flag signals insert operation", "Read resource data from a PEP file.", "Send ourselves \"updates\" about any tracks that were loaded before we started, since we missed them.", "Validates given external observer method.\n\n@param observerMethod the given observer method\n@param beanManager\n@param originalObserverMethod observer method replaced by given observer method (this parameter is optional)" ]
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users public Searcher deleteFacet(String... attributes) { for (String attribute : attributes) { facetRequestCount.put(attribute, 0); facets.remove(attribute); } rebuildQueryFacets(); return this; }
[ "Forces removal of one or several faceted attributes for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining." ]
[ "Returns timezone offset from a session instance. The offset is\nin minutes to UTC time\n\n@param session\nthe session instance\n@return the offset to UTC time in minutes", "Re-reads the given entity, refreshing any properties updated on the server-side during insert or update.", "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", "Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable", "Notifies that a footer item is changed.\n\n@param position the position.", "Used internally to find the solution to a single column vector.", "Create a new Date. To the last day.", "Create a random video.\n\n@return random video.", "Use this API to fetch filtered set of sslglobal_sslpolicy_binding resources.\nset the filter parameter values in filtervalue object." ]
public static <T> void checkAbstractMethods(Set<Type> decoratedTypes, EnhancedAnnotatedType<T> type, BeanManagerImpl beanManager) { if (decoratedTypes == null) { decoratedTypes = new HashSet<Type>(type.getInterfaceClosure()); decoratedTypes.remove(Serializable.class); } Set<MethodSignature> signatures = new HashSet<MethodSignature>(); for (Type decoratedType : decoratedTypes) { for (EnhancedAnnotatedMethod<?, ?> method : ClassTransformer.instance(beanManager) .getEnhancedAnnotatedType(Reflections.getRawType(decoratedType), beanManager.getId()).getEnhancedMethods()) { signatures.add(method.getSignature()); } } for (EnhancedAnnotatedMethod<?, ?> method : type.getEnhancedMethods()) { if (Reflections.isAbstract(((AnnotatedMethod<?>) method).getJavaMember())) { MethodSignature methodSignature = method.getSignature(); if (!signatures.contains(methodSignature)) { throw BeanLogger.LOG.abstractMethodMustMatchDecoratedType(method, Formats.formatAsStackTraceElement(method.getJavaMember())); } } } }
[ "Check all abstract methods are declared by the decorated types.\n\n@param type\n@param beanManager\n@param delegateType\n@throws DefinitionException If any of the abstract methods is not declared by the decorated types" ]
[ "Convert an integer to a RelationType instance.\n\n@param type integer value\n@return RelationType instance", "Obtain a connection asynchronously by queueing a request to obtain a connection in a separate thread.\n\nUse as follows:<p>\nFuture&lt;Connection&gt; result = pool.getAsyncConnection();<p>\n... do something else in your application here ...<p>\nConnection connection = result.get(); // get the connection<p>\n\n@return A Future task returning a connection.", "Checks if a given number is in the range of a float.\n\n@param number\na number which should be in the range of a float (positive or negative)\n\n@see java.lang.Float#MIN_VALUE\n@see java.lang.Float#MAX_VALUE\n\n@return number as a float", "Helper method to send message on outputStream and account for network\ntime stats.\n\n@param outputStream\n@param message\n@throws IOException", "Sets the site root.\n\n@param siteRoot the site root", "Log a warning for the resource at the provided address and a single attribute. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attribute attribute we are warning about", "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.", "Reads the NTriples file from the reader, pushing statements into\nthe handler.", "Rehashes the contents of the receiver into a new table\nwith a smaller or larger capacity.\nThis method is called automatically when the\nnumber of keys in the receiver exceeds the high water mark or falls below the low water mark." ]
public static InputStream getContentStream(String stringUrl) throws MalformedURLException, IOException { URL url = new URL(stringUrl); URLConnection urlConnection = url.openConnection(); InputStream is = urlConnection.getInputStream(); if ("gzip".equals(urlConnection.getContentEncoding())) { is = new GZIPInputStream(is); } return is; }
[ "Get stream for URL only\n\n@param stringUrl URL to get content\n@return the input stream\n@throws IOException I/O error happened" ]
[ "Fires the event and waits for a specified time.\n\n@param webElement the element to fire event on.\n@param eventable The HTML event type (onclick, onmouseover, ...).\n@return true if firing event is successful.\n@throws InterruptedException when interrupted during the wait.", "Get a list of destinations and the values matching templated parameter for the given path.\nReturns an empty list when there are no destinations that are matched.\n\n@param path path to be routed.\n@return List of Destinations matching the given route.", "New SOAP client uses new SOAP service.", "needs to be resolved once extension beans are deployed", "Returns the corresponding ModuleSpec service name for the given module.\n\n@param identifier The module identifier\n@return The service name of the ModuleSpec service", "Triggers collapse of the parent.", "Computes FPS average", "remove drag support from the given Component.\n@param c the Component to remove", "Retrieves a vertex attribute as a float buffer.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>float</i>\n@see #setFloatArray(String, float[])\n@see #getFloatVec(String)" ]
@UiHandler("m_dateList") void dateListValueChange(ValueChangeEvent<SortedSet<Date>> event) { if (handleChange()) { m_controller.setDates(event.getValue()); } }
[ "Handle value change event on the individual dates list.\n@param event the change event." ]
[ "A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field.\n\nReturns an empty data record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object", "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", "Calculates a column title using camel humps to separate words.\n@param _property the property descriptor.\n@return the column title for the given property.", "Generates a sub-trajectory", "Returns the compact project membership records for the project.\n\n@param project The project for which to fetch memberships.\n@return Request object", "compute Exp using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "Remember the order of execution", "Parse the JSON string and return the object. The string is expected to be the JSON print data from the\nclient.\n\n@param spec the JSON formatted string.\n@return The encapsulated JSON object", "Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store" ]
public void resizeKeys(int numKeys) { int n = numKeys * mFloatsPerKey; if (mKeys.length == n) { return; } float[] newKeys = new float[n]; n = Math.min(n, mKeys.length); System.arraycopy(mKeys, 0, newKeys, 0, n); mKeys = newKeys; mFloatInterpolator.setKeyData(mKeys); }
[ "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" ]
[ "Opens file for editing.\n\n@param currentChangeListId The current change list id to open the file for editing at\n@param filePath The filePath which contains the file we need to edit\n@throws IOException Thrown in case of perforce communication errors\n@throws InterruptedException", "Encodes the given URI port with the given encoding.\n@param port the port to be encoded\n@param encoding the character encoding to encode to\n@return the encoded port\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "Append field with quotes and escape characters added in the key, if required.\nThe value is added without quotes and any escape characters.\n\n@return this", "Answer the counted size\n\n@return int", "Return SELECT clause for object existence call", "Find Flickr Places information by Place ID.\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link #getInfo(String, String)} instead.\n@param placeId\n@return A Location\n@throws FlickrException", "Validates that this string is a valid host name or IP address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws HostNameException", "Use this API to fetch lbvserver_rewritepolicy_binding resources of given name .", "Checks whether a built of the indices is necessary.\n@param cms The appropriate CmsObject instance.\n@return true, if the spellcheck indices have to be rebuilt, otherwise false" ]
public static Object getObjectFromColumn(ResultSet rs, Integer jdbcType, int columnId) throws SQLException { return getObjectFromColumn(rs, null, jdbcType, null, columnId); }
[ "Returns an java object read from the specified ResultSet column." ]
[ "Adds a classpath source which contains the given resource.\n\nTODO: [GH-213] this is extremely ugly; separate the code required to run on the\nforked JVM into an isolated bundle and either create it on-demand (in temp.\nfiles location?) or locate it in classpath somehow (in a portable way).", "Set default value with\n\n@param iso ISO2 of country", "Processes a stencilset template file\n@throws IOException", "Get the value of a primitive type from the request data.\n\n@param fieldName the name of the attribute to get from the request data.\n@param pAtt the primitive attribute.\n@param requestData the data to retrieve the value from.", "Returns the value of the identified field as a String.\n@param fieldName the name of the field\n@return the value of the field as a String", "Use this API to fetch all the nsconfig resources that are configured on netscaler.", "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", "Increase the priority of an overrideId\n\n@param overrideId ID of override\n@param pathId ID of path containing override\n@param clientUUID UUID of client", "Removes any configured observers.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}" ]
public PayloadBuilder customField(final String key, final Object value) { root.put(key, value); return this; }
[ "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" ]
[ "Waits for a job V3 to complete\n\n@param cloudFoundryClient the client to use to request job status\n@param completionTimeout the amount of time to wait for the job to complete.\n@param jobId the id of the job\n@return {@code onComplete} once job has completed", "Returns the JSON String representation of the payload\naccording to Apple APNS specification\n\n@return the String representation as expected by Apple", "Create and add model controller handler to an existing management channel handler.\n\n@param handler the channel handler\n@return the created client", "Get object by identity. First lookup among objects registered in the\ntransaction, then in persistent storage.\n@param id The identity\n@return The object\n@throws PersistenceBrokerException", "Checks whether a character sequence matches against a specified pattern or not.\n\n@param pattern\npattern, that the {@code chars} must correspond to\n@param chars\na readable sequence of {@code char} values which should match the given pattern\n@return {@code true} when {@code chars} matches against the passed {@code pattern}, otherwise {@code false}", "Manually set the breaker to be reset and ready for use. This\nis only useful after a manual trip otherwise the breaker will\ntrip automatically again if the service is still unavailable.\nJust like a real breaker. WOOT!!!", "Specify the Artifact for which the condition should search for.\n\n@param artifact\n@return", "Static method to convert a binary operator into a string.\n\n@param oper is the binary comparison operator to be converted", "The mediator registration config. If it contains default config and definitions,\nthen the dynamic config will be initialized with those values.\n\n@see org.openhim.mediator.engine.RegistrationConfig\n@see #getDynamicConfig()" ]
public static boolean isSuccess(JsonRtn jsonRtn) { if (jsonRtn == null) { return false; } String errCode = jsonRtn.getErrCode(); if (StringUtils.isEmpty(errCode) || StringUtils.equals(WECHAT_JSON_RTN_SUCCESS_CODE, errCode)) { return true; } return false; }
[ "return request is success by JsonRtn object\n\n@param jsonRtn\n@return" ]
[ "Inserts the result of the migration into the migration table\n\n@param migration the migration that was executed\n@param wasSuccessful indicates if the migration was successful or not", "Returns the ViewGroup used as a parent for the content view.\n\n@return The content view's parent.", "Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of the operation performed.\n@throws Exception Nitro exception is thrown.", "Loads the properties file using the classloader provided. Creating a string from the properties\n\"user.agent.name\" and \"user.agent.version\".\n@param loader The class loader to use to load the resource.\n@param filename The name of the file to load.\n@return A string that represents the first part of the UA string eg java-cloudant/2.6.1", "Checks for duplicate elements. A is sorted\n@param A Matrix to be tested.\n@return true if duplicates or false if false duplicates", "Copy a patch element\n\n@param entry the patch entry\n@param patchId the patch id for the element\n@param modifications the element modifications\n@return the new patch element", "Use this API to unset the properties of gslbsite resources.\nProperties that need to be unset are specified in args array.", "Set the content type of a photo.\n\nThis method requires authentication with 'write' permission.\n\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_PHOTO\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_SCREENSHOT\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_OTHER\n@param photoId\nThe photo ID\n@param contentType\nThe contentType to set\n@throws FlickrException", "Determines storage overhead and returns pretty printed summary.\n\n@param finalNodeToOverhead Map of node IDs from final cluster to number\nof partition-stores to be moved to the node.\n@return pretty printed string summary of storage overhead." ]
synchronized ArrayList<CTMessageDAO> getMessages(String userId){ final String tName = Table.INBOX_MESSAGES.getName(); Cursor cursor; ArrayList<CTMessageDAO> messageDAOArrayList = new ArrayList<>(); try{ final SQLiteDatabase db = dbHelper.getWritableDatabase(); cursor= db.rawQuery("SELECT * FROM "+tName+" WHERE " + USER_ID + " = ? ORDER BY " + KEY_CREATED_AT+ " DESC", new String[]{userId}); if(cursor != null) { while(cursor.moveToNext()){ CTMessageDAO ctMessageDAO = new CTMessageDAO(); ctMessageDAO.setId(cursor.getString(cursor.getColumnIndex(_ID))); ctMessageDAO.setJsonData(new JSONObject(cursor.getString(cursor.getColumnIndex(KEY_DATA)))); ctMessageDAO.setWzrkParams(new JSONObject(cursor.getString(cursor.getColumnIndex(WZRKPARAMS)))); ctMessageDAO.setDate(cursor.getLong(cursor.getColumnIndex(KEY_CREATED_AT))); ctMessageDAO.setExpires(cursor.getLong(cursor.getColumnIndex(EXPIRES))); ctMessageDAO.setRead(cursor.getInt(cursor.getColumnIndex(IS_READ))); ctMessageDAO.setUserId(cursor.getString(cursor.getColumnIndex(USER_ID))); ctMessageDAO.setTags(cursor.getString(cursor.getColumnIndex(TAGS))); ctMessageDAO.setCampaignId(cursor.getString(cursor.getColumnIndex(CAMPAIGN))); messageDAOArrayList.add(ctMessageDAO); } cursor.close(); } return messageDAOArrayList; }catch (final SQLiteException e){ getConfigLogger().verbose("Error retrieving records from " + tName, e); return null; } catch (JSONException e) { getConfigLogger().verbose("Error retrieving records from " + tName, e.getMessage()); return null; } finally { dbHelper.close(); } }
[ "Retrieves list of inbox messages based on given userId\n@param userId String userid\n@return ArrayList of {@link CTMessageDAO}" ]
[ "Gets an element of the matrix.\n\n@param row\nthe row\n@param col\nthe column\n@return the element at the given position", "Reads a single byte from the input stream.", "Returns true if the given dump file type contains page revisions and\nfalse if it does not. Dumps that do not contain pages are for auxiliary\ninformation such as linked sites.\n\n@param dumpContentType\nthe type of dump\n@return true if the dumpfile contains revisions\n@throws IllegalArgumentException\nif the given dump file type is not known", "This method is called to alert project listeners to the fact that\na resource assignment has been written to a project file.\n\n@param resourceAssignment resourceAssignment instance", "scans right to left until max to maintain latest max values for the multi-value property specified by key.\n\n@param key the property key\n@param left original list\n@param right new list\n@param remove if remove new list from original\n@param vr ValidationResult for error and merged list return", "Closes the output. Should be called after the JSON serialization was\nfinished.\n\n@throws IOException\nif there was a problem closing the output", "This method is designed to be called from the diverse subclasses", "Retrieves all of the headers from the servlet request and sets them on\nthe proxy request\n\n@param httpServletRequest The request object representing the client's request to the\nservlet engine\n@param httpMethodProxyRequest The request that we are about to send to the proxy host", "Checks the initialization-method of given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated" ]
public static List<DockerImage> getAndDiscardImagesByBuildId(int buildInfoId) { List<DockerImage> list = new ArrayList<DockerImage>(); synchronized(images) { Iterator<DockerImage> it = images.iterator(); while (it.hasNext()) { DockerImage image = it.next(); if (image.getBuildInfoId() == buildInfoId) { if (image.hasManifest()) { list.add(image); } it.remove(); } else // Remove old images from the cache, for which build-info hasn't been published to Artifactory: if (image.isExpired()) { it.remove(); } } } return list; }
[ "Gets a list of registered docker images from the images cache, if it has been\nregistered to the cache for a specific build-info ID and if a docker manifest has been captured for it\nby the build-info proxy.\nAdditionally, the methods also removes the returned images from the cache.\n@param buildInfoId\n@return" ]
[ "Notifies all interested subscribers of the given revision.\n\n@param mwRevision\nthe given revision\n@param isCurrent\ntrue if this is guaranteed to be the most current revision", "Get the response headers for URL, following redirects\n\n@param stringUrl URL to use\n@param followRedirects whether to follow redirects\n@return headers HTTP Headers\n@throws IOException I/O error happened", "Returns all the deployment runtime names associated with an overlay.\n\n@param context the current OperationContext.\n@param overlayAddress the address for the averlay.\n@return all the deployment runtime names associated with an overlay.", "Builder method for specifying the name of an app.\n@param name The name to give an app.\n@return A copy of the {@link App}", "Append field with quotes and escape characters added in the key, if required.\nThe value is added without quotes and any escape characters.\n\n@return this", "Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder", "Utility method to read a percentage value.\n\n@param data data block\n@param offset offset into data block\n@return percentage value", "Initialize. create the httpClientStore, tcpClientStore", "gets the profile_name associated with a specific id" ]
public static void pullImage(String imageTag, String username, String password, String host) throws IOException { final AuthConfig authConfig = new AuthConfig(); authConfig.withUsername(username); authConfig.withPassword(password); DockerClient dockerClient = null; try { dockerClient = getDockerClient(host); dockerClient.pullImageCmd(imageTag).withAuthConfig(authConfig).exec(new PullImageResultCallback()).awaitSuccess(); } finally { closeQuietly(dockerClient); } }
[ "Pull docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host" ]
[ "Extracts the postal code, country code and service code from the primary data and returns the corresponding primary message\ncodewords.\n\n@return the primary message codewords", "Sleeps if necessary to slow down the caller.\n\n@param eventsSeen Number of events seen since last invocation. Basis for\ndetermining whether its necessary to sleep.", "Parses command-line and removes metadata related to rebalancing.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "Queues up a callback to be removed and invoked on the next change event.", "return a prepared Insert Statement fitting for the given ClassDescriptor", "Given the current cluster and a zone id that needs to be dropped, this\nmethod will remove all partitions from the zone that is being dropped and\nmove it to the existing zones. The partitions are moved intelligently so\nas not to avoid any data movement in the existing zones.\n\nThis is achieved by moving the partitions to nodes in the surviving zones\nthat is zone-nry to that partition in the surviving zone.\n\n@param currentCluster Current cluster metadata\n@return Returns an interim cluster with empty partition lists on the\nnodes from the zone being dropped", "In Gerrit < 2.12 the XSRF token was included in the start page HTML.", "Read a Synchro time from an input stream.\n\n@param is input stream\n@return Date instance", "Returns the RPC service for serial dates.\n@return the RPC service for serial dates." ]
public void setPerms(String photoId, GeoPermissions perms) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_SET_PERMS); parameters.put("photo_id", photoId); parameters.put("is_public", perms.isPublic() ? "1" : "0"); parameters.put("is_contact", perms.isContact() ? "1" : "0"); parameters.put("is_friend", perms.isFriend() ? "1" : "0"); parameters.put("is_family", perms.isFamily() ? "1" : "0"); // Note: This method requires an HTTP POST request. Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret); // This method has no specific response - It returns an empty sucess response // if it completes without error. if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } }
[ "Set the permission for who may view the geo data associated with a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe id of the photo to set permissions for.\n@param perms\nPermissions, who can see the geo data of this photo\n@throws FlickrException" ]
[ "Broadcast a packet that tells some players to start playing and others to stop. If a player number is in\nboth sets, it will be told to stop. Numbers outside the range 1 to 4 are ignored.\n\n@param deviceNumbersToStart the players that should start playing if they aren't already\n@param deviceNumbersToStop the players that should stop playing\n\n@throws IOException if there is a problem broadcasting the command to the players\n@throws IllegalStateException if the {@code VirtualCdj} is not active", "Appends to the statement table and all tables joined to it.\n@param alias the table alias\n@param where append conditions for WHERE clause here", "Answer the TableAlias for aPath\n@param aPath\n@param hintClasses\n@return TableAlias, null if none", "Prints a suggestion to stderr for the argument based on the levenshtein distance metric\n\n@param arg the argument which could not be assigned to a flag\n@param co the {@link ConfigOption} List where every flag is stored", "Read a project from a ConceptDraw PROJECT file.\n\n@param project ConceptDraw PROJECT project", "This procedure is invoked to process the \"subst\" Tcl command.\nSee the user documentation for details on what it does.\n\n@param interp the current interpreter.\n@param argv command arguments.\n@exception TclException if wrong # of args or invalid argument(s).", "Convert a floating point date to a LocalDateTime.\n\nNote: This method currently performs a rounding to the next second.\n\nIf referenceDate is null, the method returns null.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param floatingPointDate The value to the time offset \\( t \\).\n@return The date resulting from adding Math.round(fixingTime*SECONDS_PER_DAY) seconds to referenceDate, where one day has SECONDS_PER_DAY seconds and SECONDS_PER_DAY is a constant 365*24*60*60", "Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.", "Registers an event handler in the repository shared between Javascript\nand Java.\n\n@param h Event handler to be registered.\n@return Callback key that Javascript will use to find this handler." ]
private String randomString(String[] s) { if (s == null || s.length <= 0) return ""; return s[this.random.nextInt(s.length)]; }
[ "Random string from string array\n\n@param s Array\n@return String" ]
[ "Construct a pretty string documenting progress for this batch plan thus\nfar.\n\n@return pretty string documenting progress", "Sets the body filter for this ID\n\n@param pathId ID of path\n@param bodyFilter Body filter to set", "Save an HTTP response to a file\n@param response the response to save\n@param destFile the destination file\n@throws IOException if the response could not be downloaded", "Add a Opacity bar to the color wheel.\n\n@param bar The instance of the Opacity bar.", "Opens a JDBC connection with the given parameters.", "Reads a combined date and time value.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value", "Reads an HTML snippet with the given name.\n\n@return the HTML data", "Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD\n@param _jasperPrint\n@param _format\n@param _parameters\n@return", "Log the data for a single column.\n\n@param startIndex offset into buffer\n@param length length" ]
private void addTypes(Injector injector, List<Class<?>> types) { for (Binding<?> binding : injector.getBindings().values()) { Key<?> key = binding.getKey(); Type type = key.getTypeLiteral().getType(); if (hasAnnotatedMethods(type)) { types.add(((Class<?>)type)); } } if (injector.getParent() != null) { addTypes(injector.getParent(), types); } }
[ "Adds steps types from given injector and recursively its parent\n\n@param injector the current Inject\n@param types the List of steps types" ]
[ "Gets next node in the DAG which has no dependency or all of it's dependencies are resolved and\nready to be consumed.\n\n@return next node or null if all the nodes have been explored or no node is available at this moment.", "Format a date that is parseable from JavaScript, according to ISO-8601.\n\n@param date the date to format to a JSON string\n@return a formatted date in the form of a string", "This will create a line in the SDEF file for each calendar\nif there are more than 9 calendars, you'll have a big error,\nas USACE numbers them 0-9.\n\n@param records list of ProjectCalendar instances", "The method determines if the type can be resolved and if not, will try to guess the qualified name using the information from the imports.", "Saves meta tree, writes database root and flushes the log.\n\n@param metaTree mutable meta tree\n@param env enclosing environment\n@param expired expired loggables (database root to be added)\n@return database root loggable which is read again from the log.", "Write the configuration to a buffered writer.", "Get a new token.\n\n@return 14 character String", "Factory method that builds the appropriate matcher for @match tags", "Assigns retention policy with givenID to the enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@return info about created assignment." ]
private String getDynamicAttributeValue( CmsFile file, I_CmsXmlContentValue value, String attributeName, CmsEntity editedLocalEntity) { if ((null != editedLocalEntity) && (editedLocalEntity.getAttribute(attributeName) != null)) { getSessionCache().setDynamicValue( attributeName, editedLocalEntity.getAttribute(attributeName).getSimpleValue()); } String currentValue = getSessionCache().getDynamicValue(attributeName); if (null != currentValue) { return currentValue; } if (null != file) { if (value.getTypeName().equals(CmsXmlDynamicCategoryValue.TYPE_NAME)) { List<CmsCategory> categories = new ArrayList<CmsCategory>(0); try { categories = CmsCategoryService.getInstance().readResourceCategories(getCmsObject(), file); } catch (CmsException e) { LOG.error(Messages.get().getBundle().key(Messages.ERROR_FAILED_READING_CATEGORIES_1), e); } I_CmsWidget widget = null; widget = CmsWidgetUtil.collectWidgetInfo(value).getWidget(); if ((null != widget) && (widget instanceof CmsCategoryWidget)) { String mainCategoryPath = ((CmsCategoryWidget)widget).getStartingCategory( getCmsObject(), getCmsObject().getSitePath(file)); StringBuffer pathes = new StringBuffer(); for (CmsCategory category : categories) { if (category.getPath().startsWith(mainCategoryPath)) { String path = category.getBasePath() + category.getPath(); path = getCmsObject().getRequestContext().removeSiteRoot(path); pathes.append(path).append(','); } } String dynamicConfigString = pathes.length() > 0 ? pathes.substring(0, pathes.length() - 1) : ""; getSessionCache().setDynamicValue(attributeName, dynamicConfigString); return dynamicConfigString; } } } return ""; }
[ "Returns the value that has to be set for the dynamic attribute.\n\n@param file the file where the current content is stored\n@param value the content value that is represented by the attribute\n@param attributeName the attribute's name\n@param editedLocalEntity the entities that where edited last\n@return the value that has to be set for the dynamic attribute." ]
[ "Checks whether this notification is from CleverTap.\n\n@param extras The payload from the GCM intent\n@return See {@link NotificationInfo}", "Returns true if the activity is a start milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone", "Update max min.\n\n@param n the n\n@param c the c", "Use this API to fetch a rewriteglobal_binding resource .", "Sets the first occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception", "Access an attribute.\n\n@param type the attribute's type, not {@code null}\n@param key the attribute's key, not {@code null}\n@return the attribute value, or {@code null}.", "Maps a field index to an AssignmentField instance.\n\n@param fields array of fields used as the basis for the mapping.\n@param index required field index\n@return AssignmnetField instance", "Creates a decorator bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return a Bean", "Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail" ]
protected static PatchElement createRollbackElement(final PatchEntry entry) { final PatchElement patchElement = entry.element; final String patchId; final Patch.PatchType patchType = patchElement.getProvider().getPatchType(); if (patchType == Patch.PatchType.CUMULATIVE) { patchId = entry.getCumulativePatchID(); } else { patchId = patchElement.getId(); } return createPatchElement(entry, patchId, entry.rollbackActions); }
[ "Create a patch element for the rollback patch.\n\n@param entry the entry\n@return the new patch element" ]
[ "Confirms that both clusters have the same number of nodes by comparing\nset of node Ids between clusters.\n\n@param lhs\n@param rhs", "Create the function. Be sure to handle all possible input types and combinations correctly and provide\nmeaningful error messages. The output matrix should be resized to fit the inputs.", "Gets the pathClasses.\nA Map containing hints about what Class to be used for what path segment\nIf local instance not set, try parent Criteria's instance. If this is\nthe top-level Criteria, try the m_query's instance\n@return Returns a Map", "Initializes the default scope type", "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", "Use this API to fetch nssimpleacl resource of given name .", "a small static helper class to get the color from the colorHolder\n\n@param colorHolder\n@param ctx\n@return", "End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance", "Gets the message payload.\n\n@param message the message\n@return the payload" ]
public void setFirstOccurence(int min, int max) throws ParseException { if (fullCondition == null) { if ((min < 0) || (min > max) || (max < 1)) { throw new ParseException("Illegal number {" + min + "," + max + "}"); } if (min == 0) { firstOptional = true; } firstMinimumOccurence = Math.max(1, min); firstMaximumOccurence = max; } else { throw new ParseException("fullCondition already generated"); } }
[ "Sets the first occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception" ]
[ "Set the inner angle of the spotlight cone in degrees.\n\nBeyond the outer cone angle there is no illumination.\nThe underlying uniform \"outer_cone_angle\" is the cosine\nof this input angle. If the inner cone angle is larger than the outer cone angle\nthere will be unexpected results.\n@see #setInnerConeAngle(float)\n@see #getOuterConeAngle()", "Responsible for executing file rolls as and when required, in addition to\ndelegating to the super class to perform the actual append operation.\nSynchronized for safety during enforced file roll.\n\n@see org.apache.log4j.WriterAppender#subAppend(org.apache.log4j.spi.LoggingEvent)", "Permanently deletes a trashed file.\n@param fileID the ID of the trashed folder to permanently delete.", "Process a single project.\n\n@param reader Primavera reader\n@param projectID required project ID\n@param outputFile output file name", "Gets a list of any tasks on this file with requested fields.\n\n@param fields optional fields to retrieve for this task.\n@return a list of tasks on this file.", "Display web page, but no user interface - close", "Indicates if a bean is proxyable\n\n@param bean The bean to test\n@return True if proxyable, false otherwise", "Start a process using the given parameters.\n\n@param processId\n@param parameters\n@return", "The mediator registration config. If it contains default config and definitions,\nthen the dynamic config will be initialized with those values.\n\n@see org.openhim.mediator.engine.RegistrationConfig\n@see #getDynamicConfig()" ]
public Iterable<BoxLegalHoldAssignment.Info> getAssignments(String type, String id, int limit, String ... fields) { QueryStringBuilder builder = new QueryStringBuilder(); if (type != null) { builder.appendParam("assign_to_type", type); } if (id != null) { builder.appendParam("assign_to_id", id); } if (fields.length > 0) { builder.appendParam("fields", fields); } return new BoxResourceIterable<BoxLegalHoldAssignment.Info>( this.getAPI(), LEGAL_HOLD_ASSIGNMENTS_URL_TEMPLATE.buildWithQuery( this.getAPI().getBaseURL(), builder.toString(), this.getID()), limit) { @Override protected BoxLegalHoldAssignment.Info factory(JsonObject jsonObject) { BoxLegalHoldAssignment assignment = new BoxLegalHoldAssignment( BoxLegalHoldPolicy.this.getAPI(), jsonObject.get("id").asString()); return assignment.new Info(jsonObject); } }; }
[ "Returns iterable containing assignments for this single legal hold policy.\nParameters can be used to filter retrieved assignments.\n@param type filter assignments of this type only.\nCan be \"file_version\", \"file\", \"folder\", \"user\" or null if no type filter is necessary.\n@param id filter assignments to this ID only. Can be null if no id filter is necessary.\n@param limit the limit of entries per page. Default limit is 100.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy." ]
[ "Apply all attributes on the given context, hereby existing entries are preserved.\n\n@param context the context to be applied, not null.\n@return this Builder, for chaining\n@see #importContext(AbstractContext, boolean)", "Update artifact provider\n\n@param gavc String\n@param provider String", "Get logs for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return log stream response", "Establishes a thread that on one second intervals reports the number of remaining WorkBlocks enqueued and the\ntotal number of lines written and reported by consumers", "Closes all the producers in the pool", "Removes the specified objects.\n\n@param collection The collection to remove.", "Converts a Map to an array of objects, adding only those entries whose key is in the nameMapping array.\n\n@param values\nthe Map of values to convert\n@param nameMapping\nthe keys to extract from the Map (elements in the target array will be added in this order)\n@return the array of Objects\n@throws NullPointerException\nif values or nameMapping is null", "Overloads the left shift operator to provide syntactic sugar for appending to a StringBuilder.\n\n@param self a StringBuilder\n@param value an Object\n@return the original StringBuilder\n@since 1.8.2", "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." ]
private ProjectFile readTextFile(InputStream inputStream) throws MPXJException { ProjectReader reader = new AstaTextFileReader(); addListeners(reader); return reader.read(inputStream); }
[ "Process a text-based PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance" ]
[ "Determines run length for each 'initial' partition ID. Note that a\ncontiguous run may \"wrap around\" the end of the ring.\n\n@param cluster\n@param zoneId\n@return map of initial partition Id to length of contiguous run of\npartition IDs within the same zone..", "If there are any observer methods, they must be static or business\nmethods.", "Registers a BeanNameAutoProxyCreator class that wraps the bean being\nmonitored. The proxy is associated with the PerformanceMonitorInterceptor\nfor the bean, which is created when parsing the methods attribute from\nthe springconfiguration xml file.\n\n@param source An Attribute node from the spring configuration\n@param holder A container for the beans I will create\n@param context the context currently parsing my spring config", "Writes a DTD that can be used for data XML files matching the current model to the given writer.\n\n@param output The writer to write the DTD to", "Should be called each frame.", "create a consumer\n\n@param zookeeperConfig connect config of zookeeper; ex: 127.0.0.1:2181/jafka\n@param topic the topic to be watched\n@param groupId grouping the consumer clients\n@param listener message listener\n@return the real consumer", "Adds a qualifier with the given property and value to the constructed\nstatement.\n\n@param propertyIdValue\nthe property of the qualifier\n@param value\nthe value of the qualifier\n@return builder object to continue construction", "Creates an immutable map. A copy of the given map is used. As a result, it is safe to modify the source map afterwards.\n\n@param map the given map\n@return an immutable map", "Delete a photo from flickr.\n\nThis method requires authentication with 'delete' permission.\n\n@param photoId\n@throws FlickrException" ]
protected void parseSequencesWithColons(TokenList tokens , Sequence sequence ) { TokenList.Token t = tokens.getFirst(); if( t == null ) return; int state = 0; TokenList.Token start = null; TokenList.Token middle = null; TokenList.Token prev = t; boolean last = false; while( true ) { if( state == 0 ) { if( isVariableInteger(t) && (t.next != null && t.next.getSymbol() == Symbol.COLON) ) { start = t; state = 1; t = t.next; } else if( t != null && t.getSymbol() == Symbol.COLON ) { // If it starts with a colon then it must be 'all' or a type-o IntegerSequence range = new IntegerSequence.Range(null,null); VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(range); TokenList.Token n = new TokenList.Token(varSequence); tokens.insert(t.previous, n); tokens.remove(t); t = n; } } else if( state == 1 ) { // var : ? if (isVariableInteger(t)) { state = 2; } else { // array range IntegerSequence range = new IntegerSequence.Range(start,null); VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(range); replaceSequence(tokens, varSequence, start, prev); state = 0; } } else if ( state == 2 ) { // var:var ? if( t != null && t.getSymbol() == Symbol.COLON ) { middle = prev; state = 3; } else { // create for sequence with start and stop elements only IntegerSequence numbers = new IntegerSequence.For(start,null,prev); VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(numbers); replaceSequence(tokens, varSequence, start, prev ); if( t != null ) t = t.previous; state = 0; } } else if ( state == 3 ) { // var:var: ? if( isVariableInteger(t) ) { // create 'for' sequence with three variables IntegerSequence numbers = new IntegerSequence.For(start,middle,t); VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(numbers); t = replaceSequence(tokens, varSequence, start, t); } else { // array range with 2 elements IntegerSequence numbers = new IntegerSequence.Range(start,middle); VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(numbers); replaceSequence(tokens, varSequence, start, prev); } state = 0; } if( last ) { break; } else if( t.next == null ) { // handle the case where it is the last token in the sequence last = true; } prev = t; t = t.next; } }
[ "Searches for descriptions of integer sequences and array ranges that have a colon character in them\n\nExamples of integer sequences:\n1:6\n2:4:20\n:\n\nExamples of array range\n2:\n2:4:" ]
[ "Performs backward pass of Batch Normalization layer. Returns x gradient,\nbnScale gradient and bnBias gradient", "Starts data synchronization in a background thread.", "Dumps the partition IDs per node in terms of zone n-ary type.\n\n@param cluster\n@param storeRoutingPlan\n@return pretty printed string of detailed zone n-ary type.", "Log a message line to the output.", "Use this API to update sslcertkey.", "Retrieve all Collection attributes of a given instance\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs", "Run a query on the datastore.\n\n@return The entities returned by the query.\n@throws DatastoreException on error", "For each node, checks if the store exists and then verifies that the remote schema\nmatches the new one. If the remote store doesn't exist, it creates it.", "Used to load a classifier stored as a resource inside a jar file. THIS\nFUNCTION WILL ONLY WORK IF THE CODE WAS LOADED FROM A JAR FILE WHICH HAS A\nSERIALIZED CLASSIFIER STORED INSIDE IT.\n\n@param resourceName\nName of clasifier resource inside the jar file.\n@return A CRFClassifier stored in the jar file" ]
public Search counts(String[] countsfields) { assert (countsfields.length > 0); JsonArray countsJsonArray = new JsonArray(); for(String countsfield : countsfields) { JsonPrimitive element = new JsonPrimitive(countsfield); countsJsonArray.add(element); } databaseHelper.query("counts", countsJsonArray); return this; }
[ "Array of fieldNames for which counts should be produced\n\n@param countsfields array of the field names\n@return this for additional parameter setting or to query" ]
[ "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.", "A specific, existing section can be deleted by making a DELETE request\non the URL for that section.\n\nNote that sections must be empty to be deleted.\n\nThe last remaining section in a board view cannot be deleted.\n\nReturns an empty data block.\n\n@param section The section to delete.\n@return Request object", "Retrieve a single value property.\n\n@param method method definition\n@param object target object\n@param map parameter values", "Calculates a column title using camel humps to separate words.\n@param _property the property descriptor.\n@return the column title for the given property.", "This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance", "Set the attributes of a feature.\n\n@param feature the feature\n@param attributes the attributes\n@throws LayerException oops", "Gets information about this collaboration.\n\n@return info about this collaboration.", "Wait for the template resources to come up after the test container has\nbeen started. This allows the test container and the template resources\nto come up in parallel.", "Produces all tuples of size n chosen from a list of variable names\n\n@param variables the list of variable names to make tuples of\n@param nWise the size of the desired tuples\n@return all tuples of size nWise" ]
public boolean hasInstance(Scriptable instance) { // Default for JS objects (other than Function) is to do prototype // chasing. Scriptable proto = instance.getPrototype(); while (proto != null) { if (proto.equals(this)) return true; proto = proto.getPrototype(); } return false; }
[ "Implements the instanceof operator.\n\n@param instance The value that appeared on the LHS of the instanceof\noperator\n@return true if \"this\" appears in value's prototype chain" ]
[ "This method is called if the data set has been scrolled.", "Use this API to update vserver.", "Returns the specified process time out in milliseconds.\n\n@return The process time out in milliseconds.", "Converts the given dislect to a human-readable datasource type.", "Add SQL to handle a unique=true field. THis is not for uniqueCombo=true.", "performs an UPDATE operation against RDBMS.\n@param obj The Object to be updated in the underlying table.\n@param cld ClassDescriptor providing mapping information.", "Returns the y-coordinate of a vertex bitangent.\n\n@param vertex the vertex index\n@return the y coordinate", "Simply appends the given parameters and returns it to obtain a cache key\n@param sql\n@param resultSetConcurrency\n@param resultSetHoldability\n@param resultSetType\n@return cache key to use", "Maps the text representation of column data to Java types.\n\n@param table table name\n@param column column name\n@param data text representation of column data\n@param type column data type\n@param epochDateFormat true if date is represented as an offset from an epoch\n@return Java representation of column data\n@throws MPXJException" ]
private void stripCommas(TokenList tokens) { TokenList.Token t = tokens.getFirst(); while( t != null ) { TokenList.Token next = t.next; if( t.getSymbol() == Symbol.COMMA ) { tokens.remove(t); } t = next; } }
[ "Removes all commas from the token list" ]
[ "Detach any script file from a scriptable target.\n\n@param target The scriptable target.", "Gets an exception reporting an unexpected XML attribute.\n\n@param reader a reference to the stream reader.\n@param index the attribute index.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.", "Get the last date to keep logs from, by a given current date.\n@param currentDate the date of today\n@return the last date to keep log files from.", "This method can be used by child classes to apply the configuration that is stored in config.", "Transforms user name and icon size into the image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path", "Execute pull docker image on agent\n\n@param launcher\n@param imageTag\n@param username\n@param password\n@param host\n@return\n@throws IOException\n@throws InterruptedException", "Initialization necessary for editing a property bundle.\n\n@throws CmsLoaderException thrown if loading a bundle file fails.\n@throws CmsException thrown if loading a bundle file fails.\n@throws IOException thrown if loading a bundle file fails.", "Calls the provided closure for a \"page\" of rows from the table represented by this DataSet.\nA page is defined as starting at a 1-based offset, and containing a maximum number of rows.\n\n@param offset the 1-based offset for the first row to be processed\n@param maxRows the maximum number of rows to be processed\n@param closure called for each row with a GroovyResultSet\n@throws SQLException if a database access error occurs\n@see groovy.sql.Sql#eachRow(String, java.util.List, int, int, groovy.lang.Closure)", "Remove an existing Corporate GroupId from an organization.\n\n@return Response" ]
protected synchronized Class loadClass(final String name, boolean resolve) throws ClassNotFoundException { Class c = this.findLoadedClass(name); if (c != null) return c; c = (Class) customClasses.get(name); if (c != null) return c; try { c = oldFindClass(name); } catch (ClassNotFoundException cnfe) { // IGNORE } if (c == null) c = super.loadClass(name, resolve); if (resolve) resolveClass(c); return c; }
[ "loads a class using the name of the class" ]
[ "Escape text to ensure valid JSON.\n\n@param value value\n@return escaped value", "Updates the statements of the item document identified by the given item\nid. The updates are computed with respect to the current data found\nonline, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged.\n\n@param itemIdValue\nid of the document to be updated\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are IO problems, such as missing network connection", "This method retrieves a double value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of a double\n@return double value", "This function helps handle the following case\n\n<OL>\n<LI>TX1 locls r1 col1\n<LI>TX1 fails before unlocking\n<LI>TX2 attempts to write r1:col1 w/o reading it\n</OL>\n\n<p>\nIn this case TX2 would not roll back TX1, because it never read the column. This function\nattempts to handle this case if TX2 fails. Only doing this in case of failures is cheaper than\ntrying to always read unread columns.\n\n@param cd Commit data", "Find out the scrollable child view from a ViewGroup.\n\n@param viewGroup", "Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.", "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)", "Remove a DAO from the cache. This is necessary if we've registered it already but it throws an exception during\nconfiguration.", "Recursively construct a LblTree from DOM tree\n\n@param walker tree walker for DOM tree traversal\n@return tree represented by DOM tree" ]
public static final Rect getViewportBounds() { return new Rect(Window.getScrollLeft(), Window.getScrollTop(), Window.getClientWidth(), Window.getClientHeight()); }
[ "This takes into account scrolling and will be in absolute\ncoordinates where the top left corner of the page is 0,0 but\nthe viewport may be scrolled to something else." ]
[ "Read, validate, and discard a single message, returning the next valid offset, and the\nmessage being validated\n\n@throws IOException any exception", "Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory", "Get a setted section knowing his title\n\nN.B. this search only into section list and bottom section list.\n@param title is the title of the section\n@return the section with title or null if the section is not founded", "Reads the availability table from the file.\n\n@param resource MPXJ resource instance\n@param periods MSPDI availability periods", "Add an element assigned with its score\n@param member the member to add\n@param score the score to assign\n@return <code>true</code> if the set has been changed", "Creates the event type.\n\n@param type the EventEnumType\n@return the event type", "Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order", "Handles the response of the Request node request.\n@param incomingMessage the response message to process.", "Refresh children using read-resource operation." ]
public void addExportedPackages(Set<String> packages) { String s = (String) getMainAttributes().get(EXPORT_PACKAGE); Wrapper<Boolean> modified = Wrapper.wrap(this.modified); String result = mergeIntoCommaSeparatedList(s, packages, modified, lineDelimiter); this.modified = modified.get(); getMainAttributes().put(EXPORT_PACKAGE, result); }
[ "adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported" ]
[ "Sets an attribute in the main section of the manifest to a list.\nThe list elements will be joined with a single whitespace character.\n\n@param name the attribute's name\n@param values the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.", "BuildInteractiveObjectFromAnchor is a special type of interactive object in that it does not get\nbuilt using ROUTE's.\n\n@param anchorSensor is the Sensor that describes the sensor set to an Anchor\n@param anchorDestination is either another Viewpoint, url to a web site or another x3d scene", "Get all views from the list content\n@return list of views currently visible", "Return all methods for a list of groupIds\n\n@param groupIds array of group IDs\n@param filters array of filters to apply to method selection\n@return collection of Methods found\n@throws Exception exception", "Returns the decoded string, in case it contains non us-ascii characters.\nReturns the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.\n\n@param str string to be decoded\n@return the decoded string, in case it contains non us-ascii characters;\nor the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.", "Reinitializes the shader texture used to fill in\nthe Circle upon drawing.", "Validates a space separated list of emails.\n\n@param emails Space separated list of emails\n@return {@link hudson.util.FormValidation.ok()} if valid or empty, error otherwise", "Retrieves the registar linked to the bus.\nCreates a new registar is not present.\n\n@param bus\n@return", "Delivers the correct JSON Object for outgoings\n\n@param outgoings\n@throws org.json.JSONException" ]
public static CmsJspResourceWrapper convertResource(CmsObject cms, Object input) throws CmsException { CmsJspResourceWrapper result; if (input instanceof CmsResource) { result = CmsJspResourceWrapper.wrap(cms, (CmsResource)input); } else { result = CmsJspResourceWrapper.wrap(cms, convertRawResource(cms, input)); } return result; }
[ "Returns a resource wrapper created from the input.\n\nThe wrapped result of {@link #convertRawResource(CmsObject, Object)} is returned.\n\n@param cms the current OpenCms user context\n@param input the input to create a resource from\n\n@return a resource wrapper created from the given Object\n\n@throws CmsException in case of errors accessing the OpenCms VFS for reading the resource" ]
[ "Main method of VPRendererAdapter. This method has the responsibility of update the\nRendererBuilder values and create or recycle a new Renderer. Once the renderer has been\nobtained the RendereBuilder will call the render method in the renderer and will return the\nRenderer root view to the ViewPager.\n\nIf RendererBuilder returns a null Renderer this method will throw a\nNullRendererBuiltException.\n\n@param parent The containing View in which the page will be shown.\n@param position to render.\n@return view rendered.", "Convert the Values using the FieldConversion.sqlToJava\n@param fcs\n@param values", "The only properties added to a relationship are the columns representing the index of the association.", "Clears the collection and uses the iterator to run through the dao and delete all of the items in the collection\nfrom the associated database table. This is different from removing all of the elements in the table since this\niterator is across just one item's foreign objects.", "Search for interesting photos using the Flickr Interestingness algorithm.\n\n@param params\nAny search parameters\n@param perPage\nNumber of items per page\n@param page\nThe page to start on\n@return A PhotoList\n@throws FlickrException", "Initialize. create the httpClientStore, tcpClientStore", "for testing purpose", "poll the response queue for response\n\n@param timeout timeout amount\n@param timeUnit timeUnit of timeout\n@return same result of BlockQueue.poll(long, TimeUnit)\n@throws InterruptedException", "Tell a device to turn sync on or off.\n\n@param deviceNumber the device whose sync state is to be set\n@param synced {@code} true if sync should be turned on, else it will be turned off\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network" ]
private PlayState1 findPlayState1() { PlayState1 result = PLAY_STATE_1_MAP.get(packetBytes[123]); if (result == null) { return PlayState1.UNKNOWN; } return result; }
[ "Determine the enum value corresponding to the first play state found in the packet.\n\n@return the proper value" ]
[ "Recursively inspects the given objects and returns a node representing their differences. Both objects\nhave be have the same type.\n\n@param working This object will be treated as the successor of the `base` object.\n@param base This object will be treated as the predecessor of the <code>working</code> object.\n@return A node representing the differences between the given objects.", "Publish the bundle resources directly.", "Generate a schedule descriptor for the given start and end date.\n\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule descriptor", "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", "Use this API to fetch aaagroup_vpnsessionpolicy_binding resources of given name .", "Log warning for the resource at the provided address and single attribute, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param message custom error message to append\n@param attribute attribute we are warning about", "Process a beat packet, potentially updating the master tempo and sending our listeners a master\nbeat notification. Does nothing if we are not active.", "Convert a query parameter to the correct object type based on the first letter of the name.\n\n@param name parameter name\n@param value parameter value\n@return parameter object as\n@throws ParseException value could not be parsed\n@throws NumberFormatException value could not be parsed", "Locates the services in the context classloader of the current thread.\n\n@param serviceType the type of the services to locate\n@param <X> the type of the service\n@return the service type loader" ]
private void writeNotes(int recordNumber, String text) throws IOException { m_buffer.setLength(0); m_buffer.append(recordNumber); m_buffer.append(m_delimiter); if (text != null) { String note = stripLineBreaks(text, MPXConstants.EOL_PLACEHOLDER_STRING); boolean quote = (note.indexOf(m_delimiter) != -1 || note.indexOf('"') != -1); int length = note.length(); char c; if (quote == true) { m_buffer.append('"'); } for (int loop = 0; loop < length; loop++) { c = note.charAt(loop); switch (c) { case '"': { m_buffer.append("\"\""); break; } default: { m_buffer.append(c); break; } } } if (quote == true) { m_buffer.append('"'); } } m_buffer.append(MPXConstants.EOL); m_writer.write(m_buffer.toString()); }
[ "Write notes.\n\n@param recordNumber record number\n@param text note text\n@throws IOException" ]
[ "Create a TableAlias for path or userAlias\n@param aTable\n@param aPath\n@param aUserAlias\n@return TableAlias", "Add a resource assignment which has been populated elsewhere.\n\n@param assignment resource assignment", "Maps a transportId to its corresponding TransportType.\n@param transportId\n@return", "Returns a valid DisplayMetrics object\n\n@param context valid context\n@return DisplayMetrics object", "Pass the activity you use the drawer in ;)\nThis is required if you want to set any values by resource\n\n@param activity\n@return", "This method reads a byte array from the input stream.\n\n@param is the input stream\n@param size number of bytes to read\n@return byte array\n@throws IOException on file read error or EOF", "Gets an iterable of all the groups in the enterprise that are starting with the given name string.\n@param api the API connection to be used when retrieving the groups.\n@param name the name prefix of the groups. If the groups need to searched by full name that has spaces,\nthen the parameter string should have been wrapped with \"\".\n@return an iterable containing info about all the groups.", "Tries to load a property file with the specified name.\n\n@param localizedName the name\n@return the resource bundle if it was loaded, otherwise the backup", "Throws an IllegalStateException when the given value is not true." ]
protected final void hardcodeValidCopyMethod(Class<?> fieldType, String fullyQualifiedMethodName, Class<?> argType) { if (argType==null || fieldType==null || fullyQualifiedMethodName==null) { throw new IllegalArgumentException("All parameters must be supplied - no nulls"); } String className = fullyQualifiedMethodName.substring(0, fullyQualifiedMethodName.lastIndexOf(".")); String methodName = fullyQualifiedMethodName.substring(fullyQualifiedMethodName.lastIndexOf(".")+1); String desc = null; try { if (MethodIs.aConstructor(methodName)) { Constructor<?> ctor = Class.forName(className).getDeclaredConstructor(argType); desc = Type.getConstructorDescriptor(ctor); } else { Method method = Class.forName(className).getMethod(methodName, argType); desc = Type.getMethodDescriptor(method); } } catch (NoSuchMethodException e) { rethrow("No such method", e); } catch (SecurityException e) { rethrow("Security error", e); } catch (ClassNotFoundException e) { rethrow("Class not found", e); } CopyMethod copyMethod = new CopyMethod(dotted(className), methodName, desc); hardcodeValidCopyMethod(fieldType, copyMethod); }
[ "Hardcode a copy method as being valid. This should be used to tell Mutability Detector about\na method which copies a collection, and when the copy can be wrapped in an immutable wrapper\nwe can consider the assignment immutable. Useful for allowing Mutability Detector to correctly\nwork with other collections frameworks such as Google Guava. Reflection is used to obtain the\nmethod's descriptor and to verify the method's existence.\n\n@param fieldType - the type of the field to which the result of the copy is assigned\n@param fullyQualifiedMethodName - the fully qualified method name\n@param argType - the type of the argument passed to the copy method\n\n@throws MutabilityAnalysisException - if the specified class or method does not exist\n@throws IllegalArgumentException - if any of the arguments are null" ]
[ "Get the PropertyDescriptor for aClass and aPropertyName", "Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value", "a specialized version of solve that avoid additional checks that are not needed.", "Build and return a foreign collection based on the field settings that matches the id argument. This can return\nnull in certain circumstances.\n\n@param parent\nThe parent object that we will set on each item in the collection.\n@param id\nThe id of the foreign object we will look for. This can be null if we are creating an empty\ncollection.", "Closes off this connection pool.", "Use this API to unset the properties of snmpoption resource.\nProperties that need to be unset are specified in args array.", "Returns the parsed story from the given text\n\n@param configuration the Configuration used to run story\n@param storyAsText the story text\n@param storyId the story Id, which will be returned as story path\n@return The parsed Story", "Determines if the queue identified by the given key is used.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key is used, false otherwise", "Launch Sample Activity residing in the same module" ]
private void loadCadidateString() { volumeUp = mGvrContext.getActivity().getResources().getString(R.string.volume_up); volumeDown = mGvrContext.getActivity().getResources().getString(R.string.volume_down); zoomIn = mGvrContext.getActivity().getResources().getString(R.string.zoom_in); zoomOut = mGvrContext.getActivity().getResources().getString(R.string.zoom_out); invertedColors = mGvrContext.getActivity().getResources().getString(R.string.inverted_colors); talkBack = mGvrContext.getActivity().getResources().getString(R.string.talk_back); disableTalkBack = mGvrContext.getActivity().getResources().getString(R.string.disable_talk_back); }
[ "Load all string recognize." ]
[ "Gets the value of the ppvItem 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 ppvItem property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetPPVItem().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link PPVItemsType.PPVItem }", "Create a new connection manager, based on an existing connection.\n\n@param connection the existing connection\n@param openHandler a connection open handler\n@return the connected manager", "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", "Given a storedefinition, constructs the xml string to be sent out in\nresponse to a \"schemata\" fetch request\n\n@param storeDefinition\n@return serialized store definition", "Factory method that builds the appropriate matcher for @match tags", "Whether this section is consistent with an EUI64 section,\nwhich means it came from an extended 8 byte address,\nand the corresponding segments in the middle match 0xff and 0xfe\n\n@param partial whether missing segments are considered a match\n@return", "Populate a Command instance with the values parsed from a command line\nIf any parser errors are detected it will throw an exception\n@param processedCommand command line\n@param mode do validation or not\n@throws CommandLineParserException any incorrectness in the parser will abort the populate", "Parses an item id\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@param siteIri\nthe siteIRI that this value refers to\n@throws IllegalArgumentException\nif the id is invalid", "Returns a string that should be used as a label for the given item. The\nmethod also ensures that each label is used for only one class. Other\nclasses with the same label will have their QID added for disambiguation.\n\n@param entityIdValue\nthe item to label\n@return the label" ]